ZBrush To Maya 32-Bit Displacement Guide

Scott Spencer November 10, 2005

© 2005 Pixologic, Inc. All rights reserved.

Pixologic and the Pixologic logo, and ZBrush and the ZBrush logo, are registered trademarks of Pixologic, Inc. Photoshop is a registered trademark of Adobe Systems, Inc. Maya is a registered trademark of Alias, Inc. All other trademarks are the property of their respective owners. Please mail comments or suggestions about this document to doc@pixologic.com.

1. 2.

INTRODUCTION ....................................................................................................................................... 3 MAYA MODEL PREP............................................................................................................................... 3 2.1. MODEL REQUIREMENTS FOR ZBRUSH .................................................................................................. 4 2.1.1. Fixing Overlapping UVs ............................................................................................................... 4 2.1.2. Cleaning the Mesh Topology........................................................................................................ 6 2.2. EXPORTING FROM MAYA ....................................................................................................................... 6

3.

SCULPTING IN ZBRUSH ........................................................................................................................ 7 3.1. 3.2. UV REGIONS AND POLYGROUPS ......................................................................................................... 10 FINAL UV ADJUSTMENTS AND VERTEX O RDER ................................................................................ 12

4.

DISPLACEMENT MAPS AND THE ZBRUSH ALPHA DISPLACEMENT EXPORTER ....... 13 4.1. GENERATING A DISPLACEMENT MAP ................................................................................................. 14 4.1.1. Creating a comparison Image to check your Maya Renders ................................................... 17

5.

BACK TO MAYA ..................................................................................................................................... 19 5.1. MAYA SETUP FOR RENDERING ............................................................................................................ 19 5.2. CREATE .MAP FILES ............................................................................................................................. 21 5.3. RENDERING WITH A SINGLE MAP ........................................................................................................ 21 5.3.1. Lighting and Test renders ........................................................................................................... 24

6.

MULTIPLE DISPLACEMENT MAPS................................................................................................. 27 6.1. 6.2. 6.3. SETTING UP UV REGIONS IN MAYA .................................................................................................... 27 MAKING THE DISPLACEMENT MAPS IN ZBRUSH ................................................................................ 29 APPLYING MULTIPLE DISPLACEMENT MAPS IN MAYA...................................................................... 30 USING THE BUMP VIEWER MATERIAL. ............................................................................................... 32 APPLYING BUMP MAPS IN MAYA ......................................................................................................... 34 CAVITY MAPS AND THE DIFFUSE CHANNEL ....................................................................................... 35

7.

BUMP AND DIFFUSE MAPS ................................................................................................................ 32 7.1. 7.2. 7.3.

2

1. Introduction
Welcome to the ZPipeline ZBrush to Maya guide. In this manual Scott Spencer will guide your through a process of exporting your sculpt in ZBrush, for use in Maya with Mental Ray. Scott illustrates the processes he uses to work seamlessly between the two applications. This guide will focus on 32-bit displacement maps which enable real world displacement (no arbitrary scaling factors necessary) and produce the best possible results in achieving the look of your original ZBrush model.

2. Maya Model Prep
If your model started as a mesh in Maya, begin by loading your model in the Maya workspace. We will need to export the geometry as a generic 3D format that ZBrush can read. Maya will export OBJ files for this purpose. The OBJ exporter is a plug-in which must be loaded. The mental Ray renderer is also a plug-in we will load at this stage so it will be available when needed. Figure 1. Model Loaded Into Maya

To load the object exporter and the Mental Ray renderer go to Window>Settings and Preferences> Plug-in Manager. This will load the Plug-in Manager window as seen below. The OBJ plug-in is called objExport.mll and the Mental Ray plug-in is called

3

Overlapping UVs will cause unexpected crashes when you are extracting your displacement map and they are easy to miss. Figure 2. Fixing Overlapping UVs It is entirely possible to use ZBrush AUV tiles or other automatic options for our mapping but as you will see having UVs laid out in Maya will open up several workflow possibilities not otherwise available. 2.1.mll. and The model should consist of just quads and tris. Click the loaded checkbox next to each to load them now. Otherwise this small overlap could cause a crash. with the tris being in well-hidden regions. Plugin Manager Window 2.1. 4 .Mayatomr. This must be corrected before the displacement map may be extracted. Here is an example of overlapping UVs in the toes of this model. Model Requirements for ZBrush There are two requirements your model and UV map must require before they can be used in ZBrush: The mesh may only have one UV set and the UVs may not overlap at all.1. you may also want to click auto load so they are available every time Maya starts.

