Converting A Mudbox 2.0 Model
To
3DSMax
By Neil Blevins
Created On: Sept 5th 2008
Updated On: Nov 20th 2008
Here's a tutorial on how to transfer a model from max to mudbox 2.0,
export a mesh and a displacement map, and then render it in max using a
bunch of different displacement methods (depending on what renderer you
want to use). The max version I'll be using will be max 2009, but the
process is quite similar for any recent version of max.
Here's a list of methods we'll be using to displace the geometry in
max...
Making the Mesh in Max, and
Exporting as Obj
- Make Your Mesh in max. I
created a simple sphere with a radius of 45 and 32 segments.
- Make sure the "Generate Mapping
Coords" is on. Or if you have a more complex object, create good
uvs for the object using the UVW Map modifier and/or the Unwrap UVW
modifier.
- Export Selected, choose
obj, use the mudbox preset...

Importing,
Displacing and Exporting from Mudbox
- Open Mudbox
- File -> Import,
choose your obj file.
- Subdivide Selection 4
times.
- Displace your mesh using
various brushes

- Step
Level Down three times (go to the
Level
1 Subdivision Level)
- Select The Object in Object List
- Mesh
-> Recreate Level UV's. This is a
very important step, so don't miss it.
- File
-> Export Selection, save
as obj. You may ask, why are we exporting a level 1 mesh, and not the
original level 0 mesh? In general, I have found using the level 0 mesh
doesn't give you enough mesh detail to allow the displacement map to do
its job. The more detail in the actual mesh, the less detail your
displacement map has to provide, and the better the final result.
However, the more detail in the actual mesh means higher polygon counts
in your 3d app's viewport, so there's a balance to be struck here. You
don't want to export a level 6 mesh if your final mesh is a level 7,
that will probably be way too many polygons to navigate properly in the
3d app, even though the final rendered result will look almost
identical to the one in mudbox. So I generally export the low poly mesh
at either a level 1 or 2, in an attempt to add more mesh detail without
going too far.
- Step
Level Up three times (go to the
Level 4 Subdivision Level)
(You must be at the top level if you want to export the top level
displacement map)
- File
-> Import, load the obj you
just created.
- Maps
-> Extract Texture Maps
-> New
Operation. See the dialog below.

Instructions:
- Choose
Displacement Map.
- Select
your Level 1 Model in the Object List, hit "Use
Selected" in the Target Model section.
- Select
your Level 4 Model in the
Object List, hit "Add Selected" in the Source Model
section.
- Search Distance. This should be the same as the highest value
you've displaced your mesh (The "Best Guess" that mudbox picks is
generally
a good starting place). Setting this right mostly involves trial and
error, you'll want
this number to be as low as possible, but not so low that you miss the
peaks of your displacement. Basically the highest and lowest points of
your displacement get missed
with a search distance that's too small, so you'll see neutral grey
dots at your peaks and valleys (see the image below). I generally start
small, render some test
displacement maps, and I keep increasing it until the artifacts go
away...

- The size of your bitmap. The higher the better, although the
higher the more memory the map takes. 1 to 4k is a good value depending
on how close you're getting to the mesh, and how much tiny detail
you've added.
- Click the folder icon, and choose a name and filetype for your
displacement map. I used a 16-bit Black And White Tiff. But if you
don't
have too much detail, 8bit may be ok. A higher color depth means a
smoother displacement map (since it has more values of grey), and hence
a better representation of your displacement, which is why I chose
16bit. Note: If you choose a 32bit floating point image, export to a
32-Bit FP Tiff. Do not export to a 32-Bit FP Black and White Tiff, as
this format is not supported by max.
- Hit Extract
When your Extract Texture Maps operation is complete, notice the
following dialog. Write
down the numbers that the dialog provides you.

Importing Back into Max
- Import the obj file of
level 1 that you created in mudbox into max.

