Final Product What You'll Be Creating
More often than not, students come to me asking for a good method of creating wireframe renders, so in this tutorial I’m going to explain two different methods of achieving a wireframe render with Ambient Occlusion in Maya using Mentalray.
This is the model I’ll be using to create the Wireframe render with Ambient Occlusion.
Since I’m going to be using Mentalray for this tutorial, make sure it’s loaded in Maya. If it’s not, go to Window>Settings/Preferences>Plugin Manager.
From the Plugin Manager window, check the ‘Loaded’ and ‘Auto load’ options for "Mayatomr.mll", to enable it.
Now open up "Hypershade", by going to Window>Rendering Editors>Hypershade.
Click on the ‘Surface Shader’ as shown in the image below.
Now from mental ray’s “Textures”, click on "mib_amb_occlusion".
Middle mouse drag and drop the "mib_amb_occlusion" onto the surface shader created in step 6, and select ‘Default’ from the options box that comes up.
Next assign the Surface shader to the model by "Right Clicking" on it, and selecting the option "Assign Material To Selection".
Now double click on the "mib_amb_occlucion" node, and from the settings, change the "Samples", "Spread" and "Falloff" values as specified in the image below. The Samples control the quality of AO, so more samples equals better quality, but at the cost of additional rendering time.
Select "mental ray" as the renderer and hit render. The Ambient Occlusion is now set, so let’s start working on the wireframe.
Select the surface shader, and click on the "Input and Output Connection’ button in Hypershade.
Now select the "Surface Shader 1SG" node (which has just come up after clicking on the create input and output connection.)
From the "Attributes" of the "Surface shader 1SG" node, go to the Mental ray options, and check on "Enable Contour Rendering" in the "Contours" rollout.
And from the "Draw By Property Difference" options, check on the "Around all poly faces" option.
Hit "Render" again and this is the result we’re going to get, for this smooth is on (by pressing the “3″ key.)
Now go back to the "Surface Shader 1SG" shading group Attributes, and under "Contours" change the "Color" and "Width" as specified in the following image.
Hit render again to view the result.
From the "Render" settings, select "Production" from the "Quality" tab.
By selecting the "Production" preset for quality, the "Around all poly faces" option in the "Features" tab gets deselected, so you’ll have to turn it ‘ON’ again. Under "Contours", set the "Over-Sample" to 4 to improve the quality of wireframes.
For changing the background of the rendered image. Go to View>Select Camera from the Perspective viewport menu and press "CTRL+A".
Or press the button shown below.
From the "Attribute Editor" window, under "Environment" change the "Background color" to medium Grey.
Render again, and here is our final result.
The same results can also be achieved using the contour node. To do this, select the "Contour_shader_simple" node from the "Contour Shader".
Double click on the "Surface Shader" shading group node in Hypershade.
Expand the "Custom Shaders" rollout from the "Attribute Editor", and middle mouse drag and drop the "contour_shader_simple" onto the Contour Shader slot.
For changing the Color and Width of the wireframe, double click on "contour_shader_simple" and change the color and width accordingly.
And that concludes the tutorial, I hope you enjoyed it!
Don’t miss more CG tutorials and guides, published daily – subscribe to Cgtuts+ by RSS.
- Quick Tip: Rendering A Wireframe Overlay in 3DsMax
- Rendering Wireframes in Maya for Compositing with After Effects
- Quick Tip: Ambient Occlusion In xNormal
- Occlusion Shading Opacity Mapped Geometry In Maya