Toon Shading: Contours
Adding contours to your toon shading is easy when using Mental Ray, but unfortunatly broke for batch rendering in some recent versions of Maya (for Maya 2016 it was still not working with SP4)
For reference on how to apply contours, you can look at this Mental Ray Contour Shader Tutorial on the TU Delft site (Wiki Page)
Here is an image rendered with relative contour width of .5 around Silouette, Depth Contrast (2) and Normal Contrast (9) that does not render with countours (except for the first frame) when animated and batch rendered.
As always (since Maya 2014) you need to set the sampling mode to legacy (Render Settings > [Show Advanced Settings] > Legacy Options > Legacy Sampling Mode)
Batch rendering contours does work if you apply Mental Ray shaders to both the Shader Group and the Render Settings
To apply countours in a way that does batch render:
- In the Shader Group:
- under mental ray uncheck Enable Contour rendering
- under Custom Shaders add a countour_shader_simple as Contour Shader
- In the Render Settings, in configuration (check Show Advanced Options) under Countours:
- Check Enable Contour Rendering
- Under Custom Shaders
- Add a contour_contrast_function_levels to the Contrast Shader
- Add a contour_store_functions to the Store Shader
The store shader stores the data needed for contour rendering. The contrats shader takes over the settings where to draw the contour line, which are now grayed out. The settings are basically the same, but their names may seem a bit cryptic
- The Zdelta is the Depth Contrast
- The Ndelta is the Normal Contrast
- The Diff Label gets you the line around the silouette
- Diff Index will draw a line around every polygon
I could be redundant and post the head rendered with the new settings here. It looks exactly the same, but now it does bacth render with contours!