About Lights


There are six light types in Maya: ambient, area, directional, point, spot, and volume. You can combine these light types to produce just about any lighting scenario. A Maya scene may use one or all of the above light types, depending on the mood and art direction of the scene.

The following describes the different light types and some of their common uses:

  • Ambient Produces a uniform light throughout the scene. You should keep this type of light to a minimum, because the more you use it, the flatter and more devoid of contrast the scene will appear (Figure 14.14).

    Figure 14.14. The Ambient Light icon.


    Examples of ambient light include the following:

    • Light that allows you to see in a room or closet without having an actual light on

    • Light that doesn't originate from an obvious source

  • Area Two-dimensional, rectangular light source that emits light from the entire rectangle in the direction of the line perpendicular to the rectangle (Figure 14.15).

    Figure 14.15. The Area Light icon.


    Examples of area light include the following:

    • Illuminated ceiling panels

    • Rectangular light reflections on walls

  • Directional Parallel light rays that wash light across the scene in one specific direction (Figure 14.16).

    Figure 14.16. The Directional Light icon.


    Examples of directional light include sunlight and moonlight.

  • Point Radiates light out from its center in all directions. The farther an object is from this light, the less it is illuminated (Figure 14.17).

    Figure 14.17. The Point Light icon.


    Examples of point light include:

    • Light bulbs

    • LEDs

    • Torches

  • Spot Lights an area within a cone shape. The light comes from the center point and travels in a specified direction (Figure 14.18).

    Figure 14.18. The Spot Light icon.


    Examples of spotlight include:

    • Flashlights

    • Street lamps

    • Headlights

    • Spotlights

  • Volume Lights an area within a user-defined volume (Figure 14.19). Examples of volume light include light around a lit candle or torch.

    Figure 14.19. The Volume Light icon.


Light types have the following common attributes (Figure 14.20):

Figure 14.20. Common light attributes: type, color, intensity, and decay rate.


  • Type Sets the kind of light: ambient, area, directional, point, spot, or volume. You can change this attribute at any timefor example, from a point to a spot.

  • Color Sets the foundation color of the light. Image maps may be added to vary the color of the light.

  • Intensity Sets the brightness and darkness of the light. For best results, start low and work your way up (Figure 14.21).

    Figure 14.21. The top scene is lit with a light at low intensity; the bottom scene is lit with the same light at a high-intensity setting.


  • Decay Rate Controls how quickly the light's intensity decreases over distance. When you change this setting, you must also raise or lower the intensity of the light to make up for the decay-rate change. This is not an attribute of the ambient, directional, or volume lights (Figure 14.22).

    Figure 14.22. Decay rates top to bottom: wireframe, no decay, linear, quadratic, and cubic.


    • No Decay Light will have the same intensity regardless of distance.

    • Linear Decay The light's intensity diminishes with distance less abruptly than with Quadratic and Cubic decay.

    • Quadratic Decay The light's intensity diminishes at a rate between Linear and Cubic decay. This setting is closest to real-world light decay.

    • Cubic Decay The light's intensity diminishes most abruptly, substantially more abruptly than with Linear and Quadratic decay.

Ambient light

Ambient light is light that is still present even when you turn the lights out; it's the light your eyes see once they adjust to the darkness, without an obvious light source. Using ambient light gives you a quick way to see how things render without having to set up a bunch of lights. In general, however, you should use ambient light sparingly because it can quickly flatten out a scene.

First, let's create a practice scene.

To create a practice scene:

1.

Choose File > New Scene to create a new scene.

2.

Create five or six primitives in the scene, and move them around randomly, with the bottom of each sitting on the grid (Figure 14.23).

Figure 14.23. Create five or six primitives in the scene, and place them randomly.


3.

From the Create menu, select NURBS Primitive > Plane to create a plane at the origin.

4.

Scale the plane larger than the objects in your scene (Figure 14.24).

Figure 14.24. The plane is scaled larger than the objects in the scene.


5.

Save the practice scene as a file called practice.mb.

To create an ambient light:

1.

Open the practice.mb file.

2.

Choose Create > Lights, and in the sub-menu select the box next to Ambient Light (Figure 14.25).

Figure 14.25. Select the box next to Ambient Light.


3.

In the Options dialog box that opens, click the swatch beside the Color attribute (Figure 14.26).

Figure 14.26. Click the swatch beside the Color attribute.


The color wheel opens when you click the swatch.

4.

Click in the color wheel to select a color for the light (Figure 14.27).

Figure 14.27. Select a color from the color wheel, which in Maya looks more like a color block.


5.

Click Apply to lock in the color.

6.

Click Create to make the ambient light.

The ambient light is placed at the origin of the scene.

7.

In the Hotbox's north-region Marking menu, select Hypershade/Render/persp to split your window layout into these three panes.

8.

In the Render View pane, select Render > Render > persp to render the Perspective view (Figure 14.28).

Figure 14.28. Select Render > Render > persp in the Render View to render the scene.


Tip

  • Don't use more than one ambient light per scene unless absolutely necessary. Ambient light can quickly flatten the 3D effect of a scene.


