How to render your Mudbox file in Mental ray -The Easy Way – Tutorial

In this tutorial we are going to explore “how to” render the low poly mesh that was exported out of Mudbox with mental ray for Maya , and match the same number of polys of the high rez. model in Mudbox.

This approach is considered the most forward and easy to understand.
Open your Mudbox file and note the number of polys that your mesh has.
This number is located either in one of these 3 places.
1- The “HUD”  highest level Display info
2- The Status line at the bottom right corner of the UI.
3- The Object info tab

mud_screen.jpg

Step down to the lowest Level
Export the low poly mesh as an OBJ
In Maya, open the option box for the OBJ import and disable “create multiple objects”, thus importing the mesh as “one” unit.

import.jpg

A good practice would be double checking the UV integrity to insure NO broken UV edges or flipped UV shells.
This can be done by opening the UV texture editor and toggle “Border edges ON” and “Shaded UV “

uv_screen.jpg

1-    Example of broken UV edges
2-    Example of flipped UV shell

uv_screen2.jpg

Select the mesh, and click on ‘ctrl’ + a to open the attribute editor.
Under the shape node for the mesh, disable the “feature displacement”.

shapewins.jpg

This gives us a “manual control” over the displacement assignment for mental ray.
To add the node that will allow us to subdivide the mesh in render time will do the following.
While the mesh still selected:
Window > Rendering editor > mental ray > Approximation editor

subd_screen.jpg

Choose Subdivision (Polygon and Subd. Surfaces) and click “Create”.
A new node will be created “under the mesh shape node.

shapewin2s.jpg

At this point, you will be greeted with different types of subdivision methods. For the sake of simplest we will choose “parametric “
Now we need match the number of Subdivisions to match the Mudbox highest level.
Note:    The low poly mesh in Mudbox is called Level  1.  To get to level 4 (as in my Mudbox highest level example), we divided the mesh 3 times, therefore in the N Subdivisions, enter the value 3.

app_nodes.jpg

Tip: Make sure that Maya style alpha detection is turned ON

Window > setting and preference
Rendering > Use Maya style alpha detection

maya_stylealpha.jpg

Change to mental ray as your render engine
In the script editor type:
select mentalrayGlobals;

Open the Attribute Editor of this node and change the verbosity level of Translation to “progress Message”

translations.jpg

Render again and notice the Output window message
“GAPM 0.3  info : triangle count (including retessellation) :      981504”

This is the number of Tris that get tessellated in render time
divide that by 2 = the number of Quads = 490752 = the same number in Mudbox

Assign the displacement map from mudbox (preferably Open EX 32 bit)
Change the mental ray render settings quality to “Production”

mr_settingss.jpg

Now you have a render that match you Mudbox file :)

comps.jpg

Recent Entries

7 Responses to “How to render your Mudbox file in Mental ray -The Easy Way – Tutorial”

  1. Joey Says:

    I can’t get this to work. EXR file cannot be read by Maya. I followed everything you described 100% and I still don’t get ANY displacement. I can’t even see any progress report even though i turned it on via export verbosity. And im pretty sure it’s EXPORT verbosity and not RENDER verbosity. In fact NOTHING updates in my output window. are there some steps missing?

    I find it IMPOSSIBLE for me to get my displacement maps to show up properly in Maya. I thought Mudbox was made to be compatible with Maya… hopefully we will have SEAMLESS TRANSITION LIKE ZBRUSH in the future. Come on Autodesk, WTF are you people doing!!!?

    Frustrated to no end. Sorry for ranting. Please help, Ash!

  2. Joey Says:

    After trying it abit longer, I realised it was just some scaling issue. Something I remember being discussed at Mayastation. Phew… but the whole process was so frustrating. Both programs kept crashing on me :(

    But anyway, thank you so much for the tutorial Ash!!! You’re a hero!

  3. Ashraf Says:

    Hey Joey,
    The interesting part about making a demo (myself or anyone else out there) we always practice what we going to present.
    Therefore you see everything runs smoothly.
    However when a user have a slightly modified workflow, for example object got scaled.. they run into a road block and thus frustration.
    I would usually recommend when following someone tutorial, to pay attention to the small detail that happened, and apply the same workflow to yours.
    Once gets comfortable with it, then you can start adding your modification.
    It will make it easier for you to trouble shoot.
    Best of luck

  4. David Says:

    Thank you SOOO much for this tutorial. I was able to render out my character in the same quality as Mudbox. You just don’t know how appreciative I am for you making this.

  5. xiaoyun Says:

    Thanks so much, this way render out from mental ray much faster then create displacement approximation.

  6. Jan Says:

    Hello,

    Thank you for this tutorial.
    But I was wondering: what about the textures I applied to the model in Mudbox? How do I apply the textures in Maya Mental Ray?

  7. Ashraf Says:

    For the textures you need my MEL > multi Channel MEL script ..its in my blog :)

Leave a Reply