Home | Resume | Links | Tutorials | Contact

Tangent Space and Object Space Normal Maps in Zbrush 2

Zbrush 2 can quickly generate object and normal space normal maps which are used to great effect to suggest height and depth on a lower poly realtime object or character mesh.
The first classes of normal bump map, World Space and Object Space Normal Map, are characterized by their full spectrum (rainbow-colored) appearance. Both World Space and Object Space Normal Maps look identical - in fact the images can be the same. The difference is how a game engine handles them. Models displaying world space normal maps cannot be rotated from their original orientation and the vertices of the model cannot be deformed, or the shading will come out wrong. Object Space normal maps can be moved, but, like World Space normal maps, the verices of the mesh cannot deformed or the shading is wrong. An ideal usage for world space normal maps would be for buildings. Object space normals are best for things that can move, but not deform, like doors, cars, etc. From a performance standpoint, world space normal maps are the most efficient. Object space normal maps are the second-most efficient.
Object-Space Normal Map Tangent-Space Normal Map
Tangent space normal maps are easily recognized by their mostly blue appearance. Tangent space normals almost always look bluish because normals in tangent space are always considered "up" (coordinates 0, 0, 1 ), even if in world space this is not true. The normals mapped on this triangle are thus encoded, and that's the key point, relatively to ( 0, 0, 1 ). Because most normals are majorly "up", and since the vector ( 0, 0, 1 ) is colorized as blue-purple-ish, the result is a blue-purple-ish normal map. The benefits of tangent space maps are the removal of the restrictions imposed by World Space and Object Space normal maps. Tangent Space normal maps can rotate and deform, therefore they are ideal for characters or objects that need to have vertex deformation, like water or tree limbs.
There are many ways to generate normal maps in Zbrush. One way is to extract the normal map from a subdivision surface. See the tutorial "Quick Normal Maps in Zbrush 2." The images below succinctly illustrate the workflow for making normal maps from a subdivision surface in zbrush.
You can also directly "paint" a normal map directly on the scene using Zbrush's Projection Master brushes and alphas combined with the NormalRGBMat material. The resulting normal map is an object space normal map (seeing as how it is a full spectrum image), so it would make more sense to use this material for environments or any static objects. One reason you would want to work with Zbrush this way is because it enables you to quickly build up depth information and see how your normal map will actually work. You can use Zbrush's lights to also get a feel for how light will react to your normals.
1. The first thing you'll need to do is load the NormalRGBMat material into the material editor. To do this, click on the Material menu at the top of the screen and hit the "Load" button. Next, click up to the \Pixlogic\Zbrush2\Pixologic\ZBrush2\ZMaterials directory and select "NormalRGBMat."
2. Now that you have the Normal material loaded, it's time to paint. You'll probably want to resize the image to a power of 2 (512 X 512 - 1024 X 1024 - etc.). To do this, go to the Documents Menu, click on "Pro" to turn it off (it's on by default). Now you can resize the document to whatever size you need. After you enter the size in each slot ("Width" and "Height") make sure you hit enter to confirm it. Zbrush is a little tricky when resizing because even after you enter the number, it won't register with Zbrush until you confirm with an enter. Once you have successfully entered the new size, hit the "Resize" button. You'll get an alert that this is an undoable action. Throw caution to the wind and do it!
3. You'll want to fill this layer with the NormalRGBMat material. Do this by clicking the "Layer" menu and click the "Fill" button.
4. Now you can paint the scene with the Projection Master tools and alphas to create an engine-friendly normal map. To demonstrate, pick the Single Layer Brush and then pick an appropriate alpha.
5. A brief explanation of the Grid tool is in order. The grid tool can be used to create pattern shapes quickly an easily. The tool works by taking an alpha (loaded in the Alpha menu) and placing it in an array that is parameterized. By dialing up different M and S Repeat numbers and by adjusting the Scale between these numbers you can make interesting patterns.
Just click and drag. You can modify the grid in a variety of ways. Adjusting the "Zadd" or "ZSub" strength allows you to "push" or "pull" the normals out farther.
Taking this idea further, you can use the Single Layer Brush, along with the other brushes, to paint irregular surfaces, like rocky terrain very easily. Press the tilde (~) key, mouse click and hold and then moving the cursor will scroll the image so you can see how it tiles. Below is a texture that was made by resizing the document to 512 X 512 and then building up layers of depth using the Single Layer Brush set to either Zadd or Zsub and different noisy alphas. The deco brush was also used to create the valleys in the map. Using the combination of holding down the tilde (~)key and dragging with the mouse or stylus made for easy tiling.
There are two ways to get a normal map out of Zbrush 2. The first method, using the MRGBZGrabber, has been documented (see "Using the MRGBZGrabber" tutorial for the complete process). The other method is to just grab the document from the texture menu. It's a straightforward process. From the Texture menu, click the "Grab Doc" button. Zbrush 2 will take a snapshot of the canvas and put the snapshot into the active texture slot. From there simply hit the "Export" button to save the image as .PSD, .TIF or .BMP.
Tutorials Home