Tools:Texture:UV Check. When performing an inspection like this in ZBrush. but cannot add or remove points or edges. Overlapping UVs in the Maya UV Editor Window It is important to note that unless you are painting color maps ZBrush is not concerned with UV coordinates until you extract the displacement map. This leaves you free to model in ZBrush then lay out UVs later or change your UV layout without losing all the work you applied to your model. the 0 to 1 range. remember you are never locked into a UV set with ZBrush if you are just sculpting. You can import your OBJ at level one with any UV layout as long as the vertex order of the mesh remains unchanged. Again. This will generate a single map in ZBrush that applies to the entire mesh. make sure to rotate your model to view all surfaces. otherwise change the geometry of the model. (Generally.Figure 3. This is discussed in section 6. Later we’ll talk about how to spread the mapping across multiple meshes by mapping out side the 0 to 1 UV coordinate range. 5 . The UV shells are all in the dark gray square. using the mesh with automatic mapping.) More information on vertex order can be found below. This will allow you to map your mesh in ZBrush for easy masking and hiding as well as allow you to maximize texture space and extract maps for each body part instead of a single map for the entire model. this means that you can move points in the level one OBJ. It is also possible at this phase to place your UVs outside the 0 to 1 texture space. Below is an acceptable layout. ZBrush also offers a tool to check for overlapping UVs under the tools palette. Clicking this button will highlight in red on your model any overlapping UVs so you know where to look for errors back in Maya.

Opening the Cleanup Menu This will open the Cleanup menu. To export go to the File>Export selection option box and select the OBJ option from the drop 6 .Figure 4. Go to the Polygons menu in the modeling subset and select the cleanup option box. hide it in an inconspicuous area. Avoid tris. poles (points where 5 edges or more meet) and n-gons (faces with more than 4 edges). Maya will select all the quads in your mesh. Click Cleanup and this will resolve any of these issues which often arise when modeling with the extrude tool. In the same cleanup menu choose the Select and Cleanup option and select Nonmanifold Geometry and Lamina faces. Exporting from Maya With the UVs and the topology ready you can now export the mesh from Maya.1. Leaving in any of the above elements may cause artifacts at render time. 2. If you set to Select and check only the 4-sided faces option box. Cleaning the Mesh Topology The mesh needs to be clean. You can then use Edit>Invert Selection to select the non-quad faces. You also want to ensure your vertices are all welded and there are no nonmanifold or lamina faces. By clean I mean it should be all quads or at least nearly all quads. UV Map with U and V Coordinates Each From 0 to 1 2. If you find you must have a tri. Cleaning up your mesh now can save a lot of headaches later on.2.2. Figure 5. All of these mesh issues can be resolved with the cleanup tool. Often I will assign another color to these faces to keep them visible and keep working with the topology until I have an all quad mesh.

If you are beginning with a mesh that was initially modeled in another application. Figure 7. Immediately go into edit mode to allow the tool to be edited as a 3D object. 7 . right click on the canvas to open the contextual menu and select the edit button or press the ‘t’ key on the keyboard or press the Edit button on the top part of the shelf. Sculpting in ZBrush Let’s begin by opening your Ztool in ZBrush. You are now ready to import the mesh into ZBrush as a Ztool. Click Export Selection and save the model. import it as an OBJ file by using the Import button under the Tool menu. Figure 6.down menu. Import Model Button In ZBrush Now. add subdivision levels. click and drag on the canvas to draw your tool. Models in ZBrush are defined as tools. and use any of ZBrush’s sculpting tools to detail your mesh. With the tool in edit mode you are now able to tumble. Export Options 3.

only the shape will have been somewhat altered (and since that shape will be closer to the final sculpted shape. you may want to generate a displacement map against the shape built in Maya. is simply to reload the Maya model after sculpting. The morph target method is generally preferred because some programs can. after sculpting. for example. On the other hand. Its geometry will be unchanged. on occasion. which should be the case so long as you have not added or removed points or edges. as the level 1 mesh of your sculpted model.ZBrush is a multi resolution editing tool. To ensure you can return to the original Maya shape in ZBrush. you can use Tool:Morph Target:StoreMT to switch back to the original shape. This will work as long as vertex ordering has not changed. ‘StoreMT’ button in the Morph Target Subpalette An alternative way of returning to the original Maya shape. after sculpting you can simply export the reshaped level 1 mesh from ZBrush and use that. After sculpting. 8 . this may well be what you want to do). which does not require storing a morph target. Simply press Tool:Morph Target:StoreMT before you start modifying your model. follow the instructions below. In some cases you may want to access your original mesh shape again. To do this. as opposed to the somewhat different level 1 shape that will result after sculpting in ZBrush. somewhat changing the shape of the original mesh. store a morph target before you begin sculpting. Figure 8. meaning that changes you make at the higher subdivision levels will telegraph back down to the lowest subdivision level.

