©BBB3viz

Table of Contents

This page provides information on the Toon Render Effect.

 

Overview


VRayToon is a very simple atmospheric plugin that produces cartoon-style outlines on objects in the scene. The settings for a single VRayToon atmospheric are applied to all objects selected for inclusion. Multiple toon styles can be represented in a scene by creating several VRayToon atmospherics and including/excluding different sets of objects.

While there are several solutions for adding toon effects to 3D renderings in 3ds Max, most of them function either as special materials (shaders) or as render (post) effects. VRayToon has been implemented as an atmospheric effect for several reasons:

  • Very simple implementation.
  • Works with any geometry supported by V-Ray, including displaced objects, Procedural Fur and Proxy Objects.
  • Works with any camera type supported by V-Ray (spherical, fish-eye, etc.).
  • Works with any camera effect (depth of field and/or motion blur).
  • Works with ray traced effects such as reflection and refraction.
  • Smooth and consistent outlines for intersecting objects.

VRayToon is not intended to be a full NPR (non-photorealistic rendering) effect. However, it may be useful in many cases.

The source code of VRayToon is available as part of the V-Ray SDK.

 

 

off
on

 

VRayToon Parameters


Basic parameters

Line color – Color of the outlines. See the Line Color example below.

Pixels – Width of the outlines in pixels. See the Pixels example below.

World – Width of the outlines in world units. Lines closer to the camera are thicker.

Opacity – Opacity of the outlines.

Normal threshold – Determines when lines are 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 generate internal lines. Higher values mean that smoother transitions between face normals can also generate a line. Setting this value to 1.0 fills curved objects completely.

Overlap threshold – Determines when outlines are created for overlapping parts of one and the same object. Lower values reduce the internal overlapping lines, while higher values produce more overlap lines. Setting this value to 1.0 fills curved objects completely.

Do reflections/refractions – When enabled, outlines appear in reflections/refractions. Note that this might increase render times.

Trace bias – Determines the ray bias when the outlines are traced in reflections/refractions. This parameter depends on the scale of your scene.

Hide inner edges – When enabled, the inner edges of the geometry are not considered for the calculation of the toon lines. See the Hide Inner Edges example below.

Compensate camera exposure – When enabled, the Line color value is automatically adjusted to compensate for any exposure correction applied by the camera.

 

 

Maps


This group of parameters controls the outlines using various texture maps.

Screen-mapped maps work best. Maps with World XYZ mapping are also supported, but may not work very well.

Color – A texture map for the outline color. 

Width – A multiplier texture for the outline width. 

Distortion – A texture that is used to distort the outlines, using the gradient of the texture as direction for distortion. This works similarly to bump-mapping. Note that high output values may be required for larger distortion. 

Opacity – A texture for the outline opacity. 

 

 

Include/Exclude Objects


These controls specify which objects are affected by the VRayToon atmospheric. Using these options, you can achieve different outlines for different objects in the scene. To do this, create several VRayToon atmospherics and include different sets of objects in each.

The Objects/Layers dropdown menu switches the Include/Exclude list between selecting objects and layers.  

An object can be explicitly excluded from VRayToon by unchecking the VRayToon outlines checkbox that is located in the V-Ray Properties of each object.

 

 

 

Examples

 


 

Line Color

 

Line color = black rgb(0,0,0)

Line color = white rgb(255, 255, 255)

Line color = yellow rgb(215, 161, 68)

Move the slider to see the example renders.

Pixels

 

Pixels = 1.5

Pixels = 3

Pixels = 5

Move the slider to see the example renders.

 


Hide Inner Edges

 

 

off
on

 

 

 

Notes


  • VRayToon only provides outlines. You need to use VRayToonMtl or another cartoon-style material (for example, using falloff maps, etc., or other third-party material plugins).

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

  • The quality of the lines depends on the current settings of the Image sampler.

  • In order to use VRayToon simultaneously with VRayAerialPerspective, you have to put the VRayAerialPerspective on the top of the atmospherics effects list.