Aniquito : Sharing is Knowledge

CG News

Maya:Lighting:Sources of Direct Light

Sources of Direct Light

In this tutorial we gonna talk about the Direct Sources of light available in Maya and later on we will cover point light in detail and how we can make point light glow using OpticalFX. We will also have a look on ambient light.

Light Menu

Ambient Light: Produces a uniform, non directional light through the scene. Do not place more than one ambient light in the scene.

Aera Light: It has two dimensional, rectangular light source that emits light from the entire rectangle in the direction of the normal. It can be used in illuminating ceiling panel, rectangular light bouncing off walls.

Directional Light: It produces parallel light rays that illuminates the whole scene entirely from one specific direction. You can create sun light, moon light using directional lights.

Point Light: Point light is like bulb light.

Spot Light: It lights an area with a cone shape.

Volume Lights: Lights an area with in a use defined volume. Example are area around the fires or around a candle.

Tut Scene

Before we move any farther let us set up a scene for our tutorial. It consist of simple plane and few primitives and simple texture applied to them. Open up the render setting window by clicking on and change renderer to Maya Software. Click on the Maya Software tab and change quality to the intermediate quality. Turn on the raytracing quality.



Raytracing enables more accurate shadow, reflections and refractions. Go to common tab and change image size to 640x480.

Light Menu
Go to create -> Lights and tear off the create light menu. All the said settings are already done for you so open up the maya_lights.mb file. Create a point light in the scene. Press ctrl+a to open up the attributer.


Color is the color of the light and intensity is the brightness of the light source. Set light color to bright red and intensity to 1.5. Setting intensity attribute to a negative value subtracts light from the area around it. Now just test render the scene.

Below the intensity slider Illuminates by default check box. If on, the light illuminates all objects and is included in the default Light Set. If off, the light only illuminates objects to which it is linked. Illuminates by Default is on by default. Light linking we will discuss little later. Below that is Emit Diffuse and Emit Specular checkboxes. Let us first understand what are diffuse and specular colors? Diffuse color is the color that an object reflect when illuminated by good lighting that make object easy to see. Specular color is the color of the highlights on a shiny surface.

Render with diffuse Renderwithout Diffuse

Image on the left above is rendered using emit diffuse on while in the right is Emit Diffuse is switched off. Now let us turn off the emit specular and see what happens? In the color attribute of the light you can also place a map. Click on the map Map Buttonbutton and select ramp from the 2D textures. Test render your scene. You will notice that ramp colors all over your objects.

Render Without SpecularLight Color Map

Next is decay rate. Decay rate controls how quickly the light's intensity decreases with the distance. There are four options available.

1. No Decay: Light reaches everything.

2. Linear: Light intensity decreases directly with distance. Slower than real world light.

3. Quadratic: Light intensity decreases proportionally with the squire of the distance, same as real world light.

4. Cubic: Light intensity decreases proportionally with the cube of the distance. Faster than the real world light.

To make a light glow, expand the Light Glow group and click on light glow map button. Maya will create a opticalFX node for you with the attributes. From here you can choose Glow Type and Halo Type.

Glow Types:

Linear: Glow slowly diminishes from the center of the light.
Exponential: Glow quickly diminishes from the center of the light.
Ball: Glow diminishes faster towards a distance (from the light center) specified by the Glow Spread value.
LensFlare: Simulates a bright light source illuminating the surfaces of several camera lenses.
Rim Halo: Forms a circular ring with a soft central glow. The size of the ring is determined by the Halo Spread value.

In Maya, when you add a glow to a light, a geometry object is automatically created to compute the percentage of visibility of the light to help minimize the unnatural disappearance of computer-generated glow.

* For spot lights, a disc or circle (directedDisc) is created.
* For point lights, a sphere (renderSphere) is created.
* For area lights, a rectangle (renderRect) is created.

Try different Glow type and Halo type settings and render.

You can farther change the settings of Halo and Lens Flare, just set your renderer to IPR mode and play with the settings.

Now lets talk about ambient light. It has no particular light location or direction. You can place it anywhere in your scene. It appears to be coming from all the directions. You Ambient Shade will notice a new option ambient shade. It is the proportion of directional light to omni directional light. Range 0 (Light comes from all directions) to 1 (Light comes from the position of the lights). The default value is 0.45. Change light type to ambient and test render it.

Ambient Light @ Zero Intensity Ambient Light @ One Intensity

Image on the left above is at Ambient Shade value of 0 and one the right value of Ambient Shade is 1.

This wraps up the tutorial, hope it was useful for you. In next tutorial we will explore spot light.

Download Tutorial Files
Discuss in Forums

 

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