From BlenderWiki

Jump to: navigation, search

Introduction

Lets do a quick review of lights, both in real and Blender terms, so you can map ones to the others.

Playing with Lights

Real lights are characterized by some parameters: intensity, colour, position and shape. The meanings are rather simple and the use of them is what really matters. If we look at Blender buttons, we can quickly find some corresponding controls: the Energy slider for intensity and the colour sliders for colour.

This being a virtual world, position is a bit more complex. It becomes a relative thing, with the Hemi and Sun types of lamps not having any position that matters, but a direction instead, and are generally placed far away.

Shape is also tricky, as most Blender lamps are just a point in space (save for the Area type). Real light sources, on the other hand, are not just points, but physical objects, and come in a vast variety of forms, from big spheroids like the Sun to complex tubes like the neon lights on a casino. Even the classical light bulb emits light from a thin filament shaped like a "W," not a point.

Another important detail: all real sources cause shadows when objects block the light. However, Blender lets you select not only how a shadow is cast, but whether it is cast at all.


Intensity

Lets start by playing with intensity. In the following images you can compare the effects of same object under nine different intensities.

Intensity at 15%
Intensity at 50%
Intensity at 100%
Intensity at 150%
Intensity at 200%
Intensity at 250%
Intensity at 300%
Intensity at 350%
Intensity at 400%

At 15% the object is barely visible while at 200% the highlights start to merge in some parts, becoming a huge white area at 350%. Adjusting to a correct value is thus rather important, too low and hardly anything is affected, too high and we can barely distinguish the detail of the surfaces. In photography the process relies not only in the light sources but also the time allowed for the exposition. We would say we have an underexposed or overexposed photograph, and the same principle applies to 3D, even if it only relies on light intensity.


Colour

By changing the light colour we can change the object colour, and as side effect we can change the mood or time or location. We associate green with nature and tranquility, red with energy or danger, white with noon, navy with night, orange with sunset, cyan with the flourescent lights of offices.

Warm colour
Neutral colour
Cold colour

The above differences are all caused by the different colours of the main light source. If we lack the starting reference (center, neutral) it can be a bit hard to realize the look is due the light and not the object's surface colour. For well known objects, we will quickly notice the difference is in the light and not the object. If needed, we can force the colours to make it more apparent.


Position

The positional relations of the light, object and camera are another deciding factor on what we see and how it looks, as the reflection of photons depends, among other things, in the angles formed by light rays and surfaces. As in the colour case, we are also acostumed to some special cases, for example you will never accept something in happening in the middle of the day if the light source comes clearly from a side instead of above.

Placed above and slightly in front.
Placed behind and slightly above.
Placed below and slightly in front.
Placed like integrated flash.
Placed in classical location.
Placed to the side.

The above examples show how light position can change even the mood, as with 'above' case we could say the face looks a bit sad while with 'below' one it looks a bit evil. 'Flash' case shows the typical problem of many point-and-shot cameras, the subject looks flatter than it really is, sometimes scared or surprised and if we had added red eyes, diabolic.


Shape

Finally, shape is also an deciding element of lights. It is not the same a tiny near puntual light than a huge spherical source or a thin but long source.

Point shaped light.
Square shaped light.

The two images compare the same intensity, colour and position but vary the shape, one is a puntual light while the other is an area light. The main differences are clearly visible in the shading progression and in the shadows. The point light gives a hard look in surface and shadows while the area one gives smoother transitions overall.

Blender Lights

For a button by button reference of each please look at the Lamps section of the Manual. Here we will do a review of the controls in a more task oriented fashion, paying attention to when and why use something.


Light Types

Lampt type buttons

Blender provides five light types:

  • Lamp: the plain point source kind, casting light all over the place.
  • Spot: a light source with covers, affecting only a cone or square pyramid.
  • Area: square or rectangular light source.
  • Sun: source of parallel rays.
  • Hemi: huge source in the shape of an hemisphere.

