Featured contribution (COPY)

Top  Previous  Next

Bump mapping for level geometry

 

One of the great engine features that didn't get too much attention is d3d_automaterial, which allows us (among other things) to assign materials to the level textures. This month we will examine a good looking fixed function pipeline bump mapping effect, which should run fine even on ancient cards like the GeForce2.

 

aum57_shader1

 

Ok, that was our regular wall texture. Let's see the ffp effect in action now:

 

aum57_shader2

 

Do you see the difference? It is clear that from now on, all your walls, floors and ceilings will look so much better. I have assembled a standalone demo for you; copy the \levelbump folder to your 3DGS folder, placing the levb.wad file inside your \wads folder, open test.wmp and then run the level using the main.wdl script file.

 

Here's how you can use this effect in your projects:

1) Include the levelbump.wdl file in your main script;

2) Copy the wall texture and its associated dot3 bump map in the same folder with your scripts;

3) Add only the wall texture to your wad file;

3) Open levelbump.wdl and change the name of the material (walltexture in my demo) with the name of your texture, as it appears in the wad file. If your wall texture is named (let's say) "brick.tga", when you add it to the wad file it will be named "brick", right? This should be the name of your material.

 

That's all! Don't forget to thank Matt Coles and The Master for their great contribution.