Common Light Attributes

table of contents

At the top of the Attribute Editor for lights is a set of values we haven't discussed yet: Color , Intensity, and toggles for Specular, Diffuse, and Illuminates by Default. You'll use these attributes frequently to adjust a light's intensity and appearance.

Intensity

A light's Intensity attribute controls the brightness of the source. You can set it to any value, positive or negative. If the intensity is raised, more light is emitted from the source (see Figure 9.18). Usually, you set the value between 0 and 1 for a medium-intensity fill light. For sunlight effects, you might go as high as 1.5 or so. With Decay Rate added (described later in this section), the light's Intensity might need to be set much higher because the strength can fall off rapidly with distance. By default, all Maya lights have no decay rate (although the Area light gives the impression of light decay), and illuminate objects at the light's full intensity, regardless of distance.

Figure 9.18. By changing the Intensity from 1 to 3, the room looks much brighter and the shadows remain fully dark.

graphics/09fig18.gif

You can also use negative values for the Intensity attribute. By setting a negative value, the light actually "absorbs" other light. If you have an area of the scene that you want to be pitch-black but light is illuminating it, you can use a light with negative Intensity to help eliminate the problem.

Illuminates by Default

By default, lights automatically illuminate all the objects in the scene. When you disable the Illuminates by Default check box, the light is removed from the defaultLightSet and affects only objects it is linked to. Light linking is handled in the Relationship Editor for lights (Window Relationship Editors Light Linking). In this dialog box, you can select a light and then choose which objects it illuminates (see Figure 9.19). The "active" objects that will be illuminated are highlighted in gray on the right side of the dialog box.

Figure 9.19. Setting up light linking in the Relationship Editor.

graphics/09fig19.gif

Emit Diffuse and Emit Specular

In specialcases, a light can emit only diffuse or specular shading (see Figure 9.20). The Emit Diffuse and Emit Specular check boxes appear in the attributes for the light near the top. The Emit Diffuse and Emit Specular attributes are not available with Ambient lights. Using Emit Diffuse only is particularly useful for creating soft fill lights to simulate light reflection; you need to disable the Emit Specular attribute so that no highlights are generated. Alternatively, enabling only Emit Specular can be useful for lighting metal objects (such as chrome logos) when you want to add specular highlights to the metal without brightening other areas.

Figure 9.20. The leftmost object is lit by a normal light that emits specular and diffuse components . The center shows specular only and the right shows diffuse only.

graphics/09fig20.gif

Color

Each light can have its own color assigned, and modifying color for a light follows the same procedure and uses the same Color Chooser dialog box you see when modifying color for a material. You can also map textures to a light's color, causing the light to project the texture like a slide projector or a movie projector, if you animate the variables or use a movie as the source.

Decay Rate

Specific to Spot, Area, and Point lights, this attribute determines the rate at which the light intensity fades (decreases) at a distance. Several types of decay are available in the Attribute Editor's Decay Rate list box. The following list describes some settings to try:

  • No Decay The light does not diminish with distance; it reaches all objects in the scene.

  • Linear The intensity of emitted light decreases at a constant (linear) rate as distance from the light source increases . Linear decay is the most frequently used type because it's easier to control; you don't need to raise the light's Intensity attribute to enormously high values to compensate.

  • Quadratic The physically accurate mode of decay, also known as inverse square. Quadratic decay is determined by proportionally decreasing the light intensity along the square of the distance. Light intensity generally must be raised substantially with this mode.

  • Cubic Decreases the intensity of light faster than the rate seen in reality. Cubic Decay is evaluated by a decrease in intensity that's relatively proportional with the cube of the distance. The lit area falls off almost instantly with Cubic Decay. This type of decay can be used to have a lit area that seems as though it's burning within surrounding darkness . Light intensity must generally be raised to a very high value to make the light appear.

tip

IPR rendering is helpful for interactively adjusting light decay; it's hard to visualize otherwise .


Tutorial: Lighting the House

In this tutorial, you'll add some lights to illuminate the house you textured in the last chapter. Load the scene file noted here.

