|Top Previous Next|
Cubic environment mapping
This time I have put up a demo that shows a simple fixed function effect in action; the object that has the "cubic_map" action attach to it will reflect the environment (the skycube1+6.tga file from my demo). The good news is that this effect will run even on ancient video cards, like the GeForce2, and can be used for a variety of models: ammo packs, weapons, shiny cars, space ships, tanks, and so on. My demo shows only 2 objects, but the possibilities are endless.
You can see that the red Cola vending machine is reflecting the background mountains; if you'd rather have metallic reflections in your game, simply replace skycube1+6.tga with a bumpy, metallic-looking tga file.
Here's how you can use this effect in your projects:
1) Copy cubicenvmap.wdl and skycube1+6.tga inside your game folder;
2) Include cubicenvmap.wdl in your main script;
3) Place one or several models in your level and attach it / them the action named cubic_map. That's all!