Creating Ink Lines

 
 
 

You can control contour detection โ€” or inking โ€” at global and local levels. Global inking is controlled by the Toon Ink Lens shader, which must be applied to any cameras that you are using to render the toon effect. If the Lens shader is not applied, you cannot render ink lines.

Local inking is controlled by the Toon Host shader, which is available separately or as part of the Toon Paint and Host material shader. The Toon Host shader does not control the full range of ink attributes, but is useful for refining the ink lines created by the Toon Ink Lens shader.

Applying Global or Local Ink Lines

Applying Global Ink Lines: The To on Ink Lens Shader

If you want to render ink, you need to apply a Toon Ink Lens shader to any cameras that you'll be using to render the toon effect. Unless you specify otherwise, this renders contours over all scene objects, whether they are toon-shaded or not.

To apply global ink

  1. Select one or more of the cameras that render the scene and display its property editor (ModifyShader).

  2. On the Lens Shaders tab, the lens shader stack appears. Click Add to open a browser.

  3. From the shader library, select the Toon_Ink_Lens lens shader from the Lens folder and click OK to attach the shader to the selected camera.

  4. Open the lens shader's property editor by selecting it from the shader stack and clicking the Inspect button.

  5. Adjust the ink properties.

Applying Local Ink Lines: The Toon Host Shader

If you want to change the ink properties of specific objects, you need to apply a Toon Host shader to those objects. This allows you to change the characteristics of those objects' ink lines without changing the global inking created by the Toon Ink Lens shader.

The Toon Host is available by itself or as part of the Toon Paint and Host material shader.

NoteThe Toon Host shader does not replace the Toon Ink Lens shader. You still need to apply the lens shader to the render pass camera in order to render ink in the first place.

To activate an object's local ink properties

  1. Select the object whose local inking you want to change.

  2. From the Render toolbar, choose Get Material Toon Paint and Host or Simple Toon Host.

  3. With the object selected, choose Modify Shader from the render toolbar. The shader's property editor opens.

  4. Go to the Ink tab and activate the Override option.

  5. Adjust the local inking parameters (Color, Spread, and so on).

Rendering Ink For Specific Objects

Having a Toon Host shader applied to specific objects allows you to limit the Toon Ink Lens shader's ink rendering to those objects by making the Toon Host shader a requirement for any ink rendering.

To render ink for specific objects only

  1. Make sure that the Toon Host or Toon Paint and Host shader is applied to those objects that you want to ink.

  2. Select the camera to which the Toon_Ink_Lens shader is applied and open the render tree (press 7).

  3. Double click the object's Toon_Ink_Lens shader to open its property editor.

  4. Go to the Advanced tab and activate the Require Host option.

Controlling Ink Line Width

Basic ink line width is controlled by the Spread parameter. The higher the spread value, the thicker the ink line.

NoteAs ink lines get thicker, they tend to become "fuzzy" at the edges. You can sharpen them to a certain extent by adjusting the ink line sampling and the antialiasing values for the scene. For more information, see Controlling Sampling.

A

Spread = 1

B

Spread = 5

C

Spread = 10

To set global ink spread

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the Basic Appearance tab, adjust the Spread value.

Adjusting Local Ink Line Width

You can adjust the ink spread for individual objects that have a Toon Host shader (or Toon Paint and Host) applied to them. This scales the spread value defined by the Toon Ink Lens shader rather than replacing it. A value of 2, for example, doubles the current spread value, while a value of 0.5 halves it.

To adjust ink spread for specific objects

NoteAlthough the following procedure assumes that the object has a Toon Paint and Host material shader applied to it, the same controls exist in the Toon Host shader.
  1. Select the toon-shaded object whose ink line width you want to adjust.

  2. From the Render toolbar, choose Modify Shader to edit the object's Toon Material shader. The Toon Paint and Host shader's property editor opens.

  3. From the Ink tab, adjust the Spread value.

Controlling Ink Line Color

Basic ink line color is controlled by the Toon Ink Lens shader as part of the ink's basic appearance.

To set global ink line color

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the Basic Appearance tab, adjust the Color values using the sliders.

Setting Local Ink Line Color

You can also adjust the ink color for any Toon Host shaded object.

Here, all of the objects have the same ink line color, which is controlled by the Toon Ink Lens shader.

