D3 Normal Map Tutorial

On this page, you can find out how to generate and apply normal textures using D3 Shaders, in four easy steps.

You should have two objects handy to work on: the low_res object to which the normal map will be applied, and high_res which will serve as a source for our normal map. In this tutorial, I used two basic character models that come with XSI, both available from the Get->Model menu. The two objects should have roughly matching geometry for the mapping to work properly. I had to modify the low_res object slightly to fit. Note that it is not required that one object is contained within the other. Their surfaces should be close together, and are allowed to intersect. The low_res object must have texture coordinates applied. The texture UVs cannot overlap - that's because we will be using RenderMap. This is not a problem, though, as XSI provides an automatic way to map a polygon mesh to unique UV coordinates.

STEP 1:

Apply Unique UVs texture projection to the low_res object.

STEP 2:

Apply d3_normalmap_gen shader to the low_res object, add the high_res object to the object instances list, and set up the texture projection to use the unique UVs created in previous step.

NOTE: Currently, the shader uses the first object from instance list only.

Now, you can draw a render region to check if normal map generator works as it is supposed to. You should see a bluish messy texture like in the image below. That's proper normal map data, believe me!

STEP 3:

Apply RenderMap to the low_res object, configure it to use the same texture projection as the normal map generator. Finally, generate the map.

STEP 4:

We are done with generating the normal map, time to apply it.

Select the low_res object, apply a new material to it, and open the Render Tree. Get d3_normalmap node, and connect it to the Bump Map input in the material. Load in the normal map that has been generated in step 3, and select the same texture projection that has been used in previous steps.

 

Finally, draw a render region and see the results. If you did everything properly, and an unexpected bug didn't pop out in D3 shaders...

That's it! Have fun!

E-mail me with comments etc. at <bartekd /at/ o2 /dot/ pl>

© Copyright 2003, Bartek Dabkowski.