Rendering
using the Scanline and Displace Modifier
- Apply a Material that
has a diffuse color of 128,128,128 (mid
gray)
- Apply a Turbosmooth Modifier
(Turbosmooth takes up way less memory than Meshsmooth, so for high
subdivision models, using turbosmooth is a must to conserve memory),
set to iterations 3. 3 is the number of iterations between you level 1
mesh and your level 4 displacement map. So if you subdivided your
mudbox object to level 6, and exported a level 2 obj file from mudbox,
you'd want to set this value to 4.
- Apply Displace Modifier
to the object.
- When using an 8bit or 16bit image, in the Displace Modifier, Strength is set to
whatever the difference between your two range values were. In this
example, the range was -3.998 to 3.998, so set the strength to 7.996.
If you chose a 32-Bit FP image, then leave this value at 1.
- When using an 8bit or 16bit image, click on Luminance Center,
make sure center is at 0.5. If you chose a 32-Bit FP image, then leave
this unchecked.
- Click on "Use Existing Mapping".
- Choose Map, choose
Bitmap map type, then hit cancel without selecting your bitmap from the
file dialog.
- Open an instance of the map inside the material editor, and set
the Filtering to None. When
the displacement map is calculated inside mudbox, it goes through a
filtering process to achieve the final result. Then when the geometry
gets displaced in max, that geometry gets filtered as part of the
standard renderer antialiasing process. If you turn on the image
filtering as well, you're basically filtering the bitmap a 3rd time,
which may make your final result blurrier than the result inside
mudbox. But in
some cases, especially if you have a lot of high contrast detail, you
can play with turning this setting to "Pyramidal" or "Summed Area" and
see if it helps remove any artifacts. But I've had more luck keeping it
off. Note, if you chose a 32-bit FP image, not turning Filtering to
None will usually result in an out of memory error. So make sure to
turn this to None before selecting your displacement map.
- In the bitmap, select your Displacement
Map that you wrote out of mudbox.
- Render in Scanline

Rendering
using Mental Ray
- Under Render, Assign Renderer, Production, choose mental ray Renderer.
- Apply a Turbosmooth Modifier
(Turbosmooth takes up way less memory than Meshsmooth, so for high
subdivision models, using turbosmooth is a must to conserve memory),
and set to iteration of 1. I've found that
this can sometimes help with a smooth displacement map in mental ray.
- Create an Arch & Design
Material,
assign it to your object.
- Set Reflectivity to 0.
- When using an 8bit or 16bit image, Under Special Purpose Maps,
set your Displacement Value to
whatever the
difference
between your two range values were. In this
example, the range was -3.998 to 3.998, so set the strength to 7.996.
If you chose a 32-Bit FP image, then leave this value at 1.
- Choose Map, choose
Bitmap map type, then hit cancel without selecting your bitmap from the
file dialog.
- Set the Filtering to None. When
the displacement map is calculated inside mudbox, it goes through a
filtering process to achieve the final result. Then when the geometry
gets displaced in max, that geometry gets filtered as part of the
standard renderer antialiasing process. If you turn on the image
filtering as well, you're basically filtering the bitmap a 3rd time,
which may make your final result blurrier than the result inside
mudbox. But in
some cases, especially if you have a lot of high contrast detail, you
can play with turning this setting to "Pyramidal" or "Summed Area" and
see if it helps remove any artifacts. But I've had more luck keeping it
off. Note, if you chose a 32-bit FP image, not turning Filtering to
None
will usually result in an out of memory error. So make sure to turn
this to None before selecting your displacement map.
- In the bitmap, select your Displacement
Map that you wrote out of mudbox.
- When using an 8bit or 16bit image, under the output panel, set RGB
Offset to -0.5 (this sets a value of grey to be no
displacement). If you chose a 32-Bit FP image, then leave this value at
0.

- Open the Render Panel, go into the Renderer Tab, under Shadows & Displacement.
- Change Edge Length to 1
or lower.
- Max Displace should be
3.998, or your highest Displacement amount if there are
multiple displaced objects in the scene.
- Under Max Subdiv, choose
the third item in the list, or a value of 64. 3 is the number of
iterations between you level 1 mesh and your
level 4 displacement map. So if you subdivided your mudbox object to
level 6, and exported a level 2 obj file from mudbox, you'd want to set
this value to the 4th option in the dialog, or 256.


This site is ©2008 by Neil
Blevins,
All rights are reserved.
Back to NeilBlevins.com