–updated with a little more detail–
Part 3 (set outline settings of material)
This section sets up the material to render the ‘outline’ effect.
Open the SG tab of the material
Under mental ray click on the checkered icon next to ‘contour shader’
In the ‘create render node’ that pops up, click the mental ray tab and select a material. I used contour_shader_simple but each material does a different effect. Experiment and look at the help file for what each one does.
Follow this link: http://www.shaun-maluga.com//Media/CGTalk_Posts/beavers/Toon_Tute/Outline_Effects.htm to see pictures of some of the different ‘contour shaders’ that are available.
The ‘simple’ shader attributes look as follows
Change the colour and width of the line with these options
Part 4 (camera settings)
This sets up the camera to work with the toon shader
The camera used for rendering needs to tell the renderer how to composite the rendered image and the rendered contours.
In the outliner, select the camera you want to render with.
Under the mental ray attributes set the output shader as contour composite (similar process to part 3).
‘contour_composite’ generates a contour image composited over the rendered color image
‘contour_only’ generates a contour image with a given background color in the color frame buffer, discarding the rendered color image.
‘contour_ps’ creates PostScript code with black contours. The PostScript code can be written to a file with a separate output statement that specifies the file type ps. This shader does not touch the rendered color frame buffer.
Part 5 (render globals)
Sets up the renderer
Open the render globals window
Set the ‘render using’ option to mental ray
Select your settings as you want (eg file type size etc)
Select the mental ray tab
Under the contours section set the ‘contrast shader’ to ‘contour_contrast_function_levels’ and the store shader to ‘contour_store_function’ --(see post below for missed step)–
Play around with the settings to get the desired results.
(In the contour_contrast_functions you can check Diff-Index to turn on wireframe rendering (only renders triangulated wireframes)).
(i recommend setting the sampling quality min and max samples to-2, 2 to get nice smooth lines, the first toon pic i posted was set with the deafult -2,0 the pic of the beaver with hands was done with sampling quality set to -2,2)
Part 5 Pic
‘Contour store’ decides what kind of information to store at an image sample location.
‘Contour contrast’ uses the information from ‘Contour store’ to decide whether two samples are different enough to place a contour line between them. The settings for ‘contour_contrast_functions’ are as follows:
zdelta is the minimum depth difference required to cause a contour, measured in coordinate units.
ndelta is the minimum angle difference between normal vectors required to cause a contour, measured in degrees.
diff_mat if set to on, causes a contour between different materials.
diff_label if set to on, causes a contour between different object labels. It can be used to outline objects.
diff_index if set to on, causes a contour between different triangles. It can be used to draw triangle wireframes.
contrast if set to on, causes a contour between colors that exceed the contrast threshold specified in the options block. In the case of semitransparent object, contrasts caused by other objects behind the semitransparent object are taken into account.
min_level and max_level limit contours to ray generations of at least min_level and at most max_level. Every reflection and refraction counts as one level. For example, to exclude contours around reflections and refractions, set max_level to 0.
I think thats everything, but I’ve probably forgotten something or made a mistake.
I would have gone into more detail but I’ve got alot of assessment coming up and haven’t really got time but if you have any questions ask me and ill be more than happy to explain.