Sub topic 16
Fixing flat, blown-out or noisy lighting
This chapter assumes you can build a lamp and HDRI setup as described in the earlier chapters. You should know the Properties editor and the Shader Editor, and have rendered at least one scene in Cycles. The goal here is to work from a symptom to a cause and then to a fix.
A method for diagnosing lighting
Change one thing at a time and re-render. Most lighting problems fall into three groups, and each group has its own tools.
- Flat: shape and contrast are missing. The cause is usually the light direction, the light ratio or the light size.
- Blown out: highlights clip to pure white. The cause is usually too much power, or a view transform that clips.
- Noisy: grain or bright single pixels appear. The cause is usually too few samples, tiny bright sources, or indirect light that is hard to sample.
Flat lighting
A flat render has little difference between lit and shadowed areas. Faces look evenly gray, and form is hard to read.
Common causes and fixes
- The key light sits close to the camera axis. Light that comes from the camera's direction removes the shadows the viewer needs to read form. Move the key about 30 to 60 degrees to the side and above the subject.
- The fill is too strong. If the fill matches the key, shadows disappear. A key to fill ratio of about 2:1 to 4:1 keeps shape. Because light power is in watts, a 4:1 ratio means the fill has a quarter of the key's power.
- The HDRI dominates. A bright, evenly lit HDRI fills every shadow from all directions. Lower the Background Strength, then add a key lamp for direction. Look at the HDRI itself: an overcast sky is flat by nature, and a sky with a visible sun is directional.
- Everything is lit by large, soft sources. Very large area lights wrap around the subject and soften every shadow. Reduce the size of the key, or move it farther away so it covers a smaller angle.
- No rim or background separation. A subject that blends into the background looks flat even when it is shaded correctly. Add a rim light behind the subject, or darken the background.
A good test is to render with only the key light and the HDRI hidden. If this version looks shaped and the full render looks flat, the fill or the HDRI is too strong.
Blown-out highlights
Blown-out areas are pixels whose value is at or above the top of the display range. Detail there is lost, and the color turns white.
Check the cause in this order
- Power. Lamp power is in watts, and it scales with the inverse square of distance. If you move a light closer, its brightness rises quickly. A 1000 W light that was fine at 5 m will blow out at 2 m.
- Exposure.
Color Management > Exposuremultiplies the whole image. A value of 1.0 doubles the light, and a value of -1.0 halves it. Adjust exposure to place the overall brightness, and use lamp power for the balance between lights. - View transform. The Standard transform clips values above 1.0 abruptly. Filmic (Blender 3.x) and AgX (Blender 4.x) compress bright values smoothly and hold more highlight detail. If a scene looks clipped under Standard, switch before you lower any lights.
- A sun in the HDRI. Many outdoor HDRIs contain a very bright sun. At a Strength of 1.0 that sun can be many times brighter than the sky. Lower the Strength, or choose an HDRI with a soft sky.
- Bright materials. A white albedo of 1.0 reflects all the light. Real white surfaces are about 0.8. Reduce the Base Color value of white materials before you reduce the lights.
You can inspect clipped values without guessing. Open the Image Editor, show the render and use the sample tool (right click and drag on the image) to read pixel values. A value above 1.0 under the Standard transform is clipped.
Noise and fireflies
Cycles estimates light by random sampling. Noise is the variation between those estimates. Fireflies are isolated very bright pixels that appear when a rare path carries a very large amount of light.
Reduce ordinary grain
- Turn on denoising. In Python this is
scene.cycles.use_denoising = True. - Keep adaptive sampling on, and lower the Noise Threshold (for example 0.01) when you need cleaner results. Adaptive sampling stops working on pixels that have already converged.
- Raise the sample count only after the other fixes. The noise falls roughly with the square root of the sample count, so quadrupling the samples halves the noise.
Reduce fireflies
Fireflies usually come from small, bright sources reached through glossy or indirect paths.
| Cause | Fix |
|---|---|
| Tiny, very bright lamp seen in a glossy surface | Increase the lamp size and lower its power |
| Bright HDRI sun lighting an interior through a small opening | Lower the HDRI Strength, or use a lamp and a darker HDRI |
| Glass or mirror surfaces creating caustics | Turn off Reflective and Refractive Caustics in Light Paths |
| A few extremely bright indirect samples | Set Clamp Indirect to a value such as 10 |
Clamping limits each sample to a maximum value. It removes fireflies, but it also removes real light energy, so the image gets darker and loses some bright reflections. Start high and lower the value only until the fireflies disappear. Keep Clamp Direct at 0 unless you need it, so that direct highlights stay correct.
Noise in an interior has its own cause. Light that enters through a window must find the opening by chance. In that case, a portal or an area light placed at the window, or a simpler fill, reduces noise a great deal.
EEVEE-specific problems
EEVEE does not trace light the way Cycles does, so some problems differ.
- Light leaking through walls or at contact points: raise the light's shadow settings, increase shadow resolution and check light thresholds.
- Missing indirect light: enable the screen-space or raytracing options available in your EEVEE version.
- Different brightness from Cycles: the two engines can differ in brightness for the same lamps, especially with soft shadows and World light. Compare in the engine you will use for the final render.
A diagnostic script
This script applies the noise fixes from this chapter as one block, and sets a view transform that holds highlights. It works for a scene that uses Cycles. The AgX transform exists in Blender 4.0 and later, so the script falls back to Filmic on older versions.
import bpy
scene = bpy.context.scene
scene.render.engine = 'CYCLES'
cycles = scene.cycles
# Noise: denoise and stop sampling pixels that have converged
cycles.samples = 256
cycles.use_adaptive_sampling = True
cycles.adaptive_threshold = 0.01
cycles.use_denoising = True
# Fireflies: clamp indirect light only, and disable caustics
cycles.sample_clamp_direct = 0.0
cycles.sample_clamp_indirect = 10.0
cycles.caustics_reflective = False
cycles.caustics_refractive = False
# Blown highlights: use a transform that compresses bright values
view = scene.view_settings
available = view.bl_rna.properties['view_transform'].enum_items.keys()
view.view_transform = 'AgX' if 'AgX' in available else 'Filmic'
view.exposure = 0.0
# Report the lights, so very strong or very small ones are easy to spot
for obj in scene.objects:
if obj.type == 'LIGHT':
data = obj.data
print(obj.name, data.type, f"{data.energy:.0f} W")The report at the end helps with flat lighting too. Compare the wattages of your key and fill, and check that the ratio is what you intended.
Summary of fixes
| Symptom | First thing to check | Typical fix |
|---|---|---|
| Flat | Key position and fill ratio | Move the key to the side, lower the fill |
| Washed-out shadows | HDRI Strength | Lower Strength, add a key lamp |
| Clipped highlights | View transform and power | Use AgX or Filmic, lower the strongest light |
| Grain | Denoising and samples | Enable denoising, adaptive sampling |
| Fireflies | Small bright sources and caustics | Enlarge lights, clamp indirect, disable caustics |
Exercise
A render of a glass bottle lit by a small, 2000 W point lamp and an HDRI shows a few isolated white dots across the image, and the dots move between renders with different seeds. The lamp highlights look correct. Name the problem, and give two changes that reduce it without darkening the direct highlights.
Show answer
The dots are fireflies, caused by rare, very bright light paths through the glass (caustics) from the small bright lamp. Two fixes: enlarge the lamp (and lower its power so the overall brightness stays similar), or turn off Reflective and Refractive Caustics. Setting Clamp Indirect to a value such as 10 also helps, and it leaves direct highlights alone because Clamp Direct stays at 0.
Exercise
A portrait render looks flat. The key and fill are both 500 W, the key is next to the camera, and the HDRI Strength is 2.0. List three changes in the order you would try them.
Show answer
First, move the key 30 to 60 degrees to the side and above the subject so that shadows describe the form. Second, lower the fill to about 125 to 250 W for a ratio between 2:1 and 4:1. Third, reduce the HDRI Strength (for example to 0.5) so that it stops filling the shadows from every direction.