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 be 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.
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.
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.
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 good photographer, you want your image to have the full range of exposure. As in Figure 10-3, light and shadow complement each other and work to show the features of your surface.
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 of the camera 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.
still_life_v01.mb
from the Lighting project downloaded from the book’s website.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 usually 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.
The back light, or rim 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 is used to light the environment itself.
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.
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; that light will appear at the origin of your scene.
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 efficient.
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; Directional lights 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 Spot light 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.
Additionally, Area lights give off a softer feel the larger they are. Often area lights give the best photographic light quality compared to the other light types, especially when used with mental ray rendering, and they create the most accurate-looking shadows, though at the expense of render times.
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 not to be confused with volumetric lighting, such as the effect of a flashlight in smoke or headlights driving through fog. For volumetric effects, see the section “Volumetric Lighting” later in this chapter.
Any of these aforementioned lights will work with Maya Software rendering and mental ray rendering. It’s also best to start with just a couple types of light, such as Directional and Spot no matter which renderer you use, 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 Directional lights and try to avoid any Ambient light use.
You can control which lights illuminate which objects by using Maya light linking. 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 the attribute 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.
still_life_linking_v01.mb
from the Lighting project or use your own scene that already has at least three lights. Click the Render button () in the Status line to render a frame (Figure 10-20). There are no shadows; you’ll deal with that in the next section.When you’re in Lighted mode (press 7 in the Shaded panel) and using the default Viewport 2.0 view panel display, linked lights aren’t taken into account in that panel display. However, if you switch the view panel from Viewport 2.0 to High Quality Rendering (in the view panel’s menu bar, choose Renderer ⇒ High Quality Rendering), you will be able to see light linking work in the view panel. Light linking works with both Maya Software rendering and mental ray rendering.
Don’t be too quick to create an abundance of light in your scene to show off your models and textures. Shrouding objects in darkness and shadow is just as important as revealing them in light. 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.
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; however, with computing being as fast as it is now, it’s usually just best to use raytraced shadows because they are more accurate and usually look much nicer. We will use raytraced shadows throughout this book.
When you create a light in Maya, raytraced shadows are enabled by default for the light. However, since Maya Software rendering does not have raytracing enabled by default, your renders will not have any shadows at first. You will need to turn on raytracing or switch to mental ray rendering to see your raytraced shadows. You will explore raytracing and mental ray further in Chapter 11, “Autodesk® Maya® Rendering.”
If you do not want to raytrace your shadows for whatever reason, you will need to enable shadow maps for your lights by clicking the Use Depth Map Shadows check box in the Shadows area of the light’s Attribute Editor. Maya will then generate 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 are generally fast because they do not need raytracing, but they are not very accurate.
On the other hand, 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 in your renders.
As you can see, depth map shadows are not as nice as raytraced shadows when you compare Figure 10-25 and Figure 10-26.
When you create a light, the light’s Use Ray Trace Shadows setting in the Attribute Editor (see Figure 10-27, toward the bottom of the Attribute Editor window) is turned on by default. 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 using Maya Software rendering first.
still_life_linking_v01.mb
from the Lighting project, select the Point light. In the Attribute Editor, turn on Use Ray Trace Shadows under the Shadows ⇒ Raytrace Shadow Attributes heading (Figure 10-27, right). In this scene, raytrace shadows have been disabled on purpose. All new lights you create will automatically have raytraced shadows enabled.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-29 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:
still_life_linking_v01.mb
scene and open the Attribute Editor.One interesting feature of shadows is that they can diffuse or soften as the shadow falls farther away from the object casting the shadow. For example, hold a pen on its end on your desk and notice how the pen’s shadow gets softer or fuzzier the farther it is from where the pen meets the table. This small detail can greatly enhance the reality of any render. To use soft shadows, follow these steps:
still_life_shadows_v01.mb
scene from the Lighting project. Check out the render settings. Raytracing is already enabled for the key and fill lights as well as for the renderer.The Directional light had a much higher light radius than the Point light because its shadows react differently. The Point light’s distance from the subject plays a big part in how the light affects the shadows from the subject, so it is more sensitive to Light Radius values than is the non-position-dependent Directional light.
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 in mental ray rendering.
mental ray lighting and rendering opens up a large range of possibilities within Maya. As with all rendering, lighting plays a 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 additional 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-35 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 Spot lights with shadows turned on are positioned outside the box, shining in through the holes. Figure 10-35 shows a typical Maya Software render. The spheres are visible and reflect the environment, but overall they are dark, with the rest of the box in shadow and no bounced light.
However, when rendering through mental ray for Maya (see Figure 10-36), 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. If you are reading a digital version of this book, you can see the color bouncing around in Figure 10-36.
mental ray also gives you image-based lighting (IBL) in 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, when you light the toy plane 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.
Make sure your project is set to the Lighting project from the web page and use the scene file WagonSunlight_v01.ma
from the scenes folder to follow along with these steps:
The render is too bright, and the wood slats for the railings shouldn’t be reflective. Your render should also show that the fire-engine red of the wagon is a bit washed out.
You can add lights to the scene as well; you aren’t limited to the system’s results. For example, Figure 10-48 shows a render of the wagon with the sun beginning to rise behind it, making the foreground a bit dark. Figure 10-49 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, as well as adding a few nodes to the scene including a sky environment that surrounds your scene. This enabled indirect lighting to work in the scene. To get rid of the PSAS, you must go to the Render Settings window, and in the Indirect Lighting tab where you first turned on PSAS, you must click the Delete bar.
You’ll explore Final Gather in the next chapter. At the end of that chapter, though, I’ll introduce HDRI and image-based lighting for a fairly photo-real rendering of the toy plane 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-50 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-51, 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 the 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. 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.
still_life_v03.mb
file in the Lighting project on the web page. Create a Spot light, place it over the still life, and aim it directly down onto the fruit, as shown in Figure 10-53. Turn on Use Depth Map Shadows for the light and set Resolution to 1024. Set Penumbra Angle to 10 and Intensity to 1.5. Press 7 for Lighted mode in the Camera1 view panel to see how the light is being cast.The scene file still_life_v04.mb
from the web page contains the full scene for your reference. See Figure 10-55 for the final result.
In this section, you’ll set up and light a simple scene with the toy plane and the decorative box so that you can render them together. Furthermore, in the next chapter, you’ll start using displacement maps for detail on the box, and you’ll use HDRI, mental ray, and Final Gather to get the most from lighting and rendering. The lighting you’ll start with will be basic for now. In the following exercise, you’ll create a basic lighting setup for the scene and get a direct lighting solution first. In the next chapter, you’ll expand on this lighting using mental ray and HDRI.
Set your current project to the Plane 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 Plane! Did you set your project yet?
How about now?
To begin lighting, open the planeLightingScene_v01.mb
scene file from the Scenes folder of the project. This is a simple scene with a camera in place and a corner made up of a redwood tabletop and two white walls:
planeShading_v01.ma
from the Scenes folder. Next you will bring in the decorative box from the previous chapters. This time, instead of importing, you will use referencing. This allows you to import a file into your current scene. However, with a reference, any time you adjust the original file, it will automatically update that model in the scene it has been referenced in. You’ll see this in action in the next chapter.
boxDetail01.mb
to bring in the latest decorative box scene from Chapter 7, “Autodesk® Maya® Shading and Texturing,” as a reference. This is actually the same scene file as boxTextures03.mb
in the Decorative_Box project that you completed in Chapter 7, but cleaned up a bit and placed in the Plane project folders for simplicity’s sake. The texture files you need are also copied into the Plane project’s Sourceimages folder.candleModel_v03.mb
file.Save your file and compare it to planeLightingScene_v02.ma
or skip to the following section. Here you will lay out lighting using the three-point lighting system discussed earlier.
Save your file and compare it to planeLightingScene_v03.ma
or skip to the following section. Here you will make rendering reflections and shadows possible.
You can see that simple additions of shadow and reflections helped this render look nicer.
Now turn your attention to the glass candle holder and the candle inside. You can continue with your own scene or load the scene file planeLightingScene_v04.ma
to skip to this point. You will create a glass shader and a simple shader for the candle in the following steps:
This phenomenon occurs when two surfaces penetrate each other. Since Maya is interpreting the geometry of the glass and the candle inside slightly differently during render time, this penetration may occur. You can simply reduce the size of the candle inside ever so slightly. However, you will address this issue when you render this scene with mental ray in the next chapter, so you can leave it be for now.
The render is not looking too shabby, but when you tackle this scene again with mental ray in the next chapter, you will see how powerful mental ray rendering can be. In Chapter 11, you’ll add more texture maps to add carving detail to the decorative box, create mental ray specific shaders for the objects in the scene, and enable Final Gather to use an HDR image to light the scene to take it to a new level. Woo!
You can check your work against the scene file planeLightingScene_v05.ma
in the Scenes folder of the Plane project.
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 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.
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 consumer graphics cards can handle a maximum of eight lights in Lighted mode; some professional cards can handle more.
As you’ve seen, 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. RMB+click the name of the attribute and choose Key Selected from the context menu.
When you animate the color of a light or a shader, you set 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 RMB+clicking the Color attribute in the Attribute Editor and choosing Set Key from the context menu, as shown in Figure 10-66.
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-67, 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-68 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 toy plane, candle holder, and decorative box for a still rendering. You used raytracing to enable reflections and shadows as well as to create a glass look with refractions. Finally, you learned how to begin animating lights for 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.