ANR Tools

ANR Interactive Light

Lights an element with footage of a fire, lightning or a screen, through its normals and depth, with shadows from its own shape or from smoke.

  • Comp
  • Comp & Depth pack
  • 7 inputs
  • 49 controls

Overview

Interactive Light turns footage of a light source into light on your object. The Light footage is cut into a grid of small lights (Light Samples across), and the dark ones are dropped (Threshold). Each light sits where that part of the footage is in the frame, at Light Distance from the camera, in the footage's own colour. So a fire on the left lights the object from the left, its base lights from below, and the light flickers exactly as the footage does.

The object's shape comes from a Normals pass, a Depth map, or both: either one alone is enough. Without normals they are made from the depth; without depth the object is treated as a wall facing the camera at Object Distance. A matte on Mask, or the Source's alpha, keeps the light on the object.

Shadows come two ways. Shadows darkens the parts of the object that its own depth hides from the light. A Caster input (smoke footage, or the alpha of something passing in front) placed between the light and the object throws soft, moving shadows onto it.

By default the result is the Source with the light added, plus a light layer (the light alone, to grade with or plus yourself) and a shadow layer. With Show Guide on, the viewer draws the light, the caster and where its shadow falls.

Inputs

SourceLightNormalsDepthMaskCasterLightDepthInteractive LightOutput
  1. Sourceoptional

    The plate or element the light falls on. Add and Shade put the light on it, and its alpha is the output's alpha. Without it, the light alone is worked out on the frame of the Normals or Depth input.

  2. Lightrequired

    Footage of the light source: fire, lightning, a flickering screen, ideally on black. Where it lies in the frame is where the light comes from (place it upstream with a Transform, or use Place Light Manually).

  3. Normalsoptional

    A camera-space normals pass of the object, signed or packed (Normals Encoding tells which by itself). Gives the surface's direction, so each part faces the light or turns away from it.

  4. Depthoptional

    A depth map of the object: real distances, Nuke's 1/Z or a relative AI depth map (Depth Type reads which). Places each point in depth for the light's direction and falloff, and is needed for Shadows.

  5. Maskoptional

    Where the light may land: its alpha, or the luminance of an RGB mask. Used while Mask is set to Mask Input.

  6. Casteroptional

    Smoke footage or an alpha that sits between the light and the object at Caster Distance and throws shadows onto it.

  7. LightDepthoptional

    A depth pass of the light element itself, such as a 3D fire or bolt rendered through the shot's camera. Each part of the light is then placed at its own depth, so a light moving towards or away from the camera follows by itself.

Output. With the default Output, Add, with Light and Shadow Layers, rgba is the Source with the light added, and the layers light (the illumination alone) and shadow (0 lit to 1 in shadow) come with it. The other choices give one picture: Light Only, Add, Shade, Light Card or Shadow. The alpha is always the Source's.

Quick start

  1. Add ANR Interactive Light. Connect the plate or element to Source and the fire or lightning footage to Light.
  2. Connect the object's normals to Normals, its depth to Depth, or both. ANR Depth and Normal Creator makes both from the plate.
  3. Connect a matte of the object to Mask, or set Mask to Source Alpha, so the light lands only on the object.
  4. Place the light: move the Light footage with a Transform upstream, or tick Place Light Manually and drag the amber handle in the viewer. Output > Light Card shows the light's cells where they sit.
  5. Set Light Distance: nearer than the object lights it from the front, at the object's own distance from the side. Then set Intensity, and key it to fade the light in and out.
  6. For shadows, tick Shadows (it needs a Depth input), or connect smoke or an alpha to Caster and set Caster Distance between the light and the object.
  7. Use the result as it is, or Shuffle the light layer out to grade with or plus yourself.

The panel

The node's panel as Nuke shows it, with the values of a new node. Click any control to see what it does; tabs and sections work as in Nuke.

ANR_Interactive_Light1

What comes out and how strong: Output, Intensity, Mix, Quality, the mask and the viewer guide.

OutputAdd, with Light and Shadow Layers
Intensity1
Mix1
QualityHalf
MaskMask Input
Invert Mask
Show Guide

All controls

Interactive Light7 controls

What comes out and how strong: Output, Intensity, Mix, Quality, the mask and the viewer guide.

OutputMenuilOutput