it is worth considering using the modified level 1 shape back in Maya. It also helps to choose Material:BasicMaterial as the material used to display the object. You may also use adaptive mode to create your map but as you will see later in the guide. Having a morph target stored is also helpful as it allows you use the morph brush at subdivision level 1 (Tool:Geometry:SDiv = 1) to dial back changes to the original form. It is also important to note that using tools like the Transform:Nudge and Transform:Pinch brush will make changes to the mesh that will not necessarily translate well into the maps created when setting a DPSubPix value as opposed to those generated using Adaptive mode (these settings will be discussed in detail later). even when the model has not changed at all. and add it as a parallel blendshape to reshape the original mesh to the Level 1 form exported from ZBrush. This helps me read silhouette as well as see shadows better. If your base mesh is already rigged and cannot be changed in Maya. Some workflow tips I use in ZBrush to help the sculpting process: • Often I set the background of the document to black (using Document:Back. before generating the displacement map. export the ZBrush level 1 mesh as an OBJ import into your Maya scene. given that your sculpting presumably brought the shape of the model closer to the ideal shape. This is why. with black selected in the color palette). DPSubPix mode and the level 1 mesh is a preferable approach. in many cases when using these tools on your mesh. if your displacement map must be generated for exactly the shape of the model as it came from Maya. 9 . However. return the level 1 ZBrush model to that shape either by restoring a level 1 morph target. and turn down the Specular component of that material a bit. The little vertex changes the multi-resolution editing makes at level one makes it easier to render their effects in Maya with a DPSubPix map. In any case always apply your displacement map to the geometry you generated it from in ZBrush1. it is beneficial to use the slightly shape-modified level 1 mesh for your base in Maya as opposed to the original morph target. or by reimporting the Maya mesh for the level 1 model.alter the order in which they write model vertices on export. • 1 It’s worth repeating what we said just a bit ago. This gives a better idea of surface changes and helps call attention to errors in form that may be easier to miss in the flat fast shader.

UV Regions and Polygroups If you laid out your UVs in Maya in regions. Material Settings for a Clearer View of the Model 3. Click Tools:Polygroups:Uv Groups.Figure 9. you can turn on polymesh groups and interactively hide parts of the mesh. and then turn on frame mode by activating the Frame button in the shelf (or press Shift-F on the keyboard. or the Frame button in the Transform menu). 10 .1.

You may also group the mesh interactively in ZBrush by using the Group Visible button for use as simply a modeling and masking tool but UV groups offer better control over the groups and are easier to maintain.The areas of the mesh that are in separate UV coordinates will now have different colors assigned to them. and increased performance at higher subdivision levels (since less of the mesh needs to be drawn). You can Ctrl-Shift-Click on these areas to hide or show them. TIP: Be aware that sculpting across the seam where the model is hidden will cause artifacts in your sculpture. and then hidden by ctrl clicking on UV grouped regions 11 . allowing you easier access to tighter areas on the model. since sculpting is only applied to the visible portion of the model. Figure 10. Body fully visible. Use caution here.

