artween.com

Middle Grey — what a rendered image is actually doing

Entry 18 · Colour

Linear and display

The colour pipeline has two distinct jobs: arithmetic and appearance. Confusing the space where each happens is how renders go wrong before a single render is wrong.

Entry
18
Section
04 Colour
By
Tom Beddoe
Read
2 min
A person points a finger at a glowing green line on an oscilloscope screen
Plate 01 · ColourWhere the maths happens versus where you look at it.Photo: cottonbro studio / Pexels

By Tom Beddoe · Colour · 2 min read

The pipeline has two modes, not one

Light is additive. Two surfaces receiving equal illumination are twice as bright as one — not one and a half times, not some gamma-bent curve of it. Rendering engines do their arithmetic in linear light, where the numbers behave the way physics expects: double the wattage, double the value. Every multiplication in a shader, every addition across light bounces, every blending of passes relies on that linearity holding.

Monitors do not work in linear light. Consumer displays apply a tone response — historically codified as gamma 2.2, the sRGB transfer function in its simplest form — that redistributes values so the perceptual midtones are neither crushed into shadow nor burned out at the top. That redistribution is necessary because the eye is not a linear meter either; we are far more sensitive to differences in dark values than bright ones. The transfer function maps a linear 0.5 (halfway to the emitter's maximum) to roughly 0.73 on screen, where the human perceptual midpoint actually lives.

The transform that converts from linear to display-ready is called, simply, the display transform. Apply it at the very last step, after all compositing arithmetic is done. Apply it earlier — say, to a texture before it enters the lighting calculation — and every multiplication in the engine now operates on perceptually-scaled data. Shadows fill in; speculars clip; the maths becomes quietly wrong in ways that are hard to diagnose because the image still looks approximately right.

Specimen · Colour1600 × 1000
A studio light head with a black flag cutting the beam
Neutral first, everything else after.

A practical rule follows directly: textures created from photographs must be linearised before the renderer sees them. sRGB images carry the display-gamma encoding baked in; a properly set-up pipeline strips it on import, does the work in linear, and reapplies the output transform on export. A colour-management system — OpenColorIO is the standard implementation in production pipelines — handles those transforms automatically when configured correctly, so the artist never touches a gamma slider by hand.

When a render looks dark and contrasty in the viewport but correct in a calibrated preview, that is almost always a missing display transform. When textures look oddly washed out in the 3D scene, the linearisation step was skipped. Both failures are diagnostic: the image is telling you exactly where in the pipeline the space was wrong.

A clapper board face down beside a steel tape measure
On the tableWhere the maths happens versus where you look at it.Photo: StockHouse Films llc / Pexels

More in Colour

Every entry in this section is listed on the Colour page, and all twenty-four sit in the full register.