Tool:Displacement Subpalette
From ZBrush Info
Contents |
Introduction
The Tool:Displacement subpalette allows the generation of displacement maps from polymeshes that have multiple levels of subdivision. In addition, ZBrush now has additional plugins available to facilitate the creation of displacement maps. All of these are discussed below.
In order to use displacement maps, you'll also need to know about polymeshes, and Tool:Geometry Subpalette and multi-resolution polymeshes (handled by Tool:Geometry). Ideally, you should also know about the Tool:Morph Target Subpalette.
Displacement Maps
A displacement map is an intensity (alpha) map that can be used to generate a higher-resolution model from a lower-resolution model, by displacing points on the lower-resolution model by the amount indicated in the displacement map. This is typically used at rendering time; it allows a lower-resolution to be manipulated or animated, and then converts it into a higher-resolution model as each image or frame is being rendered.
In order to generate a displacement map in ZBrush, you will need a Polymesh3D tool of some sort, which has at least two different levels of subdivision. If you then set the subdivision level of the tool (Tool:Geometry:SDiv) to the lowest subdivision level, the Tool:Displacement:Create DispMap can be pressed to create a displacement map. ZBrush calculates this map by comparing the positions of the high-res model with the corresponding points on the low-res model.
Note: You can calculate a displacement map from any level of a multi-resolution model that is lower than the highest-res level for that model. However, displacement maps are usually calculated for a mesh imported from another program that becomes the lowest-level mesh, so you will generally set Tool:Geometry:SDiv to 1 when generating a displacement map.
Note: You can also generate a displacement map when SDiv is set to its highest level, but since the points of the high-res model will be compared against themselves, you will simply get a 'blank' displacement map.
Displacement maps generated by ZBrush normally use a 50% gray to indicate no displacement. Darker grays indicate displacements into the object, and lighter grays indicate displacements out from the object. This can be adjusted, see the description of controls below.
A typical workflow for creating displacement maps is given below.
- Create a Polymesh3D object in ZBrush, either from a primitive, or by importing an external mesh.
- Select that polymesh, draw a copy onscreen, and enter 3D Edit mode (hotkey t) to allow sculpting.
Polymesh created from Terrain primitive.
- Click Tool:Morph Target:StoreMT to create a record of the initial vertex positions of the polymesh.
- Create higher subdivision levels of the object (Tool:Geometry:Divide, hotkey Ctrl-d), and sculpt in those higher subdivision levels as desired.
Model after subdivision and sculpting.
- Return to the lowest subdivision level. The vertex positions at this level will have been altered by the sculpting at higher levels.
Sculpted model at lowest subdivision level; vertex positions have been altered.
- Press Tool:Morph Target:Switch to restore the original vertex positions at the lowest subdivision level. The sculpting at higher levels will not be affected.
After restoring the morph target, the low-res model is the same as the original.
- Press Tool:Displacement:Create DispMap to create the displacement map. The generated map will appear in the Alpha palette.
Thumbnail of generated displacement map.
- You can now export this map and use it in your external renderer.
Some notes about this process:
- It is not necessary to store and restore a morph target, but if you do not, then the generated displacement map will be created for application to the low-res model that will have had its vertex positions changed by higher-level sculpting. Normally, if you do not store a morph target, you would then want to export this altered low-res model for use with the displacement map.
- An alternative to storing a morph target is to finish your sculpting, and then re-import the original base mesh while the sculpted model is at its lowest subdivision level. This will alter the vertex positions back to their original, without otherwise changing things.
- To use the displacement map, you will also need to use the Alpha:Alpha Depth Factor value as a scaling value in your rendered. See the documentation for the Alpha palette.
- Make sure to read the section in this page for information about the Alpha Displacement Exporter. It may simplify this task.
The Alpha Displacement Exporter
Pixologic has also made available, for free download, a plugin called the Alpha Displacement Exporter, which can simplify the creation of displacement maps. It is freely available at http://www.ZBrushCentral.com. All of the ideas described above still apply, but in addition, the Alpha Displacement Exporter provides the following capabilities:
- Displacement maps can be exported in different TIFF file formats, depending upon the needs of your external programs.
- 32-bit, 16-bit, and 8-bit displacement maps can be exported.
- When exporting in 32-bit format, the displacement map files can be created in a manner that eliminates the need for recording and using the alpha depth factor.
- Support is provided for generating multiple maps for an object that is composed of multiple polymeshes. All maps will have consistent scaling relative to the object as a whole.
Controls For Generating a Displacement Map
DPSubPix: As the displacement map is generated, additional levels of subdivision are performed on the highest-res mesh to improve the final result. Beware, though, that each additional level of subdivision may increase generation time by up to a factor of four. Normally, you do not need to set this above two. A better way of achieving a similar result is the use of the Adaptive.
DPRes: Sets the resolution of the generated map, i.e. a setting of 1024 will result in a map of 1024x1024 pixels. This can be any value, but many external programs work best with maps that are powers of two. Also, the number of pixels in this map should normally exceed the number of polygons in your highest-level mesh, as otherwise not all of the details in the displacements will be recorded in the map. (Often, you will want the number of pixels in the map to significantly exceed the number of polygons in the mesh, so that areas of high polygon detail are adequately captured.)
Adaptive: When on, it automatically determines the additional number of subdivisions that are performed for various regions of the mesh during map generation, depending on the resolution of the mesh in that area. This option disables the DPSubPix setting, and is the preferred way of generating displacement maps; use DPSubPix only if you feel Adaptive does not give satisfactory results.
Smooth UV: Affects the "smoothness" of the final effect when the displacement map is applied. When sculpting organic models, you will normally want this on. If your model has sharp edges and you find that they are not maintained adequately in your renders, you may want to try making displacement maps with this turned off.
Create DispMap: Creates a new displacement map, based on the other settings. The new map will appear in Alpha inventory.
Controls for Viewing a Bump Map on Your Model
The controls below do not effect your displacement map. They are used to both preview a bump map and to bake a bump map into your model.
Intensity: Controls the intensity of the bump map.
Mid: Sets the "midpoint" gray intensity, i.e. the level of gray that indicates no bump. By default, this is 50%. You can alter this for use with programs that use other base intensities.
Mode: Controls whether you are viewing a bump map or previewing the bump map baked into your geometry. With Mode On your verticies will be displaced according to the grey scale value of the bump map combined with the Intensity setting. Note, to capture the detail of a bump map you should work with Mode On at the higher subdivision levels.
Apply DispMap: This is used to bake a bump map into your ZBrush mesh. For example, you could sculpt a model, create a displacement map, remove the higher-level subdivisions for the model, redivide the model, apply the generated map, and end up with the sculpted model again.

