Featured contribution

Top  Previous  Next

Normal map generator

 

This month we've got a great contribution from Torsten Simon: a program that generates a normal map bitmap, as well as the code for a normal map shader. The program can export c-script and lite-C code, so both A6 and A7 users will be happy, provided that they have a VS / PS 2.0 video card.

 

Run the installation kit that is included in this month's downloadable archive, and then start the program. Click the "Select your texture:" field to load the desired texture.

 

aum67_exq1

 

Now drag the "Select the strange of the normal map" slider, which sets the complexity of the normal map bitmap.

 

aum67_exq2

 

That's pretty much it! Click and rotate the two windows at the bottom to see how the normal map and the color + normal map (the one that interests us) work. You can now export the normal map bitmap or the code to c-script / lite-C. As an alternative, you can export a faked texture (a baked texture). Let's see what happens when we press this button.

 

aum67_exq3

 

You can export the baked texture and use it in your levels as it is, without needing any lighting or shaders. The only drawback is the fact that you'll use more video memory, but this isn't an issue with today's (and even yesterday's) video cards.

 

The exported code is well commented, so you shouldn't have any problems integrating it into your own projects; just use the original texture (the color map) for the first skin of the model and the exported normal map (the one from the upper right window) for the second skin of the model. Finally, include the scripts and attach "action Example_action" to your model - that's all!

 

Don't forget to thank Matt_Aufderheide, Bloodline, William, xXxGuitar511, who have put together this great normal map shader.