Each object has a Toon Paint and Host shader applied to it. The ink color override is active and each object has been assigned its own ink color, except for the grid whose ink color is still controlled by the Toon Ink Lens shader.

To set local ink line color

NoteAlthough the following procedure assumes that the object has a Toon Paint and Host material shader applied to it, the same controls exist in the Toon Host shader.
  1. Select the toon-shaded object whose ink line color you want to override.

  2. From the Render toolbar, choose Modify Shader to edit the object's Toon material shader. The Toon Paint and Host shader's property editor opens.

  3. From the Ink tab, activate the Override option.

  4. Set the override ink color using the sliders.

Tapering Ink Lines

Tapering varies the spread of the ink lines based on specific criteria. You can Three types of tapering are available:

  • Anisotropy varies the spread at a specified angle. Typically, this is used to simulate a chisel-tipped pen.

  • Direction varies the spread so that ink lines are thickest where the object faces a specified direction and thinnest where it faces away.

    For example, the default direction spread makes ink lines thickest where the objects faces the camera and thinnest where it faces away.

  • Distance varies the spread based on the object's distance from the camera. Typically, this is used to create depth fading.

A

No Tapering and Spread = 5

B

Anisotropy Tapering, Amount = 3, and Angle = 155

C

Direction Tapering, Amount = 1, and Vector = Camera

D

Distance Tapering and Amount = 1

To taper ink lines

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the Taper tab, activate Anisotropy tapering, if necessary, by setting the Amount to a non-zero value. The Amount value controls the strength of the effect.

    • Set the Angle value, which specifies the angle at which the spread is varied. A value of 0 corresponds to 12:00 on a clock face, 90 to 3:00, and so on.

  4. Activate Direction tapering, if necessary, by setting the Amount to a non-zero value. The Amount value controls the strength of the effect. Adjust the following values to tune the direction-based taper.

    • Vector: Specifies the incident vector, relative to the object's surface, used to calculate the direction-based taper.

    • Space: Defines the coordinate space (World | Camera | Object) used for specifying the incident vector.

    • Direction Min/Max: Specifies the range of directions on which the effect is applied.

      A value of 0 implies that the surface faces the incident vector (i.e., the surface normal is parallel to the incident vector).

      A value of 90 implies a surface grazed by the incident vector (i.e., the surface normal is perpendicular to the incident vector).

    • Spread Min/Max: Defines the range of spread values to which surface directions are mapped. For example, a Min Spread of 2 would cause spread to increase by a factor of two at the specified Min Direction.

    • Profile Operation: Gives a nonlinear emphasis to the effect so that changes in spread may ease-in smoothly or cut in abruptly, for example.

    • Power: Controls the amount of emphasis created by the profile Operation.

  5. Activate Distance tapering, if necessary, by setting the Amount to a non-zero value. The Amount value controls the strength of the effect. Adjust the following values to tune the distance-based taper.

    • In the case of secondary rays (those spawned as a result of reflection or transparency effects), the distance considered is that accumulated over the entire ray path, beginning at the camera and ending at the current ray-surface intersection.

    • Distance Min/Max: Specifies the range of distances to which the taper effect is applied.

    • Spread: Specifies the range of spread values to which distances are mapped. For example, a Min Spread of 2 would cause spread to increase by a factor of two at the specified Near Distance.

    • Profile Operation: Gives a non-linear emphasis to the effect, so that changes in spread may ease-in smoothly or cut in abruptly, for example.

    • Power: Controls the amount of emphasis created by the profile Operation.

Varying Ink Line Spread

The width of hand-drawn contour lines tends to fluctuate a certain amount, depending on how steady the artist's hand is. You can simulate the irregularities inherent in hand drawing by using the variation options to create random variations in the ink spread.

A

No Variation, Frequency = 50,50,50, and Spread = 5

B

Variation = 0.5, Frequency = 50,50,50, and Spread = 5

C

Variation = 1, Frequency = 50,50,50, and Spread = 5