graphics/ch09p_icon.gif
  1. First, select all the lights in the Outliner and delete them to start with a fresh slate.

  2. Create an overhead light for the scene (Create Light Directional Light). Name it toplight in the Channel Box, and then set Translate X, Y, and Z to 25 , 1440 , and 20 . Then set Rotate X, Y, and Z to 270 , 50 , and 180 so that the light points down on the scene. Set Scale X, Y, and X to 500 so that you can easily see the icon. Open the Attribute Editor, and set the Intensity attribute to 0.2 . Expand the Shadows section, and enable the Depth Map Shadows option. Set the Dmap Resolution to 1024 . Disable Dmap Auto Focus so the shadows don't shift as the camera's viewpoint travels . Set the Width to 400 so that the shadow area covers the house.

    graphics/ch09q_icon.gif
  3. Next, you'll create some fill lights. Create a Spot light (Create Light Spot Light), and rename it as front_fill . Set Translate X, Y, and Z to 3200 , 570 , and 1550 ; Rotate X, Y, and Z to 175 , 64 , and 180 ; and Scale X, Y, and Z to 500 so that you can easily see the icon. Open the Attribute Editor and deselect the Emit Specular check box so that this fill light doesn't cause highlights on objects. Set Intensity to 0.2 and Cone Angle to 90 .

  4. Repeat Step 3, but name the light side_fill and set its Translate X, Y, and Z to 2100 , 830 , and 2600 and its Rotate X, Y, and Z to 167 , 38 , and 180 . In the Attribute Editor, set Intensity to 0.25 and Dropoff to 2 to get a gradient effect in this light.

  5. Create a new Directional light and name it main_light . Set Translate X, Y, and Z to 2200 , 980 , and 2000 and Rotate X, Y, and Z to 16 , 47 , and . In the Attribute Editor, click the color swatch and set this light to a slightly bluish color to look like nighttime lighting (HSV: 230 , .06 , 0.85 ). Enable the Depth Map Shadows option and set Dmap Resolution to 2048 . Disable Dmap Auto Focus and set the Width to 8000 so that its shadows cover the entire scene. Note that if you have limited RAM, you may need to set the shadow sizes for toplight and mainlight, currently 1024 and 2048. You can lower them to 512 and 1024 or lower if your system runs out of RAM while rendering.

    Now all the lights are in place and you can render a test frame. We've used a night lighting style for the spooky house. It's not as dark as it would be in a true nighttime scene; we've intentionally brought the light level up enough to be able to see the surroundings better. This is similar to movie makers shooting "day for night" at twilight, because true night is too dark to see anything.

    Another touch you can add to the scene is a glowing moon in the night sky. To add it, you'll make a Point light that does not shine , but uses OpticalFX to create a glowing orb in the sky.

  6. Create a Point light by choosing Create Lights Point Light. In the Channel Box, change its name to moon-glow , and set Translate X, Y, and Z to 7500 , 1500 , and 4000 . Open the Attribute Editor (hotkey: Ctrl+a ). Deselect the Emit Diffuse, Emit Specular, and Illuminates by Default check boxes so that the light creates no actual light.

  7. Next, in the Light Effects panel, click the checkered button to the right of the Light Glow attribute to add an optical called OpticalFX1 to the light. For the optical effect, set the Glow Type to None and the Halo Type to Exponential. In the Halo Attributes section, you can adjust the color to light blue (HSV: 230 , .3 , 1 ) and set the Halo Intensity and Halo Spread to 0.5 . Select the Ignore Light check box, and close the Attribute Editor.

  8. Next, you need to make sure this light is not outside the camera's far clipping plane. Select the Camera view, choose View Camera Attribute Editor on the menu, and set the Far Clip Plane to 50000 . This setting ensures that the faraway light is still within the camera's renderable view. The "moon" FX light needs to be far away to ensure that the camera doesn't show its position changing in relation to the viewer's movements (thus reducing the effect of "parallax"). The real moon is far enough away that it looks the same from any point on earth, so you don't want your virtual moon to shift position and give away its nearness too easily.

    At this point, you should have a nice, spooky night effect when you render, as shown in Figure 9.21. Load the scene from the CD if you'd like to compare.

    graphics/ch09r_icon.gif
    Figure 9.21. The rendered house scene with the lights added.

    graphics/09fig21.gif

Going Further

Try adding lights to the scene with the character you modeled in Chapter 7, "Modeling with Polygons," and then rendering the scene. Lighting a character can be a lot of fun and can make a good model look spectacular. Adding lights not only illuminates objects in your scene, but also helps define the shape of the model. Using the basics you have learned in this chapter, you should be able to efficiently light your character. Try using the three-point lighting method discussed in Chapter 1, "Pre-Maya: A Primer" (see Figure 9.22).

Figure 9.22. The creature from Chapter 7 has been lit with three-point lighting.

graphics/09fig22.gif



Maya 4. 5 Fundamentals
Maya 4.5 Fundamentals
ISBN: 0735713278
EAN: 2147483647
Year: 2005
Pages: 201

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net