Rendering — Camera Effects (Adding Character) (3D Animation Using Maya)

In the real world, if you point a camera at a bright light source and snap a picture, kCfl) y°u’U get a bright glowing spot in your picture, along with a lens flare. The glowing is caused by overexposure. The lens flare is produced by the series of glass lenses that the light passes through on the way to your negative.

In Maya, however, neither of these elements will appear in your renders by default. Let’s say that you create a point light. If you point a camera at it and render the frame, your render will be black. To see the light glow and lens flare, you must enable Optical FX.

Light Glows and Lens Flares

Optical FX allows you to add glows, halos, and lens flares to your lights. The Optical FX node is created by selecting a light and clicking the Light Glow attribute Create Render node button. Then you can access the many settings of the Optical FX node. These settings control the type of glow, halo, and lens flare that will be seen in your renders.

Rendering Exercise — Optical FX Egg

1.    Set your project to understanding_maya\Chapter04\rendering_optical_egg.

2.    Open the scene rendering_optical_egg_begin.ma.

3.    Play the animation. You’ll see a hinged egg opening its top.

4.    Create a point light by clicking Create > Lights > Point Light. Place the light inside the top of the egg, where it’ll be seen when the egg opens as in Figure 4.73.


5.    On frame 16 render a frame. The light is affecting the scene, but it is not itself visible.

6.    Open the Attribute Editor, with the pointLightShape1 selected. In the Light Effects section, click the Create Render node button next to the Light Glow attribute. This will automatically create and connect an Optical FX node, as well as a render sphere attached to the light (see Figure 4.74).

7.    Render the frame. Now you can see the light and a four-point glow effect. If you like, experiment with the different Glow Types and related settings.

Point light placement

Figure 4.73: Point light placement

Enabling light glow

Figure 4.74: Enabling light glow

8. The Lens Flare is not enabled by default. Turn it on by clicking the Lens Flare checkbox, and then render the frame to see the result (see Figure 4.75).

When you are fine-tuning light settings, effects, materials, and other render settings, it can be pretty inefficient to continually re-render the scene after every adjustment. For these cases, Maya provides an excellent solution: the Interactive Photorealistic Renderer, or IPR.

The IPR updates your rendered image in close to realtime. As you adjust the settings on your effects, you’ll see instant results appear on your final image.

 Lens flare and light glow

Figure 4.75: Lens flare and light glow

9.    First, turn off Raytracing in the Render Globals. (IPR doesn’t work with raytracing.) With your perspective view active, click the IPR render button on the Status Line. Your frame will be rendered, and then you’ll be instructed to “Select a region to begin tuning.” LMB-click-drag a marquee selection around the portion of your image you’d like to refine, as in Figure 4.76. (The smaller the area, the quicker the updates will be.)

10. Now continue to tune the lens flare attributes, such as Flare Vertical, Flare Horizontal (used to rotate the row of flare shapes), Flare Intensity, and Flare Min/Max Size (see Figure 4.77).

IPR render

Figure 4.76: IPR render

Tuned lens flare

Figure 4.77: Tuned lens flare

11.  When you are finished, click the IPR stop sign icon. This clears the IPR layers from memory. You should now render a frame with the usual render button. (But be sure to turn Raytracing back on in the Render Globals first.)

12.  Return to frame 1 on the timeline and render a frame. There’s a problem: the light should not be visible when it’s hidden from view by the egg’s lid. When a light is fully occluded from a camera, no lens effects can occur. In order to make this work in Maya, you must set the render sphere to an appropriate radius. When the render sphere is fully hidden from the camera, so is the optical effect.

13.  Change the sphereShape1 radius to 0.4. Render the frame — no more glow!

14.  Try batch rendering this animation in order to see the glow appear as the egg opens (see Figure 4.78 and Color Plate VIII).

15.    Save your scene.

Behold the animated space egg

Figure 4.78: Behold the animated space egg

Next post:

Previous post: