I have been working very hard to improve the accuracy of displacement mapping in Maya using numerous meathods but the technique that works best I will describe now.
This teqnique will allow you to make a direct comparison between the original ZBrush high-res mesh and the rendered displacement.
Ok here goes:-
In ZB the first thing I would recommend is to change the import/export options to this.
Preferences>Import export :-
iFlipY ON, iFlipZ ON, eFlipY ON, eFlipZ ON, Unify Scale 1.
All other options in this section should be off.
What this does is to make sure that when an object is transferred between the two programs the scale and orientation do not change.
Next make an object in maya say a cube give it 10 subdivisions in each axis and make it 10x10x10 in scale. Make sure it has a good UV map, export as an OBJ and call it cube.
Import it into ZB as a tool. Draw it on the canvas and enter edit mode. Subdivide it 3 times. Draw some shapes and use Projetion Master to add some detail. Export the level 4 mesh and name it cube-ZB-out. Return to subdivistion level 1 and re-import the original cube
. Go to Zplugin MULTI DISPLACEMENT 2, export options.
DE-LBEK-EAEAEA-32MAYA-AD
Copy/paste this quick code into an unused slot, make its status ON
and turn off all other slots. Hit close.
Select Zplugin MULTI DISPLACEMENT 2>Create All and choose a sutable filename.
NB after the map(s) have been exported from ZB the tilde "~" character in the filename should be removed as it is not good practice and may lead to problems.
Open a command promp window and use the imf_copy.exe (located in the Maya bin folder) to convert the file to a .map format.
E,g, imf_copy.exe F:\temp\cube1001-32MAYA-AD.tif F:\temp\cube1001-32MAYA-AD.map
In Maya import the original cube if you need to and assign a lambert shader. Find the lambert SG node and create a displacement file texture and select the .map file created in the last step.
In the file node:-
Alpha gain = 2
Alpha offset = -file1.alphaGain/2
Use the Mental Ray subdivision approx but not displacement approx (subdivision approx overides it) If you use the parametric method the N subdivisions corrisponds to the subdivision levels in ZBrush. Set it to 4.
Now do a render in Mental Ray, keep
the image and do not move the viewing angle at all.
Put the object on a layer and hide the layer. Now import the original object and render.
You can now use the slider in the bottom of the render window to compare the original with the displaced surface.
The 2 images should be identical (provided the shaders are the same). If they are not check your settings.
I hope that this is usefull and I also hope that there are no mistakes.
Cheers,
Shadowfiend.