The concept of displacement mapping is not new, but the significant interest in it certainly is. Since the use of displacement maps is not yet a standard feature in all renderers, a certain degree of experimentation is required in order to achieve optimal results.
This thread is intended to be a ‘one-stop shop’ containing posts by ZBC members who have successfully rendered ZBrush-generated displacements maps in one (or more) external renderers.
Achieving optimal results in external renderers requires you to…
1. Generate the displacement map correctly.
2. Experiment and find the best render-settings in the external renderer.
To simplify the process of finding the optimal workflow, I’m including a sample low-res head mesh with its calculated Z2 displacement map (step 1). This will allow you to concentrate your efforts on getting the best results out of the external renderer (step 2).
The following is the test mesh which was created, detailed and then rendered in ZBrush with, and without, the displacement-map…
Use the link below to download a zip archive which contains 2 files: the low-resolution mesh (OBJ format) and the displacement-map (TIF format).
Note 1: The displacement-map may need to be flipped vertically for correct UV mapping.
Note 2: The displacement-gain in ZBrush was set to 0.834; you may need to factor this value to achieve similar displacement amount in the external renderer.
Test these files in the renderer that you’re using. If you have achieved successful results (similar to the above image, in any color) you’re invited to post your findings in this thread, so others can benefit from them.
To keep this thread as informative as possible, please don’t post unsuccessful results here. If you have encountered difficulties or have questions regarding this thread, please post them in the Q&T forum.
As time progresses, the usage of displacement and normal maps will become standardized and simpler. On the ZBrush side, we will continue to enhance these features, and will continue to share information with other companies to help streamline the process of rendering ZBrush-generated displacement and normal maps in their renderers.
Update May 9th 2004:
Here is one more displacement map test…
This test will better enable you to evaluate the accuracy of your test-render.
This displacement test is much less forgiving than the one above due to several factors…
Higher details ratio: 2.26 million polygons mapped into 138 polygons. Each low-res polygon represents 16384 high-res polygons.
The displacement is composed of geometric shapes, making any mapping distortions easily detectable.
The sides of the sword are perpendicular, causing abrupt changes of the normal directions within small areas.
Note 1: Since antialiasing and sampling of the displacement values are handled differently across applications, ZBrush can export the UV coordinates with or without a 0.5-pixel offset. Both files are included within the zip file. You may want to try both, to determine which one works better (i.e., is more seamless) in the external renderer.
Note 2: This test uses AUVTiles mapping. Normally, discontinuous UV mapping produces visible seam artifacts. To eliminate these artifacts, ZBrush automatically executes a smart seam-overpaint when the displacement map is generated. (The smart seam routine is optimized for AUVTiles/GUVTiles and other rectangle-based UV mapping. For other mapping methods the standard seam-overpaint is used)
Note 3: If your external renderer cannot make use of the full 16-bit resolution of the included displacement map, you may be able to improve the displacement render quality by first maximizing the grayscale contrast of the 16-bit displacement map, then reducing its depth to 8 bits.
Note 4: This test is provided because it’s a very demanding displacement map. Since it requires a more accurate rendering, some visible artifacts in your test render, especially at the sharp edges of the blade, will be acceptable. Typically, mesh/displacement map combinations are less demanding, and artifacts (if there are any) are less likely to be noticeable.
Note 5: If you need to modify the included displacement file to better fit the format expected by the external renderer (i.e., by splitting the map to positive and negative displacements, or by reducing the map depth to 8 bits), please specify these steps in your post. In the near future, I plan to write a ZBrush plugin which will enable you to specify a target application, and ZBrush will export the map(s) in a ready-to-use format.
Below is an alternate (easier to render) version of the Sword file.
This file is mapped with GUVTiles mapping…
… and the displacement map generated from Subdiv level 2 (instead of 1)
which reduces the HighRes/LowRes ratio to 4096 (instead of 16384).