Wednesday 11 May 2011

Baked lighting and Environment shadows

I decided to kill the dynamic lighting in favour of baked vertex colours. The speed improvement from this should let me keep 60fps whilst having a naturally looking lit environment. I never really needed 'dynamic' lights anyway and they didn't enhance the look of the game that much more than 2D texture lights have done. I've implemented shadow maps, which have transformed the way the world looks. Buildings and architecture pop right out of the screen now to great effect, looking more 3D than previously.


Levels are no longer designed via simply placing tiles, instead all the static geometry in a level is modelled from existing objects placed together in Blender. This means I can still use the tiles but have the flexibility to add new objects as I please. I'm also using Blender to bake in the light vertex colours and create the shadow map. I will continue to use my old editor to place triggers and game items/entities.

There are some left-over texture seams and no shadow on the player's vehicle yet (hopefully I will be able to overlay the shadow multi-texturing onto combatant ships too in the end) but quite a visual improvement nonetheless.


Some of the mesh processing needs to neaten up various things still like texture seams and shadow map texture artifacts. I'll also soon set a minimum ambient light level based on the sun diffuse light being used - as some polys not facing the light source are currently rendered in complete darkness. Finally, I could consider blending ambient occlusion in with the existing shadow map.

No comments:

Post a Comment