Light Only: the illumination alone, to plus over the object or to drive a grade. Add: the Source with the light added. Shade: the light multiplied by the Source's own colour, then added -- dark parts of the object take less. Light Card: the Light footage's cells drawn where they sit, to place the light. Shadow: how much of the light the Caster (and the depth's own shadows) took, 0 lit to 1 in shadow. Add, with Light and Shadow Layers: rgba is Add, and the layer light (Light Only) and the layer shadow (Shadow) come with it, from one render (this node renders the three pictures one above the other, and the ANR Interactive Light node cuts them into the layers).

Default: Add, with Light and Shadow LayersOptions: Light Only Add (Source + Light) Shade (Source x (1 + Light)) Light Card (where the light is) Shadow (1 = in shadow) Add, with Light and Shadow Layers

IntensitySliderilIntensity

How bright the light is. Key it to fade the light in and out.

Default: 1

MixSliderilMix

Add / Shade: how much of the light lands on the Source.

Default: 1

QualityMenuilQuality

The resolution the light is worked out at (the result is always full size). Half is usually invisible and four times as fast.

Default: HalfOptions: Full Half Quarter

MaskMenuilMask

Where the light may land: the Mask input (its alpha; luminance for an RGB mask), the Source's alpha, or everywhere.

Default: Mask InputOptions: Mask Input Source Alpha None

Invert MaskCheckboxilInvertMask

Lights everything outside the mask instead: the Mask input or the Source's alpha, whichever Mask uses. No effect when Mask is None.

Default: off

Show GuideCheckboxilShowGuide

Draw in the viewer: the light (orange, with its centre), the caster (blue) and where its shadow lands on a wall at Object Distance (dashes; the faint ones are the soft edge from the light's extent).

Default: on

Light14 controls

The light footage: where it sits in the frame and in depth, how finely it is sampled, its colour and its timing.

Place Light ManuallyCheckboxilPlaceManually

Off: the light is where the Light footage lies in the frame (place it upstream with a Transform). On: the footage is centred at Position and scaled by Scale.

Default: off

PositionPositionilPosition

Place Light Manually: the centre of the light in the frame. Drag its amber handle in the viewer.

Default: 1024 778

ScaleSliderilScale

Place Light Manually: the size of the light footage.

Default: 1

Light DistanceSliderilDistance

How far the light is from the camera, in the depth's units (Near / Far for a relative depth map; Object Distance when there is no depth). Nearer than the object lights it from the front, the same distance from the side. Not used when Light Depth From takes the depth from an input.

Default: 4

Light Depth FromMenuilLightDepthFrom

Where each cell of the light sits in depth. Auto: the Light Depth input when one is connected, else Light Distance. Light Depth Input: a depth pass of the light element itself (a 3D fire or bolt), so a light moving in Z, or a bolt reaching into the scene, is placed cell by cell and follows by itself. Depth Under The Light: the Depth input where the light is, for a fire standing on something in the plate (Light Depth Offset brings it forward).

Default: AutoOptions: Auto Light Distance Light Depth Input Depth Under The Light

Light Depth OffsetSliderilLightDepthOffset

Added to the depth every cell got, in the depth's units. Negative brings the light toward the camera.

Default: 0

Light Depth TypeMenuilLightDepthType

What the Light Depth input's red channel means (Auto reads the frame). Near / Far Distance and Depth Scale under Geometry are shared with the Depth input.

Default: AutoOptions: Auto Distance Inverse (1/Z) Relative, near bright Relative, near dark Relative, near bright, linear

Light SamplesSliderilSamples

Cells across the Light footage. More is a finer light (and slower); 16 is plenty for a fire.

Default: 24

ThresholdSliderilThreshold

Cells darker than this fraction of the brightest are not lights: drops the footage's black background.

Default: 0.02

FalloffMenuilFalloff

How the light fades with distance. All three agree at Light Distance.

Default: Inverse SquareOptions: Inverse Square Linear None

SaturationSliderilSaturation

Of the light's colour.

0 makes the light grey (the footage's brightness only), 1 keeps the footage's colour, above 1 strengthens it.

Default: 1

TintColourilTint

Multiplies the light's colour.

Default: 1

Light Alpha Cuts OutCheckboxilLightAlpha

Multiply the Light footage by its alpha first (for a keyed element on a background).

Default: off

Light Time OffsetSliderilTimeOffset

Read the Light footage this many frames later (to line the flicker up).

Default: 0

Surface4 controls

How the surface takes the light: wrap, highlight and bounce.

WrapSliderilWrap

Let the light creep round past the terminator, as it does on skin and cloth.

Default: 0.2

SpecularSliderilSpecular

A highlight of the light, in its colour.

Default: 0

RoughnessSliderilRoughness

Specular: small is a tight, glossy highlight; large a broad sheen.

Default: 0.4

AmbientSliderilAmbient

The light's average colour added everywhere in the mask, whatever the surface faces: bounce.

Default: 0

Shadows5 controls

Self-shadowing of the object, from the Depth input.

ShadowsCheckboxilShadows

With a Depth input: parts of the object behind other parts, as seen from the light, go dark.

Default: off

Shadow StrengthSliderilShadowStrength

How dark the depth's self-shadows get: 1 takes all of the light away in shadow, the default 0.8 leaves a fifth of it.

Default: 0.8

Shadow SoftnessSliderilShadowSoftness

Degrees.

The softness of the self-shadows' edges, as an angle in degrees: 0 gives a hard edge, larger values a softer one.

Default: 2

Object ThicknessSliderilShadowThickness

How deep things are assumed to be behind their front face, in the depth's units.

Default: 1

Shadow LengthSliderilShadowLength

Farthest a shadow is cast.

The farthest a self-shadow reaches, in the depth's units.

Default: 10

Shadow Caster7 controls

Shadows from smoke or an alpha connected to Caster.

Caster DistanceSliderilCasterDistance

How far the Caster input (smoke, an alpha) is from the camera, in the depth's units. It throws shadows only while it sits between the light (Light Distance) and the object.

Default: 4.5

Caster Density FromMenuilCasterChannel

What blocks the light: Auto takes the alpha when the Caster has one, else its luminance (smoke on black).

Default: AutoOptions: Auto Alpha Luminance

Caster DensitySliderilCasterDensity

How much a fully covered pixel of the caster blocks: 1 all of the light, 0.5 half.

Default: 1

Caster SoftnessSliderilCasterSoftness

Blur the caster first, in pixels. The light's own size already softens the shadow.

Default: 0

Place Caster ManuallyCheckboxilCasterPlaceManually

Off: the caster is where its footage lies in the frame. On: centred at Caster Position, scaled.

Default: off

Caster PositionPositionilCasterPosition

Place Caster Manually: its centre. Drag its blue handle in the viewer.

Default: 1024 778

Caster ScaleSliderilCasterScale

Place Caster Manually: its size.

Default: 1

Geometry12 controls

How to read the Depth and Normals inputs, and the lens they were seen through.

Depth TypeMenuilDepthType

What the Depth input's red channel means. Auto reads it from the frame: real distances (a Scene Solver, CG Z), Nuke's 1/Z, or a relative AI map (Depth Anything: near bright; Lotus / ANR Depth and Normal Creator: near dark).

Default: AutoOptions: Auto Distance Inverse (1/Z) Relative, near bright Relative, near dark Relative, near bright, linear

Near DistanceSliderilNear

Relative depth: what the nearest value means, in scene units.

Default: 1

Far DistanceSliderilFar

Relative depth: what the farthest value means.

Default: 50

Depth ScaleSliderilDepthScale

Distance / Inverse depth: multiplies the values into scene units.

Default: 1

Object DistanceSliderilObjectDistance

With no Depth input: how far the object is, as a wall facing the camera (the normals sit on it).

Default: 5

Normals EncodingMenuilNormalsEncoding

How the Normals input stores its vectors. Auto: anything below 0 means signed.

Default: AutoOptions: Auto Signed (-1..1) Packed (0..1)

Flip XCheckboxilFlipX

The normals' X points the wrong way (Lotus does).

Default: off

Flip YCheckboxilFlipY

The normals' Y points the wrong way (DirectX normal maps).

Default: off

Flip ZCheckboxilFlipZ

The normals' Z points away from the camera.

Default: off

Normals From Depth SmoothSliderilNormalsSmooth

With no Normals input: pixels of smoothing on the normals made from the depth.

Default: 2

Focal LengthSliderilFocal

The lens the depth was seen through, mm (with Horizontal Aperture: positions from the depth).

Default: 35

Horizontal ApertureSliderilAperture

Film back, mm.

Default: 36

Tips

  • If the light seems to come from the wrong side, the normals' axes may point the other way: try Flip X, Flip Y or Flip Z under Geometry.
  • Raise Threshold if the footage's dark background still lights the object; lower it to keep a faint glow.
  • Light Time Offset shifts the footage in time, to line its flicker up with the plate.
  • Shade multiplies the light by the Source's colour before adding it, so dark parts of the object take less; Add adds it the same everywhere.
  • Wrap lets the light creep past the shadow line, as it does on skin and cloth. Specular with Roughness adds a highlight for glossy surfaces, and Ambient adds the light's average colour everywhere in the mask, as bounce.
  • For a fire standing on something in the plate, set Light Depth From to Depth Under The Light; a negative Light Depth Offset brings it towards the camera.
  • For a keyed light element on a background, tick Light Alpha Cuts Out.
  • In the viewer, the caster's outline is blue while it can throw a shadow, and red and dashed when Caster Distance is not between the light and the object.
  • Write all channels to an EXR to keep the light and shadow layers in a render.

Good to know

  • With Mask on Mask Input and nothing connected to the Mask input, the light lands everywhere in the frame.
  • Shadows needs a Depth input and is cast from the light's centre. The Caster's shadows take the whole light's size into account, so they soften with a large light.
  • The viewer guide shows the caster's shadow on a wall at Object Distance. With a Depth input the real shadow follows the depth, so the guide is only a guide.
  • Distances are in the depth's units: what Near Distance and Far Distance say for a relative depth map, and Object Distance when there is no depth.
  • Positions in depth come from the lens: set Focal Length and Horizontal Aperture to the shot's camera when you know them.
  • Pixels are treated as square; anamorphic footage is not corrected for.

Something unclear or missing? Write to [email protected].