/* Zbrush to RFM (Renderman for Maya)- AdamC.net

These are my notes on the process of moving displacement maps from Zbrush 3.1 to Maya 2008, and rendering them using Renderman.

When using highres displacement to render there are advantages to using a micro polygon renderer such as Renderman to render out the details. The way that Renderman renders allows the details to come through almost for free and the only problem now is the size of the displacement map its self. The displacement is easily applied using the described method below.
Most of the settings mentioned are taken from a combination of this thread at Zbrush Central http://www.zbrushcentral.com/zbc/showthread.php?t=50873 and Scott Spencers book Zbrush Character Creation, Advanced Digital Sculpting. I highly recommend this book it is full of the ins and outs of Zbrush and the settings are better described.

Exporting from Zbrush to Maya:

  • It is a good idea to make sure that your UV's are good. No overlapping and as seamless as possible. and it is good to smooth out the UVs in order to avoid spikes in your render.
  • Switch the tools subdivision level to the one to be exported. make sure that you have enough detail to carry the displacement properly.
  • Turn on SmoothUV and Adaptive under the displacement menu in the tool pallet.
  • displacement
  • I used the Zplugin Multi Displacement 3, to export the 32 bit displacement map. I changed the some of the settings as follows: MaxMapSize to 4096, MapSizeAdjust to 0, and the DpSubPix to 0. The rest of the settings where left at the default settings.
  • Then the Export Options button is clicked to reveal a set of values to be adjusted. Set the Quick Code to DE-LBEK-EAEAEA-D32. Witch will choose the D32 option and then make sure the rest of the settings are as follows: Channels- 3, Bits- 32 Float, Vertical Flip- Yes, Scale- A.D. Factor, Smooth- No, Seamless- No, Ch 1 2 and 3 Ranges- Full, Ch 1 2 and 3 Res- Full or these settings can be set manually.
    DPX 3
  • Now push the Create All button and the files will be created at the location and name you define.
  • Maya settings:

  • Open Maya and make sure that Renderman is your renderer.
  • Import the .obj that was exported from Zbrush. making sure that in the Import options that Make Multiple Objects is unchecked.
  • In the Attribute Editor under Displacement Map turn off Feature Displacement.
  • Now Add a Subdivision Attribute to the mesh. Select the mesh and go to Attributes>Renderman Attributes>Sub?????.
  • Create the material of your choice. I used a Blin to show the displacement better. then attach a Displacement Node to that material. In the Attribute Editor click on the checkered box and attach the displacement .tif image that was made earlier.
  • Enter this expression in the Alpha Offset:
  • Alpha Offset:= - file1.alphaGain/2;

  • Adjust the Alpha Gain up and down until the details are showing on the renders. Then add this expression to the Alpha gain and Alpha Offset will adjust it's self. These expressions will allow the model to be scaled, and the displacement will adjust with it.
  • Alpha Gain: = decidednumber * objectname.scaleX;

    This is a Mel script Taken from this thread on the second page.

    http://www.zbrushcentral.com/zbc/showthread.php?t=50873

    Once in Maya this Mel script adds the subdivision scheme and applies the displacement map and its settings, all that is left to do is to choose the file that you want to use.

    If there is a better way or I am doing something wrong please email me or leave a comment. I hope this helped.

    /* */