Lighting

From TOI-Pedia

Direct Illumination

Lights

Maya lights.jpg

There are several lights in Maya. You can create lights using the Create > Lights menu.


An overview:

Ambient Light Maya ambient light.jpgMaya ambient light example.jpg Emits light uniformly in all directions. Don't use when using Mental Ray with Final Gathering or Global Illumination for realistic lighting scenarios. The scene will look very flat when you use too much ambient.
Directional Light Maya directional light.jpgMaya directional light example.jpg Emits parallel rays of light across the entire scene in a certain direction.
Point Light Maya point light.jpgMaya point light example.jpg Emits light in all directions from the center of the point light.
Spot Light Maya spot light.jpgMaya spot light example.jpg Emits a cone of light from the center of the spot in a certain direction.
Area Light Maya area light.jpgMaya area light example.jpg Emits light from one side of a 2D surface.
Volume Light Maya volume light.jpgMaya volume light example.jpg Fills a volume with light. Outside the volume, the light will have no effect.

Common Light attributes

Lights in Maya have some common attributes. The image below shows the attributes for a point light.

Point light common attributes.jpg

Intensity
controls the amount of light emitted by the light. Default is 1.
Color
the color of the light. Note that strong colors have a dramatic effect on the appearance of the scene.
Light color white.jpgLight color yellow.jpg
Light color lblue.jpgLight color lyellow.jpg
Emit specular
determines whether the light is visible in reflections. You may want to disable the specular component for lights that are solely for additional lighting.
Pointlight specular.jpg
In the render left, the specular component of the light has been disabled, so you don't see the light source in the reflection. In the render right it has been enabled (default), so you see the light in the reflection.
Decay Rate
decreases the intensity (energy) of the light over distance. For realistic light behavior, this should be set to Quadratic. No Decay, the default, is only used in legacy, simple ('quick 'n dirty') lighting mode, where realistic light behavior is not needed.


Raytracing

By default, a light will not cast any shadows. If you want a light to cast shadows, you have to enable it specifically. There are two methods to calculate the shadows cast by a light: Raytracing and Depth Map (dmap) shadows. Nowadays, raytracing is the most commonly used. (read more on raytracing and depth map shadows)

To enable Raytrace shadows, open the attribute editor for the light and open the Shadows sections. Find the Raytrace Shadow Attributes section and check Use Ray Trace Shadows. Some lights have some extra options:

Light angle
Available for a directional light. Allows a small variation in the angle of each ray. The will soften shadows cast by this light. A setting between .5 and 5 normally yields pretty good results. To get nice smooth result, the number of Shadow Rays must also be increased (to between 10 and 50).
Shadow Rays
The number of rays to use when calculating shadows. The default of 1 is fine in most cases. Only when settings are applied that produce soft shadows, this number may need to be increased to achieve nice results. This slows down rendering considerably!. Numbers may need to be increased to 30 or more for good results.
Ray Depth Limit
The path of a raytracing ray is limited. If you want, for instance, to have a shadow to show up in reflections, you have to increase this number. A number between 1 and 5 is common. Transparent objects between a light and an object that cast a shadow, have no influence for these calculations, so you don't need to increase the limit in this case.
Light Radius
Available for spot- and point lights. Determines the softness of the shadows. 0 produces hard shadows, 1 will give soft shadows.
If you're using raytracing for a light, make sure raytrace shadows are also enabled in the Rendersettings for the render engine you're using.

Indirect Illumination

By default, light that normally would 'bounce' of other surface (e.g walls, ceiling, etc) and creates an even illumination across the scene, isn't calculated by a render engine. Only direct illumination is calculated.

Direct illumination scene.jpg

The image above shows a scene lit by a single spotlight. It has pitch black areas where direct light doesn't get: behind the blue objects, outside the spot light beam, etc. We would expect something more like this:

Direct illumination scene w fg.jpg

This image was created using more advanced techniques, which will be covered in the next section, Using Mental Ray for indirect illumination. But it shows what we would expect. So now the question is: how can we achieve similar results? One option is to use advanced renderers that allow calculations for indirect illumination. Alternatively we could use only direct illumination to mimic the result. We start with the latter.

Using lights for indirect illumination

If we have only direct illumination, how can we mimic the light that bounces of a surface (wall, ceiling, etc)? One could argue that the surface light bounces of can be abstracted as a light source. So we could place some additional lights, with lower intensity, that mimic the reflecting light.

Our initial scene setup was:

Direct illumination scene setup 01.jpg

Next, we're going to two add secondary lights that mimics the reflections of the walls:

Direct illumination scene setup 02.jpg

In this case we used area lights with a low intensity (0.1 in this case), but you could also use spot-, point- or directional lights. Shadows are not enabled for these lights and you might want to disable the Emit Specular to hide the light source in reflection.

Try to limit the additional lights to 2 - 4. Normally you shouldn't need more than that. You can aggregate the effect of .e.g a wall and a ceiling by strategically placing the lights. Remember that you only need to mimic the light as seen by the camera you're rendering.

Rendering with only direct illumination and the light setup shown above, yields the following result. Left you see the scene with direct illumination, right is a render that uses indirect illumination (Final Gather):

Direct illumination with three lightsIndirect illumination (using Final Gather)


Using Mental Ray for indirect illumination

Mental Ray has multiple methods that allow calculations for indirect illumination: Global Illumination (using Photons) and Final Gather. Both will be covered in depth in the pages on Mental Ray. When using these techniques, light bouncing of diffuse surfaces will be calculated. The results can be very realistic, but also very slow to render.

Work flow

The light setup is unique for every scene. Each scenes has it own demands regarding lighting. There are some common pointers however.

Indirect before direct illumination

Most scenes need an combination of direct and indirect illumination. In the real world, the sun provides direct illumination (with shadows) and the sky dome provides indirect illumination.

When creating this kind of light setup, it's recommended to create the setup for indirect illumination first. The exact method depends on the render engine used. The setup should be tuned to provide light that would match a cloudy day.

Once the indirect illumination setup has been created, you can add your direct illumination. When creating a sun, you would typically use a directional light for which you enable Ray Trace shadows.

The final step is to do some fine tuning for the balance between the direct en indirect illumination. For a clear sky with strong sun, the direct light would relatively stronger. For a cloudy day with a weak sun, the indirect illumination would be relatively stronger.

Three-point Lighting

You can use most lights to create a three-point lighting. Most commonly used are spotlights, directional lights and point lights. Or a combination of these three. But you could use a area light as well. Volume and ambient lights are not really suitable.

3point lighting.jpg

Key light
This light is used as main illumination of the model. This light casts the strongest shadow.
Fill light
This light acts as a diffuse source which softens the illumination of the key light for a more realistic rendering.
Back light
This light is used to emphasize the edge of the model defining the transition between object and background.
Start with the key light, then add fill and back light.

The key light normally has the highest light intensity. The fill and back light's intensity is significantly lower as these are only meant for subtle changes in illumination.

For architectural scenes, the three-point setup can be complemented with a fourth light below your model to illuminate surfaces facing down.



Overview of Maya topics

Maya main index

Personal tools
Actions
Navigation
Tools