Thursday 28 August 2014

Baking In The Engine Room

Freshly recovered from fighting yesterday's flames, I am back, big as life and twice as ugly! Spent the first few hours sorting out some character ragdoll and waste twist issues, emails and other small touches, but spent most of the day working on the Pre-Bake Ambient Occlusion code (finally).


Here is the present HIGHEST shader with everything ramped up high and no real-time shadows present, to give you an idea of the raw clay my pre-bake is working with.  After applying my new lightmapping process, we get this:


As you can see, because we used a simpler shader with the light mapping texture, we have doubled the render frame rate, and the ambient scatter and directional light shadows bring out the depth of the scene.  I will be introducing stuff back into the shader such as bump mapping, specular and other touches but our watch word for this work is performance which retaining visual quality, so hopefully we can strike a good balance with this technique.


In other news, new art is being formed for a more interesting set of modern day scenes, including lots and LOTS of concrete. As ambient occlusion on terrain will take some time, I figured I would get some entity floor down so we can see nice ambient scatter on the ground. It turns out these extra pieces will also make for some great building blocks when creating game levels too!

Once the pre-baker is integrated within Standalone Export (and perhaps even Test Game) and seamlessly working, I will switch my focus over to some serious performance work and see if I can reduce the overdraw currently hammering graphics rendering performance. This technique above should allow me to make some savings inside the shader, and other rendering processes overall, and get your FPS back to a high level.

Finally, for those users moving on to pastures and Engines new, the best of luck with your future projects. Also remember, you have life-time updates to this technology you helped create, and you are welcome back to check our progress any time!  I can guarantee that performance and visual quality will improve and our final release will be an awesome game creator!

19 comments:

  1. Now THAT is more like it. I won't say the visuals are perfect now, but from that one shot they match at least commercial products of the last four years. Wonderful work Lee. (AO does an awful lot for visual quality.)

    ReplyDelete
  2. Gets better with every blog i read,progress is a lot faster than i thought it would be also.Well done team.

    ReplyDelete
  3. Now that is more like what we expect, great work on the pre bake, the ao is not that convincing, i do hope that we can tweak the ao? Anyways lookin forward to it, well done.

    ReplyDelete
  4. Looks great. I know devs hate giving dates but how far off do you think a new playable demo is? I look forward to seeing the improvements in action.

    ReplyDelete
  5. This does look alot better! if you can get the performance to match that then we are on to a winner.

    ReplyDelete
  6. I like the occlusion/bake shots.

    However, my personal opinion is that the shadows in the crevices are a bit too dark (although I appreciate you're trying to show them off). I think they should be a bit more blurred/soft and a bit less intense.

    ReplyDelete
  7. Looking good. This should improve speed quite a bit if only dynamic entities are to be shadowed in real time. Obviously the option to use real time or baked would be the best choice in the long term, for when day night cycles become more useful (unless they have already, but not seen anyway to move the sun in script as yet, just the config). Thinking about that, I wonder if it is possible to create a bake that can completely replace dynamic shadows for static entites, but still work correctly for sun position. Several keyframes to be baked, and tweened between? Possibly a little memory intensive, I'm not sure if you could load in a saved file on the fly so well at the moment, or indeed if it would be a total change in how it is currently being handled.
    The graphics are coming along nicely imo, and if you can get speed back up to something like decent we will all be having a lot more fun with our creations. Shadows are one of the culprits for slowdown early on, so hopefully this will go some way to improving things.

    ReplyDelete
  8. OMG the ambient occlusion lighting looks SO much better than before. Once bump mapping and specular highlights have been added back in this will be the visual quality Reloaded needed to achieve, especially with the new terrain texture fixes.

    The next move should be to have all static objects use the ambient occlusion pre bake then only have dynamic objects casting dynamic shadows as a 2nd stage in the rendering process. This will give the balance between awesome visuals and performance.

    Will there be any options to determine the number of samples and shadow resolution so we do a kind of quick pre bake in test game to give an approximation of how the scene will look and then a production quality bake for standalone games?

    Also is this system going to be added for all static lights so we can finally use indoor lighting etc? We've been looking at terrains for about 18 months now and I would like to start seeing what Reloaded can do for indoor environments.

    I personally think Lee should work exclusively on graphics and performance and let the other people in the team do all of the gameplay code. Graphics and performance are what the engine is really going to live or die by.

    ReplyDelete
  9. I like how this is coming along.

    ReplyDelete
  10. The shadow mapping looks great! Is it safe to assume that once bump mapping, specular highlighting and such get fully integrated with this technique, we may achieve results similar to that shown in the Kickstarter teaser (https://www.kickstarter.com/projects/tgc/fps-creator-reloaded)? Because that looked really excellent.

    ReplyDelete
  11. screen shot 2 is awesome in comparison to screen shot 1.. much much better :)..
    now if highest settings got 200-250fps this would be great :).
    and if the engine could hold at 60-100fps on a well sized and populated map all the better.

    ReplyDelete
  12. Can I just applaud you Lee. Those visuals are incredible! I cant wait to see them integrated into the main engine. Seriously, we will have scenes 10x better

    ReplyDelete
  13. Wait just one second... That's before bump mapping and specular map!! I can now really see why you like your artist so much. That defuse map is amazing!! Anyway I love the shader improvements and the fact that it improves performance as well...

    ReplyDelete
  14. Yes ! this is what I've been waiting for, visuals look great ! don't look washed out like in the first image. Can't wait to have a play :D

    Nice one Lee.

    ReplyDelete
  15. I really like the visual improvements and hope that the increased frame rate will hold once all the shader elements are put back in.

    ReplyDelete
  16. What's all this about getting flamed? What am I missing?

    ReplyDelete
  17. Definitely impressive visuals there! Love it!

    Well, the AO is a bit heavy in that second shot... makes it look like it's got a cartoon shader applied. Easy fix, though, just turn down the AO :)

    ReplyDelete
  18. Cool to see you're puttin' in the oven! ;)

    ReplyDelete