To vary ink line spread

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the Variation tab, activate the variation by setting the Amount to a non-zero value. Amount controls the strength of the variation.

  4. Adjust the following parameters, as necessary:

    • Frequency (X, Y, Z): Defines the spatial frequency of the random variation. Higher values create noisier ink contours, while lower values create in more smoothly varying contours.

    • Animation: Controls the animation of the variation of the ink spread.

      A setting of 0 disables the animation and freezes the variation over time.

      Low values make ink lines crawl over time.

      Very high values make ink lines "chatter".

    • Basis: Specifies the basis of the random variations. Each option creates a distinct effect.

    • Space: Specifies the coordinate space (World | Camera | Object) used for specifying the variation Basis.

      Selecting camera coordinates computes variation relative to the camera. Camera coordinates might be appropriate for simulating hand-painted techniques.

      Selecting world coordinates locks the effect to the direction of a surface regardless of its global orientation.

      Selecting object coordinates rotates the effect along with the surface.

    • Variation: Specifies the range of input to which the effect is applied.

    • Spread: Specifies the range of spread values to which surface directions are mapped.

    • Profile Operation: Gives a non-linear emphasis to the effect, so that changes in spread may ease-in smoothly or cut in abruptly, for example.

    • Power: Controls the amount of emphasis created by the profile Operation.

Controlling Ink Line "Pressure"

The Pressure options simulate the pressure applied to a brush, pen, and so on, when drawing contours. The ink lines' color and alpha values are altered in proportion to the spread value.

Typically, this is used to create ink lines that fade as they become thinner, though you can create a variety of effects by experimenting with the values.

A

Original Image and No Pressure

B

Brightness, Spread Min/Max: 0.25, 1, and Brightness Min/Max: 1, 0.75

C

Saturation, Spread Min/Max: 0.25, 1, and Saturation Min/Max: 0.5, 2

D

Alpha, Spread Min/Max: 0.25, 1, and Alpha Min/Max: 0.5, 1

E

All Pressure options combined with the same values used in the three preceding images.

To create ink line pressure

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the Pressure tab, activate one or more pressure effects and adjust the following parameters:

    • Spread Min/Max: The range of spread values on which the effect acts. Each type of pressure has its own Min/Max values that correspond to a separate set of spread Min/Max values.

    • Brightness Min/Max: The range of brightness to which distances are mapped. A Min Brightness of 0.5 would cause ink to darken to half its original intensity at the specified Min Spread.

    • Saturation Min/Max: The range of saturation to which distances are mapped. A Min saturation of 0.5 would cause ink to fade to half its original saturation at the specified Min Spread.

    • Alpha Min/Max: The range of alpha to which distances are mapped. A Min alpha of 0.5 would cause ink to have half its original alpha value at the specified Min Spread.

Texturing Ink Lines

If you want to add some complexity to the color of the ink lines, you can use textures to drive ink color. This can be done globally through the Toon Ink Lens shader or locally on objects that have a Toon Paint and Host or Toon Host shader applied to them.

Texturing Local Ink Lines

To texture an individual object's ink lines, you have to drive its ink line color with a texture.

All of the objects' ink lines are controlled by the Toon Ink Lens shader.

The ink color override is active in the cube's Toon Paint and Host shader, while a rainbow gradient is used to drive the override color parameter. To emphasize the effect, the cube's local ink spread was also increased.

To color local ink lines using a texture

NoteAlthough the following procedure assumes that the object has a Toon Paint and Host material shader applied to it, the same controls exist in the Toon Host shader.
  1. Select the toon-shaded object whose ink lines you want to texture.

  2. From the Render toolbar, choose Modify Shader to edit the object's Toon material shader. The Toon Paint and Host shader's property editor opens.

  3. From the Ink tab, activate the Override option.

  4. With the object still selected, open a render tree (press 7) and select a texture from the Nodes Texture menu.

  5. Connect the texture to the host shader's host_override_color input.

  6. Double-click the texture's node to open its property editor and adjust the texture. Make sure to select an appropriate projection type for the object.

    For more information about texture projection types, see Types of Texture Projection [ Texturing ].

Texturing Global Ink Lines

Texturing global ink lines is more complex than texturing a single object's ink lines because texture shaders do not generate texture coordinates for cameras. Instead, you have to use a series of shaders to generate these coordinates in order to control how the texture is applied.

The best approach is to use a Texture Space Generator shader to create the coordinates for a texture that you connect using either the Image Lookup shader or a Texture Generator shader. Connecting the texture's output to the Toon Ink Lens Shader's Color input renders the texture in the ink lines using the coordinates that you created.

The easiest way to do this is to open the camera's render tree and connect the shaders there. The following two examples demonstrate how to texture ink lines this way.

Example 1: Controlling Global Ink-Line Color

