Importing ZBrush Normal Maps
A normal map applies the surface normal values of a high-resolution polygon surface to a low-resolution variation of the same surface; in doing so, the low-resolution surface picks up the surface detail of the high-resolution surface. A bump map, although related, perturbs the normals of a surface so that the surface appears rough or bumpy. A bump map is not dependent on higher-resolution surfaces and can be generated from any bitmap. Neither normal maps nor bump maps are able to displace the edge of a surface. (A normal is a vector that is perpendicular to a surface face that helps determine how dark or light the face should render.) Normal maps have two advantages over bump maps:
- Bump maps store intensity values that represent the relative height of a pixel from the view of the camera. Normal maps store the direction of high-resolution surface normals relative to low-resolution surface normals. Thus, while a bump mapped surface renders a pixel as if it's displaced along a line drawn from the current surface normal, a normal mapped surface renders a pixel displaced in any number of different directions that are not dependent on the current surface normal. Ultimately, this allows normal maps to be more accurate and potentially better when rendering high peaks, deep valleys, and sharp corners.
- Normal maps are not dependent on specific world units and thereby travel more easily between different 3D programs.
You can import normal maps from Pixologic ZBrush into Maya with a few specialized steps:
1. Export an 8-bit BMP, TIFF, or PSD normal map from ZBrush. The ZMapper plug-in, supplied by Pixologic, streamlines the process. The basic steps require that you set the model to its lowest possible subdivision setting, start the ZMapper plug-in, click the Tangent Space N.Map button, switch to the Normal & Cavity Map tab, and click the Create Normal Map button. Once the normal map is created, you can export it from the Texture palette by choosing the Export button. To create the normal map, ZMapper compares the low-resolution version of a model to the high-resolution, subdivided version through the normal mapping process. ZBrush also provides the option to convert a bump map to a normal map. For more information, visit www.zbrush.info.
(Left) A tangent-space normal map exported from ZBrush. (Right) A matching low-resolution polygon model imported into Maya. Normal map and model courtesy of Justin Patrick.
- Export a low-resolution version of the model to which the normal map belongs. ZBrush gives you the option to save an OBJ file by choosing Export from the Tool palette. An OBJ file stores UV texture space information, which is needed by the normal map.
- In Maya, create a new scene. Import the low-resolution OBJ. If the model is faceted, switch to the Polygons menu set and choose Normals ^ Soften Edge. At this point, it is not necessary to increase the polygon resolution.
- Open the Hypershade window. Create a new Blinn material and assign it to the model. Open the Blinn's Attribute Editor tab. Click the map button beside the Bump Mapping attribute. Click the File button in the Create Render Node window. A new bump2d1 node is loaded into the Attribute Editor. Change Use As to Tangent Space Normals.
- Switch to the filel node Attribute Editor tab. Load the normal map by clicking the file browse button beside the Image Name attribute. Render a test. The normal map bumps the surface. If the normal map appears upside down, open the place2dTexture1 node in the Attribute Editor and change RepeatUV to 1, -1. Render another test. If the normal map appears to be inverted (for instance, pushing out instead of in), change the Bump Depth attribute of the bump2d1 node to a negative number. If the normal map appears too strong, choose the Bump Depth value closer to 0.
The Maya Software renderer produces a fairly strong bumping effect with a normal map. The mental ray renderer, in comparison, smooths out the bump effect, making it appear less harsh.
- (Left) Normal map rendered with Maya Software. (Right) Normal Map rendered with mental ray.
If you'd like to smooth out the low-resolution geometry and improve the overall quality of the normal map, you can choose one of two approaches:
- Select the model and choose Mesh ^ Smooth. This adds additional divisions to the polygon mesh. The quality of the render improves with both the Maya Software and mental ray renderers.
- Select the model and choose Window ^ Rendering Editors ^ mental ray ^ Approximation Editor. In the Approximation Editor window, click the Create button beside the Subdivision Approx. attribute. A mentalraySubdivApprox1 node is created and loaded into the Attribute Editor. Change Approx Method to Spatial. In the Render Settings window, switch Render Using to mental ray. Render a test. To increase the quality, gradually raise the Min Subdivisions and Max Subdivisions attributes, found in the mentalraySubdivApprox1 Attribute Editor tab. This process is similar to the one required for ZBrush displacement maps (see Chapter 6).
Some animators prefer to create the low-resolution model in Maya. This allows them to prepare the UV texture space in Maya. The low-resolution model is then imported into ZBrush, subdivided, and detailed. A normal map is then exported from ZBrush without the need to export the geometry.
Post a comment