Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Overview

...

Section
In this example we will render an object with
Column
width50%
45%

This tutorial shows how to export a vector displacement map created in from Autodesk Mudbox and then use it with V-Ray for Maya.

The object is first prepared in Mudbox and a low poly mesh is exported for use in Maya. A vector displacement map is exported as well, which is then used as a displacement texture map.

Then, in Maya we show the steps of setting the vector displacement map and prepare the object for render with V-Ray.

Column
width5%
 
Column
width45%50%

Image Removed 

 

Image Added


Preparing the Object in Mudbox

...

Section

...

Column
width45%

There are a few things to keep in mind when painting your object in Mudbox:

– Make sure that the object has UV coordinates;

– Make sure that you have as few UV seams as possible (best if there are no UV seams);

...

To the right is an example of an object sculpted in Mudbox:

Column
width5%

 

Column
width50%

Image Added



Exporting the Base Object from Mudbox

...

Section
Column
width45%

Go to the 0-level resolution of the object, select it and export it to an .obj

...

 file from File Export Selection...

Image Removed

 

This way you will have the base mesh to import later in Maya.

Column
width5%

 

Column
width50%

Image Added

 

Exporting the Vector Displacement Map from Mudbox

...

Section

...

Column

...

width45%

Go to UVs & Maps > Extract Texture Maps > New operation... and in the following dialog

...

select Vector Displacement Map.

For Target Models select the 0-level resolution of the object

...

. For Source Models select the resolution that you want to bake (typically the highest resolution) - in this case, level 4.

...

Here, we enable the Smooth Target Models and Use Creases & Hard Edges options and disable the Smooth Target UVs

...

. Whether to choose these options depends on the model you are exporting. With this particular model, we want to keep the hard edges in order to keep the "edgy" look at the alien's neck.

Similar to that, we enable the Smooth Source Models option, which affects the polygonal faces of the highest res mesh (level 4) .

Set the desired resolution of the displacement map. A resolution of 2048x2048 works in our case.

Set the Vector Space to 

...

Object.

UI Text Box
typenote

It is important to choose the same Vector Space mode as the Displacement type used later in V-Ray for Maya.

Select an OpenEXR file as the output vector displacement file

...

To the right is what the final extraction options should look like (click on the image for full resolution):

 

...

 

 

Rendering the Object with V-Ray for Maya

, that is the Base File Name. V-Ray supports 32-bit maps, so it is better to keep the Bits per Channel to 32-Bit FP.

Once ready with all the settings, press the Extract button to create the vector displacement map.

...

Image Removed

Column
width5%

 

Column
width50%

Image Added

 

...

 

Section
Column
width45%

Here is how the extracted map looks like:

Column
width5%

 

Column
width50%

Image Added

Prepare the Object for Render in Maya

...

Section
Column
width45%

In Maya, import the .obj file with the 0-level resolution mesh for your object (File > Import...).

Select the shape node of the imported object and apply V-Ray subdivision attributes to it. Leave the settings at their default values:

 Image Removed

 

After that, assign a new material to the object (I used a VRayFastSSS2 material with the Milk (skimmed)preset, and assign a displacement shader to it. Create a File texture for the displacement source and point it to the exported .exr vector displacement file. For Maya 2012, leave the map attached to the Displacement slot of the displacement shader, and not to the Vector Displacement one.

With the File node still selected, go to the Attribute Editor, Attributes > VRay > Allow negative shader colors. This will add a V-Ray specific option to the File node, telling V-Ray that negative colors are okay for this textures. Another option would be to enable negative shader colors globally in the V-Ray settings. If you don't set one of these options, V-Ray will clip negative portions from the displacement map and it will produce wrong results. 

Select the shape node for the imported object, and in the Attribute Editor, go to Attributes > VRay > Displacement control. This will add a group of attributes to the shape for controlling the displacement. Set the Displacement type to Vector displacement (absolute)

...

With the object selected, navigate to the V-Ray shelf and assign a VRay Displacement node.

While at the VRay Displacement node, navigate to the Attribute Editor > Attributes > V-Ray and choose Displacement Control and Subdivision and Displacement Quality (optional) extra attributes.

Then, choose a File texture as a Displacement mat.

Column
width5%
 
Column
width50%

Image Added

 

...


Section
Column
width45%

In the Image Name of the File texture, load the exported vector map.

Column
width5%

 

Column
width50%

Image Added

 

...

 

Section
Column
width45%

Now let's prepare the V-Ray displacement for render - navigate to the vrayDisplacement node in the Attribute Editor.

Go to Displacement control panel and make sure to select the same Displacement type as in the exported .exr (that is the Vector Space mode in Mudbox). Here, we set it to Vector displacement (object).

Enable the Keep Continuity option and make sure to disable the Filter texture one.

Set the Displacement bounds to Explicit.

Here you can also control the Displacement Amount.

Column
width5%

 

Column
width50%

Image Added

 

...

 

Section
Column
width45%

Once you set the Displacement bounds to Explicit, select the Min value.

Set the Color Space to RGB 0 to 1. Then set the R, B and G to a value of -1.000.

UI Text Box
typeinfo

 This allows V-Ray to consider negative values for render from the map, otherwise they will be clipped.

Column
width5%

 

Column
width50%

Image Added

 

...

 

Section
Column
width45%

Optionally, you can go to the Subdivision and displacement quality group of attributes to control the quality of the displacement result. 

That should be all - the object is now ready to be rendered:

Image Removed

 

The default Edge length is set to 4.000. You can lower this value, which increases the render quality, but is on the expense of render time. You can also tweak the Max subdivs to reach the desired subdivision of the mesh.

This short example shows the difference between the base low poly mesh (Displacement is disabled) and the displacement details (Displacement enabled) during render time. For this model, we set the Edge Length to 2.

Column
width5%

 

Column
width50%

Image Added