Driving the global ink line color with a texture means that every object's ink lines are colored by the texture, unless they have a local color defined by a Toon Host shader.

Node

Function

A

Material node: Acts like a placeholder for any shader that can affect the camera.

B

Toon Ink Lens: Defines ink line attributes for all scene objects. In this example, an ink-only render is specified.

C

Color Math Basic: Performs a basic mathematical calculation on two color inputs. In this case, the first input (the texture) is multiplied by the second input (RGBA values of 1.0, 1.0, 1.0, 1.0).

D

Image Lookup: Gets a texture image and defines its UV coordinates.

In this case, the coordinates are defined by the Texture Space Generator and Texture Edit shaders.

E

Image Clip: An image clip of the texture that appears in the ink lines.

F

Texture Edit: This tool shader remaps vector coordinates as defined by the parameters in the shader's property editor.

G

Texture Space Generator: This tool shader defines the camera's texture projection method.

Define a UV projection method and set the Space Transformation mode to Screen to achieve the effect shown above. Do not define a texture space.

Example 2: Controlling Global Ink-Line Spread

The last example demonstrated how to color global ink lines using a texture. You can use the same technique to alter global ink line spread.

By converting the texture into a scalar value and using it to drive the Toon Ink Lens shader's Spread parameter, you can create interesting variations in the ink lines' thickness.

When you alter the ink line spread globally, it does not affect individual objects' ink line colors. In this image the ink line color is controlled by each object's Toon Host shader, while the ink line spread is controlled globally by the Toon Ink Lens Shader.

Node

Function

A

Material node: Acts like a placeholder for any shader that can affect the camera.

B

Toon Ink Lens: Defines ink line attributes for all scene objects. In this example, an ink-only render is specified.

C

The Color2Scalar shader converts the Color Math Basic shader's color output into a scalar value needed to drive the Toon Ink Lens shader's Spread parameter.

D

Color Math Basic: Performs a basic mathematical calculation on two color inputs. In this case, the first input (the texture) is multiplied by the second input (RGBA values of 1.0, 1.0, 1.0, 1.0).

E

Image Lookup: Gets a texture image and defines its UV coordinates.

In this case, the coordinates are defined by the Texture Space Generator and Texture Edit shaders.

F

Image Clip: An image clip of the texture that appears in the ink lines.

G

Texture Edit: This tool shader remaps vector coordinates as defined by the parameters in the shader's property editor.

H

Texture Space Generator: This tool shader defines the camera's texture projection method.

Define a UV projection method and set the Space Transformation mode to Screen to achieve the effect shown above. Do not define a texture space.

Controlling Ink Line Detection

You can specify where contours are detected based on boundaries between scene elements (between different objects or between objects and the background environment, for example) and based on Toon Host shader properties (like paint, shadows and transparency).

To set contour detection options

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the Sampling tab of the Toon Ink Lens shader's property editor, select one or more of the following Boundaries options:

    • Environment: draws ink lines at the boundaries between object surfaces and the scene environment.

    • Object: draws ink lines where object surfaces intersect or overlap.

    • Material: draws ink lines at the boundaries between different materials.

    • Paint: draws ink lines that delineate the borders of paint regions on any toon shaded objects.

    • Shadow: wherever shadows are cast, ink lines are drawn between shadowed and unshadowed surfaces.

    • Transparency: draws ink lines at the boundary between transparent and opaque objects.

    TipTransparency-based contour detection is especially useful when you are using a transparency map to simulate "holes" in an object's surface because it allows you to draw ink lines around the holes.

    You can adjust the threshold of transparency/opacity using the Detection Threshold setting on Transparency tab of the object's Toon Paint and Host (or Toon Host) shader property editor.

  4. If you want to render the scene objects' wireframes, set the Facet options. This is described in depth in the next section, Rendering Wireframes Using Facet Detection.

Rendering Wireframes Using Facet Detection

You can easily render the wireframes of some or all of your scene objects using the Toon Ink Lens shader's facet detection settings. When facet detection is enabled, contours are detected at the boundaries of an object's facets and rendered between all adjoining, intersecting, or overlapping triangles in the tessellated object surface.

In toon terms, this means that object wireframes are rendered as ink lines whose size, color, and overall look you can control as you see fit. Of course, you can further refine any object's wireframe by applying a Toon Material shader to the object and adjusting its local ink characteristics, making it transparent to expose the back-face of its wireframe, and so on.