3. This even includes reposing your mesh! Use the following process any time you transfer your model between Maya and ZBrush. or reordering on import. 12 . The process to transfer a model from ZBrush to Maya and back to ZBrush seamlessly is as follows. Export using Tool:Export. deleting faces. Final UV Adjustments and Vertex Order When your sculpting is complete you are now ready to export displacement maps. In ZBrush set Tool:Geometry:SDiv to 1. If this is checked Maya will not preserve the point order and your model will not reimport into your ZBrush. In Maya go to the File>Import option box and select OBJ for file type.) You may change UVs and vertex position without destroying your sculpture. 1. 3.2. Save the mesh as an OBJ file. Make sure that Create Multiple Objects is set to False on this screen. 2. (Vertex order is changed by cutting new faces. If you need to change your UVs this is the last chance to do so. The OBJ file may be moved endlessly between applications as long as the vertex order remains unchanged.

There is no reason to use 16 bits since the quality is lower than what we will achieve with 32 bits. Maya Import Options 4. provides two important extra capabilities: • When exporting 32-bit displacement maps with MD2. Make any positional or UV changes you want and export the OBJ again. so you no longer need to record an alpha depth factor. • Since we are rendering in Mental Ray for Maya. and the advantages and disadvantages of each.ZBrushCentral. 4. there are some times when you might not want to use MD2. In addition. scaling will be ‘baked into’ the exported displacement maps. we’ll use MD2 all the way. and below is a brief summary of the ways in which displacement maps may be generated in exported from ZBrush. 2 Available at www. and with the tool corresponding to your model selected. 5. MD2 allows the generation of multiple displacement maps. in a single pass. which supports 32 bit floating point displacements. In ZBrush at Tool:Geometry:SDiv = 1. Displacement Maps and the ZBrush Alpha Displacement Exporter The new Alpha Displacement Exporter2 (abbeviation: ADE) plug-in permits exporting displacement maps in many formats. The UVs will automatically update to the ones in your new OBJ file.Figure 11. go to Tool:Import and select the new OBJ file.com. And. which is part of the ADE package. 13 . However. corresponding to multiple external objects. the Multi Displacement 2 (abbreviation:MD2) plugin.

14 . you’ll always enter 2. if your pipeline can make use of 32-bit displacement maps.2 for the Alpha Gain in Maya. except that you have a wide range of options as to the precise TIFF format in which they are exported. 4. let’s go back to our knowledge of the ‘old’ way of generating displacement maps. and it also doesn’t place generated displacement maps in the alpha inventory. does require you to use the alpha depth factor. • The original method of generating displacement maps is to use the Tool:Displacement subpalette to generate the map and place it in the alpha inventory. the Tool:Displacement:Adaptive setting (on or off) also affects displacement maps generated with Multi Displacement 2. some of the controls that appear in Tool:Displacement also appear in the Multi Displacement 2 controls. Complete documentation on the ADE (and MD2) is included as a PDF in the ADE package. you could choose any of the following methods for generating your displacement maps: • Use MD2.Basically. In fact. I use Adaptive off and DpSubPix = 2. and generating maps one at a time is OK. then this is probably the simplest way to go. doesn’t permit multiple map generation in one go. but mention a few points that apply if you don’t use MD2 in your pipeline. then export that map and use it along with the alpha depth factor in your render. and (with some external programs) may require converting the exported map into another format. using MD2 is a little more complicated.1. Generating a Displacement Map First. using MD2 allows you to forget about using the alpha depth factor from ZBrush. you should set the DpSubPix level in the MD2 menu. This is very similar to the ‘classic’ method of making displacement maps (you’ll still use the controls in Tool:Displacement to generate them). On the other hand. if you don’t want to or can’t use 32-bit maps. if you don’t need those abilities. But. as we’re doing here. • Finally. For my work. In particular. As we go through the map generation. you can use the ADE without using MD2. Also. plus a number of other options. Tool:Geometry:SmoothUV will also affect the final result. If Adaptive is off. we’ll give the steps for using MD2. This lets you generate multiple displacement maps in a single pass. This doesn’t permit the higher-quality 32-bit maps. and take note of the following: Maps generated with MD2 will be affected by the various settings in Tool:Displacement. not in the Tool:Displacement menu.

MaxMapSize MapSizeAdjust DpSubPix should be set to 0. The last digit will correspond to the UV region in which the shell lies starting from left to right. Leave this as 0. is the number assigned to the first map generated. Multi Displacement 2 Plugin Here’s how to use it. InitialFileIndex is your map resolution. Leave this as 1001. our model is all done in ZBrush and we’re ready to generate a displacement map. Border thickness (overpaint in the generated map) can be left at 8. It will increment as each file is generating giving them unique names. First. 2 twice and so on. but we note how the controls apply to multiple map generation. Set this to a value above 0. 1. 15 Export Options . this will make sense later): UDim is the number of additional regions in U (left to right). Be aware that this will be memory intensive the higher it is set.OK. as shown below: Figure 12. 1 subdivides once. adjust the settings according to the following (this is to generate a single displacement map. governs the number of times the mesh is subdivided as the displacement map is generated. Set this to 4096 or 2048. Lower numbers will be faster but lower quality. The Multi Displacement 2 plugin is found under the Zplugin menu. opens the Alpha Displacement Exporter window.

to get the alpha depth factor. This brings up the ADE window. the displacement map shows up in the alpha inventory. Click the Create All button in the MD2 menu and ZBrush will ask you for a destination folder and base file name. you will need to record Alpha:Alpha Depth Factor. In these cases. shown below. or are using MD2 but aren’t using 32-bit displacement maps. it’s a bit trickier. no problem. Figure 13. Now. If you have more than one UV region. press GetMeshInfo and make sure your model has just 1 UV region. A single UV region (UVs laid out in 0 to 1) will generate only one map and only one tile will be shown when you click this button. 5. 6. If you generated a displacement map with Tool:Displacement:Create DispMap.2. and automatically export the map based on these settings as it works. You may now switch to your original morph target and generate your mesh based on subdivision level 1. or set them manually as shown above. In that case. Just to be sure. 16 . Click Close. This is covered in the PDF that comes with the ADE. Displacement Exporter Options 4. to use it later as the Alpha Gain in Maya. If you’re using MD2 to generate multiple displacement maps. you need to jump ahead to section 6 on generating multiple displacement maps :-) 3. 7. Select the R32 option and enter the DE-LBEK-EAEAEA-R32 Quick Code to set the 32-bit export options that are ideal for Maya. The number of UV regions corresponds to the number of maps that will be generated. you’ll also need to generate a single displacement map into the alpha inventory. because then the maps are written directly to disk. press the Export Options button. All done! A few notes if you’re not using MD2. so just select it and make a note of Alpha:Alpha Depth Factor.

