Home · Lab · Finishing & Optics

O4 Chromatic aberration

Red and blue drift apart towards the frame edge

Finishing & Optics · ~5 min · Free

1 The idea

A lens bends each colour slightly differently, so colour fringes appear towards the frame edge. CG without any looks too clean. Here we add it by scaling red up a touch and blue down a touch around the centre. The lab starts at red ×1.004 and blue ×0.996, stronger than a real lens so you can see it (real shots are often nearer 1.002 / 0.998). On a real lens, which colour spreads which way depends on the lens, so read it from the plate.

Use as little as the plate shows, and place it after glows and before grain, like the real lens order.

2 Hands-on in the mini compositor

SkyVFX mini compositor · O4640×360 · float · 1001

3 Deep dive

Why a lens splits colours

Glass bends each colour by a slightly different amount, so red and blue land on the sensor at very slightly different image sizes. At the centre the difference is zero; it grows towards the edges. That is why scaling each channel about the centre imitates it.

Common values: red about 1.002, blue about 0.9982, green untouched. On a 1920×1080 frame the corner is 1101 px from the centre, so red moves out about 2.2 px and blue moves in about 2.0 px: roughly 4 px apart at the corners, and no shift at all in the centre.

Position (1920×1080)Red ×1.002Blue ×0.9982
Centre0 px0 px
Mid left/right edge (960 px)1.9 px out1.7 px in
Corner (1101 px)2.2 px out2.0 px in

Change colour only, not brightness

If you only shift red and blue, the edge brightness shifts too and edges look doubled. A cleaner way: convert to YCbCr, keep the original Y (brightness), and take only CbCr (colour) from the shifted image. The edge gets a colour fringe while its sharpness and brightness stay put.

Add a radial centre mask so the middle of the frame stays clean, then mix it down. Good CA is barely noticed, but switch it off and the CG suddenly feels too clean.

  1. 1Split R G B
  2. 2Scale R up, B down about centre
  3. 3Original Y + new CbCr
  4. 4Centre mask
  5. 5Mix down

Our lab just scales red up and blue down, with no luminance restore, and is set stronger than real so you can see it

Read it from the plate, don’t guess

Zoom into a bright-against-dark edge near a corner, like a car roof against the sky in the desert plate. See which colours fringe and how strongly. Common pairs are purple/green and red/cyan, depending on the lens. Use the pair the plate shows, not red/blue on every shot.

Wide lenses tend to show more CA than long ones, and expensive lenses less. Don’t put strong CA on a long-lens shot whose plate has almost none. Heavy CA is a classic beginner tell. Blown-out highlights often carry their own purple fringe; some artists add a second, highlight-only layer for it.

Where it goes in the chain

CA is pinned to the frame: its fringe pattern is centred on the lens axis, which moves with the camera. So it goes after the camera shake, which keeps the fringes centred on the frame. The rule for the whole stack: effects pinned to the frame, such as CA, vignette and grain, go after the shake; effects tied to things in the scene, such as a flare that follows its source’s track, go before it, and a whole-frame glow comes out almost the same on either side, so it sits before the shake too (see O5). CA goes before halation and grain, because those happen at the film or sensor, after the light has left the lens.

  1. 1Camera shake
  2. 2Chromatic aberration
  3. 3Halation
  4. 4Grain

4 In real work

In Nuke

  1. TransformMasked limited to red, scale about 1.002; check the center sits in the middle of the frame.
  2. A second TransformMasked limited to blue, scale about 0.998.
  3. Colorspace both the source and the shifted image to YCbCr, copy only the colour channels from the shifted one, then convert back to RGB.
  4. Radial as a centre mask, Keymix against the source, and bring the mix down.
  5. Keep the alpha untouched; CA is for rgb only.

Common mistakes → the fix

  • ✗ CA so strong there are rainbow edges everywhere✓ Tiny values, then mix down, compared against real edges in the plate.
  • ✗ Translating channels instead of scaling them✓ A translate fringes the centre too. Scale about the centre.
  • ✗ CA that brightens or doubles the edges✓ Keep the original Y; change colour only.
  • ✗ Adding CA after the grain✓ CA happens in the lens and grain at the sensor, so CA comes first.

Before you send the shot

  • No CA in the centre, most in the corners
  • Fringe colours and strength match real edges in the plate
  • Edge brightness and sharpness are unchanged
  • After the shake, before halation and grain
  • Alpha untouched

5 Check yourself

One question to check yourself

Where is lateral chromatic aberration strongest?

What you learned

🔒 Answer the question above and this card opens

More questions

1. On a 1920×1080 frame, red is scaled 1.002 about the centre. Roughly how far does red move at the middle of the left edge?

2. Why keep the original brightness (Y) when building CA?

Where the numbers come from: Computed in your browser. Saturation, Multiply, Clamp, Invert, Keymix, Copy and Grade match Nuke 17.0v2 (checked). Blur, Defocus, Glow, Sharpen, ChromaticAberration, Vignette, LensDistort, Grain, Erode, Toe, the Keyer and Despill are teaching versions, not identical to Nuke’s nodes. Transform here is also a teaching version: bilinear filtering, no concatenation, cropped at the frame edge. Images are our own Blender renders (the green screen is fully code-built; the desert scene uses Gaea 2.3 hills, a Poly Haven CC0 HDRI sky, Poly Haven CC0 rocks and grass, Quixel sand and cliff textures and a Mixamo rig for the robot, with Quixel and Mixamo used in the renders only).