By default, the light of ambient, directional, point, and spot lights never decays.. however, with point and spot lights you can force the light to lose intensity by changing the Decay r
Trang 1in addition, you can animate the Color attribute by left-clicking the color swatch,
choosing a new color from the Color Chooser window, right-clicking the color swatch
or the word Color in the Attribute editor tab, and choosing Set Key from the shortcut
menu to edit the resulting animation curves, select the light and open the graph
editor (choose Window > Animation editors > graph editor)
Intensity Controls the brightness of the light you can apply a texture to this attribute
to vary the intensity across the throw of the light the texture serves as a multiplier
if intensity is set to 2 and the texture is 50 percent gray, the intensity of the light will
only be 1 when it strikes a surface
Illuminates By Default Serves as an on/off switch for the light.
Emit Diffuse and Emit Specular Determines whether the light will affect the diffuse and
specular calculations of a material during a render each attribute can be checked off
independently if only emit Specular is checked, the specular highlights will render by
themselves; however, the alpha channel will include the entire surface
Maya lights offer manipulator handles to make the positioning of the light icons easier you can activate a manipulator by selecting the light and choosing Display >
rendering > Camera/light Manipulator > manipulator name (to hide the
manipula-tor, choose it again it from the menu.) the following manipulator handles are
avail-able for all six lights:
Cycling Index Displays an upside-down Q-shaped icon that, when clicked, cycles
through all the other available manipulators (see Figure 2.2) this is perhaps the most
efficient way to use the light manipulators
Figure 2.2 A spot light’s Cycling Index manipulator
Trang 2Center Of Interest Displays a Center of interest manipulator and an origin
manipula-tor (see Figure 2.3) When the Center of interest is translated, the light rotates matically to follow you can also translate the origin manipulator and thus move the body of the light
auto-Activated Pivot manipulator
Center Of Interest manipulator
Origin manipulator
Figure 2.3 A directional light’s Center Of Interest and Pivot manipulators The Pivot manipulator
handle is activated so that the Rotate tool operates around the new pivot point
Pivot Displays a handle that sets the light’s pivot point you can drag the handle’s
small circle across the light’s Center of interest line, which is automatically displayed with the pivot manipulator (see Figure 2.3) you can set the pivot in front of or behind the light to rotate the light with the new pivot point, click the small circle so that its center becomes solid yellow to return the rotation to the light’s origin, click the small circle a second time if the pivot manipulator is hidden while it is active (that
is, solid yellow at the center), the rotate tool will continue to operate around the new pivot point
By default, the light of ambient, directional, point, and spot lights never decays
that is, its intensity appears the same whether an object struck by the light is one world unit from the light or a million world units from the light however, with point and spot lights you can force the light to lose intensity by changing the Decay rate attribute to linear, Quadratic, or Cubic the Decay rate options are ordered from the mildest to the harshest (see Figure 2.4) With Quadratic, the intensity decreases proportionally with the square of the distance (intensity = 1/distance*distance), which
matches the real world When using decay, you will need to raise the intensity value of
the light For example, in Figure 2.4 each light is given an intensity value of 150 even
Trang 3so, the light with the Cubic Decay rate manages to illuminate no more than 12 world
units from its origin
Using Spot Lights
Maya spot lights are named after the spotlights used on stage and in motion pictures
As opposed to their real-world counterparts, however, the light rays from a Maya
spot light are born at an infinitely small point in space the light rays quickly diverge
and follow the shape of the spot light cone Although the cone has a finite length, the
light rays continue on indefinitely the scale of the light icon does not affect the light’s
hence, flashlights, car headlights, recessed lighting, table lamps with shades, overhead lighting that “pools,” and sunlight diffusely bounced through a window are
all good candidates for spot lights (see Figure 2.5)
Trang 4Figure 2.5 Real-world lighting situations that match the qualities of Maya spot lights
Spot lights are unable to accurately emulate daytime sunlight, since the spot light rays can never be parallel Additionally, if the Cone Angle of a spot light is set to
a large value, such as 120, the resulting shadows are distorted (For more information
on shadows, see Chapter 3.)
in addition to standard light manipulators, Maya spot lights include Cone Angle, penumbra, look through Barn Doors, and Decay regions manipulators you can activate these by selecting the light and choosing Display > rendering > Camera/
light Manipulator > manipulator name.
Cone Angle Creates a circular handle at the edge of the light cone that allows you to
interactively increase or decrease the Cone Angle attribute if you click-drag the small
cyan cube, the cone size will change
Penumbra Creates a circular handle at the center of the light cone that allows you to
interactively increase or decrease the penumbra attribute the penumbra represents the transition from full light intensity to no light intensity the larger the penumbra value, the softer the edge of the spot light if the penumbra is smaller than the Cone Angle, the Cone Angle establishes the outermost limit of the spot light’s illumination (see Figure 2.6) if the penumbra value is larger than the Cone Angle, the penumbra establishes the outermost limit of the spot light’s illumination
Trang 5Figure 2.6 Four Cone Angle and Penumbra settings for the same spot light
Look Through Barn Doors toggles on virtual barn doors for the spot light in the real
world, barn doors are rectangular metal flaps that control the light throw of a
spot-light (see Figure 2.7)
Trang 6light Manipulator > look through Barn Doors the barn doors are represented by two horizontal and two vertical cyan lines if you reduce the values of the left Barn Door, right Barn Door, top Barn Door, or Bottom Barn Door attributes in the light effects section, the barn door lines move closer to the center of the light the smaller the remaining “hole,” the smaller the rectangular light shape when the light strikes a surface if a barn door line extends past the circular edge of the light, the circular edge serves as the cutoff point for that section of the light (see Figure 2.8) you can inter-actively click and drag the barn door lines in the workspace view when panels > look through Selected is activated for the light.
Figure 2.8 (Top) Look Through Barn Door manipulators for two spot lights (Bottom) The corresponding light
shapes made by the spot lights
Decay Regions Displays circular handles that represent decay regions you can force
the light to possess specific decay regions by checking the Use Decay regions attribute
in the Decay regions section of the spot light’s Attribute editor tab three regions, labeled 1, 2, and 3, are provided each region has a Start Distance and an end Dis-tance attribute Both attributes represent a specified number of world units from the light’s origin the section between the Start Distance and end Distance represents the area where the light is active the gaps between these sections represent the areas
Trang 7that receive no light hence, you can force the light to “skip” across surfaces (see
Figure 2.9) you do not have to use all three regions if the end Distance and Start
Distance values of two neighboring regions are identical, the decay between the
regions is nonexistent you can click-drag the Decay regions manipulator circles
to interactively resize the regions the Use Decay regions and Decay rate
attri-butes are compatible however, shadows are unaffected by the use of the Use Decay
regions attribute
Figure 2.9 Light “skips” across a plane when the Use Decay Regions attribute for a spot light is checked.
For a more subtle decay, you can create custom curves with a spot light’s sity attribute to do this, click the intensity Curve Create button in the light effects
inten-section of the light’s Attribute editor tab A curve node is automatically created (see
Figure 2.10) By default, the curve is given an excessive number of keyframes
never-theless, you can delete or add keys as necessary in the graph editor (choose Window >
Animation editors > graph editor) the intensity of the light is represented by the
down to up y direction of the graph the distance the light travels in world units from
its origin is represented by the left-to-right X direction of the graph the distance is
determined with the aid of a light info utility (For more information, see Chapter 7.)
By default, the curve starts at 1 and ends at 100 in the X direction, but you can scale
the curve or move keyframes if necessary
you can create similar curves for the light’s Color to do this, click the Color Curves Create button in the light effects section of the light’s Attribute editor tab in
this situation, separate curve nodes are created for the red, green, and Blue channels
once again, the default curves will have an excessive number of keyframes; these can
also be edited in the graph editor
Trang 8Using Directional Lights
Directional lights provide light direction without light position that is, they are nite and constant in one direction the position and the scale of the directional light icon do not affect the light’s intensity
infi-Directional lights are ideal for emulating light that possesses one or more of the following traits:
hence, direct sunlight and moonlight are the best candidates for directional lights (see Figure 2.11)
Directional lights are ideal for set pieces that are large in world space in the same situation, a spot light would have to be placed extremely far from the subject or
Trang 9have its Cone Angle increased to a very large value, which in turn would cause the
light’s shadows to become even less parallel (see Chapter 3 for a comparison of shadows)
Figure 2.11 Real-world lighting situations that match the qualities of Maya directional lights
Using Ambient Lights
Ambient lights create a soft light emanating in all directions the ambient light icon
cannot be scaled Ambient lights do not contribute to specular or bump map
calcula-tions if a scene is lit solely with ambient lights and a material has a bump map, the
bump map will not be visible
Ambient lights are ideal for emulating light that possesses one or more of the following traits:
hence, ambient lights are well suited for fill light in particular, light that bounces off walls and light that bounces off the ground are appropriate for ambient
lights (see Figure 2.12)
Trang 10Figure 2.12 Real-world lighting situations that match the qualities of Maya ambient lights The camel, building, and couple
are visible in the shadow of the key light (the sun) thanks to the presence of fill light (reflected sun light)
By default, ambient lights are not truly omnidirectional the Ambient Shade attribute controls the balance between omnidirectional and directional light rays for the light the default Ambient Shade value of 0.45 mixes omnidirectional and directional rays (see Figure 2.13) if Ambient Shade is 0, the light is read with equal intensity at all points in the scene if Ambient Shade is 1, the light emanates from the current position of the light icon; in this case, the light is identical to a point light if Ambient Shade is 0, it does not matter where the light icon is placed
Ambient Shade = 0
Trang 11Using Point Lights
point lights represent a light source at a fixed position light emanates in all directions
from the light icon As with a spot light, the light is generated from an infinitely small
point at the center of the icon the icon cannot be scaled
point lights are ideal for emulating light that possesses one or more of the lowing traits:
fol-o
p
hence, incandescent lightbulbs are the perfect candidate for point lights point lights can also emulate leDs and compact fluorescent lighting (see Figure 2.14)
Figure 2.14 Real-world lighting situations that match the qualities of Maya point lights
Using Area Lights
Area lights are physically based lights that emanate from a confined, flat area Area
lights can be scaled in two directions (X and y) Area lights have a center pointer that
indicates the direction in which the light is flowing
Area lights are ideal for emulating light that possesses one or more of the lowing traits:
hence, area lights match light filtering through a window or bouncing off a large wall Area lights can also re-create fluorescent lighting fixtures, strips
of neon light, back-lit signs, and large, dense banks of incandescent bulbs (see
Figure 2.15)
Trang 12Figure 2.15 Real-world lighting situations that match the qualities of Maya area lights
Area lights do not produce parallel light rays instead, area lights create a series of rays that emanate from the light icon at sampled positions along the height and width in essence, area lights function as an array of stacked point lights (see Figure 2.16)
Figure 2.16 (Left) Area light icon (Right) A simplified representation of an area light array Red spheres represent sampled
positions that generate light rays
Trang 13the intensity of an area light is affected by its intensity attribute and its relative
angle that is, if the angle between the surface normal and the light direction vector
of a single ray is large, the light intensity contribution of the ray is low if the angle
between the surface normal and the light direction vector of a single ray is small, the
light intensity contribution of that ray is high Since area lights produce a series of rays
that are sampled across the height and width of the light icon, a unique light direction
vector exists for each ray of the series
Because the light rays of an area light diverge from their origins, the edge of the area light’s throw is soft the degree of softness depends on the distance between the
light and the surface For example, the higher the light is raised above a surface, the
more diffuse the edge (the divergent rays have the opportunity to overlap to a greater
degree) Although area lights are either square or rectangular, the edge is always
rounded at the corners For a perfectly square pattern, you can use a spot light with
barn doors
Area lights, due to their nature, decay automatically nevertheless, a Decay
Rate attribute is provided to accelerate the decay process Although you can map a
texture to an area light’s Color attribute, the resulting light pattern will not be
pre-dictable; specific patterns of a bitmap will not be visible
Using Volume Lights
Volume lights possess a shape icon that dictates the extent of their light throw you
can scale and translate the shape icon to achieve different light falloffs By default, the
light’s light Shape attribute is set to Sphere you can switch the attribute to Box,
Cyl-inder, or Cone you can find the light Shape attribute in the Volume light Attributes
section of the light’s Attribute editor tab
By default, a volume light shoots light rays from the center of its shape icon in
an outward direction; in this way, the volume light is similar to a point light
how-ever, the light will never escape from or exceed the boundary of the shape icon you
can force the light rays to shoot inward from the boundary of the shape by changing
the Volume light Dir attribute to inward on the other hand, if Volume light Dir is
set to Down Axis, the light rays will be generated in parallel and will all follow the
light shape’s down axis By default, the down axis points toward negative y the axis
is indicated by the shape icon’s green arrow when Down Axis is chosen (see
Fig-ure 2.17) you can rotate the shape icon if need be
By default, the volume shape is closed however, if light Shape is set to Sphere, Cylinder, or Cone, you can reduce the Arc attribute and thus use only a
section of the light For example, if light Shape is set to Sphere, Volume light Dir
is set to outward, and Arc is set to 90, a pie-shaped wedge of light is created on
an intersecting plane
Trang 14Inward arrow Down Axis arrow
Figure 2.17 Volume light with Volume Light Dir set to Outward, Inward, and Down Axis The light intersects a plane and one of two
cylinders This scene is included on the CD as volume_axis.ma
you can add additional ambient light to the volume shape by checking the emit Ambient attribute in the Color range section in this situation, ambient light is added
to all points within the volume shape
the quality of the light produced by a volume light is controlled by two ents: penumbra and Color range the penumbra gradient, which is available to Cylin-der and Cone shapes, controls the light falloff the left side of the gradient represents the intensity of the light at the volume shape’s outer edge the right side of the gradi-ent represents the intensity of the light at the shape’s center you can insert additional handles into the penumbra gradient by clicking the gradient field if a handle is pulled down to 0, the light will have zero intensity at that point Additionally, you can widen the end of the Cone shape by raising the value of the Cone end radius attribute in its default state, the Cone shape’s down axis extends from the point of the cone
gradi-the Color range gradient controls gradi-the color of gradi-the light As with gradi-the penumbra gradient, the left side corresponds to the volume shape’s outer edge you can insert addi-tional handles into the Color range gradient by clicking the gradient field the color of each handle is set by the Selected Color swatch if a handle is set to black, it effectively reduces the light’s intensity to zero at that point For example, in Figure 2.18 light Shape of a volume light is set to Box Volume light Dir is set to outward, and emit Ambient is checked three additional color handles are inserted into the Color range gradient the result is a stylized light emanating from the center of the cube
Trang 15thanks to the flexibility of the light’s attributes, a volume light can function in a
simi-lar manner to an ambient, a point, or a directional light
Linking and Unlinking Lights
in Maya, there are several ways to link and unlink lights and surfaces By default, a
light is linked to all surfaces within a scene when it is created if a light is unlinked
from a surface, it no longer illuminates that surface the option is useful for lighting
complex scenes where a light may be adversely affecting some surfaces while lighting
others properly in addition, it allows different elements within a scene to have the
dedicated set of lights For instance, one character may be given one set of lights with
specific settings, while a second character is given a separate set of lights with a
com-pletely different set of settings
the quickest way to unlink a light is to select the light and surface, switch to the rendering menu set, and choose lighting/Shading > Break light links (Unlinking
affects the render View and Batch render, but is not reflected in the Smooth Shade
All workspace view.) to relink the light and surface, choose lighting/Shading > Make
light links
When linking and unlinking multiple lights and surfaces, it is often more cient to use the relationship editor For example, to unlink a light from multiple sur-
effi-faces, follow these steps:
1. Select a light Choose Window > relationship editors > light linking >
light-Centric the relationship editor window opens (see Figure 2.19)