Light shapes the world by showing us what we see. It creates a sense of depth, it initiates the perception of color, and it allows us to distinguish shape and form. For a scene to be successful in CG, these realities of light need to be reproduced as faithfully as possible. The trick is learning to see light and its astonishing effects on the world around us.
It’s no surprise that lighting in Maya resembles actual direct-lighting techniques used in photography and filmmaking. Lights of various types are placed around a scene to illuminate the subjects as they would for a still life or a portrait. Your scene and what’s in it dictate, to some degree at least, which lights you put where. The type of lights you use depends on the desired effect.
At the basic level, you want your lights to illuminate the scene. Without lights, your cameras have nothing to capture. Although it seems rather easy to throw your lights in, turn them all on, and render a scene, that couldn’t be further from the truth.
Although it’s easy to insert and configure lights, it’s how you light that will make or break your scene. Knowing how to do that really comes only with a good deal of experience and experimentation, as well as a good eye and patience.
This chapter will familiarize you with the basic techniques of lighting a scene in Maya and start you on the road to finding out more.
There are many nuances to the real-world lighting around us that we take for granted; we infer a tremendous amount of visual information without much consideration. With CG lighting, you must re-create these nuances for your scene.
The most valuable thing you can do to improve your lighting technique is to relearn how you see your environment. Question why things look the way they do, and you’ll find that the answers almost always come around to lighting. Take note of the distinction between light and dark in the room you’re in now. Notice the difference in the brightness of highlights and how they dissipate into diffused light and then into shadow.
When you start understanding how real light affects objects, you’ll be much better equipped to generate your own light. After all, the key to good lighting starts with the desire to create an interesting image.
Ideally, your scene needs areas of highlight and shadow. Overlighting a scene flattens everything and diminishes details. Figure 10-1 shows a still life with too many bright lights that only flatten the image and remove any sense of color and depth.
Similarly, underlighting your scene makes it muddy and lifeless, and it flattens the entire frame. Figure 10-2 shows the still life underlit. The bumps and curves of the mesh are hardly noticeable.
Like a photographer, you want your image to have the full range of exposure. You want the richest blacks to the brightest whites in your frame to create a deep sense of detail. As in Figure 10-3, light and shadow complement each other and work to show the features of your surface.
Because your scene needs to be rendered and lighting can be a fairly heavy rendering process, your lighting needs to be efficient. That means not using dozens of lights for every part of the scene.
The traditional filmmaking and television approach to lighting is called three-point lighting. Three distinct roles are used to light the subject of a shot. More than one light can be used for each of the three roles, but the scene should seem to have only one primary (or key) light, a softer light to fill the scene, and a back light to pop the subject out from the background.
Three-point lighting ensures that the primary subject’s features aren’t just illuminated but featured with highlights and shadow. Using three directions and qualities of light creates the best level of depth. Figure 10-4 shows a schematic of a basic three-point setup.
A key light is placed in front of the subject and off to the side to provide the principal light on the subject. Because it’s usually off-center, the key light creates one side of brighter light, increasing the depth of the shot. This light also provides the primary shadows and gives the important sense of lighting direction in the shot.
Although it’s possible for several lights to fulfill the role of key light in a scene—for example, three ceiling lights overhead—one light should dominate, creating a definitive direction. Figure 10-5 (left) shows the subject being lit by only a key light, although it’s physically composed of two lights.
The direction of the two lights remains the same, and one takes intensity precedence over the other and casts shadows. The effect creates a single key light, which produces a moody still life.
A more diffused light than the key light, the fill light seems directionless and evenly spread across the subject’s dark side. This fills the rest of the subject with light and decreases the dark area caused by the key light.
The fill light isn’t meant to cast any shadows onto the subject or background itself and is actually used to help soften the shadows created by the key light. Figure 10-6 shows the still life with an added fill light. Notice how it softens the shadows and illuminates the dark areas the key light misses.
Typically, you place the fill light in front of the subject and aim it so that it comes from the opposite side of the key light to target the dark side of the subject. Even though the still life in Figure 10-6 is still a fairly moody composition, much more is visible than with only the key light in the previous figure.
Typically, you place the fill light in front of the subject and aim it so that it comes from the opposite side of the key light to target the dark side of the subject. Even though the still life in Figure 10-6 is still a fairly moody composition, much more is visible than with only the key light.
The back light,orrim light,is placed behind the subject to create a bit of a halo, which helps pop the subject out in the shot. Therefore, the subject has more presence against its background. Figure 10-7 shows how helpful a back light can be.
The back light brings the fruit in this still life out from the background and adds some highlights to the edges, giving the composition more focus on the fruit.
Don’t confuse the back light with the background light, which lights the environment behind the subject.
The three-point lighting system is used for the primary subject of the scene. Because it’s based on position and angle of the subject to the camera, a new setup is needed when the camera is moved for a different shot in the same scene. Three-point lighting is, therefore, not scene specific but shot specific, as long as it does not break the overall continuity of the scene.
After the lighting is set up for the subject of a shot, the background must be lit. Use a directed primary light source that matches the direction of the key light for the main light, and use a softer fill light to illuminate the rest of the scene and soften the primary shadows.
Practical lighting is a theatrical term describing any lights in a scene that are cast from lighting objects within the scene. For example, a desk lamp on a table in the background of a scene would need practical lighting when it’s on. You never want the practical lighting to interfere with the main lighting of the scene, unless the scene’s lighting is explicitly coming from such a source.
Each light-emitting object in your CG scene doesn’t necessarily need its own Maya light. Rendering tricks such as glow (for glow effects, see “Lighting Effects” later in this chapter) can simulate the effect that a light is turned on without actually having to use a Maya light. Of course, if you need the practical light to illuminate something in the scene, you need to create a light for it.
Six types of light are available in Maya: Ambient, Directional, Point, Spot, Area, and Volume. These lights are also used when rendering in mental ray. How you use each dictates whether they become key, fill, or rim lights. Each light can fill any of those roles, although some are better for certain jobs than others. The most commonly used light types for most scenes are Spot, Directional, and Ambient. All of these Maya lights render in Maya Software as well as mental ray.
To create each light, choose Create ⇒ Lights, and click the light type.
Lights in Maya are treated like any other object node. They can be transformed, rotated, scaled, duplicated, deleted, and so forth, and they are visible as nodes in the Hypergraph and Outliner alongside other objects in the scene. Like any other node, lights have attributes that govern how they function. Figure 10-8 shows the Attribute Editor for a typical light.
When you select any light type and then open the Attribute Editor, you’ll see the following attributes and options:
Beyond the common light attributes, each light type carries its own attributes that govern its particular settings. In the following section, open the scene file still_life_v01.mb from the Lighting project, and create the light being described to see firsthand how that particular light affects the scene.
Ambient lights cast an even light across the entire scene. These lights are great for creating a quick, even illumination in a scene; but, as you can see in Figure 10-10, they run the risk of flattening the composition. They’re perhaps best used sparingly and at low intensities as fill lights or background lights.
The Ambient Shade slider in the Attribute Editor governs how flat the lighting is. The lower the value, the flatter the lighting. Figure 10-11 shows the effect of two contrasting Ambient Shade settings.
Directional lights cast a light in a general direction evenly across the scene (see Figure 10-12). These lights are perhaps second to Spot lights as the most commonly used light type. They’re perfect for sunlight or general indoor lighting, for key lights, and for fill and back lights. They give an accurate sense of direction without having to emanate from a specific source.
A Point light casts light from a single specific point in space, similar to a bare light bulb. Its light is spread evenly from the emission point (see Figure 10-13).
Using the Decay Rate drop-down menu in the Attribute Editor, you can set how a Point light’s intensity diminishes over distance. With No Decay, the Point light illuminates an object far away as evenly as it does up close. This is the most common setting for most applications.
Setting Decay Rate to Linear, Quadratic, or Cubic requires you to increase the intensity level exponentially to compensate for the decay. You can use Decay Rate settings to illuminate nearby objects and to leave distant ones unaffected. In reality, lights have decay rates. But in CG, they don’t really need to decay unless the falloff effect is needed, as shown in Figure 10-14. Clever lighting can easily avoid this cumbersome calculation.
Point lights are good for effects such as candlelight or setting a mood.
Spot lights are arguably the most used lights in Maya because they can be used for keys, fills, or rims; and they’re highly efficient, casting light in specific areas, just like real spotlights.
Similar to Directional lights, Spot lights emphasize direction. But these lights emit from a specific point and radiate out in a cone shape, whereas Directional lights emit from an infinite source from a certain direction. As such, Spot lights can create a circular focus of light on the geometry much like a flashlight on a wall; Directionals spread the light evenly. Figure 10-15 shows a Spot light on the still life.
The following attributes govern the behavior of Spot lights:
Most practical lights are created with Spot lights. For example, a desk lamp’s light is best simulated with a Spot light. Spot lights are also the lights of choice to cast shadows. You’ll find more on shadows later in the chapter. Remember, with a Spot light, you can press T for the Special Manipulator, allowing you to move the source and target of the spotlight easily to orient and place the light in your scene.
Area lights emit light from a flat rectangular shape only (see Figure 10-17). They behave similarly to Point lights, except they emit from an area and not from a single point. You can still set a decay rate, just as you can with Point lights. Area lights are the only lights whose scale affects their intensity. The larger an Area light, the brighter the light.
Because you can control the size of the area of light being emitted, these lights are good for creating effects such as a sliver of light falling onto an object from a crack in a door (as in Figure 10-18), overhead skylights, or the simulation of large, diffused lighting fixtures such as overhead office lights. Use Area lights when you need to light a specific area of an object.
Volume lights emit light from a specific 3D volumetric area as opposed to an Area light’s flat rectangle(see Figure 10-19). Proximity is important for a Volume light, as is its scale.
A Volume light can have the following attributes:
Use Volume lights when you need to control the specific area in which light is cast, or when you need an object to move into and out of a particular area of light. Volume lights are also great for creating volumetric lighting effects such as areas of lit fog. For volumetric effects, see the section “Volumetric Lighting” later in this chapter.
It’s best to start with just a couple types of light, such as Directional and Spot, before turning to the more sophisticated types, such as Area and Volume.
Getting the essence of lighting is far more important in the beginning than understanding the nuances of all the attributes of a light. At first, limit yourself to Spots and Directionals, and try to avoid any Ambient light use.
You can control which lights illuminate which objects by using Maya light linking. Inevitably, a time will come when you want to create a special light for part of your scene but not for all of it.
However, by default, lights created in your scene illuminate all objects in the scene. The easiest way to create an exclusive lighting relationship is first to create a light and then to turn off Illuminates By Default in the light’s Attribute Editor. This ensures that this light won’t cast light on any object unless specifically made to do so through light linking.
When you’re in Lighted mode (press 7 in the Shaded panel), however, keep in mind that linked lights aren’t taken into account in the view panel displays. The linking comes through in the render. Light linking works with Maya Software and mental ray rendering.
Don’t be too quick to create an abundance of light in your scene eager to show off your models and textures. Shrouding objects in darkness and shadow is just as important as revealing them in light. You can say a lot visually by not showing parts of a whole, leaving some interpretation to the audience.
A careful balance of light and dark is important for a composition. As Figure 10-24 shows, the realism of a scene is greatly increased with the simple addition of well-placed shadows. Don’t be afraid of the dark. Use it liberally but in balance.
Maya lights don’t cast shadows by default; you need to enable this feature in the light’s Attribute Editor. When you do that, however, lights can cast shadows in one of two ways, depending on how the scene is rendered: depth map shadows and raytraced shadows. Depth map shadows are faster and pretty accurate; however, with computing being as fast as it is now, it’s usually just best to use raytraced shadows, which will be the predominate shadow type you’ll use in this book.
When you enable shadow maps (by clicking the Use Depth Map Shadows check box in the Shadows area of a light’s Attribute Editor), Maya generates shadow maps that locate where shadows fall by following the path of the light backward from the lighted object to the light itself. Shadow maps create fast, fairly accurate shadows through the Maya renderer.
The second method for casting shadows is achieved by raytracing with the Maya Software renderer or mental ray. Raytracing involves tracing a ray of light from every light source in all directions and tracing the reflection to the camera lens. Therefore, you can create more accurate shadows with raytracing. However, this render can take a little longer to calculate, particularly so when using soft shadows, which look more realistic.
You need to turn on raytraced shadows for each light when you want more accurate shadows—either soft and diffused or sharp and crisp edged—as well as enable raytracing in the Render Settings window. (See Figure 10-25 and Figure 10-26.)
For every light type except Ambient, you can turn on shadow maps through the light type’s Attribute Editor, as shown in Figure 10-27.
The depth map resolution defaults at 512. The higher this resolution, the better defined the shadows. Most shadows are detailed enough with a depth map resolution of 1024 using a Spot light.
Spot lights create shadow maps with greater accuracy at lower depth map resolution settings and faster render times than other light types (especially over Directional lights), so if you must have shadow maps, use Spot lights. Figure 10-28 shows the same render with a Spot light and a depth map resolution setting of only 1024. Compare it to Figure 10-25, which is using a Directional light with a depth map shadow with four times the resolution.
To enable raytraced shadows, turn on the light’s Use Ray Trace Shadows setting in the Attribute Editor (see Figure 10-29, toward the bottom of the Attribute Editor window). If you are rendering with Maya Software, open the Render Settings window by choosing Window ⇒ Rendering Editors ⇒ Render Settings or by clicking the Render Settings icon () in the Status line; then enable the Raytracing check box under the Raytracing Quality heading. Let’s add shadows to the scene.
For an object that has a transparency map applied to its shader, however, only raytraced shadows can cast proper shadows. On the left of Figure 10-31 is a plane with a mapped checkerboard transparency casting a raytraced shadow over the still life. On the right is the same light using shadow maps instead of raytraced shadows.
To better control your lighting, you can specify whether an object can cast and receive shadows in Maya. For example, if you have geometry casting light in front of a shadow but you don’t want it to cast a shadow, you can manually turn off that feature for that object only.
To turn off shadow casting for an object, follow these steps:
One interesting feature of shadows is that they can diffuse or soften as the shadow falls from its casting object. This small detail can greatly enhance the reality of any render. To use soft shadows, follow these steps:
Notice how the shadows soften more toward the edge of the shadow; the shadow is still sharp at the point of contact. This gives a much nicer feeling of depth to the scene. There is an increase in render time—it’s important to evaluate how much softening you need so you don’t overdo the look or increase the render time too much.
Using soft shadows was easy! Make sure you enable raytracing in Render Settings, of course. These soft raytraced shadows work both in Maya Software rendering as well as mental ray rendering.
mental ray lighting and rendering opens up a large range of possibilities within Maya. As with all rendering, lighting plays the primary role. I’ll cover mental ray rendering more in the next chapter; however, because rendering and lighting go hand in hand, it’s tough to ignore it in this chapter. This section is a primer on mental ray light functionality.
Two important functions that mental ray brings to the Maya table are caustics and global illumination (GI). Caustics is the scattering of light reflections off and through semitransparent objects, such as the light that shines on the ceiling above an indoor pool or the sunshine at the bottom of an outdoor pool. Global illumination is the effect of light reflected from one object to another. For example, if you place colored spheres inside a gray box and shine a light into the box, the walls and floor of that box pick up the color of the spheres. The light from the spheres reflects onto the walls and tints them with the spheres’ color. Furthermore, the light from the floor of the box bounces and helps illuminate the undersides of the balls.
For example, Figure 10-37 shows a scene file that has a dozen or so glass spheres inside an enclosed box. The box has four holes in the top, and two spotlights with shadows turned on are positioned outside the box, shining in through the holes. Figure 10-37 shows a typical software render. The spheres under the holes are visible, and the rest of the box is in shadow.
However, when rendering through mental ray for Maya (see Figure 10-38), the light that enters the box bounces around the scene and illuminates the other spheres. The color of the spheres also colors the area immediately around them because of GI. Additionally, the light shines through the semitransparent spheres and casts caustic highlights on the floor. (You can see the full effect in the Color Section of this book.)
Global illumination and caustics are both advanced lighting effects and won’t be covered in this book. However, a short GI exercise from a previous version of this book is available for download from the book’s web page, www.sybex.com/go/introducingmaya2014. The scene files for this exercise are also available there. Once you download the exercise, you can use Adobe Acrobat and the scene files to run through this livingroom exercise, where you use simple GI techniques to explore this powerful rendering option in mental ray.
mental ray also brings image-based lighting (IBL) to Maya. This method of lighting uses an image, typically a high dynamic range image (HDRI), to illuminate the scene using Final Gather or GI. Final Gather is a form of global illumination that relies on direct as well as indirect illumination. Direct illumination calculates the amount of light coming directly from lights in the scene and renders the result. However, it misses an important aspect of real-life lighting: diffuse reflections of light. Indirect illumination happens when light bounces off objects in a scene in order to reach and therefore light the rest of the scene—that is, diffuse reflections. Final Gather is typically a faster way than GI to get indirect illumination in a scene.
I’ll briefly touch on Final Gather here as we explore Physical Sun and Sky lighting in the next section. However, I’ll cover both IBL and Final Gather in depth in Chapter 11, “Autodesk Maya Rendering” when you light the table lamp and decorative box model (with displacement maps for box details as well).
In Physical Sun and Sky lighting, mental ray for Maya creates nodes in your scene to simulate an open-air sunlight effect for your scene lighting. It’s a quick way to create a nice-looking render. You’ll place the textured red wagon into an open scene and apply a Physical Sun and Sky (PSAS) in the following exercise.
Use the scene file WagonSunlight_v01.ma from the Lighting project on the web page to follow along. Follow these steps:
You can add lights to the scene as well; you aren’t limited to the system’s results. For example, Figure 10-50 shows a render of the wagon with the sun beginning to rise behind it, making the foreground a bit dark. Figure 10-51 shows the same render but with an added Directional light (with an Intensity of just 0.25) pointing toward the front of the wagon. This helps define the front of the wagon, hinting that there is another light source, perhaps a porch light behind the camera.
The PSAS system can get you some fairly nice results quickly. Keep experimenting with different sunDirection angles as well as the attributes for the system to see what results you can get for your scene. Add lights to create areas of detail in your model.
Unbeknownst to you, when you invoked the PSAS system, Maya turned on Final Gather in the mental ray settings. This enabled indirect lighting to work in the scene. You’ll explore Final Gather in the next chapter. At the end of this chapter, though, I’ll introduce HDRI and image-based lighting for a fairly photo-real rendering of the table lamp and decorative box.
This is the perfect time for a break, so save your work (as if I have to tell you that at this point!), go grab some iced tea, and rest your eyes for a bit. In the next section, I’ll go over various special lighting effects before returning to the wagon.
In CG, you must fake certain traits of light in the real world. Using certain methods, you can create smoky light beams, glowing lights, and lens flares. Although some of these effects fall under the domain of rendering and shader tricks, they’re best explored in the context of lighting, because they’re created by light in the real world.
How do you create an effect such as a flashlight beam shining through fog? This lighting effect is called volumetric lighting, and you can use it to create some stunning results that can sometimes be time-consuming to render.
You can’t apply volumetric effects to Ambient and Directional light types. To add a volumetric effect to any of the other types of lights, select the light and, in the Attribute Editor under the Light Effects section, click the checkered Map button to the right of the Light Fog attribute. This creates a new render node that appears in the Hypershade window. After you click the Map button, the Attribute Editor takes you to the lightFog node.
Maya handles volumetric lights by attaching a lightFog node to the light. The Color and Density attributes under this node control the brightness, thickness, and color of the fog attached to that light. Furthermore, in the light’s Attribute Editor, you can control the fog with the Fog Spread and Fog Intensity settings. Fog Intensity increases the brightness of the fog, and Fog Spread controls how well the fog is defined within its confines. For example, a Spot light with fog shows the fog in its cone. Figure 10-52 shows how Fog Spread affects the conical fog shape.
If you want the rays of light within the fog to cast shadows, check Use Depth Map Shadows for the light. You’ll have to increase the depth map resolution for a higher-quality image.
Lens flare and light glow, as illustrated in Figure 10-53, mimic the real-world effect created when light strikes a lens or when the light source is visible in the frame. The flare is created when the light hits the lens at a particular angle and causes a reflection of itself in the optics of the lens.
To enable a light glow, under the Light Effects section in the light’s Attribute Editor, click the checkered Map button next to the Light Glow attribute to create an OpticalFX node that appears in the Hypershade. The Attribute Editor shifts focus to that new node, which controls the behavior of the light glow and lens flare. The OpticalFX node contains the following attributes and settings:
To turn on a lens flare along with the light glow, click the Lens Flare check box at upper right in the Attribute Editor for OpticalFX. The attributes in the Lens Flare section control the look of the flare.
Light glows and flares can be highly effective in scenes, adding credibility to the lighting, but they’re often misused or, worse, overused in CG. Used sparingly and with subtlety, lens flares can go a long way toward adding a nice touch to your scene.
To create a glowing effect, it’s sometimes better to place a glow on a geometry’s shader instead of the light itself. Because a light must be seen in the shot and pointed at the camera to see any light glow and flare, a shader glow is sometimes more desirable. This process will composite a glow on the object that is assigned the Glow shader to simulate a volumetric light, such as a street lamp on a foggy night. Shader glows have far less render cost than true volumetric lights.
The scene file still_life_v04.mb from the web page contains the full scene for your reference. See Figure 10-57 for the final result.
In this section, you’ll set up the table lamp and decorative box together in a scene with lights so that you can render them. Furthermore, in the next chapter, you’ll be using displacement maps for detail on the box and using HDRI, mental ray, and Final Gather to light the scene using the photo of the real lamp and box as a guide. Because most of your “lighting” look results from using an HDR image, the lighting you’ll start with will be basic for now.
The lighting conditions you’ll use as a starting point are shown in Figure 10-58 as well as in the Color Section of this book. You can see that there is a primary key light coming from behind and to the right of the camera, with a fill from the left side and from the top back, which also gives a bit of a rim light. These lights will be easy to set up to get the general feel first. The finesse of this exercise will come from rendering through mental ray in the next chapter, using an HDR IBL, adding reflections to the box, adding displacement maps for the intricate carvings, and adjusting the shaders to taste for both the box and lamp. In the following exercise, you’ll create a basic lighting setup for the lamp and decorative box and get a direct lighting solution first.
Set your current project to the TableLamp project, which you should have already downloaded from the book’s web page. This is important to make sure Maya finds all the project files it needs, so it bears repeating: Set your project to TableLamp! Did you set your project yet?
How about now?
To begin lighting, open the lampScene_v07.mb scene file from the Scenes folder of the project. You’ll bring in the decorative box first and place it in the scene with these steps:
You’ve only just begun this process for the lamp and box scene. You’ll pick up this exercise from this point in Chapter 11, where you’ll add more texture maps to control reflections as well as add carving detail to the box, adjust shader settings for the lamp, and enable Final Gather to use an HDR image to light the scene to take it to a new level. Woo!
The scene file lampLighting_v01.mb in the Scenes folder of the TableLamp project gives you this lighting setup.
Lighting professionals in the CG field are called on to find the most efficient way to light a scene and bring it to the peak of its beauty. Again, this comes only from experience. The best way to become a crackerjack lighting artist is to spend months and years honing your eye and practicing the latest procedures, such as HDR lighting.
The file still_life_v01.mb in the Lighting project on the web page contains the scene of the still life with no lights, so you can play with lighting and shadow methods as well as light linking to create some extra focus on some parts of the frame. The file still_life_v02.mb contains the same scene but with three-point lighting already set up.
Notice in the still_life_v02.mb file that two lights make up the key light (spotLight1 and spotLight2). One light makes up the fill light (directionalLight1), and two lights (spotLight3 and spotLight4) make up the back light.
For practice, download some models from the Internet, and arrange them into your own still-life scenes to gain more lighting experience. Set up scenes, time the rendering process, and try to achieve the same lighting look using faster lighting setups that may not be as taxing on the renderer. Also, try taking pictures of situations and trying to match the lighting in the photo, like you’re doing with the decorative box.
Try setting up simple scenes. Start with an indoor location that is lit by a single light bulb. Then, try the same scene in the following locations to expand your lighting repertoire:
When you’re lighting a scene, invoking a lighting mode in your Perspective or Camera view panel will give you great feedback regarding the relative brightness and direction of your lights. Most computer systems’ graphics cards can handle a maximum of eight lights in Lighted mode; some professional cards can handle more.
You invoke Lighted mode by pressing 7 on your keyboard (not through the number pad on the side). You must first be in Shaded mode (press 5) or Texture mode (press 6) to be able to press 7 for Lighted mode. Remember that Lighted mode displays linked lights as if they’re lighting the entire scene. This can cause some confusion, so it’s wise to take notes on any light linking in your scene.
The Maya IPR renderer is also useful when lighting a scene. This almost-real-time updating renderer will give you a high-quality render of your scene as you adjust your lights. Chapter 11 will explore the IPR renderer.
Any attribute of a light can be animated in the same way that you animate any other object attribute. You can’t, however, animate a light’s type. To edit a light’s animation, you need only select the light and open the Graph Editor to access its keyframes. You can set keyframes on Intensity, Penumbra Angle, Color, and so on, within the Channel Box or the Attribute Editor. Right-click the name of the attribute, and choose Key Selected from the context menu.
Animating the color of a light, as well as the color of a shader, sets keyframes for the color’s RGB values as three separate keyframes. The Graph Editor shows a separate curve for the red, green, and blue channels of color when you animate a light’s color. You can set all three keys at once by right-clicking the Color attribute in the Attribute Editor and choosing Set Key from the context menu, as shown in Figure 10-69.
In addition, lights can be animated to be moved, scaled, and rotated like any other object. For further study, try animating the lighting for the simple scene(s) you set up to practice lighting from the previous section. Try creating animated lights to simulate a candle illuminating your scene, a campfire, or the flashing emergency lights you would find in your average space-station airlock.
As you saw earlier in the chapter, an easy way to manipulate lights is to use their Special Manipulator. For example, pressing T or choosing Modify ⇒ Transformation Tools ⇒ Show Manipulator tool with a Spot light selected gives you two Translate Manipulators in the view panel, as shown in Figure 10-70 and displays the icon () below the Tool Box.
This allows you to move the source or target of the light to aim it better. By clicking the cyan circle that appears below the source’s Translate Manipulator, you can toggle through a number of Manipulators to adjust the Spot light’s settings, such as cone angle (two clicks clockwise) and penumbra angle (three clicks clockwise). Figure 10-71 shows the Manipulator for cone angle.
Source and Target Translate Manipulators are available for all light types through the Show Manipulator tool as well.
This chapter explored lighting in Maya, beginning with basic concepts that included the three-point lighting technique. You then learned about the different lights in Maya, how they work, and how you can use light linking to control your scene better. Shadows are an important part of lighting and were covered in this chapter, followed by a quick exploration of the Physical Sun and Sky system with mental ray and then lighting effects such as lens flare and light glows. You then created simple lighting for the table lamp and decorative box for a still rendering. Finally, you learned how to begin animating lights for use in your scenes.
Lighting is truly the linchpin of CG; it can make or break a scene. As you’ll see in the next chapter, lighting goes hand in hand with rendering and shading, and the more you understand about all three functions, the better your scenes will look. Don’t be afraid to experiment with lighting and shading schemes on all your projects.