Use Document:Export to export a TIFF file. In Light: Turn off all lights but the first one to the right of the light positioning control. Set the color to black. Position your light to give you the best view of your displacements 14. Press “t” to enter edit mode. 3. click Resize. 5. 10. then click the DiffuseCurve box to open the curve and click Reset to flatten the curve out. Set Ambient to 0. In Draw: Press Perspective and set the Distortion slider to 18. 15. 13.1. 8.1. 11. Press “w” to enter Gyro mode and activate perspective. To use ZBrush’s perspective and get a reference image that you can use to judge your Mental Ray render against. 6. 7. 1. Creating a comparison Image to check your Maya Renders When comparing your Maya renders with the ZBrush view port it is important to note that in ZBrush the diffuse channel of the material is governed by a curve. Increase the resolution to the highest level. Press “q” to drop your model to the canvas. set Ambient to 0 and Specular to 0. In Material: select the Basic Material. 17 . In Document: Set size to 2048 x 2048. To help approximate the look of your final render from Maya we can make some material adjustments in ZBrush. 9. In the options that become visible for that material in the Material palette. 16. Position the model to best reflect the detail of your model or the area of interest. 2.4. 17. Use Document:Save As to save a ZBrush document for later adjustments. I do the following. This helps create gorgeous renders and it is also not something that is the default in Maya. Press “t” to exit edit mode. Document: Press Back (makes the back of canvas black). 12. You can customize the steps to your liking. Draw your object on the canvas. In Render: Press Shadow and Best. 4. (This will be used to compare against the rendered Maya image). Press AAHalf on the shelf to the right of the canvas to anti-alias the image.

18 . and the Resulting Image. .Figure 14. ZBrush Settings for Generating the Triceratops.

or if in ZBrush you generated your maps from a stored morph target. Always be aware of vertex order and the importance of maintaining it between applications. Go to Window>Rendering Editors>Mental Ray>Approximation Editor. Turning Off Feature Displacement We now need to add a Subdivision Approximation to the mesh to tell Mental Ray how to subdivide at render time so there is enough geometry to support the displacement detail we need. use the original model you exported from Maya. Under Displacement Map in the shape node uncheck feature displacement.1.5. 19 . To do this we use the Approximation editor. If you are importing a mesh back into Maya remember to go to File>Import and select OBJ for file type. Figure 15. Make sure that Create Multiple Objects is set to false on this screen. Back to Maya 5. Maya Setup for Rendering Back in Maya re-import the ZBrush level 1 mesh. With the mesh selected press Ctrl-a to open the attribute editor.

Subdivision Approx Attribute Editor Change the Approx Method To Spatial. because Mental Ray will overrun RAM and crash if these settings are too high.01 or even 0. Figure 17. If your machine can support it. The min and max settings tell Mental Ray the minimum and maximum number of tris to subdivide your model into at render time. The settings above were selected to provide good results while not demanding too many resources.001. 20 . Mental Ray Approximation Editor With the mesh selected. The length value tells Mental Ray the longest any triangle edge can be and helps insure large protrusions and areas of high displacement render well. Be careful. click this to open the options in the attribute editor. you could set max to 6 and length to 0. The Edit button will now become active.Figure 16. These settings are flexible and work as a good start. The subdivision approximation will smooth the base mesh at render time and insure there is enough geometry to support your displacement map.100. click the Create button to the right of the Subdivision Approx setting. the lower this number is the smaller the tris in the mesh. set the min and max settings to 3 and 5 and length to 0.

map format. First.exe.2. 21 . Open Hypershade by going to Window>Rendering Editors>Hypershade. if you convert them to the Mental Ray . Select Displacement Map from the connection editor window that appears.3. Maya provides a nice utility in the Maya/bin directory called imf_info. This is especially apparent with higher resolution maps. Imf_copy –p originalfile. but with a graphic interface.map format. You can use this program at the command line to read detailed information about your displacement map.map Files Your displacement maps from ZBrush will perform far better. You will now double click the displacement node to open the attributes. 5. To check details on your maps. imf_disp. Middle-mouse-button drag a displacement node over it.tif newfilename. Rendering with a Single Map This example uses the single map we generated using MD2 with the displacement scale baked in. 5.ZBrushcentral. Mental Ray comes with a command line utility called imf_copy. Create a Lambert material by dragging it to the workspace from the left side window. Also.map This creates a map file optimized for Mental Ray and readable as 32-bit floating point. which will allow us to convert the TIF files to . Create .You may also wish to experiment with the Parametric setting. You can also find batch files to automate this process online at www. Then. and with more stability in Mental Ray. It has only one slider to control Approximation making it simpler but offering less control over the final output. faster.exe is another utility that will display maps and offer info on them.map format. Perform this on all displacement maps you plan to use.com Open a command window in the folder where your tiff files are located and use the following command line to convert to . For the sake of safety you may want to perform this on copies of your original files.

