There are several lights in Maya. You can create lights using the Create > Lights menu.
Common Light attributes
Lights in Maya have some common attributes. The image below shows the attributes for a point light.
- controls the amount of light emitted by the light. Default is 1.
- the color of the light. Note that strong colors have a dramatic effect on the appearance of the scene.
- 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.
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.
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.
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.
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:
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:
Next, we're going to two add secondary lights that mimics the reflections of the walls:
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):
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.
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.
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.
- 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.
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.