Wednesday, 20 October 2010

Static reflections or cubmapping

I was looking at the problem of glass again, reflections for cockpit instruments and improving the canopy and TADS optics. FSX manages to do so much with so little (a small 128x128 DDS) for shiny metal parts, such as chrome props it was time to look at adding cube mapping again.

I know this has been added to Leadwerks 2.40 but the corona problem doesn't seem to be fixed yet. Retro-fitting cube-maps to 2.31 is an easy task and the river mesh material was updated (we don't use the single height infinite plane as it doesn't work with real-world topography). As water goes it's not fancy, real-time reflection and surface animation for high-speed machines during the polish end-phase. River surface cube-mapping matches the environment lighting and thus provides a simple and economic effect. There's only one river that runs east-west.

Shiny chrome parts and subtle glass reflections should be trivial to add (when I get the alpha component sorted out).


Reflection base layer
Composite reflection and diffuse
Working a little more on the glass shader for the canopy, they need to have transparency and their diffuse layers blended together but I got rid of some problems with normals at certain light positions for the base reflection layer.

* update 2 *

Tummy flu today. Children do love to bring things home from school. Sitting in bed and working out how to add maps to the moving map display (and by extension the camp mission editor) Josh at Leadwerks was kind to provide insight into how his engines terrain editor created the composite view which was very nice of him.

Didn't take long to implement and have the new TSD class in-game render the loaded map ready to use as an underlay for symbology. It would be nice to switch to sat images or aviation maps but those things need licensing. What I'll do is leave the option for users to add their own maps as layers.

Theater map, sans objects, symbology and veg atm.
Major features are the mountain passes, the river running east/west where the main green zone runs.


  1. Apache looks really great with those effects. Looking forward to see it in motion. Great job. What about Your comp?

  2. Awaiting arrival of parts, an i7 foxconn which will do the job nicely.

    Some 3d engines have this sort of thing built in and was only a recent addition to LE, but I like being able to add custom effects like this. The original 3DFX mode in LB2 had this shiny bubble canopy effect which it's pretty close to. I think I need to add a mask layer somewhere.

    The other thing I'm working on is the moving map stuff for the TSD. I'm forever delaying moving on to weapons, not sure why that is.

    Got stomach flu atm so feeling pretty yuck, it's fun to sit in bed and tinker with shaders though. And I've settled on mission file format for multiplayer. I anticipate rapid progress when that is added.

    Thanks for reading.

  3. I want i7 too. :-) All right, so get well and I cant wait for next updates. WEAPON UPDATES. :-)

    Enjoy weekend if possible.