The Ambient Shade attribute inside the ambient light affects the direction of the light source. If Ambient Shade is set to 0, light comes from all directions (Figure 14.29). If it's set to 1, light comes from the source itself, acting similarly to a point light (Figure 14.30). You must be careful when adjusting this attribute because the lower the number, the flatter the image will appear.

Figure 14.29. The Ambient Shade attribute is set to 0, flattening the scene.


Figure 14.30. The Ambient Shade attribute is set to 1, making the light similar to a point light.


To change an ambient light's Ambient Shade attribute:

1.

With an ambient light selected, open the Attribute Editor by selecting Window > Attribute Editor, or pressing .

2.

Set the Ambient Shade attribute to 0 (Figure 14.31).

Figure 14.31. Set the Ambient Shade attribute to 0.


The 0 value sends light evenly over the entire scene.

3.

Render the Perspective view.

Because Ambient Shade is 0, the objects blend together flatly, as in Figure 14.29.

4.

With the light still selected, go to the Attribute Editor and change the Ambient Shade attribute to .7.

The .7 value makes the ambient light act similarly to a point light, so that its intensity fades slightly as the distance from the light source increases.

5.

Click the Redo Previous Render icon in the Render View.

Because Ambient Shade is higher, the scene has more depth, similar to Figure 14.30.

6.

In the Attribute Editor, set Intensity to .25 (Figure 14.32).

Figure 14.32. Set the intensity to .25.


This brings down the intensity of the ambient light and keeps the flattening of the scene to a minimum.

7.

Click the Redo Previous Render icon in the Render View.

The scene will be very dark.

Area lights

Area lights are best for situations that call for rectangular lightingfor example, florescent lighting. Another great use for an area light is to backlight a character. However, using area lights extensively in a scene can slow rendering.

To create an area light:

1.

Open the practice.mb file.

2.

In the Hypershade, right-click the black triangle below the Create Tab and select Create All Nodes.

A list of nodes appears in the Create bar.

3.

Select Area Light in the Lights section of the Create bar (Figure 14.33).

Figure 14.33. Select Area Light in the Lights section of the Create bar.


4.

Scale the light to the size you want the area light to be.

5.

Move and rotate the light around the scene until the surface normal points at the object or area you want to light (Figure 14.34).

Figure 14.34. Point the surface normal at the area you want to light.


6.

Select the light, and press to open the Attribute Editor.

7.

In the Attribute Editor, click the swatch beside Color.

8.

Click in the color wheel to select a color for the light.

9.

Click Accept to lock in the color.

10.

Move the Intensity slider in the Attribute Editor to set the light's brightness.

11.

Close the Attribute Editor.

12.

From the Hotbox's north-region Marking menu, select Hypershade/Render/persp to split your panel layout into these three panes.

13.

Render the Perspective view (Figure 14.35).

Figure 14.35. Select Render > Render > persp to render the Perspective view.


Directional lights

Directional lights work great for representing sunlight and moonlight.

To create a directional light:

1.

Open the practice.mb file.

2.

From the Create menu, select Lights > Directional Light.

A directional light is created at the origin of the scene. The default direction points down the Z axis in the negative direction (Figure 14.36). The perpendicular light rays follow a horizontal direction by default (Figure 14.37).

Figure 14.36. The default position of the directional light.


Figure 14.37. The perpendicular light rays of the directional light follow a horizontal direction by default.


3.

Select the directional light by clicking it. Rotate the light around the axes until the arrows point in the direction you want the light to follow (Figure 14.38).

Figure 14.38. Point the arrows in the direction you want the light to follow.


4.

With the light still selected, choose a new intensity setting for the light in the Channel Box.

5.

From the Window menu, select Rendering Editors > Render View (Figure 14.39).

Figure 14.39. Select Rendering Editors > Render View to open the Render View in a new window.


The Render View opens in a new window.

6.

Render the Perspective view.

Tip

  • Translating a directional light has no effect on how it lights the scene; however, it could help you find or select that light later.


Point lights

Point lights are great for lamps and torches. They're also great for adding a little light to a dark corner, removing light from an overlit area, or faking reflected light on an object.

To create a point light:

1.

Open the practice.mb file.

2.

In the Hypershade, click the Point Light icon in the Lights section of the Create bar (Figure 14.40).

Figure 14.40. Scroll down to the Lights section of the Create Bar in the Hypershade to select the Point Light.


The Point Light appears in the Work Area of the Hypershade window (Figure 14.41).

Figure 14.41. Click the Point Light icon to create a new light to work with in Hypershade's Work Area panel.


3.

Double-click the Point Light icon in the Work Area to open the Attribute Editor.

4.

Set the Color and Intensity attributes, then close the Attribute Editor.

5.

Click the light to select it, and move it above the ground plane to keep it from being obstructed by the plane (Figure 14.42).

Figure 14.42. Move the light above the ground plane.


6.

From the Hotbox's north-region Marking menu, select Hypershade/Render/persp to split your panel layout into these three panes.

7.

Render the Perspective view (Figure 14.43).

Figure 14.43. The final rendering in the Perspective view.


