Home · Lab · CG Multipass & Relighting

CG4 Relighting with the normal pass

Let the sparks light the robot with N·L, albedo and plus

CG Multipass & Relighting · ~8 min · In pack $15

1 Your mission

~8 min

make the sparks light the robot. Aim the comp light from the sparks and bring the error against Blender’s render below the goal in the panel (the goal sits halfway between the starting error and the best a single directional light can do, which is about 32%).

The light starts on the wrong side. Azimuth −90° points at the camera, 0° to the right. Compare “added light” with “Blender (ref)” to see which side of the robot should be lit, then ask whether the light on every part of the robot should really be the same colour.

SkyVFX Lab · CG4interactive · 1001

2 Why it works

A normal pass stores which way the surface faces at each pixel. Dot it with a light direction L and drop the negatives, max(0, N·L), and you have the simplest diffuse light (Lambert); multiply it by the albedo and the light colour, then plus it over the beauty.

The sparks are in front and to the right of the robot, about 1.7 m from its chest and a little lower. Set the light’s azimuth and elevation that way, set the intensity, and switch “multiply by albedo” to “on”. Watch how far you are off Blender’s render, and switch the view between “added light” and “Blender (ref)” to see whether the light lands on the right side.

added = albedo · max(0, N̂·L) · colour · intensity

Where the numbers come from: Every picture is a Blender 5.2 Cycles render of our own desert and robot, computed in your browser. The robot’s Normal pass (world space) and Diffuse Color pass come from the same render. The reference is a separate Cycles render of an orange point light at the sparks’ position (with shadows and bounce). Our comp light is one directional Lambert light (a teaching model), so it can’t reach zero error: the best is estimated by searching a 10° grid of directions (with the best-fit intensity for each), and the goal sits halfway between the start and that best.