In this tutorial we will cover how to convert a scene that has been setup for use with the mental ray renderer to MtoA. We will cover how to use vector displacement on the leg and tentacles of the Killamari character. We will also cover Override Sets to add subdivision to create a smooth looking mesh.
The original Maya scene files for this series of tutorials can be downloaded from Autodesk's Hyperspace Madness production.
This tutorial will cover the following topics:
- Start off by opening the Killamari model in Maya. You will notice that it is a low poly model. We can add geometry detail by increasing the number of Subdivision Iterations using Arnold's Subdivision settings. We will also need to add subdivisions to the leg and tentacle models as we will be adding displacement to them.
- Select the body geometry (not the tentacles) and create a Maya Set for them.
- Select the Set and go to the Arnold tab. Click on Add to open the Add Override Attributewindow.
- We want to create a smooth surface for our model, so add Ai SubdivType and change it to Catclark.
- We will also want to add some subdivision iterations to smooth the model. Add Ai Subdiv Iterations to the Set and increase them to 2.
Subdivision Overrides assigned to body Set
Bear in mind that each subdivision iteration quadruples the number of polygons. If your object has 2 levels of subdivision iterations set and 4 additional iterations set in Arnold, that's 6 subdiv iterations total and therefore 426936 * 4^6 = 426936 * 4096 = 1.7 Billion polygons.
Care should be taken when increasing Arnold's subdivision iterations in combination with Maya's Smooth Mesh Preview (3 on the keyboard). Arnold will also render this preview smoothed state in the final image. This may result in a subdivided mesh that far exceeds the necessary amount of polygons required and will result in longer export/render times.
We can add more detail to the leg and tentacle models by using a vector displacement map.
- Repeat the above steps by adding another Override Set to the leg and tentacle geometry. However this time, increase the number of Ai Subdiv Iterations to 6. We will need these extra subdivisions to get the fine level of detail from the displacement map.
Override Set for leg and tentacle geometry
- Assign a Standard Surface shader to the Killamari and rename it Killamari_body.
- Select the Shading Engine for this shader and connect a displacement shader to the Vector Displacement attribute.
- Select the displacement shader and connect the 'killamari_merged_appendages_vdm' vector displacement map to the Vector Displacement.
- Change the Vector Space to World. This is the coordinate space where the vector is applied.
Displacement texture connected to the Shading Group of the body shader
- Render the scene. The vector displacement effect should be visible as in the image below.
Rollover image to see without displacement
The Utility shader can be useful for diagnosing issues when rendering displacement maps. It has a polywire mode that can be useful when test rendering displacement and subdivision. The leg and tentacles appear black because they have a high number of subdivision iterations (6) whereas the rest of the body has only 2.
You can also use Feature Overrides if you need to disable rendering of displacement in the scene (useful for scene diagnosis purposes).
Utility shader. Shade mode set to 'ndoteye'. Rollover to disable subdivision (Feature Override).
Thats it. Congratulations, you have successfully converted a scene from mental ray to MtoA! Now go out there and explore new worlds of rendering!