Shadowing with the Toon System

The Maya Toon system emulates the "ink and paint" method of traditional 2D cel animation. Solid "ink" outlines are applied to areas of solid-color "paint." The outlines are specialized tube geometry that is applied to the assigned surfaces. The areas of color are created by Surface Shader and Ramp Shader materials, which are assigned by the Toon system.

The quickest way to apply the Toon system is to switch to the Rendering menu set, choose Toon > Get Toon Example, select a Toon icon in the Visor window, right-click, and choose Import Maya File name of Toon file from the shortcut menu. A complete scene with a Toon system is brought in. Otherwise, you can apply the Toon system with the following steps:

  1. Create several NURBS or polygon primitives. Allow them to partially intersect. Choose Toon > Assign Outline > Add New Toon Outline. Toon outline tubes are created and applied to all the outer edges and corners of the primitives.
  2. At this point, the primitives remain assigned to the default Lambert material. To create the paint-like quality, select the primitives again and choose Toon > Assign Fill Shader > Solid Color. A Surface Shader material is automatically assigned to the primitives. You can change the Out Color attribute of the material to change the "paint" color.

Surface Shader materials ignore all lighting and shadowing information in a scene. Therefore, the Solid Color fill shader does not create shadows. However, if you choose Toon > Assign Fill Shader > Shaded Brightness Two Tone or Shaded Brightness Three Tone, shadows are generated. In this situation, a Ramp Shader is assigned to the surfaces. The Color Input of the Ramp Shader is set to Brightness, which forces Maya to apply the colors of the Ramp Shader's Color gradient based on the brightness of the surface. Shadowed surface areas, which receive little or no light, pick up the left-hand side of the gradient (see Figure 3.28). This works with both depth map and raytrace shadows. Although the mental ray renderer supports the Ramp Shader material, it does not render the Toon outlines. (For more information on the Ramp Shader material, see Chapter 7.)

Maya Rampshader
Figure 3.28 A pair of primitives are assigned a Toon outline and the Shaded Brightness Two Tone fill shader. The render is raytraced. This scene is included on the CD as toon_shadow.ma.

Other Fill Shaders are accessible through Toon > Assign Fill Shader > name of shader. Light Angle Two Tone applies a Ramp Shader, but sets the Color Input attribute to Light Angle. The Light Angle option chooses colors from the gradient based on the angle between the surface normals and the illuminating lights. oddly enough, Light Angle Two Tone generates shadows. Rim Light, on the other hand, uses a Ramp Shader material, but adds a white color handle to the Incandescence gradient and therefore creates a thin white line around the surface's edge. Circle Highlight is similar, but inserts a white handle into Specular Color gradient, thereby creating an artificial specular highlight on the brightest potion of the surface. Both Rim Light and Circle Highlight options generate shadows.

When the Add New Toon Outline tool is applied, a pfxToon transform and pfxToon shape node are created. The pfxToon shape node generates the tube geometry for the "ink" outline and hosts a long list of attributes that affect the outline position, color, and behavior.

0 0

Post a comment

  • Receive news updates via email from this site