Maya Hypershade with Lambert shader and displacement node visible We need to tell the shader it will use a file for displacement. Click the checker box (to the right of the Displacement entry box) and select the file from the popup window.Figure 18. Choose File Option Window 22 . Figure 19. Displacement Node Figure 20.

23 . Attribute Editor Click the folder icon to the right of Image Name to browse to the . It should open automatically when you click the file button but if not double click the node in the hypergraph (the one pictured as black above) Figure 22. In the file node we will add our displacement map. Your shader graph will now appear like the image below: Figure 21.map file we want to use for this map. You can graph your shader by selecting Lambert and then in the Graph menu select Input and Output connections.This creates a file node in which we can place our displacement map. Network for a displacement shader.

Setting up Test Render Lighting I find it beneficial to set up a single spotlight or direction light raking across the surface of the model to help spot details that tend to be lost in flat lighting. so the alpha offset will always be (-½*alpha gain). The latter setting accounts for the fact ZBrush creates a map where 50% gray is no displacement.2. the alpha gain in Maya will be the same.For all 32-bit maps exported from ZBrush using Multi Displacement 2.1. It defaults to Gaussian and in some rare instances this may cause artifacts. Lighting and Test renders 5.2 and Alpha Offset to -1. 5.1. just set it to 2.1. try to approximate the same lighting setup in Maya as you had with the single light in ZBrush.1. Test Render Lighting 24 . you may also want to turn off filtering at the top of the screen.3. Setting Alpha Gain and Alpha Offset If you get unexpected results from your rendered surface. assuming a 32-bit map exported with MD2. Figure 24. open Color Balance on this screen and set Alpha Gain to 2. you’ll still need to set the alpha gain based on the alpha depth factor from ZBrush So. Figure 23.3. if you didn’t go through MD2. but Maya sees black as no displacement. It’s also helpful to lighten the color of your shader to be closer to the surface color of the model in your comparison image. However. If you have a comparison image from ZBrush. We need to shift that value to allow the mesh to be pushed in and pulled out by the map.

25 . If it is not already set. This includes the final triangle count. Highlighting Details Specular color set to dark gray will give us subtle highlights to accentuate finer details on the render that might otherwise be overlooked or lost.In some cases you might even want to change your shader to a Blinn and dial down the specular color to a dark gray to nearly black. choose Mental Ray from the dropdown box. Figure 25.3. Render Globals Go to Window>Rendering Editors>Render Globals to open your render globals window. Compare this to the final face count in ZBrush to determine how close to the ZBrush subdivision you are getting with you Approximation settings. which when divided by two is the face count of your subdivided model at render time.1. Open this and set Export Verbosity to Progress Messages. 5. You may adjust them as needed. The subtle specular highlight in the render helps pick out tiny details that might otherwise be overlooked and considered lost. This will tell Mental Ray to report useful information to the output window when it renders.2. Maya's Render Globals window Under the Mental Ray tab there is a rollout option called Translation. Figure 26.

3. Test Renders Open the render view and start a render.3. As you start rendering more maps you may want to research BSP optimization especially when ray tracing shadows. Displaced mesh rendered in Maya using Mental Ray.1. Figure 28. or the offset is not set to -½ of alpha gain. Memory and Performance Using the . If you are on a renderfarm with your scene folder on a remote machine from the nodes this advantage is negated. Check your output window to make sure you are getting enough geometry at render time.map file format will also increase your speed at render time because they use Mental Ray’s memory caching features.Figure 27. You may keep the image in the render view for real-time comparisons. Usually you have forgotten to set one or both. This speed increase is only apparent when rendering locally. Your initial renders will most likely not be sufficient and you will need to adjust settings in the approximation editor. Taking care with how Mental Ray handles memory will speed up renders and make for far better performance. Maya Output Window with Progress Messages is another menu of interest here. 5. If you see bloating in your render then there is a mistake with the alpha gain and offset. 26 .

