Toon Shader

The Toon Shader is an effect that can be applied to a 3D object. The intention of this effect is to make your 3D objects appear 2D so that they integrate more seamlessly into your 2D scene.

The effect will generate a contour line around all the separate geometry contained in the 3D object. It will also give you the ability to posterize your image so that the colour gradation in the objects appear more hand drawn.

NOTE To use this effect, Vulkan 3D Rendering will need to be enabled. For more information, see: Vulkan 3D Rendering.

Applying the Toon Shader Effect

NOTE You can also apply a Toon Shader by right-clicking the 3D layer read node and selecting Insert > 3D > Toon Shader.

Toon Shader Properties

The Toon Shader properties window allows you to control the overall strength and look of the effect. You can control the line width, colour as well as how it will appear in relation to the camera.

The Toon Shader property options are the following:

  • Line Width.

  • RGBA.

  • Truck Factor.

  • Shading Posterize Levels.

  • Grayscale.

Line Width

Line Width defines the width of the contour line generated around the geometry of the 3D model.

NOTE By default the Line Width is set to five.

To change the Line Width do one of the following:

  • Click on the Line Width box and type in a new value.

  • Click and drag on the arrow keys of the Line Width box.

The outline is rounded and generated at the depth of the object’s surface. The border will not apply to textures and will only affect the perimeter of the geometric shapes.

NOTE If the geometry is really small, the line may appear square.

RGBA

The RGBA section controls the colour and transparency of the line generated by the Toon Shader. The RGBA section is divided into Red, Green, Blue and the Alpha attributes and a colour picker.

The values of the chosen colour using the Colour Picker will be applied to the RGBA attribute boxes automatically. You can manually set the colour by entering the RGBA values in their respective attribute boxes.

NOTE The Alpha is set to 255 by default. 255 is opaque and 0 is transparent.

Truck Factor

Truck Factor affects the weight of the line based on its relation to the camera.

NOTE By default the Truck Factor is enabled.

When Truck Factor is enabled, the line weight will change relative to the 3D object's distance from the camera. The line weight will appear smaller as it moves back in Z-depth away from the camera.

When Truck Factor is inactive, The line weight will remain consistent regardless of the distance between the 3D object and the camera.

Shading Posterize Levels

Posterize simplifies the toning of shadows and/or colours on an object. By adjusting the value of the attribute, you can control the number of tones that will be applied to a 3D object.

When integrating a 3D object into a 2D scene, the smoothness of the model and textures can stand out against a 2D drawn image. By adjusting the Shading Poserize Levels, you can make your 3D object less smooth to fit in a 2D scene better.

NOTE When Posterize is set to 0, the effect is inactive.

Grayscale

If your 3D object has colour, it will be converted to grayscale, with perceived luminance weighting.

This can help to integrate a 3D object into a 2D scene visually.

TIP The Toon Shader effect settings can be copied and pasted between Storyboard Pro scenes and between Panels.