Home | Resume | Links | Tutorials | Contact

Painting Depth on Textures in Zbrush 2

When creating normal maps for games, it is possible, in Zbrush, to load a texture from Photoshop, Painter or another package in order to create a complementary depth map that can be used to generate a normal map.
To create the depth map for a texture, you first need to import the texture. Do this by clicking the Texture menu and pressing the "Import" button.
Browse to the file you want, click on the file and hit "Open." Note the file formats that are supported: .psd, .tif, and .bmp. Make sure your file is one of these formats or you won't be able to import it into Zbrush.
With the texture selected, click the "Crop and Fill" button. Zbrush will resize the document to the imported texture's dimensions and it will flood the document canvas with the texture.
With the texture visible, you can now begin painting depth. Pick a tool from the Tool menu. Note you can also select an alpha from the Alpha menu as well as a stroke from the Stroke menu. The combination of Tool, Alpha and Stroke work together in a brush/brushtroke way to layer depth onto the image.
Turn off MRGB and RGB if these options are on so you don't accidentally alter the color map. Make sure Zadd or Zsub is on and begin painting depth onto the texture. The depth information will be captured later as an alpha. For now, experiment with the different tools, alphas and strokes. Zadd creates more height, Zsub pushes down.
To quickly change the tool's draw size, tap the space key to bring up a mini menu. With this menu, you can increase tool size, change depth strength, change the tool, alpha and stroke. Every thing you need to alter the depth info is accessible from this mini-menu, so remember to tap Space for easy access to the menu. Keep adding more depth to the image.
The Light menu has a Light Placement preview option allowing you to move the light source in the scene around. Using this tool, you can get a preview of how your texture takes lighting. While probably not a totally accurate or reliable preview for a game engine, using this is helpful because you can get an idea if the depth you are putting into the scene is working the way you want it to. To Light Placement interface, click on the Light menu, and then click drag on the ball in the Light Placement window. Drag the light around. You'll see the scene update and change as you do this.
Continue to drag the light around as you add more depth to the scene. Move the light constantly as you work. Also, keep in mind you can offset the image in zbrush by either holding down the tilde (~) key and left-clicking while dragging your mouse or by going to Layer>Displace H or Layer>Displace V to move the image in a predictable manner. Do this to check your tiling. Keep track of how many pixels you offset the document as you'll need use these numbers to offset the image back to its original position when you are finished.
When you are satisfied with your image, return it to the starting position. Do this in the Layer menu by either entering the exact negative of the Displace V and Displace H numbers you entered previously or enter the integers needed to push it back to the original position.
To capture the depth of the scene you've been working on, click on the Tool menu and pick the MRGBZGrabber tool. Drag the MRGBZGrabber across the entire document. It will capture the depth in the scene and place it in the Alpha menu. It will also capture color information and place it in the Texture menu. You may or may not want the color snapshot, but it has been captured nonetheless. Another way to get the same result is to click on the Alpha menu and then click the "Grab Doc" button. Zbrush will then take a snapshot of just the depth information (as an alpha) and place it in the alpha menu.
You'll need to do something with this alpha, as it probably can't be used as is with a game engine. Click the Alpha Menu and hit the "Export" button.
Pick a file type, such as .PSD or as a .BMP for the alpha. This will be file you open in Photoshop. Make sure you have nvidias nvTools>NormalMapFilter installed in your Photoshop>Plug-ins>Filters folder. You'll need the NormalMapFilter to convert your image into a normal map.
In Photoshop, open the alpha (saved as either a .psd, .bmp or .tif file).
Your image is most likely a Grayscale image. You'll need to change the image to RGB else the nvTools>NormalMapFilter won't work properly. In Photoshop, go to Image>Mode>RGB to convert the image to an RGB image. Depending on what format you chose when you exported the file, it could be also be a 16-Bits-Per-Pixel. You'll want to convert it to an 8-Bits-Per-Pixel image as well. Go to Image> Mode>8-Bit and convert the image.
Now go to Filters>nvTools>NormalMapFilter and run the filter.
In the NormalMapFilter dialogue, play with the scale of the filter to increase or decrease the effect of the normal map. It takes some experimentation to get the desired effect. You can also invert the light direction using the Invert X or Invert Y radio buttons. This may or may not be applicable depending on what the engine you are working with requires.
After you run NormalMapFilter, you'll see the resultant conversion of your file to a tangent space normal map. Save the file as a .dds or .tga (or other file format if necessary).
Tutorials Home