Rendering Wireframe Using MentalRay ContourShader



Well, after previously making the Rendering Wireframe Using ToonShader, this is a tutorial to Rendering Wireframe Using MentalRay ContourShader, the advantage to using this method over the cheaper toonshader technique is that this method give you a more smoother and better anti-aliased wireframe :)


Step 0. Before starting, make sure the MentalRay plugin is enabled. It is called "Mayatomr.dll" in the Plugin manager.

Step 1. Create a new Lamert material. Rename it to wireframeShader. Rename the shadingGroup to wireframeShaderSG.


Step 2. Select the ShadingGroup and Open the mental ray -> Contours tab.Click Enable Contour Rendering.


Step 3. In this tab you can select the color and width for the wireframe.. it might be subject to a little experimentation.

Step 4. Select the objects that you want to render the wireframe on and assign the wireframeShader to these objects.

Step 5. Open the Render Settings, and make sure the Render using option is set to MentalRay. In the Features tab, scroll down and go to the contours Tab and select enable contour rendering.


Step 6. Open the Draw By Property Difference Tab, and enable "Select Around All Poly Faces"

Step 7. Render Away! Depending on how you oversample, the final render time will be drastically affected. with the right settings the quality can be top-knotch. :) And here is some stuff that i rendered in the same technique. This is a turboKat from the SWAT KATS series that i had made around Oct-Nov 2008.



I have made a script for this purpose called crToonWireframeRen 2.0 that lets u add the wire-frame and makes the settings that are required. What u get is a render ready version of the wire-frame on any selected meshes. It is quite helpful and can be found below, or by looking into the scripts section of this blog. /scripts/maya/cr_toon_wireframe_render