Today I've added -
Quote:
- New shader / code path in-engine for rendering basements
- Dynamic cube map generation
- Light map integration
- Generating tangents for basement meshes [for normal mapping]
- Load basement assets "on demand" since only 1 basement can be visible at once
I've also decided to use only one light for the basement scenes since it looks much more dramatic.
My constant playing with Light Map Maker has paid off with some much better quality light maps, in the form of 3 1024^2 textures. I'm still going to have to integrate shadows for the dynamic character/object models in the scene. I'm probably just going to go with a simple render to texture / projection setup, or maybe just render onto a single plane.
I've made good use of the D3DRS_SLOPESCALEDEPTHBIAS & D3DRS_DEPTHBIAS render states today, until now they've been rather mystical to me. They were necessary to stop the zfighting issues rendering the light maps.
I spent a few minutes playing around with an online-demo and I figured out what I had to do to get the lightmaps rendering correctly over my geometry. Yesterday I was thinking that I could just look through each vertex and determine it's match in teh lightmap mesh, comparing the normals, etc. to make sure its the same triangle/vertex...but that didn't work out too well. Just representing the lightmaps as a sepreate mesh and using the above renderstates worked out much better / cleaner.
Anyways...all this is supposed to make the scene look better but I'm finding that most basic shaders make my scenes look better ;-)
I'm happiest with this screenshot - using very basic shaders, actually just blending the light map + the model texture...
Here is a later screenshot which looks too "boring" for some reason...I think the specular highlights just remind me of Doom 3 or every other game for some reason. It makes the level geometry look a lot more basic.
Also I'm aware of the lightmapping flaw behind the radiator things...I gotta re-generate the lightmaps.
I have coded up ways to generate / save dynamic cubemaps in-game...the result of that...I've also implemented cube map reflections inside the shader, just need to modulate it via the normal map's alpha channel.
Speaking of normal mapping...A totally arbitrary normal map applied to all geometry...
I'm in the process of creating the normal maps for each texture.
OMG NIGHT VISION, reminds me of ZOMBIE MOD for half-life 2...
More screens of the new light maps...
Anther image showing what it looks like @ the lowest texture resolution...
Tommorow hopefully I'll have finished creating all the normal maps for the 'base' basement model, and I'll have finalized the in-engine code allowing players to enter their HQ's basement.
Also I want to have major progress done on the interior of the jail/prison tommorow as well.
I have 9 more basement models to create....
- Dan