Aniquito : Sharing is Knowledge

CG News

Maya:Lighting:Spot Light

Spot Light

In this tutorial we will talk about spot light in Maya and also how we can use it to generate fog. Spot lights create a beam of light that gradually becomes wider, in a cone shape, like a flashlight or car headlight.

Now open maya_lights.mb again and place a spot light. Maya will create it at origin for you, using move tool drag it upwards, notice the direction of the cone, rotate it downward towards the plane. Now from the panel menu, click on look through selected, you would notice a circle that is your spot light. Now you can set the position of the spot light according to the view you can see through it. Use normal key+mouse combination of dolly, track or tumble to adjust the position and direction of the spot light. Now switch back to perspective viewport.

Spot Light

Now before we move ahead lets have a look at the spot light attributes.

We have already discussed Type, Color, Intensity, Illumination by default, Emit Diffuse and Emit Specular and decay rate in our previous tutorial, so lets start with the Cone Angle. Cone Angle is the angle (in degrees) from edge to edge of the spot light’s beam. The default value is 40. Below you can see cone angle at 150 degrees. Make it 50 degrees. Now press t on your keyboard to activate manipulator. The minute you press t, a new manipulator gizmo appears on the screen. Now you can also manipulate the spot light target, you can now move it in 3D space. Move target above the objects as shown in the pic below.

Test render your scene. Penumbra Angle is the angle (in degrees) from the edge of the spot light’s beam over which the intensity of the spot light falls off linearly to zero. Don't change anything from the previous render, only change Penumbra Angle value to 5 and render. Notice the changes. Now the spot light has an effective spread of (50+5+5=60) degrees and spot light intensity decreases to o between 50 and 60 degrees. Now change the Penumbra Angle to -5 and see what happens? Notice the changes and the effect is reversed in the later case.

Dropoff, controls the rate at which the light intensity decreases from the center to edge of the spot light beam. Below is an example of the drop off at the values 10, 30 and 50 respectively.

Decay region is similar what we have discussed already in the point light section. Here in spot light you can change its decay region interactively before we move there, let us first understand light manipulators. To show the light manipulator, first select the light icon, click on the show manipulator button or press t on your keyboard. An index manipulator will appear. Notice the small icon next to green arrow. You can click on that icon and you get different type of manipulators to adjust the values. Now change manipulator icon to Penumbra Radius, it is 3rd from the right in pic below at the middle. A yellow icon will appear at the center of the spot light. Click and drag on that icon to increase or decrease the radius of the penumbra angle. Similarly you can adjust cone angle, just play with it and get hang of it.

Now it is time to add fog effect to spot light. From the Light Effects roll out click on the Light Fog button.

Maya adds a new node lightFog1. Just test render the scene and notice that fog is appearing in the render but it is kinda disappearing in the middle. To correct that activate the light manipulator and click on the icon until it changes to decay region icon. See the image above for reference. You will see some numbers there.

Select the last circle and drag it downwards towards the objects. Render scene. Now fog is up to the objects. Now we will fine tune the objects. Open the hypershade window. Drag lightFog1 node to work area. Add a Volume Fog node to work area from volumetric rollout. Middle mouse drag-drop volumeFog node on lightFog node, choose color from the pop up.

Double click on the lightFog node, from Light Fog Attributes roll out click on the color map. Select clouds from the 3D texture list. Render the scene. Now it looks like a fog.

This wraps up the tutorial. In next tutorial we will explore light linking.

Download Tutorial Files
Discuss in forums

 

About Us | Contact Us | Forums| Gallery | © 2006-2007 Aniquito