Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
UI Text Box
typenoteinfo

This page provides information on the VRayToonMtl (Toon Cel Shader). For the Toon outline effect, visit the VRayToon page.

...

Overview

...

Section
Column
width62%55%

2D cel and cartoon effects can easily be achieved with the VRayToonMtl. Use this material to make your scene get that hand-drawn look. Controlling the shadows and lights received by the material in combination with material transparency, gotten from Object or Material IDs, allows for fine-tuning the result. You can take advantage from the other standard V-Ray material options such as reflection, refraction, anisotropy, subsurface scattering and bump/normal mapping to set up the render to your liking.

Combine with VRayToon to add custom outlines for inky effect.

Column
width5%

 

Column
width33%40%

Image Modified

UI Expand
titleUI Path: ||Right-click on the geometry|| > Assign New Material...
Section
Column
width5%
 
Column
width300px

||Right-click on the geometry|| > Assign New Material... > VRay section > VRay Toon Mtl


Column
width5%
 
Column
width280px

||V-Ray Shelf|| > Right-click to Create V-Ray Materials button > VRay Toon Mtl

 


Column
width5%
 
Column
width500px

||Hypershade|| > Window tab > Create... > VRay section > VRay Toon Mtl



Column
width5%

 

...

Section
Column
width62%

Diffuse Color – Base texture blended with the color from the diffuse ramp. See the Diffuse Color with Diffuse Ramp example below.

Amount – A multiplier for the base texture. 

Diffuse Ramp

The Diffuse Ramp controls the diffuse color based on the amount of light received. Position 0.0 maps to light intensity 0.0, position 1.0 maps to light intensity 1.0 and above. See the Diffuse Ramp example below.

 

Diffuse Ramp Offset – Grayscale texture used to offset the ramp position for the respective shaded point.

Diffuse output offset – Amount used to offset the ramp position by a static value. Useful when the ramp offset texture has values in [0, 1] range but the user wants values in [-0.5, 0.5] range instead.

Opacity Map – Assigns opacity to the material where white is completely opaque and black is completely transparent. You can also assign a map by clicking the check board button. This way you can create a material that has a non-uniform opacity.

Opacity Mode – Controls how the opacity map works.

Normal – The opacity map is evaluated as normal: the surface lighting is computed and the ray is continued for the transparent effect. The opacity texture is filtered as normal.
Clip – The surface is shaded as either fully opaque or fully transparent depending on the value of the opacity map (i.e. without any randomness). This mode also disables the filtering of the opacity texture. This is the fastest mode, but it might increase flickering when rendering animations. 
Stochastic
 – The surface is randomly shaded as either fully opaque or fully transparent so that on average it appears to be with the correct transparency. This mode reduces lighting calculations but might introduce some noise in areas where the opacity map has gray-scale values. The opacity texture is still filtered as normal.

Roughness Amount – Used to simulate rough surfaces or surfaces covered with dust (for example, skin, or the surface of the Moon).

Self-Illumination – The self-illumination color of the material. A texture map can be used for the self-illumination color by clicking on the check board box next to the color slider.

Self-Illumination GI – When enabled, the self-illumination affects global illumination rays and allows the surface to cast light on nearby objects. Note, however, that it may be more efficient to use area lights or VRayLightMtl material for this effect.

Compensate Exposure – When enabled, the intensity of the Self-Illumination will be adjusted to compensate the exposure correction from the VRayPhysicalCamera.

Column
width5%

 

Column
width33%

...

Section
Column
width62%

Trace Reflections – Check – Check in this option to enable reflections for the material.

Max depth – The number of times a ray can be reflected. Scenes with lots of reflective and refractive surfaces may require higher values to look correct.

Dim distance On – Enables the Dim distance parameter which allows you to stop tracing reflection rays after a certain distance.

Dim distance – Specifies a distance after which the reflection rays will not be traced.

Dim fall off – A fall off radius for the dim distance.

Reflect On Back Side – When disabled, V-Ray calculates reflections for the front side of objects only. Enable it to make V-Ray calculate the reflections for the back sides of objects too.

Affect Channels – Allows the user to specify which channels are going to be affected by the reflectivity of the material.

Color Only – The reflectivity affects only the RGB channel of the final render.
Color+alpha – Causes the material to transmit the alpha of the reflected objects, instead of displaying an opaque alpha.
All channels – All channels and render elements are affected by the reflectivity of the material.

Column
width5%

 

Column
width33%

Image Removed