Go ahead and sculpt. To display beyond just 0 to 1. You’ll still retain your original models for use when you’re done with ZBrush 3. Troubleshooting Renders and Artifacts In some cases you may see artifacts in your renders. it will process those areas individually and generate a separate displacement map for each. 27 . UV regions simply mean your UVs are outside the standard 0 to 1 range that is displayed in Maya by the gray box in the UV Texture Editor. which was not only more work. Let’s say we’re working with models A. the separate displacement maps can be applied to your original meshes back in Maya. Small spikes on UV seams can be remedied by using the SmoothUV option in ZBrush under Tool:Displacement. 6. combine those models into a single OBJ and take that into ZBrush. This value may be higher or lower as needed. 4. poles. Now you can use MD2 as previously. 6. each model would have to be processed individually in ZBrush. Then.5. A might get the space where U goes from 0 to 1 and V goes from 0 to 1. set up a single map coordinate space for all models. 2. and C. Setting up UV Regions in Maya To generate multiple maps with Multi Displacement 2.1.1. it is necessary to place your different models into different UV regions in Maya. which together make up some larger object. B. Finally. but when it sees vertices outside the standard 1x1 UV range. where each model has it’s own 1x1 block of the coordinate space. These should be hidden in inconspicuous places during the modeling process or removed completely.4. Pinches in the mesh are apparent where you have tris. If you find such an artifact on your render applying a smooth to the mesh before rendering can help.3. Multiple Displacement Maps ZBrush’s Multi Displacement 2 (part of the Alpha Displacement Exporter plugin) allows you to generate. 5. Before MD2. go to the View>Grid option box and raise the Length and Width value to 5. in one pass and with consistent scaling. In Maya. B would get the range where U goes from 0 to 1 but V goes from 1 to 2. In our example. This will increase render time and you may want to lower your Approximation settings as a result. displacement maps for a set of models that are used as a unit externally. or faces with more than 4 vertices. and so forth. but also generated different alpha depth factors for each map. For example. The basic workflow for processing all of these in MD2 is: 1. You may also want to set Grid Lines to 1 to visually clarify where each region begins and ends. we’ll be doing this with a dog that actually consists of four separate meshes in Maya.