Tip

  • Setting the intensity attribute to a negative number will subtract light from the area around it.


Spotlights

Spotlights are great for areas where you want to focus light. You can use them as stage or theater spotlights, headlights, or any cone-shaped light source.

To create a spotlight:

1.

Open the practice.mb file.

2.

Click the Spot Light icon in the Rendering shelf to create a spotlight at the origin of the scene.

3.

Set the Object Pick mask to select lights only, and swipe across the Spot Light icon at the origin to select it (Figure 14.44).

Figure 14.44. Set the Object Pick mask to select lights only.


If the Object Pick mask is selected correctly, only the light will be selected.

4.

Select the Show Manipulator Tool by pressing or selecting its icon in the toolbar.

5.

Pull up the Y axis translation manipulator on the spotlight to raise it above the ground (Figure 14.45).

Figure 14.45. Pull up the Y-axis translation manipulator on the spotlight to raise it above ground.


Notice when you're in the Show Manipulator tool that the end of the spotlight stays in its original position, forcing the light to point at it.

6.

Select the center square of the end manipulator, and move it to the position where you would like the light to point (Figure 14.46).

Figure 14.46. Move the end manipulator into a new position.


7.

From the Hotbox's north-region Marking menu, select Hypershade/Render/Persp to split your panel layout into these three panes.

8.

Render the Perspective view (Figure 14.47).

Figure 14.47. Select Render > Render > Persp to render the Perspective view.


A spotlight has a number of attributes that you can change. Below are definitions of some of these attributes.

Spotlight attributes

  • Cone Angle The larger the number you input here, the wider the cone (and thus the illuminated area) will be (Figure 14.48).

    Figure 14.48. The default cone angle on top; the same light position but with a larger cone angle on the bottom.


  • Penumbra Angle Adjusting the penumbra angle softens the edge of the spotlight by blurring it. A negative number blurs inside the edge of the cone; a positive number blurs outside the edge of the cone (Figure 14.49).

    Figure 14.49. Adjusting the penumbra angle blurs the edge of the spotlight. The top light has a setting of 0; the bottom light has a setting of 7.


  • Dropoff Adjusts the intensity of the light from its center out to its edge. Raising the value of this attribute results in a soft gradation from the center to the edge (Figure 14.50).

    Figure 14.50. Dropoff adjusts the intensity of the light from its center out to its edge. The light at the top has a default setting of 0; the light at the bottom has a setting of 8.


Many light attributes can have an image added to them to affect the light in additional ways. An example would be adding an image into the color attribute of a light. This projects the image through the lightsimilar to having light filtered through a stained-glass window project a pattern onto the floor (Figure 14.51). This technique is also helpful for creating light shapes that aren't round.

Figure 14.51. A light with an image mapped into it.


Volume light

Volume lights are great for illuminating multiple objects that are placed in the same proximity to each other because you can illuminate all objects within the area of the volume lights icon.

To create a volume light:

1.

Open the practice.mb file.

2.

From the Create menu, select Lights > Volume Light (Figure 14.52).

Figure 14.52. Select Lights > Volume Light from the Create menu to create a volume light at the scene's origin.


3.

Scale the Volume Light icon until it surrounds the objects you want to illuminate (Figure 14.53).

Figure 14.53. The Volume Light icon is similar to a sphere and should be placed around the objects you want to illuminate.


4.

From the Window menu, select Attribute Editor.

The Attribute Editor opens.

5.

Set the Color and Intensity attributes, then close the Attribute Editor (Figure 14.54).

Figure 14.54. Set Color and Intensity to achieve the desired brightness and color for the scene.


6.

From the Hotbox's north-region Marking menu, select Hypershade/Render/Persp to split your panel layout into these three panes.

7.

Render the Perspective view (Figure 14.55).

Figure 14.55. The Render drop-down menu allows you to select which view, or camera, you would like rendered.


To add an image map to a light's Color attribute:

1.

Click a spotlight to select it.

2.

With the light selected, select Window > Attribute Editor (Figure 14.56).

Figure 14.56. Select Window > Attribute Editor.


3.

In the Attribute Editor, select the map icon next to the Color slider to open the Create Render Node panel.

4.

In the Create Render Node panel, select the Textures tab and then click File in the 2D Textures section (Figure 14.57).

Figure 14.57. From the Create Render Node panel, select the Textures tab, and in the 2D Textures section, select File.


This creates a File node and also opens the Attribute Editor.

5.

In the Attribute Editor, select the File icon next to the Image Name attribute.

The Open dialog box appears.

6.

In the Open dialog box, browse to the folder containing the image you want to use, then select it and click Open.

The icon at the top of the Attributes Editor, updates with the image you selected.

7.

From the Hotbox's north-region Marking menu, select Hypershade/Render/Persp to split your panel layout into these three panes.

8.

Render the Perspective view (Figure 14.58).

Figure 14.58. The image used is on the left, and the final render of light with the image mapped into it is on the right.




    Maya for Windows and Macintosh
    MAYA for Windows and MacIntosh
    ISBN: B002W9GND0
    EAN: N/A
    Year: 2004
    Pages: 147
    Authors: Danny Riddell

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