Types of lights

There are typically many different types of light objects, but they are typically the same between 3D packages.

Just remember that lights almost never have geometry associated with them. This means that when you add a light object you are not adding a "bulb" object to a scene. You are only adding a position in space where light will come from.

Omni / Point

An "Omni" or "Point" light will eminate light in all direction from a single point in space. It is "omni-directional" from a single "point" that contains no actual dimensions or mass.

Omni directional lights will probably be your go to light for general lighting. Even if a light appear to need a spot light type (such as the top of a light shade) it may be best to just use an omni-directional light and allow the shadowing of the shade to create the spot light effect.

Directional / Parallel

Directional lights create lighting that appears to be from an infinite distance. In any given scene sunlight / moonlight will almost always be the sole use of such a light.

To be sure - In the real world you can not have a true directional light. We consider the sun to be a form of directional lighting because it so very far away that it acts as one. If you were to measure a shadow against an object that cast it you would find a difference on a very minute scale.

Directional lights typically do not take into account the position of the light object but will only take into account the rotation of the light object. This makes sense since the light is coming from an infinite distance and the object within your scene can not be placed an infinite distance away. As such, when using one, you may as well keep the object itself in an obvious and easily clickable place within the scene.

Spot

As it sounds like a spot light is similar to what you might see on a stage at a play or concert. From a single point in space you can eminate light in a, typically, possible 180 degree field.

Area

An area light is designed to simulate an emmisive surface (this is different than an emmisive texture for a material).

While most lights do not have mass an "Area" light will attempt to cast light from a primitive shape light a box or sphere with a user-defined width, height, and depth. Most progams will fake such a surface by spreading multiple lights across this primitive shape. The number of lights used to create this larger area light are often known as "Samples". If an area light has been set to the shape of a rectangle and the user has chosen 16 samples then the program will spread 16 different smaller lights within that 2d plane to simulate one large emmisive object.

If you are working with area lights note that most programs will only show the effect of them if you have selected either "Shadow Map" or "Area" for the shadow type. These are discussed below.

Light properties

There are several key properties of lights that extend across the various light types. In this case "types" refers not to whether or not the light is a spot or omni light but in how the light itself is measured. If your program seems to default to one kind it's probably best to use thata kind even if it has others available.

Intensity / Multipliers / Real world measurements

"Intensity" just refers to the brightness of a light. Some lights might work on logarithmic scales and take multipliers. This just means that a multiplier of "2" will be twice as strong as the default light object. Such a measurement should have an immediate and obvious effect.

At the same time some "Photometric" branded lights will attempt to model the intensity on the systems we use in the real world to measure light brightness.

Attenuation

Most programs will differentiate between "near" and "far" attentuation. This is a way of simulating the falloff seen around a light. This is not referring to the change in intensity based on the angle of the surface but instead refers to the actual distance from a light that it either becomes brighter or darker.

Obviously realistic lighting will concern itself more with when a light stops having an effect at greater distances than when it begins to actually exist, but there are uses for "delaying" the point at which a light has an effect. Mostly for the sake of art and composition.

Types of Shadows

Every 3d program will have multiple types of shadows that you can use. Multiple kinds of shadows exist for the same reason multiple kinds of lights exist - it's typically better to give the user the choice of what kind of light to use instead of calculating physically "correct" models which can be extremely slow to render.

There are only a few properties shared between them. Most programs will allow you to define a color for a cast shadow (for if you want to coordinate the atmospheric colors in a scene). And shadow "density" can typically be changed to simulate bouncing, atmospheric light faster than the calculations required of actual bouncing light.

Raytraced

Raytraced shadows will be the simplest and fastest to render form of shadows you can use. They typically result in sharp, high-contrast edges with no blurring, softness or variance in shadow density.

Shadow maps

"Shadow mapped" shadows are similar to raytraced shadows. They are only marginally more taxing on a computer but offer a more realistic softness to the edges around a shadow.

The way shadow maps work is fairly complex to explain. It involves matrix math and the interpolation of coordinates in a 3d space. Let's try and simplify it a bit in the basic steps your computer goes through when rendering a shadow map.

  1. The light source renders a depth map from it's own point of view. This allows the light to measure distance to any given point in the scene it can see.
  2. The camera you view the scene through renders a depth map of it's own (this is part of the default behavior of rendered images). This allows the camera to measure distance to any given point in the scene it can see.
  3. The renderer uses both depth maps to compare distances between individual points / pixels on the light and camera map. If a distance exceeds a threshold then that would mean the light can not see the same area the camera can see.
  4. Any area the camera can see, but the light can not, must therefore be rendered as if it were in a shadow.

Step 3 is where the "bias" setting for your lights will come into play. The "bias" will dictate how far apart these measured points can be before they are considered to be "seen" by he camera or not.

  • If a shadow is generally too blurry or if you can see what looks like pixelation within it, then try increasing the size of the shadow map (this will have the effect of sharpening the shadow).
  • If you are experiencing errors or artifacts within your shadow along the edges of the shadow then you may wish to play with the bias setting.

Area

Area shadows are generated by simulating a surface "area" that the light is eminating from. Keep in mind that this is not the same as an area light. An "area light" is basically multiple light generators arranged around an origin. An "area shadow" is a simulated surface around each generator.

An area shadow uses a variable number of samples arranged in a user-defined shape around the position of the light object to simulate a penumbra effect eminating from a shadow casting object. This is the most costly form of shadows and will generally take longer to render than other forms of shaodwing.

Let's explain the first sentence one part at a time.

A light object can not be a continuous "volume" within a 3d space. At least not with the way most light objects are designed. So what a light casting an area shadow does is spread several shadow casters across a shape and averages the result. These shapes can vary however. By default your program will probably use a cube or spherical shape but flat shapes light rectangles and discs should also be possible.

What does it mean to simulate a penumbra that eminates from a shadow casting object? Astronomy students will have a leg up here. Let's look at an actual area shadow. ...with an animation that took way more time to make than it should have.

Umbra
Penumbra
(The area to the right of the umbra that is created by the occasionally crossing green lines is known as the "antumbra").

In the animation seen here we have a blue circle casting a shadow from a visible light source (the white globe is added to show the size of the light "area" since it is typically invisible by default).

The white globe is set to be the same size as the area shadow volume. Notice how as the volume increases in size the penumbra the area where the shadow transitions from light to dark, the "penumbra", changes widths.

This happens because, as you can see from the green and red lines, the greater the surface of the light volume the wider an area the light must be dispersed across. This results in two qualities:

  • The closer an object casting a shadow is to the surface it casts upon then the sharper the shadow will be (the distance of the light source is irrelevent).
  • Light volumes larger than an object casting the shadow will produce "antumbras" on the side opposite the light source. This is where the bluring of the shadow results in the shadow eventually fading away.

It's the calculations of all these factors that requires more processing power for area shadows. But if you can afford it then hands down it is the most realistic of the shadow types.

------