Hi there.

After years of pulling out my hair in order to get displacement maps to work, I have finally figured out (or have been told) how to get displacement maps to work in Maya and render fairly quickly.

Before I begin, I must stress that good uvs are critical to getting a very clean displacement map. It is possible to get very good results using some kind of automatic UV mapping but it isnt guaranteed and is more of a gamble (this is ofcourse, just my opinion).

Also, you will need two utilities for this to work:

The first is the multi displacement 2 plugin for Zbrush, which can be found here:
http://www.zbrushcentral.com/zbc/sho...d.php?t=029789

You will also need a nifty little bat file called convertfile.bat, which automatically converts tif/targa/image files to .map files for mental ray, which can be found here:
http://www.datafilehost.com/download.php?file=3ec7a97e


So here are the steps:

ZBRUSH:
1. Download and load multi displacement 2 into Zbrush

2. Load finished Z-tool, and at the lowest subdivision level, open the z-plugins > multi displacement 2 tab.

3. Use these options:

UDIM: leave at default.

Initial File Index: leave at default.

Max Map Size: I find that 2048 works fine, but you can go up to 8K

Map Size Adjust: change this to 0.

DpSubPix: leave at 0, will use adaptive instead.

Border: can leave at 8, as this will actually overpaint UV seams. In my tests, it actually does an ok job of overpainting if your UV's arent that great.

4. Click the export options button in the multi-displacement 2 menu and make sure that D32 is off (as well as every other setting) and turn on R32.

5. Paste this quickcode into the quickcode box for R32:
DE-LBEK-EAEAEA-R32

6. Under your tool menu, go to the displacement sub-menu and check the Adaptive box.

7. Back to the Multi-Displacement 2 tab, click "create all" and choose a filename, all while at the lowest subdivision level of your ztool.

8. Wait for the map to finish and export your level 1 ztool with the "group" and "merge" options unchecked in the tool > export tab.

Maya/Desktop:


1. Download the convertfile.bat file and put it on your desktop.

2. Find your 32-bit displacement map that Zbrush generated and drag it into the convertfile.bat icon. This will automatically convert the file to a .map file and place it in the same directory as the original displacement map (you can do this with any targa/tif file...other formats may work but I havent tested them).

3. Open Maya, and import the level 1 Zbrush mesh with groups "off" in the import options box.

4. Select your model, and in the attribute editor, turn off the "feature displacement" setting.

5. Open the hypershade, and assign a new material to the mesh. In the shading group of the material under the "shading group attributes" section, click the checkered box next to "displacement mat.", and select your .map displacment file. Make sure it is selected as a "file" and not as a projection.

6. In the file node under color balance, change the alpha gain to 2.2 and the alpha offset to -1.1

7. Open the Approximation Editor under Window > Rendering Editors > Mental Ray > Approximation Editor, select your model and click "create" for a subdivision approximation. I use the spatial setting and leave the value at 2 (but dont go past 3 or 4). If the attribute editor for the approximation doesnt show up, select your model and click the "edit" button next to "subdivision approximation".

Thats it! Now hit the render button and it should finish fairly quickly.