Advanced Maya Texturing and Lighting- P3 doc

30 346 1
Advanced Maya Texturing and Lighting- P3 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

39 ■ MAYA LIGHT TYPES In 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 92730c02.indd 39 6/19/08 1:52:45 AM 40 c h a p t e r 2: APPLYING THE CORRECT MAYA LIGHT TYPE ■ Center 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 auto- matically to follow. You can also translate the Origin manipulator and thus move the body of the light. 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 92730c02.indd 40 6/19/08 1:52:51 AM 41 ■ MAYA LIGHT TYPES so, the light with the Cubic Decay Rate manages to illuminate no more than 12 world units from its origin. Cubic Quadratic Linear Figure 2.4 Linear, Quadratic, and Cubic decay rates for a spot light. This scene is included on the CD as spot_decay.ma. Note: Area lights naturally decay over distance. Nevertheless, area lights carry a Decay Rate attribute to speed the decay process. In contrast, directional and ambient lights have no natural decay. However, you can create decay through a custom shading network. See Chapter 7 for an example using the Light Info utility. Volume lights, on the other hand, are constrained by their sphere, box, cylinder, or cone light shape. 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 intensity. Spot lights are ideal for emulating light that possesses one or more of the fol- lowing traits: N• aturally divergent rays C• lose proximity to the subject I• dentifiable transition between 0 and 100 percent intensity 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). 92730c02.indd 41 6/19/08 1:52:56 AM 42 c h a p t e r 2: APPLYING THE CORRECT MAYA LIGHT TYPE ■ Ph ot os © 2008 Ju Pit e r i m ag e s Cor Poration Figure 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. 92730c02.indd 42 6/19/08 1:53:03 AM 43 ■ MAYA LIGHT TYPES Cone Angle = 20 Penumbra = 30 Cone Angle = 30 Penumbra = 20 Cone Angle = 40 Penumbra = 10 Cone Angle = 10 Penumbra = 40 Figure 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). Ph ot o © 2008 Ju Pi t e r i mag e s Co rP or at io n Figure 2.7 Barn doors on a spotlight 92730c02.indd 43 6/19/08 1:53:40 AM 44 c h a p t e r 2: APPLYING THE CORRECT MAYA LIGHT TYPE ■ In Maya, barn doors allow a normally circular light to be square. To see the Look Through Barn Doors manipulator, you must check the Barn Doors attribute in the Light Effects section of the spot light’s Attribute Editor tab, choose Panels > Look Through Selected in a workspace view, and choose Display > Rendering > Camera/ Light 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 92730c02.indd 44 6/19/08 1:53:47 AM 45 ■ MAYA LIGHT TYPES that 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 Inten- sity attribute. To do this, click the Intensity Curve Create button in the Light Effects 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. 92730c02.indd 45 6/19/08 1:53:52 AM 46 c h a p t e r 2: APPLYING THE CORRECT MAYA LIGHT TYPE ■ A BA B Figure 2.10 Two spot lights are given custom Intensity curves. This scene is included on the CD as spot_curves.ma. Using Directional Lights Directional lights provide light direction without light position. That is, they are infi- nite and constant in one direction. The position and the scale of the directional light icon do not affect the light’s intensity. Directional lights are ideal for emulating light that possesses one or more of the following traits: N• aturally parallel rays A• source that is a great distance from the subject N• o identifiable edge or falloff 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 92730c02.indd 46 6/19/08 1:54:05 AM 47 ■ MAYA LIGHT TYPES have 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). Ph ot os © 2008 Ju Pit e r i m ag e s Cor Poration 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: E• xtremely diffuse or random rays L• ittle, if any, variation in intensity V• isible in areas that are shadowed by other lights 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). 92730c02.indd 47 6/19/08 1:54:14 AM 48 c h a p t e r 2: APPLYING THE CORRECT MAYA LIGHT TYPE ■ Ph ot os © 2008 Ju Pit e r i m ag e s Cor Poration Figure 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 ll light (reected 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 Ambient Shade = 0.45 Ambient Shade = 1 Figure 2.13 Various Ambient Shade values for an ambient light. This scene in included on the CD as ambient_shade.ma. 92730c02.indd 48 6/19/08 1:54:30 AM [...]... edge Render a test frame 4 Create two new point lights Name one light CandleL and the other CandleR Place CandleL above the candle geometry held by the screen left wall sconce (see Figure 2.30) Place CandleR above the candle geometry held by the screen right wall sconce For each light, set the Color to orange, the Intensity to 1.25, and Decay Rate to Linear This will make the light falloff more believable... a check mark beside it, the object type is displayed in the column In addition, it’s possible to link and unlink shadows from surfaces For more information, see Chapter 3 Using Light Fog and Light Glow Maya spot lights, point lights, and volume lights support Light Fog and Light Glow In addition, Maya area lights support Light Glow Light Fog creates a virtual fog in a specific volume Light Glow creates... daylight with incandescent light and candlelight (see Figure 2.28) You will use point lights, volume lights, and a spot light In addition, you will apply Light Fog and Light Glow effects 1 Open room.ma from the Chapter 2 scene folder on the CD Spend a few minutes familiarizing yourself with the model’s various parts All the surfaces have been assigned to Blinn materials with simple procedural and bitmap... 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 efficient... Open the Hypershade window and switch to the Materials tab Select the lightFog1 material and open its Attribute Editor tab Set Color to a pale sky blue and Density to 1.3 9 Select CandleL and open its Attribute Editor tab Click the Light Glow checkered attribute button in the Light Effects section An Optical FX utility is automatically created Open the Hypershade window and switch to the Lights tab... node and open its Attribute Editor tab Set Glow Color to saturated orange Set Glow Intensity to 3 and Glow Spread to 0.5 This will create a small, hot glow that will emulate the candle flame Repeat this process for CandleR Render a test frame At this stage, the glass of the two sconces is too dark In the Hypershade, select the LampGlass material and open its Attribute Editor tab Change the Incandescence... of Glow Type and Halo Type attributes This scene is included on the CD as glow_halo.ma Glow and halo descriptions in the previous two paragraphs are based on default settings Both glow and halo effects have their own sections in the Optical FX utility’s Attribute Editor tab The attributes in these sections are fairly self-explanatory and determine the intensity, spread, internal noise, and additional... rotations for Sunlight until the light pattern is satisfactory 6 Create a new volume light and name it CandleAmbient Change its Color to a saturated orange Change the Intensity attribute to 0.6 Check Use Depth Map Shadows Set Resolution to 256 and Filter Size to 6 Transform CandleAmbient so it is centered under the arches and in front of the daybed area Scale the light so that it encloses most of the room... internal noise, and additional star arms of the glow and halo The color of the glow or halo is derived from the multiplication of the light 92730c02.indd 61 6/19/08 1:55:43 AM Color value and the Glow Color and Halo Color attributes of the Optical FX utility For example, if the light’s Color is yellow and the Glow Color is cyan, the center of the glow is yellow and the body of the glow is green You can create... additional 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 . possible to link and unlink shadows from surfaces. For more information, see Chapter 3. Using Light Fog and Light Glow Maya spot lights, point lights, and volume lights support Light Fog and Light. 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. 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

Ngày đăng: 02/07/2014, 05:20

Tài liệu cùng người dùng

Tài liệu liên quan