Sunday, July 31, 2011

Lighting


Lighting is an essential part of any scene. In Blender, you control lighting by adding various lamps to your scene: positioning them, adjusting their color, strength and so on.

In the default scene that loads whenever you start Blender, there is one Point lamp in the top right part of the scene. Right click it to select it. Then in the Properties Window click on the Object Data tab (represented by a star burst looking shape). This is where you will find all of the setting for your lamp.


The Basic Properties of Lamps:

The color or "Diffuse" of the lamp does exactly what you'd expect, changes the color of the light. Different light sources put off different colors. Some bulbs have a bluish tint, while others have a more warm yellow color. Clicking on the color bar will bring up a color wheel where you can select the diffuse color. As with most things, subtle coloring is the best. Do not overdo it with a blood red or a lime green lamp.

Energy is also fairly straightforward. Increasing the Energy value will make the lamp give off more light. Be careful of too much light though as this will blow out details of a scene. For example, if you start to see spots of solid white, your lighting is probably to intense.

Here's a great example of some really overdone lighting. You can hardly see any details, just bright whiteness. This looks really bad. Please do not do this!

This next control is a little more complicated. The Falloff Distance (just labeled Distance) controls how quickly the energy of the light diminishes with distance. If you turn on a single light in a dark room, things right next to it will receive lots of light and be easily seen. However, things that are farther away will get less light. So, this value is Blender's way of controlling how much the light fades.

Right now, the energy is at 1 and the distance at 30. Objects that are the specified units away from the lamp, will receive half of the set energy. So, something 30 units away from this lamp will only get .5 energy.

The next big thing to talk about is Shadow. Currently, you can see there are two options: No Shadow, and Ray Shadow (there is an option for Buffer Shadows in Spot Lamps). The Color bar below it adjusts the color of the shadow.

Tip: Setting the color of the shadow to a lighter color (grayish, bluish) will make the shadows appear less dense and more realistic for most setups. (Most shadows in nature are not purely black)

This Layer Only will cause only objects that are on the same layer as the lamp to cast shadows relative to the lamp.
Turning on Only Shadow will mean that the lamp does not illuminate anything but, shadows will be cast as if it did give off light.

Sampling just has to do with how the shadows are calculated. More Samples means higher quality but more render time. Adaptive QMC is the quickest method of sample generation, while Constant QMC is slower but produces nicer shadows.


The Different Types of Lamps:
In Blender, there are several different lamps that all do different things. Picking the right lamp for the right job is very important.

Point Lamp: As mentioned before, this lamp casts light in all directions. It is the simplest light source. 
                    Uses: anytime there is something (like a campfire) that should be casting light about in all directions.

Sun Lamp: This lamp was designed to simulate the real sun's light. It will cast even lighting everywhere from the angle that you put it at. Position of this lamp is not important, just rotation. The Sun will light everything the same amount no matter how far away it is from the lamp. The rotation of the lamp (rotating it in the 3D View) changes the angle that the light is cast.
                   Uses: any scene where the sun is present.

Spot Lamp: The Spot Lamp is a very controllable and versatile lamp. It cast light only on the areas withing its cone displayed in the 3D View. The Falloff Distance for this lamp adjusts at what point the lamp stops casting light altogether. Take a look at the Spot Shape panel. The Size degree value determines the angle of the cone of light. Setting it higher will create a wider cone, setting it lower will create a narrower cone. Blend adjusts the softness or the edge (how it transitions from full light to no light outside the cone). Enabling the Square option turns the lamp into a square. Show Cone merely draws a cone in the 3D View so you can more clearly see what will be illuminated by the lamp. Halo will render a volumetric halo. This is easier illustrated than explained in words. The Intensity affects how "thick" the halo is.


Halo turned off.


Halo turned on. Similar to the effect of a light through fog or smoke.
                Uses: a spot light.

Hemi Lamp: Sometimes, in your scenes, areas don't receive any direct light. This can create very dark areas which usually don't occur indoors or in most outdoor situations. The Hemi Lamp provides overall lighting in a specified direction (adjusted by rotating the lamp in the 3D View) but does not cast shadows. It does not matter where it is positioned, like the Sun Lamp). As a general rule, these lamps should have a very low energy setting as they are meant just to provide extra light.
Uses: The sky tints things a very subtle bluish color. Also, if there are lights running along the walls, floor  or ceiling, then a Hemi could be used to illuminate things as if they were being lighted from the lights on the walls, floor, or ceiling.
Area Lamp: The last lamp is the Area Lamp. Area Lamps cast light in one direction and from a certain "area." Under Area Shape you can adjust the shape and size of this area. Decreasing the size will cause light to emanate from a smaller area that is represented by the box around the lamp in the 3D View.


Well there's your run down of lighting and lamps in Blender. I encourage you to find some photographs (or take some!) and try to imitate the lighting. Lighting is one of the most difficult things to do realistically. Observing lighting in the real world and practicing it in Blender is the best way to get better at it.

No comments:

Post a Comment