Refraction

UI Text Box
typenote

When selecting the Affect All channels option, be aware that the information of the respective component affects all render elements, therefore the Back to Beauty composition will not match the RGB result from the renderer.

Column
width5%

 

Column
width33%

Image Added

Refraction

...

Section
Column
width62%

Refraction Color –  Refraction color. Note that the actual refraction color depends on the reflection color as well.

Amount – This is the amount of the refraction color.

Refraction Glossiness – Controls the sharpness of refractions.

Section
Column
width62%

Refraction Color –  Refraction color. Note that the actual refraction color depends on the reflection color as well.

Amount – This is the amount of the refraction color.

Refraction Glossiness – Controls the sharpness of refractions. A value of 1.0 means perfect glass-like refraction; lower values produce blurry or glossy refractions.

Refraction IOR – Index of refraction for the material, which describes the way light bends when crossing the material surface. A value of 1.0 means the light does not change direction. 

Fog Color – The attenuation of light as it passes through the material. This option helps simulate the fact that thick objects look less transparent than thin objects. Note that the effect of the fog color depends on the absolute size of the objects and is therefore scene-dependent.

Fog Multiplier – The strength of the fog effect. Smaller values reduce the effect of the fog, making the material more transparent. Larger values increase the fog effect, making the material more opaque.

Fog bias – Changes the way the fog color is applied. Negative values make the thin parts of the objects more transparent and the thicker parts more opaque and vice-versa (positive numbers make thinner parts more opaque and thicker parts more transparent).

Affect Shadows – This parameter causes the material to cast transparent shadows to create a simple caustic effect dependant on the refraction color and the fog color

Column
width5%

 

Column
width33%

...

Section
Column
width62%

Trace Refractions – Enables – Enables refractions for the current material.

Max depth – The number of times a ray can be refracted. Scenes with lots of refractive and reflective surfaces may require higher values to look correct.

Affect Channels – Allows the user to specify which channels are going to be affected by the transparency of the material.

Color Only – The transparency will affect only the RGB channel of the final render.
Color+alpha – This causes the material to transmit the alpha of the refracted objects, instead of displaying an opaque alpha. 
All channels – All channels and render elements are affected by the transparency of the material.

Dispersion
UI Text Box
typenote

When selecting the Affect All channels option, be aware that the information of the respective component affects all render elements, therefore the Back to Beauty composition will not match the RGB result from the renderer.

Dispersion – Enables the calculation of true light wavelength dispersion.

Dispersion Abbe – Allows the user to increase or decrease the dispersion effect. Lowering it widens the dispersion and vice versa. 

Column
width5%

 

Column
width33%

...

Section
Column
width62%

Cutoff Threshold – A threshold below which reflections/refractions are not traced. V-Ray tries to estimate the contribution of reflections/refractions to the image, and if it is below this threshold, these effects are not computed. Do not set this to 0.0 as it may cause excessively long render times in some cases. This parameter is not available when the renderer is set to CUDAV-Ray GPU.

Double-sided – When enabled, V-Ray also shades the back-facing surfaces with this material. Otherwise, the lighting on the outer side of the material is always computed. This can be used to achieve a fake translucent effect for thin objects like paper.

Use Irradiance Map – When enabled, the irradiance map is used to approximate diffuse indirect illumination for the material. If this is off, Brute Force GI is used, in which case the quality of the Brute Force GI is determined by the Subdivs parameter of the Irradiance Map. You can use this for objects in the scene which have small details and are not approximated very well by the Irradiance Map.

Fix dark edges – When enabled, fixes dark edges that sometimes appear on objects with glossy materials.

 
Column
width5%


Column
width33%

...

Toon Edges Override

...

Section

This rollout gives you the option to override the VRayToon effect. Note that controlling the parameters works only if the object has assigned VRayToon node in combination with VRayToonMtl.

 

Column
width62%

Enabled – Enables the Toon Edges Override effect. See the Toon Edges Override example below.

Toon Edge Toon Edge Priority – The Toon Edge Priority is taken into consideration when two edges overlap. If the two objects come with the same priority, for each part of the edge overlapping the object, V-Ray looks into the edge's corresponding settings. However, if any of the objects has its priority set higher, the whole edge is drawn with its settings. All materials other than VRayToonMtl have their priority set to 0.

Line Color – The color of the outlines.

Line Width Multiplier – Scales the global toon effect line width multiplying it with a value from the range of 0 to 1. A value of 0 removes the outlines and a value of 1 renders the original line width specified in the VRayToon. You can connect a texture map here to control the line width.

