Light sources
A light source emits light, which is used to calculate shadows and the lighting conditions.
There are the following types of light sources:
- Point Light
- Spot Light
- Directional Light
- Area Light
- Ambient Light
Point Light
A point light emits light in all directions equally.
It is used to simulate a lightbulb or an explosion.
Typical parameters are:
- position
- intensity
- color
- range
- falloff: the light intensity is smaller the further away from the light source. Most used falloff formulas are linear or inverse square law.
Spot Light
A spot light emits a cone shaped light in a specific direction with a specific angle.
It is used to simulate car headlights, torches or other light sources that point in a specific direction.
Typical parameters are:
- position
- direction
- intensity
- color
- inner cone angle
- outer cone angle
- range
- falloff
Directional Light
This light type has a direction without a specific position. It's infinitely far away and has parallel light beams.
It is used for light sources like the sun or the moon and no falloff occurs since the light source is infinitely distant.
Typical parameters are:
- direction
- intensity
- color
Area Light
An area light is like a spot / pointlight, but with a bigger light emitting area.
Light from a window or a television screen, where point lights would be too small to accurately represent the light source.
Typical parameters are:
- position
- direction
- intensity
- color
- range
- area = the emitted light area. the bigger the area the softer the shadow edges
- shape
Ambient Light
This light type has neither a position nor a direction. It lights up the scene equally from all directions and every position.
Its use cases are, as the name suggests, as ambient lighting or to simulate global illumination or bounced light
Typical parameters are:
- intensity
- color