A Day Of Lasers, Shaders and Light Maps
My day continues from where it left off on Sunday, trying to get a shader and a light map to co-exist in my real-time light mapping process while editing levels. The afternoon was spent checking and deleting emails and apart from a five minute AGK task, it was all FPSC related :)
On The Subject Of Lasers
I started the ball rolling a few days ago to add lasers to Reloaded, but was convinced by Rick that lasers don't really sit well in the middle of a modern day generic graphics set so today we dropped them, along with laser booby traps and a beefy new laser gun for the player.
Instead we are going with something similar called tracer rounds, which show the person firing the gun where their bullet went. They will provide great additional visuals during a fire fight and allow us to add extra things like sounds when the bullet just misses your head, and showing where the enemies are shooting their guns. The feature will be enabled, like in real life, with the use of 'tracer rounds' which are alternative forms of ammo you can use with your weapons.
The best news is that the system can be easily extended in the future to bring lasers back, but we will probably do that when we do a big futuristic model pack for you.
Shader Plus Light Map Equals Hell
The burning task today is to get these two elements to play nicely. I have got quite a way already, now at 4:30PM, but I am getting random crashes with no easy way to find the cause. I know it has something to do with writes into naught memory so the search continues.
The good news is though that when not crashing, I can now see my lovely rendered shader floor and the real-time light mapping textures blending nicely together and the map editor has jumped up in visual quality. A long way to go though as the shader I chose only really works on floors, and I need a universal shader that ticks all the boxes for whatever object it has to render. I have plenty source material so it should be a fun process (that is, when I can stop it crashing).
Signing Off
I am also taking the opportunity to move the DBP DLL projects over to Visual Studio 2012 as well, as and when it becomes necessary to debug and work on them. My last machine had all three Visual Studio editions on and it was a bit of a mess, so moving to a single development kit should make life simpler. I dare say VS 2012 also has some nice improvements in terms of compiler speed, optimisation of byte code and better production of Windows 8 friendly applications.
All ideas expressed in this blog are temporal and any resemblance to manifested reality are purely co-incidental. The forgoing is a casual musing from a fellow coder, not an iron clad promise of features and products - The Law
Monday, 22 April 2013
Sunday, 21 April 2013
Sunday Reloaded Marathon
In Point Of Fact
Actually, I have just started this blog and the day, and have no idea if today will turn into a Reloaded marathon, but this is my intent. I had planned to start the player control system but having used the editor to do some fun play testing, I realised there are some loose ends that need finishing off. The blueprint graphic from the old system shows through from time to time which is not helpful, the was I slice the visuals so you can see the layer you are editing chops off cursors and the level does not light completely when you load a new map.
This is enough to make the whole thing feel unfinished, and I think it makes sense to tie these off now while I am closest to the time I messed it up. Even though control systems and physics is exciting and cool to work on, the sensible course is to make the current editor as close to final as is practicable.
You might be wandering why I am not outside enjoying the sun shine? Well, the weather man said heat wave, and right on schedule, the exact opposite blessed my Sunday with rain and clouds. So no repeat BBQ and no outside wheel barrow (or barrel) work. I consider myself quite smug now that I snook off and enjoyed the sun while it was available, and will probably make it a policy to do so this summer so I don't miss any 'good days'.
2PM : Playtesting
As is my ritual, I spend 10 minutes just playing with the current state of the software to get a feel for what is blatantly bad. It is obvious the editing process has been disrupted a little and I need to 'put it right' so it feels as solid and visually crisp as ever. I have made a small list for my reference, and intend to work through it as the day unfolds.
3PM : Loading In
The old system would load the map and then 'maybe' use the last loaded light to illuminate the scene. Not ideal as the scene could be full of details that need lighting. I have added a system to create a cascade of light map updates for each light in the scene just after the level loads in, so the user only has to wait and watch as the lighting is restored. I am not going the other route of saving the light maps with each FPM file as I like the fact they are very small and interchangeable.
It's a minor thing, but when you load your level you want to see it in the proper light (pardon the pun and the classic graphics).
3:35PM : Object Cascading
Similar to above, when you draw lots of segments very fast, the light mapper can skips objects during the light mapping and so they appear unlit in the scene, which looks bad. I am adding a system which will store all objects in a list, and then use that list to feed the light mapper. This will create a trail which the real time light mapper can follow to ensure ALL objects are light mapped as you are editing.
3:45PM : Very Nice
The object cascade system works very nice, it actually ran backwards with the newest object being light mapped before the older ones, but I like this as it maintains focus on what the user is doing right now and not older stuff that might be far away from the scene of editing. I think I will keep this order. I also noticed the cursor is flickering all over the place so I will see if I can tame that and also sort out the visibility of the cube cursor (such as those used when editing segments) so they once again appear whole and unclipped so I can see the top of them. Right now my layer slicing system is cutting their tops off!
4:10PM : Performance Boost
The first implementation of the object cascade light mapper seemed to be light mapping objects around the newly added object which was not ideal as complex areas would trigger a lengthy light map step multiplied by all the objects in the area, lightmapping objects that had already been lit. By adding some extra code which removed objects from the active cascade list when they where indirectly lit by a previous lighting step, all redundant light map requests are eliminated and a faster lighting experience ensues. Hurray!
4:28PM : Not Entirely Happy
There are cases where segments which have already been light mapped in previous passes are being included in the cascade list, but there is no 'memory' to tell me these objects should not be included so take up precious time. It's not critical, but as an observer, you might be left wondering why the light mapper is going ten to the dozen without any light map changes taking place. Maybe I will come back to this if it becomes intolerable. On top of that, my latest monster test just crashed without giving me a call stack trace which is not very helpful. Will start running in debug mode in case it happens again.
4:40PM : Polish Early
I noticed when there was a quick light map step such as one segment tile the light map status bar flickered as it went from zero to one hundred in a few milliseconds. Not pretty. I have added some smoothing code which increases the alpha of the status graphic the longer it's being used, so a quick step should not show and a longer process will show the bar fading in and then fading out. Not easy either as it's very much a case of looking at the activity of the light map percentage value and working out when to bring up the alpha an when to hide the status bar altogether. Still, should be worth it when done correctly.
5:10PM : A Spot Of Lunch
I've just finished the above polished light map status bar and also removed the camera range slicer which messed up so much. After lunch I am going to see if I can go back to the idea of hiding layers of no interest during the edit process. Ideally I only need to traverse the 'massive' object group when changing layers so theoretically should be a good solution. Time and experimentation will tell...but first, food.
5:40PM : Soupee-Twist
Just finished my spot of lunch and finished watching half an hour of great comedy on Netflix. Congratulations if you can figure out what it was. Just ran Reloaded to see where I was, and the clip slicing as gone which means I need to replace it with something else. That will be my mission now..
6:00PM : Mission Aborted
The object cascade list system is not ideal. A simple segment room with two storeys and a single light seems to have a lot of objects to repeatedly light which is nuts! I think I will return to it and 'dump' the whole object list into the light mapping pass so it gets it over with in one go. It might mean less frequent light map updates, but it will eliminate the current system issue which seems to want to process objects fully 60 seconds after the last light map change was detected. Grr.
6:15PM : Label Text Moved To Status Bar
When I adjusted the size of the back-buffer for perfect 1:1 pixel quality in the test game mode, the map editors smaller window scrunched up the text. The two back buffer sizes cannot be reconciled and naturally we prefer the higher quality test game render, so I have moved ALL text from the map editor over to the status bar in the IDE. It means the editor is less cluttered and the text is also 1:1 perfect too so another win-win.
7:25PM : Three In One
In moving to the next bit which was hiding non-current layers, I realised the alpha mapping code was not working. Rather than mess about with fixed function questions, I realised that the editor will be using shaders directly in the final product so decided to skip to adding a basic universal shader to the map editor so the alpha factor functionality would once again work. It also means we're one step closer to the final editor visuals which will feature the full shader rendering, not a washed out representation as in the old engine.
8:35PM : Shaders Are Buggers
I always have a fun old time with shaders, that is, they are a royal pain in the butt sometimes. Most of the time they have errors, and just disappear, but you don't know whether they are invisible because of the shader, or invisible because they are working with alpha at zero. Grr. And don't get me started on the task of integrating the shader with the fixed functionality of the light mapped object after the real time light mapper has finished with it. So much to do that's so obvious, but so far away...
10:28M : Making Slow But Steady Progress
I have the layers separated by layer now based on the layer you are editing using the new alpha mapper on the freshly made universal shader. The new shader is based on one of Mark Blosser's creations and works out the box so I can adapt as I go. My first adoption was to allow the alpha to be overridden so the editor could fade out individual objects.
I re-introduced the light mapper and of course, boom, all alpha stuff ignored. Now I need to make sure the real time light mapper can handle shaded objects as I don't fancy making the code re-apply the shader after light mapping as it seems redundant when the back-end could do it quicker and more elegantly. That is my next port of call. I think I made the right call sorting these varied issues out and not jumping into cool physics and control systems, it's the boring stuff that really needs pinning down to ensure it's a great user experience at the edit end of the product.
Signing Off
Well it's a few minutes to midnight and I've not eaten since my spot of lunch, and right now when I drop in a large segment my lovely light mapper crashes. I probably should not have starting blending the shader and light mapper into one thing as it's a big thought to do and it was the back end of the day. Just going to stop it crashing by backtracking a little, then calling it a night. Can't abide leaving a project with a crash at the very front of it. Once I've tackled that, a spot of 'midnight dinner' and then off to beddy bye boes.
Actually, I have just started this blog and the day, and have no idea if today will turn into a Reloaded marathon, but this is my intent. I had planned to start the player control system but having used the editor to do some fun play testing, I realised there are some loose ends that need finishing off. The blueprint graphic from the old system shows through from time to time which is not helpful, the was I slice the visuals so you can see the layer you are editing chops off cursors and the level does not light completely when you load a new map.
This is enough to make the whole thing feel unfinished, and I think it makes sense to tie these off now while I am closest to the time I messed it up. Even though control systems and physics is exciting and cool to work on, the sensible course is to make the current editor as close to final as is practicable.
You might be wandering why I am not outside enjoying the sun shine? Well, the weather man said heat wave, and right on schedule, the exact opposite blessed my Sunday with rain and clouds. So no repeat BBQ and no outside wheel barrow (or barrel) work. I consider myself quite smug now that I snook off and enjoyed the sun while it was available, and will probably make it a policy to do so this summer so I don't miss any 'good days'.
2PM : Playtesting
As is my ritual, I spend 10 minutes just playing with the current state of the software to get a feel for what is blatantly bad. It is obvious the editing process has been disrupted a little and I need to 'put it right' so it feels as solid and visually crisp as ever. I have made a small list for my reference, and intend to work through it as the day unfolds.
3PM : Loading In
The old system would load the map and then 'maybe' use the last loaded light to illuminate the scene. Not ideal as the scene could be full of details that need lighting. I have added a system to create a cascade of light map updates for each light in the scene just after the level loads in, so the user only has to wait and watch as the lighting is restored. I am not going the other route of saving the light maps with each FPM file as I like the fact they are very small and interchangeable.
BEFORE
AFTER
It's a minor thing, but when you load your level you want to see it in the proper light (pardon the pun and the classic graphics).
3:35PM : Object Cascading
Similar to above, when you draw lots of segments very fast, the light mapper can skips objects during the light mapping and so they appear unlit in the scene, which looks bad. I am adding a system which will store all objects in a list, and then use that list to feed the light mapper. This will create a trail which the real time light mapper can follow to ensure ALL objects are light mapped as you are editing.
3:45PM : Very Nice
The object cascade system works very nice, it actually ran backwards with the newest object being light mapped before the older ones, but I like this as it maintains focus on what the user is doing right now and not older stuff that might be far away from the scene of editing. I think I will keep this order. I also noticed the cursor is flickering all over the place so I will see if I can tame that and also sort out the visibility of the cube cursor (such as those used when editing segments) so they once again appear whole and unclipped so I can see the top of them. Right now my layer slicing system is cutting their tops off!
4:10PM : Performance Boost
The first implementation of the object cascade light mapper seemed to be light mapping objects around the newly added object which was not ideal as complex areas would trigger a lengthy light map step multiplied by all the objects in the area, lightmapping objects that had already been lit. By adding some extra code which removed objects from the active cascade list when they where indirectly lit by a previous lighting step, all redundant light map requests are eliminated and a faster lighting experience ensues. Hurray!
4:28PM : Not Entirely Happy
There are cases where segments which have already been light mapped in previous passes are being included in the cascade list, but there is no 'memory' to tell me these objects should not be included so take up precious time. It's not critical, but as an observer, you might be left wondering why the light mapper is going ten to the dozen without any light map changes taking place. Maybe I will come back to this if it becomes intolerable. On top of that, my latest monster test just crashed without giving me a call stack trace which is not very helpful. Will start running in debug mode in case it happens again.
4:40PM : Polish Early
I noticed when there was a quick light map step such as one segment tile the light map status bar flickered as it went from zero to one hundred in a few milliseconds. Not pretty. I have added some smoothing code which increases the alpha of the status graphic the longer it's being used, so a quick step should not show and a longer process will show the bar fading in and then fading out. Not easy either as it's very much a case of looking at the activity of the light map percentage value and working out when to bring up the alpha an when to hide the status bar altogether. Still, should be worth it when done correctly.
5:10PM : A Spot Of Lunch
I've just finished the above polished light map status bar and also removed the camera range slicer which messed up so much. After lunch I am going to see if I can go back to the idea of hiding layers of no interest during the edit process. Ideally I only need to traverse the 'massive' object group when changing layers so theoretically should be a good solution. Time and experimentation will tell...but first, food.
5:40PM : Soupee-Twist
Just finished my spot of lunch and finished watching half an hour of great comedy on Netflix. Congratulations if you can figure out what it was. Just ran Reloaded to see where I was, and the clip slicing as gone which means I need to replace it with something else. That will be my mission now..
6:00PM : Mission Aborted
The object cascade list system is not ideal. A simple segment room with two storeys and a single light seems to have a lot of objects to repeatedly light which is nuts! I think I will return to it and 'dump' the whole object list into the light mapping pass so it gets it over with in one go. It might mean less frequent light map updates, but it will eliminate the current system issue which seems to want to process objects fully 60 seconds after the last light map change was detected. Grr.
6:15PM : Label Text Moved To Status Bar
When I adjusted the size of the back-buffer for perfect 1:1 pixel quality in the test game mode, the map editors smaller window scrunched up the text. The two back buffer sizes cannot be reconciled and naturally we prefer the higher quality test game render, so I have moved ALL text from the map editor over to the status bar in the IDE. It means the editor is less cluttered and the text is also 1:1 perfect too so another win-win.
7:25PM : Three In One
In moving to the next bit which was hiding non-current layers, I realised the alpha mapping code was not working. Rather than mess about with fixed function questions, I realised that the editor will be using shaders directly in the final product so decided to skip to adding a basic universal shader to the map editor so the alpha factor functionality would once again work. It also means we're one step closer to the final editor visuals which will feature the full shader rendering, not a washed out representation as in the old engine.
8:35PM : Shaders Are Buggers
I always have a fun old time with shaders, that is, they are a royal pain in the butt sometimes. Most of the time they have errors, and just disappear, but you don't know whether they are invisible because of the shader, or invisible because they are working with alpha at zero. Grr. And don't get me started on the task of integrating the shader with the fixed functionality of the light mapped object after the real time light mapper has finished with it. So much to do that's so obvious, but so far away...
10:28M : Making Slow But Steady Progress
I have the layers separated by layer now based on the layer you are editing using the new alpha mapper on the freshly made universal shader. The new shader is based on one of Mark Blosser's creations and works out the box so I can adapt as I go. My first adoption was to allow the alpha to be overridden so the editor could fade out individual objects.
I re-introduced the light mapper and of course, boom, all alpha stuff ignored. Now I need to make sure the real time light mapper can handle shaded objects as I don't fancy making the code re-apply the shader after light mapping as it seems redundant when the back-end could do it quicker and more elegantly. That is my next port of call. I think I made the right call sorting these varied issues out and not jumping into cool physics and control systems, it's the boring stuff that really needs pinning down to ensure it's a great user experience at the edit end of the product.
Signing Off
Well it's a few minutes to midnight and I've not eaten since my spot of lunch, and right now when I drop in a large segment my lovely light mapper crashes. I probably should not have starting blending the shader and light mapper into one thing as it's a big thought to do and it was the back end of the day. Just going to stop it crashing by backtracking a little, then calling it a night. Can't abide leaving a project with a crash at the very front of it. Once I've tackled that, a spot of 'midnight dinner' and then off to beddy bye boes.
Saturday, 20 April 2013
Saturday At Play
More Sunshine
Apparently we are getting sun tomorrow as well as today, which is a rare thing for us Welsh-bound souls at the moment so I'm hitting the 'outdoors' every day so far. Right now I am still recovering from a BBQ, and will probably enjoy more sunshine Sunday too!
As promised, I did find time to fire up the PC to do some extra work and once my email was cleared out a had a few gems to play with. Rather that blog about my own coding, I wanted to highlight two DBP coders who will be influencing and perhaps contributing to the Reloaded effort.
Darkest Occlusion
I have just put the finishers on a new Dark Occlusion installer update which takes the current DBP coded system over to a DLL, which means more speed and more security. I gave the demo a quick run, and boy is it fast. I was going to use the Intel Software Occluder but it's DirectX 11 and will take some untangling. The new Dark Occluder is a serious contender though, and I will be looking at it closer in the days to come:
I plan to run some tests to see how it handles object limbs, and/or large small objects which is what FPSC will throw at it when occlusion is required, but I have a feeling it will fly along very nicely in terms of performance. I gave it 10,000 objects to occlude and it sped along at over 300fps ;) Nice! If you want to learn more, check out the current version here:
http://www.thegamecreators.com/?m=view_product&id=2311
Shameless plug I know, but when your DBP projects start to get into the 'thousands of objects' territory, it's time to bring in the big guns!
Darkest Lighting
I also checked out a link from a blog comment and was impressed with what I discovered at the other end. Evolved is a name many DBP coders will recognise and respect, and he continues to dazzle with his latest Advanced Lighting demo. Check out his site and the excellent technologies on offer here: http://www.evolved-software.com/advancedlighting/advancedlighting
Right now my plan is to write my own unified shader system to combine many of the effects you would expect from Reloaded, by Evolved has produced a great module which seems to do it all. If you have to check out just one of his demos, try the 'Materials' once where you can roam about an interior brick scene. Check out the depth of field, parallax mapping, dynamic shadows and metallic surface shader. All top draw!
Signing Off
I am very careful when it comes to other coders copyright and approvals, so I won't be able to just copy their code and stick it into Reloaded. Once I have a play, and if it's a good fit, I will tentatively approach the authors to see if I can 'compliment' Reloaded with their excellent technologies. I am sold on the visuals of the Advanced Lighting and the speed of the Occluder, but like most things in coder land, many planets have to line up before things start to work.
Apparently we are getting sun tomorrow as well as today, which is a rare thing for us Welsh-bound souls at the moment so I'm hitting the 'outdoors' every day so far. Right now I am still recovering from a BBQ, and will probably enjoy more sunshine Sunday too!
As promised, I did find time to fire up the PC to do some extra work and once my email was cleared out a had a few gems to play with. Rather that blog about my own coding, I wanted to highlight two DBP coders who will be influencing and perhaps contributing to the Reloaded effort.
Darkest Occlusion
I have just put the finishers on a new Dark Occlusion installer update which takes the current DBP coded system over to a DLL, which means more speed and more security. I gave the demo a quick run, and boy is it fast. I was going to use the Intel Software Occluder but it's DirectX 11 and will take some untangling. The new Dark Occluder is a serious contender though, and I will be looking at it closer in the days to come:
I plan to run some tests to see how it handles object limbs, and/or large small objects which is what FPSC will throw at it when occlusion is required, but I have a feeling it will fly along very nicely in terms of performance. I gave it 10,000 objects to occlude and it sped along at over 300fps ;) Nice! If you want to learn more, check out the current version here:
http://www.thegamecreators.com/?m=view_product&id=2311
Shameless plug I know, but when your DBP projects start to get into the 'thousands of objects' territory, it's time to bring in the big guns!
Darkest Lighting
I also checked out a link from a blog comment and was impressed with what I discovered at the other end. Evolved is a name many DBP coders will recognise and respect, and he continues to dazzle with his latest Advanced Lighting demo. Check out his site and the excellent technologies on offer here: http://www.evolved-software.com/advancedlighting/advancedlighting
Right now my plan is to write my own unified shader system to combine many of the effects you would expect from Reloaded, by Evolved has produced a great module which seems to do it all. If you have to check out just one of his demos, try the 'Materials' once where you can roam about an interior brick scene. Check out the depth of field, parallax mapping, dynamic shadows and metallic surface shader. All top draw!
Signing Off
I am very careful when it comes to other coders copyright and approvals, so I won't be able to just copy their code and stick it into Reloaded. Once I have a play, and if it's a good fit, I will tentatively approach the authors to see if I can 'compliment' Reloaded with their excellent technologies. I am sold on the visuals of the Advanced Lighting and the speed of the Occluder, but like most things in coder land, many planets have to line up before things start to work.
Friday, 19 April 2013
Friday sun
A day outdoors
The day started normally with work then the sun started shining so I left the keyboard and picked up the wheel barrel. After a long day digging I have decided to have an early night and work over the weekend. Tune in for a rare weekend blog ;)
The day started normally with work then the sun started shining so I left the keyboard and picked up the wheel barrel. After a long day digging I have decided to have an early night and work over the weekend. Tune in for a rare weekend blog ;)
Thursday, 18 April 2013
Thursday Non-Loaded
A Day In Bits
Today was designated 'bits day' where I move other projects along that had been building up, and it has been a successful one. Got two apps free of bugs and a few preliminary versions ready for release. Currently retrieving a pre-Perceptual version of DBP from my backups to build a new FPSC V120 without the MFC dependencies :)
Reloaded News
I can report some Reloaded news from last night which saw the rest of the light mapping tweaks put in, and it hums along nicely now. I changed the text font to improve visuals but it still lets it down so I have decided to have no text in the map editor part, and allow the full screen text game to dictate the back-buffer size. This basically means higher quality test game renders.
I also took a few hours to play Borderlands 2 as well, which was a very good idea of mine. I am about to start the player control system and Borderlands 2 is a nice game to teach you about a control system. It's simple, but works. The speed of movement, jump height and timing, strafing, stop/start inertias and mouse look speeds are all nicely calibrated. My hope is to get something similar in the next week or so (the controls that is) ;)
It also teaches some great character AI as well, with some enemies just charging in, others hiding and lobbing metal objects at you and others sniping from positions almost as good as the player can find. I think it's a great game to bounce back and forth from and should improve the Reloaded offering over time.
Signing Off
It is about 6PM now and I have one more hour of 'bit duty', then going to reward myself with a huge steak with stinky cheese on top. Maybe be back this evening to play borderlands 2, or get started on the control system, or finalise any beta uploads that might be required. As it was an early start (relatively) for me, I am looking for an early night so we will see how that goes. All in all, a very productive day (and an almost empty inbox).
Today was designated 'bits day' where I move other projects along that had been building up, and it has been a successful one. Got two apps free of bugs and a few preliminary versions ready for release. Currently retrieving a pre-Perceptual version of DBP from my backups to build a new FPSC V120 without the MFC dependencies :)
Reloaded News
I can report some Reloaded news from last night which saw the rest of the light mapping tweaks put in, and it hums along nicely now. I changed the text font to improve visuals but it still lets it down so I have decided to have no text in the map editor part, and allow the full screen text game to dictate the back-buffer size. This basically means higher quality test game renders.
I also took a few hours to play Borderlands 2 as well, which was a very good idea of mine. I am about to start the player control system and Borderlands 2 is a nice game to teach you about a control system. It's simple, but works. The speed of movement, jump height and timing, strafing, stop/start inertias and mouse look speeds are all nicely calibrated. My hope is to get something similar in the next week or so (the controls that is) ;)
It also teaches some great character AI as well, with some enemies just charging in, others hiding and lobbing metal objects at you and others sniping from positions almost as good as the player can find. I think it's a great game to bounce back and forth from and should improve the Reloaded offering over time.
Signing Off
It is about 6PM now and I have one more hour of 'bit duty', then going to reward myself with a huge steak with stinky cheese on top. Maybe be back this evening to play borderlands 2, or get started on the control system, or finalise any beta uploads that might be required. As it was an early start (relatively) for me, I am looking for an early night so we will see how that goes. All in all, a very productive day (and an almost empty inbox).
Wednesday, 17 April 2013
Wednesday And Light Design
Illuminating Day
A good day today with all those little niggles being squashed one by one. The system is so nice now I almost made a video for you guys and gals. I passed it to quality control (Rick) and with a few more polish tweaks it will be ready for public consumption.
The above picture shows some of the alley graphics you saw in the original Kickstarter. What you might find quite cool is that this is a shot from the FPSC map editor. The shadows being cast are real time generated, and will move when you move the yellow posts (or if you move the light too). The combined effect of this feature is quite amazing as you start to appreciate the subtle and powerful art of lighting design!
A Run Down
Right now I can add and remove entities and segments as fast as I like, and the light-mapping keeps pace very nicely. I switched from area lights to point lights and naturally it got even faster, so much so that they could be mistaken for dynamic lights in a low poly area :) I dare say the light mapping routines can be optimised even more, and with control over quality settings while editing the whole thing could potentially zip along at a higher rate. That said, I am happy with what I have now which means I am nearly ready to move on.
I was going to add a system which chained all your changes into a list of required updates, and the light mapper could work through the list, but as I edit the scene now it seems not to be required. Not wanting to make work for myself I will skip this feature and come back to it if needed. This omission reveals itself when you might place five entities very quickly in a wide area of the map, and the middle entity might get missed as the 'latest' entity placement overwrites it. This is normally hidden as entities are usually placed close together when editing, and the next entity is already cued up ready as the present one is being light mapped, so it usually gets hidden well.
Another optimisation I had was to refine the way the light mapper detects exactly which objects need lighting as right now it is a rather crude distance calculation. A better way would be to check for objects clipping the light frustum volume from the point light to the object being placed (thereby objects within the shadow cast by the newly placed object need updating). Again, this is an optimisation I can call on if I need more speed in this feature later on.
Going to go through the usual steps of checking for stability, memory leaks and of course restoring editing to the same functional level as the classic engine. Right now all this happens on one layer. There is no longer alpha mapping and slicing of the edited level so I need to reintroduce a new system to cope with that. For some reason alpha mapping is not working with the new cloned objects so that needs looking at. Once I can step up and down the layers, and edit as before, I will be happy to move on.
Signing Off
I will be moving onto player controls after real time light mapping, which will be a lot of fun. Right now the mouse has a limited mouse look capability as I use keyboard and mouse sharing technology, which means when I move to the left of the screen I switch to another PC. Not good if you are mouse looking in the test game. Once I solve that, I can bring in the old control system from the classic engine and make any improvements required. One comment from a previous blog used the word 'fluid' and I think that sums up the goal perfectly. You really need to feel the mouse is an extension of your hand, and that sliding around the level feels responsive and slick. We have the frame rate, we just need the subtle art of inertia tweaking and speed control. I will probably need some mouse sensitivity settings too, as everyone's mouse is different!
A good day today with all those little niggles being squashed one by one. The system is so nice now I almost made a video for you guys and gals. I passed it to quality control (Rick) and with a few more polish tweaks it will be ready for public consumption.
The above picture shows some of the alley graphics you saw in the original Kickstarter. What you might find quite cool is that this is a shot from the FPSC map editor. The shadows being cast are real time generated, and will move when you move the yellow posts (or if you move the light too). The combined effect of this feature is quite amazing as you start to appreciate the subtle and powerful art of lighting design!
A Run Down
Right now I can add and remove entities and segments as fast as I like, and the light-mapping keeps pace very nicely. I switched from area lights to point lights and naturally it got even faster, so much so that they could be mistaken for dynamic lights in a low poly area :) I dare say the light mapping routines can be optimised even more, and with control over quality settings while editing the whole thing could potentially zip along at a higher rate. That said, I am happy with what I have now which means I am nearly ready to move on.
I was going to add a system which chained all your changes into a list of required updates, and the light mapper could work through the list, but as I edit the scene now it seems not to be required. Not wanting to make work for myself I will skip this feature and come back to it if needed. This omission reveals itself when you might place five entities very quickly in a wide area of the map, and the middle entity might get missed as the 'latest' entity placement overwrites it. This is normally hidden as entities are usually placed close together when editing, and the next entity is already cued up ready as the present one is being light mapped, so it usually gets hidden well.
Another optimisation I had was to refine the way the light mapper detects exactly which objects need lighting as right now it is a rather crude distance calculation. A better way would be to check for objects clipping the light frustum volume from the point light to the object being placed (thereby objects within the shadow cast by the newly placed object need updating). Again, this is an optimisation I can call on if I need more speed in this feature later on.
Going to go through the usual steps of checking for stability, memory leaks and of course restoring editing to the same functional level as the classic engine. Right now all this happens on one layer. There is no longer alpha mapping and slicing of the edited level so I need to reintroduce a new system to cope with that. For some reason alpha mapping is not working with the new cloned objects so that needs looking at. Once I can step up and down the layers, and edit as before, I will be happy to move on.
Signing Off
I will be moving onto player controls after real time light mapping, which will be a lot of fun. Right now the mouse has a limited mouse look capability as I use keyboard and mouse sharing technology, which means when I move to the left of the screen I switch to another PC. Not good if you are mouse looking in the test game. Once I solve that, I can bring in the old control system from the classic engine and make any improvements required. One comment from a previous blog used the word 'fluid' and I think that sums up the goal perfectly. You really need to feel the mouse is an extension of your hand, and that sliding around the level feels responsive and slick. We have the frame rate, we just need the subtle art of inertia tweaking and speed control. I will probably need some mouse sensitivity settings too, as everyone's mouse is different!
Tuesday, 16 April 2013
Tuesday Cave Dwelling
The Mound Rises
Since the fateful decision was made to go into official obsession mode over Reloaded, it's been a blast. That said, it is also apparent that small jobs that would otherwise have been done as a matter of course are now piling up nicely in a mound of todo's. Some of them actually quite substantial product releases too :)
Rather than revert to the old ways, I have decided to block book Thursday to do all those tasks and get the inbox clear and all Lee related matters resolved. Some developers can happily bounce between a few different projects, but I find the going quite slow when I do that. There is a certain amount of re-acquainting with the subject matter before you can get into a rhythm and then of course you change records again. At least confining all the potential distractions to one day caps each end and contains the matter.
Reloaded Progress So Far
I now have segments, overlays, entities and lights being added and removed using the new object system and the real time light mapping adjusting the map in the background without slowing down proceedings. A great result for what was simply a theory a few months ago.
I also solved a few crash issues caused by the light mapper lighting objects in the background, which where then deleted by me as it was happening, meaning it would be using data that had been deleted elsewhere. This is a common problem when writing multi-core software and something I should be on my guard for. Now I simply hide the objects until the process is complete and the threads finished, and then I can delete them safely.
Right now I am battling with deleting lights and having that event trigger more lighting in the background. Once I have the full gamut of adding and deletion when editing sorted, and hiding the markers in the main test mode, I should be ready to move on a little.
Small But Vital Tweak
One little change I made while playing with entity placement was for the cursor to remember the actual position of the entity before you attach it to your mouse cursor. This way, when you click to drag an entity it no longer jumps position to centre on the mouse pointer and instead stays put. This means micro changes can be made using the top down view without the frustration of constantly having to re-position every entity you lift off the map. It's a small change, but really improves the editing process.
Signing Off
It's 4PM now so a few more hours of lovely toil and then we'll be further along. The next thing I want to do is a good player control system so I can move, strafe, jump, mouse look and manouver like a good 'un. Taking inspiration from a few of the FPS games I have installed will help in this, and before I add bullet physics I want to have a basic player control system in place so I can see how the physics affects it once implemented. The physics will be an exciting chunk of work, but I want to completely finish the light mapping stuff so I don't have to come back in a months time to fix things. Better do it now while it is fresh in my mind.
Since the fateful decision was made to go into official obsession mode over Reloaded, it's been a blast. That said, it is also apparent that small jobs that would otherwise have been done as a matter of course are now piling up nicely in a mound of todo's. Some of them actually quite substantial product releases too :)
Rather than revert to the old ways, I have decided to block book Thursday to do all those tasks and get the inbox clear and all Lee related matters resolved. Some developers can happily bounce between a few different projects, but I find the going quite slow when I do that. There is a certain amount of re-acquainting with the subject matter before you can get into a rhythm and then of course you change records again. At least confining all the potential distractions to one day caps each end and contains the matter.
Reloaded Progress So Far
I now have segments, overlays, entities and lights being added and removed using the new object system and the real time light mapping adjusting the map in the background without slowing down proceedings. A great result for what was simply a theory a few months ago.
I also solved a few crash issues caused by the light mapper lighting objects in the background, which where then deleted by me as it was happening, meaning it would be using data that had been deleted elsewhere. This is a common problem when writing multi-core software and something I should be on my guard for. Now I simply hide the objects until the process is complete and the threads finished, and then I can delete them safely.
Right now I am battling with deleting lights and having that event trigger more lighting in the background. Once I have the full gamut of adding and deletion when editing sorted, and hiding the markers in the main test mode, I should be ready to move on a little.
Small But Vital Tweak
One little change I made while playing with entity placement was for the cursor to remember the actual position of the entity before you attach it to your mouse cursor. This way, when you click to drag an entity it no longer jumps position to centre on the mouse pointer and instead stays put. This means micro changes can be made using the top down view without the frustration of constantly having to re-position every entity you lift off the map. It's a small change, but really improves the editing process.
Signing Off
It's 4PM now so a few more hours of lovely toil and then we'll be further along. The next thing I want to do is a good player control system so I can move, strafe, jump, mouse look and manouver like a good 'un. Taking inspiration from a few of the FPS games I have installed will help in this, and before I add bullet physics I want to have a basic player control system in place so I can see how the physics affects it once implemented. The physics will be an exciting chunk of work, but I want to completely finish the light mapping stuff so I don't have to come back in a months time to fix things. Better do it now while it is fresh in my mind.
Subscribe to:
Posts (Atom)