Inner Line Control – Enable this option to get control over the inner edges.

Inner Line Color – The color of the inner edges' outlines. A texture map can be connected to this parameter.

Inner Line Width Multiplier – Scales the global width of the inner edges' outlines multiplying it with a value from the range of 0 to 1. A texture map can be connected to this parameter.

Outer Overlap Threshold – Determines when outlines are created for overlapping parts of one and the same object. Lower values reduce the outer overlapping lines, while higher values produce more overlap outer lines.

Normal Threshold – Determines at what point lines are created for parts of the same object with varying surface normals (for example, at the inside edges of a box). Lower values mean that only sharper normals generate an edge, while a value of 0.5 means that 90 degrees or larger angles generate internal lines. Higher values mean that smoother normals can also generate an edge. Don't set this value to pure 1.0 as this 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. Don't set this value to pure 1.0 as this fills curved objects completely.

Mask Color Threshold – Sets a threshold for the mask color. The range is between a value of 0, where there are no outlines created and 1 where there are many outlines created.

Mask Color – Uses a texture as a mask creating more outlines depending on the Mask Color Threshold value. 

Column
width5%

 

Column
width33%

 

...

The Mask Color Threshold is based on the color difference between the background and the supposed outlines/edges of the Mask Color texture. The bigger the threshold, the bigger the color difference tolerance of the texture mask is. Thus, more of the texture detail is visible in the render. See this simple example below - when increasing the value of the Mask Color Threshold, more details of the texture map are visible and rendered as outlines.of the texture map are visible and rendered as outlines.

 

Section
Column
width10%

 

Column
width80%
Image slider
minLabel0.000
maxLabel0.999
Panel
borderStylenone

Image Added

Threshold: 0.000

Panel
borderStylenone

Image Added

Threshold: 0.300

Panel
borderStylenone

Image Added

Threshold: 0.850

Panel
borderStylenone

Image Added

Threshold: 0.925

Panel
borderStylenone

Image Added

Threshold: 0.975

Panel
borderStylenone

Image Added

Threshold: 0.995

Panel
borderStylenone

Image Added

Threshold: 0.999

Column
width10%

 

 

Anchor
DiffuseRampEx
DiffuseRampEx

...

Example: Diffuse Ramp

 

This examples shows the effect of the Diffuse Ramp. Note that a VRayToon is also used for stronger toon effect.

 

Section
Column
width25%

 

Column
width50%
Image slider
startIndex2
Panel
borderStylenone

Image Added

Diffuse Ramp with blue colors

Panel
borderStylenone

Image Added

Diffuse Ramp with light green colors

Panel
borderStylenone

Image Added

Diffuse Ramp with red colors

Panel
borderStylenone

Image Added

Diffuse Ramp with purple colors

Panel
borderStylenone

Image Added

Diffuse Ramp with yellow colors

Column
width25%

 

 

Anchor
ToonEdges
ToonEdges

...

Example: Edges Override

 

This examples shows the effect of the Edges Override parameter. Note that a VRayToon is also used for stronger toon effect.

 

Section
Column
width25%

 

Column
width50%
Before after
afterLabelon
beforeLabeloff
Panel
borderStylenone

Image Added

Panel
borderStylenone

Image Added

Column
width25%

 

 

Anchor
DiffuseColor
DiffuseColor

...

Example: Diffuse Color with Diffuse Ramp

 

This example shows the effect of the Diffuse Color when used with a Diffuse Ramp. Note that a VRayToon is also used for stronger toon effect.

 

Image Added

 

Section
Column
width10%25%

 

Image Removed

Threshold: 0.300
Column
width80%50%
Image slider
minLabel0.000
maxLabel0.999
startIndex2
Panel
borderStylenone

Image Removed

Threshold: 0.000

Panel
borderStylenone
Panel
borderStylenone

Image Added

Diffuse Color = white

Image Removed

Threshold: 0.850

Panel
borderStylenone

Image Added

Diffuse Color = grey

Image Removed

Threshold: 0.925

Panel
borderStylenone

Image Added

Diffuse Color = black

Image Removed

Threshold: 0.975

Panel
borderStylenone

Image Added

Diffuse Color = red

Image Removed

Threshold: 0.995

Panel
borderStylenone

Image Added

Diffuse Color = green

Image Removed

Threshold: 0.999

10%
Column
width25%