Home · Lab · Integration

I3 Light wrap

Let a little background light bleed onto the CG edge

Integration · ~7 min · Free

1 The idea

A real camera lets light from a bright background spill slightly over object edges, so razor-cut CG looks pasted on. Light wrap adds a blurred background onto the inner edge of the CG.

This graph builds the wrap from plain nodes: blur the plate → cut it with a blurred alpha (stencil) → keep the part inside the CG (mask) → plus a little of it. View the nodes one by one.

2 Hands-on in the mini compositor

SkyVFX mini compositor · I3640×360 · float · 1001

3 Deep dive

Why a CG edge looks cut out

In a real camera, light from a bright background spills a little over the edge of the object in front of it. A CG edge with none of that looks too clean, as if it was cut out and pasted on.

Light wrap fakes it: a blurred copy of the background bleeds into the inside edge of the robot, only at the edge, and very gently.

Build it piece by piece

Piece one is the light: the background blurred heavily until only rough colour and brightness remain. Make sure the blur doesn’t pull black in from outside the frame. Piece two is the edge band: the robot’s alpha × (1 − blurred alpha), a thin band just inside the edge.

Multiply the light by the edge band and plus it onto the comp in rgb only, leaving alpha alone, with the mix turned way down. If you can tell it’s a light wrap, it’s too strong.

  1. 1Heavy BG blur
  2. 2Edge band from alpha
  3. 3Multiply
  4. 4Plus rgb, low mix

Why plus, and why subtle

A light wrap is added light, so it is plussed: light adds directly. Screen clips HDR (once an input is above 1 it just returns the larger value), so it’s a poor fit for a bright sky or HDR sparks.

Often you use two layers: a wide faint one and a tight one right at the edge, each very light. Where the background is dark, the wrap adds almost nothing, and that is correct.

Toggle the wrap on and off: the edge should feel settled, not glowing.

When light wrap is the wrong tool

If a light is bright enough to bloom the whole frame, such as a sun behind the robot, a wrap on the robot alone looks wrong: the equally bright background isn’t blooming at all. Use a lens-style glow over the whole frame near the end instead; it wraps the edge and blooms the background together.

4 In real work

In Nuke

  1. Blur the background by a large amount, keeping the bbox inside the frame so no black is pulled in from outside.
  2. Blur the robot’s alpha → Merge (stencil) the blurred alpha out of the original alpha to get the inner edge band.
  3. Merge (mask) so the blurred BG remains only inside the edge band.
  4. Merge (plus) onto the comp with output set to rgb and the mix turned well down.
  5. Nuke also ships a LightWrap node; build it by hand once first so you know what each knob does.

Common mistakes → the fix

  • ✗ The wrap spreads over the whole robot✓ Limit it with a thin inner edge band and less alpha blur.
  • ✗ Screening the wrap over an HDR background✓ Plus it and control strength with the mix.
  • ✗ Letting the wrap change the alpha✓ Set the Merge output to rgb only.
  • ✗ Using a wrap in place of a glow for a very bright source✓ Bright sources get a whole-frame glow; keep the wrap for a small spill at the edge.

Before you send the shot

  • The wrap sits only on the inner edge, not outside the robot.
  • The wrap colour comes from the background right behind it.
  • Where the background is dark there is almost no wrap.
  • No black from outside the frame has been blurred in.
  • Toggling it changes the feel, but you can’t point at it.

5 Check yourself

One question to check yourself

How visible should good light wrap be?

What you learned

🔒 Answer the question above and this card opens

More questions

1. Where should the light wrap appear?

2. Which Merge operation combines the wrap with the comp?

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).