The images shown below are simple ink-only wireframe renders of the scene shown above. Ink line width is set to 2 and the basic ink color is set to black. However, each sphere has been given a different ink color. The background color is set to white.

A

Basic facet rendering detects and renders contours between adjoining, intersecting, or overlapping triangles.

B

When the merge co-planar option is activated, facet boundaries between co-planar triangles are ignored, resulting in a wireframe with hidden lines removed.

C

When the rendered objects are made transparent, the back-face wireframe is rendered as well.

To render a wireframe
  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. To make sure that only the ink lines are rendered, go to the Basic Appearance page and activate the Ink Only option.

    You can also adjust the Color and Spread values to change the color and thickness of the ink lines respectively.

  4. Now go to the Sampling tab and activate Facet detection. Select the Merge Coplanar option to hide the boundaries between coplanar triangles (see the previous illustration).

To include an object's back-face in the wireframe render
  1. Follow the previous steps to render a wireframe. Lock the Toon Ink Lens property editor to keep it open (click the lock icon).

  2. If the object does not have a Toon material applied to it, apply one now (Get Material Toon). The Toon Paint and Host property editor opens.

  3. From the Toon Paint and Host property editor, click the Transparency tab and activate the transparency.

    Set all of the transparency color values to 1 for full transparency.

  4. From the Sampling tab of the Toon Ink Lens property editor, increase the Trace Depth value.

    The trace depth determines how many levels of contour detection are computed. For example, to render a transparent object's front and back-face ink lines requires a trace depth value of 2 for two levels of contour detection.

    Rendering the front-face ink lines of an object behind that transparent object requires an additional level, and so on. Keep in mind that increasing the trace depth can significantly increase render time.

Placing Ink Lines Using Seams

The Seams options in the Toon Host shader allow you to hide ink lines where they would normally be rendered (blending) or create them where they normally wouldn't exist (unblending).

Using Blend Groups

Blending ink lines allows you to hide ink lines in areas where they would normally appear. For example, areas where one object partially occludes another or where two objects intersect usually contain ink lines for both objects' boundaries. Blending can remove the ink lines from these areas.

For the ink lines to be hidden, one of the two overlapping objects must be a part of the other's blend objects list and within the specified occlusion distance. Alternatively, both objects can share the same blend group ID.

NoteThe blend options are local inking options, so blending requires that all objects involved must have a Toon Paint and Host or Toon Host shader attached to them.

This ink-only rendering contains three overlapping objects (not counting the grid). The sphere and the cone partially occlude the cube, which creates ink lines.

Making the sphere and the cone part of the cube's Blend group allows you to not render the ink lines that would ordinarily be created where the cube is occluded.

To blend objects' ink lines together

NoteAlthough the following procedure assumes that the object has a Toon Paint and Host material shader applied to it, the same Seams controls exist in the Toon Host shader.
  1. Select the toon-shaded object whose ink lines you want to blend with occluding/occluded objects.

  2. From the Render toolbar, choose Modify Shader to edit the object's Toon material shader. The Toon Paint and Host shader's property editor opens.

  3. Do one of the following:

    • From the Seams tab, click the Add button next to the Object list. From the pop-up explorer, select the object(s) whose ink lines you want to blend with those of the selected object. Click anywhere outside the explorer to close it and accept the selection.

    • Set the Group value to a non-zero value. This value becomes the object's blend group ID. Ink lines are hidden wherever the object overlaps another object with the same blend Group ID. You need to repeat this for any other objects whose ink lines you want to blend with the selected object's ink lines.

  4. Set the Occlusion Distance value. This is a distance value measured in Softimage units. Surface samples from the occluding and occluded objects must be no farther apart than this distance for ink lines to be hidden.

Using the Unblend Group

Unblending ink lines is just the opposite of blending them: it creates ink lines where none would normally exist. Every Toon Host object has an unblend-group parameter that you can texture to create ink lines on the object, using the texture as their basis.

In this ink-only render, the host_unblend_group parameter was textured with a procedural vein texture, using the render tree shown below it. Adjusting the Scalar Math Basic shader's values determines which parts of the texture produce ink lines.

Another ink-only render. In this case, the host_unblend_group parameter was textured with the 2D no_icon.pic texture image using the render tree (as shown below it). Once again, adjusting the Scalar_Math_Basic shader's values determines which parts of the texture produces ink lines.

