Sub topic 4
Placing lamps: key, fill and rim
This chapter assumes you can move, rotate and scale objects in the viewport and have already added a lamp (Point, Sun, Spot or Area) to a scene. It also assumes you know what a lamp's power and size do to brightness and shadow softness. Here you will use those controls to place three lamps so that a subject looks solid and readable.
Why placement matters more than power
A single lamp can light a subject, but the result is often flat or harsh. Where a lamp sits decides which surfaces catch light, where shadows fall, and how much of the subject's shape is visible. Power only decides how bright the result is, and you can change that later.
The standard answer is three-point lighting. It uses three lamps with different jobs:
| Lamp | Job | Typical position | Relative strength |
|---|---|---|---|
| Key | Main light. Sets the direction of the light and the main shadows. | 30 to 60 degrees to one side of the camera, above the subject | Strongest |
| Fill | Lifts the shadows the key creates so they are not pure black. | Opposite side from the key, near camera height | About 25 to 50 percent of the key |
| Rim (back light) | Outlines the subject so it separates from the background. | Behind and above the subject, aimed toward the camera | Similar to or a little below the key |
The numbers are starting points. Adjust them by looking at the render.
The key light
Place the key first, with the other lamps off or hidden. Put it roughly 45 degrees to the side of the camera-to-subject line and raised about 45 degrees above the subject. This angle shows the form of the subject through shading. A key placed directly behind the camera lights everything evenly and removes the shading that shows depth.
Pick the lamp type for the effect you want:
- An Area light gives soft, controllable shadows and is the usual choice for a key.
- A Spot light gives a defined cone, useful when you want light to fall on only part of the scene.
- A Sun light gives parallel rays and hard-edged shadows. Its position does not matter, only its rotation.
Shadow softness depends on the apparent size of the lamp as seen from the subject. A 2 m Area light placed 4 m away is softer than the same light placed 12 m away. If shadows look too hard, enlarge the lamp or move it closer, and then lower the power to compensate. Light from a nearby lamp also falls off with distance, so moving it changes brightness as well as softness. Sun lights do not fall off with distance.
The fill light
The fill goes on the side opposite the key, near camera height, so it shines into the shadows without making new ones. Keep it weaker than the key. If the fill is as strong as the key, the subject looks flat again, because the difference between lit and shadowed sides is what shows shape.
Use a large, soft Area light for the fill. A hard fill creates a second set of shadows that competes with the first. The ratio between key and fill sets the mood:
- Key about twice the fill: soft, even, suitable for product shots.
- Key about four times the fill: more contrast, a dramatic look.
- Fill at zero: strong contrast, with shadows that are very dark unless something else lights them, such as an HDRI or bounce light from nearby surfaces.
In a Cycles render, light that bounces off walls and the floor already fills some shadows. You may need less fill than you expect. EEVEE does not calculate all of that bounce by default, so it often needs a stronger fill.
The rim light
The rim light sits behind the subject, raised, and aimed back toward the camera. It catches the edges of the subject and draws a bright outline. This separates a dark subject from a dark background.
Keep the rim narrow in effect. Move it far enough behind the subject that only edges are lit. If it moves too far to the side, it starts lighting the face or front surfaces and competes with the key. A Spot light or a small Area light works well, because you can aim it without lighting the background too.
Rim lighting depends on surface shape. A flat matte surface shows very little rim. A curved or glossy surface shows a clear highlight at the edge.
Aiming lamps
Rotating a lamp by hand until it points at the subject is slow, and it breaks when you move the subject. A Track To constraint solves this. Lamps emit along their local -Z axis, so the constraint must track -Z and use Y as the up axis.
import bpy
# Aim the key light at an existing object named "Subject"
key = bpy.data.objects["Key"]
target = bpy.data.objects["Subject"]
con = key.constraints.new(type='TRACK_TO')
con.target = target
con.track_axis = 'TRACK_NEGATIVE_Z' # lights shine along their local -Z axis
con.up_axis = 'UP_Y'This assumes objects named "Key" and "Subject" already exist. Add the same constraint to the fill and rim lamps and they all follow the subject.
The subject's origin is the aim point. If the origin sits at the base of a character, the lights aim at the feet. Parent the lamps to an empty placed at chest or face height and use that empty as the target.
Building the key light with Python
The next script creates the key from the earlier description: an Area light with a power of 1000 W, a size of 2 m and a slightly warm color, placed up and to the side.
import bpy
# Create an area light data block and an object that uses it
light_data = bpy.data.lights.new(name="Key", type='AREA')
light_data.energy = 1000.0 # power in watts
light_data.size = 2.0 # edge length of the area light in meters
light_data.color = (1.0, 0.95, 0.9)
key = bpy.data.objects.new(name="Key", object_data=light_data)
bpy.context.collection.objects.link(key)
key.location = (4.0, -4.0, 5.0)Lamp data and the lamp object are separate. The data holds power, size and color. The object holds location and rotation. Two lamp objects can share one data block, so changing the data changes both.
Common placement mistakes
- Key too close to the camera axis. Shadows disappear behind the subject and the image looks flat. Move the key 30 degrees or more to the side.
- Fill brighter than key. The apparent light direction flips and shading looks wrong. Lower the fill.
- Rim lighting the front. Move the rim further behind the subject, or lower its power.
- Lamps visible in frame. Area lights show up in reflections on glossy surfaces. That is sometimes wanted. If not, move them or turn off their visibility to the camera in the Object properties.
- Placing by eye without a test render. Viewport shading does not match the render. Check with a low-sample render or in Rendered view.
- Shadows with different directions. If each lamp casts a clear shadow in a different direction, the scene looks like it has several suns. Make the fill soft so its shadows are faint.
A working procedure
- Turn off every lamp except the key. Place it and set its power until the lit side of the subject looks correct.
- Add the fill on the opposite side. Start at a quarter of the key's power and adjust.
- Add the rim behind the subject. Raise its power until the edge outline is visible but not distracting.
- Add Track To constraints so all three lamps follow the subject.
- Render a test frame and compare it against the viewport.
Exercise
A subject looks flat. The key lamp is directly behind the camera, and the fill has the same power as the key. Which two changes would add the most shape, and why?
Show answer
Move the key about 30 to 60 degrees to the side of the camera-to-subject line and raise it above the subject, so shading and shadows reveal the form. Then lower the fill to roughly 25 to 50 percent of the key's power, so lit and shadowed sides differ. Shape is shown by the difference in brightness between lit and shadowed areas, and both settings had removed that difference.
Exercise
You built the three lamps and used Track To constraints. A lamp shines away from the subject. Which setting is the most likely cause, and what should it be?
Show answer
The track axis. Lamps emit along their local -Z axis, so Track To must use Track Axis -Z (TRACKNEGATIVEZ) with Up Axis Y. With a different track axis, the lamp's emission direction does not point at the target.