and lower gum. We can however combine them and import into ZBrush as a single object with UV Groups active. You may repeat for each shell you want as a separate map or UV Group. Figure 30. upper gum. Fine) 28 . In this example the dog’s body mesh (model by Dan Fine). placing each in its own quadrant. Setting Grid Options To shift UVs from 0 to 1 select a shell and in the Maya command line or the script editor enter the following MEL command (note the capital letters) polyEditUV -u 1 -v 0 This moves the shell one unit to the right and 0 vertically. Increment the U number for the number of quadrants to move in each direction. are separate objects. teeth. Dog Model with Four Separate Mesh Parts (model by Dan J.Figure 29.

Ctrl-Click the body polygroup to hide it and render the teeth visible for sculpting. Ctrl-Click to isolate the group you want to change color for and then click Tools:Polygroups:Group Visible to cycle through other options. Figure 31. 3. You may also want to enable Tool:Display Options:Double to display geometry double sided in the view. 29 . 2. Making the Displacement Maps in ZBrush Once you’ve layed out UVs as described above. Now we will create a combined object file to use in ZBrush. The generated maps will then be applied to your original multiple mesh Maya geometry. to make more visible the fact that these parts are combined into a single mesh. Your UVs will be intact and still in separate regions (see image). Combined Objects and UVs Note: The figure below shows just the mouth parts combined. the steps to generate displacement maps using ZBrush are as follows.6. Detail your mesh as normal. In ZBrush import the combined mesh and activate Uv Groups under Tool:Polygroups. Turn on Frame mode to view your grouping. You may want to turn off Tool:Geometry:Smt (Subdivide Smooth) to prevent your mesh parts from shrinking as you sculpt. Select each separate object and click Polygons>Combine to create a single mesh from these objects. If the colors ZBrush chooses are too similar to distinguish from each other. as it will be used only by ZBrush. Save the new Maya scene (with the maps separated into UV regions) separately from your original. 4.2. 1.

Details are found in section 4. 30 . Finally.3. use the Create All button in the MD2 menu to create the displacement maps. To assign the maps we need to create a displacement shader for each map we will apply to the model. Applying Multiple Displacement Maps in Maya In the previous sections we created a separate map per body part to increase quality in the final product by allowing more texture space per body part and the use of multiple highresolution maps. Be sure to check the place2DTexture node attached to your displacement map and be sure that Wrap U and Wrap V are checked.1. Dog Teeth Parts of Model with Polygroups Assigned (Body is hidden) 5.Figure 32. This will tile the maps outside 0 to 1. 6.

It helps to name shaders descriptively as you create them. Drag-select one quadrant of UVs and go to Select>Convert>Faces (or Ctrl-F10 on the keyboard).This model has 8 UV regions so 8 maps are generated. To make sure each map is applied to the correct region of the creature open the UV Texture Editor as seen above. The resulting 32-bit TIF files will be ready to apply to the mesh in Maya and should render exactly as seen in ZBrush. Now in Hypershade apply the shader with the corresponding map to the set of faces. 31 . You can quickly assign shaders to selected faces by right-clicking on your shader in Hypershade and selecting Assign To Selection from the marking menu that appears You can determine which map is for which quadrant by looking at the filename index number for each map. you should be able to on with your rendering or other work as usual. You can select a few UVs from one shell then use Select>Select Shell to enlarge the selection to the whole UV shell. And that’s it! With the displacement maps all generated and attached back to the original meshes in the dog project. 1002 for 2 and so on. 1001 is for quadrant one.

ZBrush has a little known but very helpful method for viewing bump maps directly in ZBrush. which can be loaded from the Zmaterials directory that is part of the ZBrush distribution. A good rule of thumb is if your detail will change the silhouette of the model. Finer details can be added in a bump map and rendered over the displacement in Mental Ray. add it as a bump map detail instead. These can be added into the geometry itself and ultimately the displacement map but doing so is inefficient and usually not necessary. ZBrush Sculpt Before Bump Map Applied Figure 34. If it is not visible in the profile.1. Bump and Diffuse Maps In many cases you will want fine details on your mesh like pores and small wrinkles. Applying this material to your model will then cause it to render in ZBrush using the currently assigned 32 . Figure 33. using a special material called the BumpViewerMaterial.7. displace it. This takes a huge load off the renderer since you don’t have to subdivide nearly as high to get finer details to appear. Same Mesh with Bump Map (viewed using the Bump Map Material) 7. Using the Bump Viewer Material.

and easily see the result. The system color palette window may vary. Here’s the procedure for using this: 1. With your tool open and in 3D Edit mode got to the Material Menu and click Load. 3. Then go to the Texture menu. depending on your operating system. A gray texture will be created. In the Zmaterials folder of your ZBrush install folder you will find the file BumpViewerMaterial. To create a texture for the bump viewer open the system color palette by pressing the SysPalette button to the left of the workspace… …and select 50% gray (RGB value 128 128 128). 4.zmt. This allows you to use all the tools available in the Projection Master or elsewhere in ZBrush.texture as a bump map. Load this and the material will be applied to the model. 33 . rather than a normal texture. 2. set width and height to 4096 (or whatever is appropriate to your needs) and click New.

varying intensity to adjust bumpiness. the modifications to the texture will appear as bumps on the model’s surface. 6. The initial value of 1 is usually too high so I start testing with a value of . Click the checkered box to the right and select the bump map file from the popup window.5 under color balance in the file node. you can export it and use it in Maya. This will ensure that you do not inadvertently modify geometry as you paint the bump map. Here there is a Bump Mapping slot. do not use ZAdd or ZSub. and your brushes are using RGB only. Once the map is done. Bump Depth is the “volume” control for the level of the bump. Remember that.5.2. like the displacement map. Make sure that you enter Projection Master with only the Colors option checked. Applying bump maps in Maya To apply your bump map in Maya go to the Attribute Editor for the material on your mesh. When you leave Projection Master.5 Click the arrow next to Bump Value to access the file node where you will load your bump map. This will create a bump2D node. 7. this is based on 50% gray corresponding to no bump. so be sure to set your alpha gain to 1 and offset to -. You may now enter Projection Master with only color enabled and paint with black or white on your model. 34 . 7.

Figure 36. but with a 35 .3. and filled with the selected alpha (the displacement map). and After 7. This causes the canvas to be erased. Cavity Maps and the Diffuse Channel Using cavity shading in ZBrush. Before Applying Bump Map. select Material:BasicMaterial and click Alpha:CropAndFill. resized. Render Without Diffuse Map. Begin by creating a displacement map with Tool:Displacement and selecting it that map in the alpha inventory popup.0 you can make cavity maps manually by altering material settings. you can generate diffuse maps which when used in Maya can help support the displacement by accentuating shadows in the recessed areas. and With Cavity map generation will soon be automated with future releases but as of ZBrush 2.Figure 35. Next.

The diffuse map can be added in Maya similarly to the bump map.com. Dark areas will render darker and light areas will be normal. and the “ZBrush in Production Pipelines” forum at www. With Render:Best on.) You should get a posterized effect denoting where the areas of the map will be cavity-shaded. Jaime. The alpha is not applied to the canvas as grayscale intensities. Ken and the Pixologic team! [Pixologic editor’s note: No. Turn Ambient all the way up. CavityRadius.] 36 . Example diffuse map. at ZBrush Central.highend3d. You may want to adjust the map in a photo editing package if the effect appears too strong or adjust the file node settings. but his much-appreciated contribution. This is our job. Scott is the person who gets special thanks. Ryan. Once you have a diffuse (cavity) map to your liking press Texture:GrabDoc to make the document into a texture. Thanks for reading this guide! If you have any suggestions or corrections I can be found at www. and then export using Texture:Export. Figure 37.com. Happy sculpting! Special thanks to!!: Pixolator. (CavityIntensity is probably a good one to start with.ZBrush twist. In the attributes for your shader attach a file node to the diffuse channel. adjust the CavityColorize. which means the contents of the canvas will be sensitive to the lighting conditions. Aurick. and CavityIntensity until the wrinkles in your model are shaded as you like.scottspencer. but as depth.

Ricardo Ariza.Sunit. Monstermaker. Dave Cardwell. and the countless other artists on ZBC who are always inspiring! All models by Scott Spencer except Bulldog by Dan J Fine. Zack Petroc. Dick Smith. Pendulum Studio. 37 . Bill Spradlin. Svengali. Marcus Civis. Will at HighEnd3D. Aminuts. Antropus.