Controlling Sampling

Sampling controls the quality of rendered ink lines to a large extent. The sampling value specifies the maximum number of rays fired to locate contours. The higher the sampling value, the higher the quality of the contours.

The default sampling value is 5, which is sufficient for rendering thinner contours (spread values less than 5 or 6). As contours get thicker (spread values of 7 and higher), however, they tend to become fuzzy at the edges and require higher sampling values.

All of these images were rendered with the following scene Antialiasing settings: Sampling Min/Max Level = 0/2 and Thresholds (RGBA) = 0.1, 0.1, 0.1, 0.1.

A

Spread: 2 and Samples: 5

A sampling value of 5 (and sometimes less) is fine for thinner ink lines.

B

Spread: 10 and Samples: 5

However, thicker ink lines start to get fuzzy at the edges.

C

Spread: 10 and Samples: 8

Increasing the Sampling value from the Toon Ink Lens shader smooths out the fuzzy edges.

To set ink line sampling

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the property editor's Sampling tab, adjust the Samples value.

    ImportantIn a typical scene, increasing the Samples value by 1 slows rendering by a factor of 1ยน, so you need to use as low a value as possible.

Balancing Toon Sampling with Scene Antialiasing

Because both the Toon Ink Lens shader's sampling setting and the render pass' antialiasing settings contribute to the quality of ink lines, it is important to balance them in order to optimize rendering.

For example, if you're rendering ink lines at the default spread value of 2, good values for a draft-quality render are:

  • Render pass Antialiasing settings:

    • Sampling Min/Max Level: -1,1

    • Thresholds (RGBA): 0.2, 0.2, 0.2, 0.2

  • Toon Ink Lens shader Samples value: 5

Good values for a high quality render are:

  • Render pass Antialiasing settings:

    • Sampling Min/Max Level: 0,2

    • Thresholds (RGBA): 0.1, 0.1, 0.1, 0.1

  • Toon Ink Lens shader Samples value: 5

As you make your ink lines thicker, you'll need to increase the Toon Ink Lens shader's Samples value, but you should not increase the antialiasing settings.

Instead, use the antialiasing settings to achieve the desired render quality whether or not the ink lines are rendered. Then adjust the Toon Ink Lens sampling to increase the quality of the ink lines.

For more information about antialiasing settings, see Controlling Aliasing [Rendering].

Setting a Background Color

As you create Toon rendered scenes, you may want to preview the scene objects against a solid color background. This is especially useful when you're adjusting your ink lines.

To set a background color

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the Background tab, enable the background and set the Color values.

    TipUsing the render tree, you can texture the background color. This allows you to render your scene against, among other things, a still image or an image sequence.

Creating Lens Distortion

You can render your toon-shaded scenes with two different types of lens distortion: fisheye and bulge.

  • Fisheye distortion simulates a hemispherical (fisheye) lens capable of rendering a 180-degree field of view with characteristic hemispherical distortion typical of real-world fisheye camera lenses.

    A

    No fisheye distortion

    B

    Fisheye distortion amount=0.5

    C

    Fisheye distortion amount=1.0

  • Bulge distortion allows "bulging" of the lens by altering eye-ray direction. The lens may bulge out (convex, like a fisheye lens) or bulge in (concave). This effect may vary over the surface of the lens.

To create fisheye distortion

  1. Select the camera that is rendering the ink lines and open its property editor (Modify Shader from the Render toolbar).

  2. On the Lens Shaders tab, the lens shader stack appears. Select the Toon Ink Lens shader from the shader stack and click the Inspect button to open the shader's property editor.

  3. From the Lens Effects tab, activate the type of distortion you wish to use โ€” fisheye or bulge.

  4. For either effect, adjust the Amount value. This controls the amount of distortion. A value of 0 negates the effect, while a value of 1 results in the full effect.

  5. Do one of the following, depending on the type of distortion:

    • For fisheye distortion, adjust the Scale settings. This adjusts the proportions of the distorted image in X and Y. You can activate the Uniform option to force them to the same value.

    • For bulge distortion, adjust the Magnitude. The X and Y settings control the horizontal and vertical bulge respectively.

    TipDriving the bulge effect's Magnitude with a texture is an easy way to create complex patterns of distortion. For more information about texturing global ink line parameters, see Texturing Global Ink Lines.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License