Lamp is the basic workhorse while Spot allows focusing the area of effect without having to use a real cover or reflector. Area is more suited for smooth effects, but in some cases you are better of with one or maybe multiple Spot lights. All three are good for small sources like bulbs, but do not take that as unbreakable rule, there are some cases in which they can be used to simulate at least part of the effect of a rather huge lamp.

Sun is the perfect source for sharp directional light, while Hemi is for the softer kind. In both cases we should match them with huge and probably far away sources, like sun, sky or even the ground's bounced light. The reason is that far away sources will look to us to have near parallel rays and cover a rather big area of effect (they must be big if they have reached us).

Color and Energy

Energy, color and related buttons

We can control intensity (Energy in Blender) and colour, it would be silly if not. As extra control, we can choose how to limit the range of effect with Sphere toggle and Distance value, thus insulating objects from far away sources.

Quad and its associated sliders provide a more realistic attenuation than Sphere as the objects get far away. We should use them for comparatively small sources like bulbs but not for huge ones like the Sun, as that is how they behave in reality (Sun too but the effect is minimal at the human scale).

We can think that light does not get attenuated with distance in void, while the real issue is that as the distance increases, so does the area that the photons must cover and thus less photons per area unit. Imagine a two fully transparent concentrical spheres with a bulb in their centre, one bigger than the other. The inner sphere is nearer and has smaller area, but both are being passed by the same number of photons.

Shadows

Shadow control panel.

All types except Hemi provide raytraced shadows. You should only use shadow option for those lamps important enough to deserve shadows, and what is more important, to have a good reason for them, otherwise they will be distracting, a problem photrographers are always fighting. In some cases separating, by means of OnlyShadow, the main light from the shadows is a good idea as you will be able to control their strength, colour, etc separately, and you can always parent them to keep the positions linked.

Extra lamps you use to make effects are better without shadows as that gives away there is an extra source. One problem to balance is that no shadows also means specular is computed all over the surface, so in some cases you should enable shadows or disable specular, to keep the illusion of reality.

Special case when talking about shadows are Spot lamps, which also allow buffer based shadows. These give you control over the smoothness without increasing the time much, so they are a good tool if your objects are all solid (no transparecy, no alpha maps and so on) and the area of effect required can be described or at least enclosed in a cone or pyramid. Spots with buffer shadows require more manual work as you have to adjust more controls to match the scene and also use more memory, but you will save later on render time.

Effects

The typical effect people want is halo. We should not abuse it except in cases there is a good reason like a dusty atmosphere. As side effect, we will have to master the use of Spot light with buffered shadows as those are the only lamps that allow it currently.

Controling if a light source causes only diffuse light by clicking NoSpecular is a good way to hide the existance of a source similar to disabling shadows, without losing the extra lighting. In case we need an extra artistic effect, we can use the inverse case with NoDiffuse, so we increase the specular reflection without changing the main light we have already set or the material. On the other hand, in such cases it could also be a good idea to use a decal or environment map as that way we will be able to give shape to the reflection, mostly in faking the shape of the source light a window with internal bars or a street light with a "stars" effect.

Negative allows removing light, a very good idea when combined with effect limiting features like Distance. Photographers no doubt would love to have negative lights as this gives total freedom, being able not only to add but also remove as required.

Speaking of limits, the Layer button is another way to isolate objects and lights for a better control. If you ever have a scene nearly finished and one or more objects require light adjustments, use layers to keep the new lights separate from the global effect you have already achieved.


Textures

Texture panels for lamps

Textures in light are not a must but provide two useful tools. One reason is to break the perfection of a light source, thus making it more realistic, as sources and atmosphere are always a bit random even in best case.

The other is making the light have a pattern under our control, and not only by placing something in front which requires the slow processing of shadows. This way we can get colour variations with a single light or faking shadows quickly. You can make a TV in dark room effect by using the screen texture in a lamp, for example.