DL3D TOON SHADER & VRAY TOON ATMOSPHERE

In this article I would discuss some simple but very useful toon shaders.

There are several methods to get the “toon” like renders. I find these two methods handy and simple.

Lets begin with what can be done with mental ray

Thanks to David Lanier, these shaders are available royalty-free, non-exclusive license to possess and to use the them for non commercial uses.

Lets first download the shaders from

Follow instruction in the zip file to load the dll and .mi files in your max folder.

This works for max 7 and 8

Set mental ray as your renderer

Press M for the material editor and click on standard, chose mentayray material

click on surface slot of the mental ray shader and select dl3d_toonshader

Lets see what they are. This would be purely experimental, and you would have to find out what parameters would suit your prop or scene
The parameters:
Ka-Ka : coefficient for ambient color
Kd : coefficient for diffuse color
Ks : coefficient for specular color
Roughness is to set roughness for specular reflections.
Ambientcol : ambient color
Diffusecol: diffuse color
Specularcol: specular color
Fractal noise: adds fractal noise to diffuse and specular color
The toon shader works on the coefficient linked to diffuse and specular in the range [0, 1]
So we have 3 limits
Lim1: lowest limit
Lim2: Medium limit
Lim3: Highest limit
Lights: when checked it allows you to choose the lights in the scene
One you set the desired parameters, go one step up , back to mental ray mat and then click on contour under advanced shaders.
Select dl3dtoonshader_contour like below

The parameters are
color : the color of the contour of 3D objects.
width : width of the contour
silhouette : if checked, we draw only the silhouette of the object (the contour lines that are interior to the object are not drawn
Go to Rendering> render>renderer
Scroll to contour and enable it

Click on contour contrast and select dl3d_contour_contrast function

Then click on contour store and select dl3d_contour_store

Click on contour output and select
Assign this mat to the mesh. Set an omni to light the scene.
Turn final gather on with some 100 samples and render
This is what I got using similar

Another lovely option we have is with vray
Its not a toon shader in vray but is given under the list of atmospheres and effects

Line color – this is the color of the outlines.

Pixels width – this is the width of the outlines in pixels.

World pixels width – this is the widthe of the outlines in world units. Lines closer to the camera will be thicker.

Opacity – opacity of the outlines.

Normal threshold – this determines when lines will be created for parts of the same object with varying surface normals (for example, at the inside edges of a box). A value of 0.0 means that only 90 degrees or larger angles will generate internal lines. Higher values mean that more smooth normals can also generate an edge. Don’t set this value to pure 1.0 as this will fill curved objects completely.

Overlap threshold – this determines when outlines will be created for overlapping parts of one and the same object. Lower values will reduce the internal overlapping lines, while higher values will produce more overlap lines. Don’t set this value to pure 1.0 as this will fill curved objects completely.

Do reflections/refractons – this will cause the outlines to appear in reflections/refractions as well. Note that this may increase render times.

Trace bias – this parameter depends on the scale of your scene; it determines the ray bias when the outlines are traced in reflections/refractions.

Color map – a texture map for the outline color. Screen-mapped maps will work best. Maps with World XYZ mapping are also supported, but may not work very well.

Width map – a multiplier texture for the outline width. Screen-mapped maps will work best. Maps with World XYZ mapping are also supported, but may not work very well.

Distortion map – a texture that will be used to distort the outlines. This works similar to bump mapping and will take the gradient of the texture as direction for distortion. Note that high output values may be required for larger distortion. Screen-mapped textures work best, although World XYZ mapping is also supported.

Opacity map – a texture for the outline opacity. Screen-mapped textures work best, although World XYZ mapping is also supported.

VRayToon only provides outlines. You will need to come up with your own cartoon-style materials (for example, using falloff maps etc or other third-party material plugins).

VRayToon doesn’t work very well with transparent objects. It will be better to use refractive objects with IOR 1.0.

There are no per-object settings. VRayToon will create outlines for all objects in the scene.

VRayToon will not work properly with objects that have their Cast Shadows property turned off.

(Information about vray toon- courtesy http://www.spot3d.com/)

So I assigned vray as the renderer.Imported a mesh in my scene.

Then assigned a fall off material to my mesh. You may want to use gradient or any mat of your choice, giving the toon feel.

Then go to environments > Atmospheres> Vray toon

Hit render

These are the examples, where I used vraytoon atmosphere

connect@animationxpress.com