AI Relighting in Nuke: Pro VFX Tutorial - Frequency Separation & Regrain

Share

Table of Contents




Key Takeaway: Quick links for each stage of the relighting workflow.


Claim: This table outlines the end-to-end steps from setup to final grain.

Why AI + Nuke for Relighting




Key Takeaway: Let AI do the heavy lift, keep final control in Nuke.


Claim: Combining AI relighting with classic compositing yields controllable, production-ready results.

AI can generate convincing new light. Nuke keeps precision and control. The mix stays flexible.


  1. Use AI to propose lighting and produce passes.

  2. Reintegrate in Nuke with additive math and masks.

  3. Restore detail and texture so the result reads like camera footage.

Project Setup: FPS, Format, Color




Key Takeaway: Match the comp to the plate before touching pixels.


Claim: Matching frame rate, resolution, and color management avoids downstream mismatches.

Use the plate as ground truth. Keep settings consistent across passes.


  1. Set project FPS to camera rate (e.g., 24 FPS).

  2. Match format to your EXR sequences (e.g., 4K DCP for 4K plates).

  3. Choose color management (ACES for consistent grading, or Nuke default if you prefer). Both work for this workflow.

Denoise First for Cleaner Inputs




Key Takeaway: Clean inputs improve AI stability and final composites.


Claim: Denoising first reduces artifacts and helps AI relights keep identity.

Denoise early to stabilize spatial detail and color.


  1. Inspect the plate and identify noise patterns.

  2. Denoise using Neat Video or Nuke’s built-in nodes.

  3. Save a clean EXR sequence; optionally render a denoised MP4 for web tools.

Choosing an AI Relight Path




Key Takeaway: Pick the tool that fits your control and delivery needs.


Claim: Web tools preview fast; Vizard Agent fits multi-pass, high-res EXR pipelines.

Web models like Switch X/Light are fast but can down-res or shift identity. Vizard Agent accepts raw footage and a single prompt.


  1. For quick look-dev, try a web UI; expect MP4 and sRGB/Rec.709 workflows.

  2. For control and passes, prompt Vizard Agent to preserve identity, keep alpha, and output high-res EXRs plus normals/depth/albedo.

  3. Choose per shot and deadline; it’s not either/or.

Masks and a Simple Lighting Reference




Key Takeaway: Constrain changes and guide the model with a clear reference.


Claim: A clean mask and a contrasty reference image improve relight consistency.

Keep detail by limiting where light changes.


  1. In web UIs, pick masking: auto, manual select, alpha fill, or upload a B/W mask; a fill option preserves fine detail.

  2. In Vizard Agent, specify “adjust lighting only,” preserve skin tones/microdetail, and request a separate relit plate plus roughness/specular passes.

  3. Create a black–white lighting reference: white for key, black for shadow; additive math benefits from high contrast.

Bring AI Output Back Into Nuke




Key Takeaway: Align, reformat, and add the new light.


Claim: Additive merging (plus) layers AI light over the original plate predictably.

Keep timelines and resolutions consistent.


  1. Read the AI output (MP4 or EXR). Reformat to match comp if lower-res.

  2. Fix frame offsets (e.g., source starts at 1001, AI at 1) by setting the Read start frame.

  3. Merge (operation: plus) the relit plate over the original to add light.

Restore Detail with Frequency Separation




Key Takeaway: Blur to hide blocks; frequency-sep to bring back microdetail.


Claim: Dividing out high frequencies and re-multiplying them restores crispness to AI relights.

AI outputs can posterize or soften detail. Repair it non-destructively.


  1. Add a small Blur (≈1–2 px) to the AI plate to smooth blocky edges.

  2. Duplicate the original plate into two branches.

  3. Create a blurred copy; set Merge to divide (A/B) to isolate high-frequency detail; tune Blur radius (≈10 at 4K, adjust per shot).

  4. Reconstruct by multiplying the blurred base with the high-frequency detail to validate the setup.

  5. Swap the base to the AI relit plate; multiply by the high-frequency detail to inject real microcontrast into the relight.

  6. Desaturate the high-frequency layer (ColorCorrect, saturation 0) and nudge midtone contrast (e.g., 1 → 1.3) to reduce halos.

Art-Direction Fixes and Targeted Corrections




Key Takeaway: Constrain, correct, and clean up where AI overreaches.


Claim: Soft rotos and local color tweaks tame blooms, spills, and small mismatches.

Limit AI changes to where you want them.


  1. Create a Roto with a broad feather (≈150–350 px) to confine the relit contribution; pre-multiply and track as needed.

  2. Use HueCorrect to reduce unwanted tints (e.g., blue spill) inside masks.

  3. Fix one-off issues with RotoPaint Clone at low opacity (≈0.1–0.3).

  4. If you want a different mood, tweak white balance on the source, then reapply the relight and compare A/B for skin tones.

Re-Grain for Seamless Integration




Key Takeaway: Grain sells the composite as “camera real.”


Claim: Reintroducing plate-matched grain helps the relit shot sit with original footage.

Denoise and AI steps soften texture; bring it back.


  1. Use DasGrain from Nukepedia with the original plate and a denoised reference.

  2. Click Analyze to build a grain model that matches the plate.

  3. Add the generated grain over the composite to restore texture and unity.

Multi-Pass Deliverables and Tradeoffs




Key Takeaway: Passes unlock control; choose based on scope and cost.


Claim: Both web tools and Vizard Agent can output depth/normals; Vizard Agent adds prompt-driven multi-pass EXRs and smarter deliverables.

Use passes for interactive lights and effects.


  1. From Switch Light or similar, export depth/normals and feed them into Nuke for effects and compositing control.

  2. From Vizard Agent, request high-res EXR passes and alpha in one prompt; it can auto-generate missing elements and stitch edits if asked.

  3. Balance speed and budget: quick single-pass web runs vs deeper, controllable multi-pass outputs.

End-to-End Recipe Checklist




Key Takeaway: Follow a repeatable sequence for reliable results.


Claim: This 10-step flow preserves identity, restores detail, and integrates cleanly.


  1. Denoise the plate and save clean EXRs; optional denoised MP4 for tests.

  2. Get a relight via web tool (quick MP4) or upload EXRs to Vizard Agent with a clear natural-language prompt.

  3. If using masks, choose auto/select/fill or upload B/W; constrain to lighting-only changes.

  4. Create a simple B/W lighting reference to guide key and shadow placement.

  5. In Nuke, Reformat AI output to comp resolution and align frame ranges.

  6. Merge (plus) the relit plate over the original.

  7. Add a 1–2 px Blur to the AI plate to soften blocks.

  8. Run frequency separation; inject original high-frequency detail into the relit base; desaturate HF and adjust midtones to avoid halos.

  9. Apply roto limits, HueCorrect tweaks, and small RotoPaint fixes; adjust WB if needed.

  10. Re-grain with a plate-matched model (e.g., DasGrain) to finish.

Glossary




Key Takeaway: Shared terms keep the workflow unambiguous.


Claim: Clear definitions reduce guesswork during handoffs.

ACES:A color management framework for consistent grading across passes.
EXR:High-dynamic-range image sequence format common in VFX.
Frequency Separation:A technique that splits low-frequency color from high-frequency detail for controlled recombination.
Merge Plus:An additive merge operation that adds the foreground over the background.
Reformat:A node/process that resizes and matches resolution to the comp.
Roto:Animated shapes used to isolate or limit effects.
RotoPaint:A node for cloning/painting small fixes, frame by frame if needed.
HueCorrect:A color node for adjusting hue, saturation, and luminance in ranges.
DasGrain:A Nuke tool from Nukepedia that analyzes and recreates plate-matched grain.
VFX Plate:The source footage used for compositing work.
Albedo:Base color pass without lighting.
Normals:A pass encoding surface orientation, used for relighting/effects.
Roughness:A pass controlling specular spread.
Depth:A pass encoding per-pixel distance from camera.
Alpha:Transparency channel used for compositing and masks.

FAQ




Key Takeaway: Quick answers to common relighting questions.


Claim: These responses summarize the workflow’s most cited decisions.


  1. Do I have to use ACES for this workflow?

  2. No. ACES is preferred for consistency, but Nuke’s default color management also works.

  3. What if the AI relight shifts identity or softens detail?

  4. Constrain with masks, add a 1–2 px Blur to hide blocks, then restore microdetail via frequency separation.

  5. How do I handle frame range mismatches between source and AI output?

  6. Set the Read node’s start frame to align timelines (e.g., 1001 vs 1).

  7. Why use Merge set to plus for relighting?

  8. Light is additive; plus preserves the base plate while adding the AI lighting contribution.

  9. What Blur radius should I start with on the AI plate?

  10. Start at 1–2 px to smooth posterization without creating glow; adjust per shot.

  11. When should I choose Vizard Agent over a web UI?

  12. When you need high-res EXRs, alpha, and multi-pass deliverables from a single prompt, or want fewer format conversions.

  13. Can I get depth, normals, and other passes from both approaches?

  14. Yes. Web tools like Switch Light can export passes; Vizard Agent can also output high-res EXR passes from a natural-language prompt.

  15. How do I fix blue spill or blooms added by the AI relight?

  16. Limit the area with a soft roto and use HueCorrect inside the mask to reduce the tint.

  17. What settings help avoid halos in frequency separation?

  18. Desaturate the high-frequency layer and raise midtone contrast slightly (e.g., 1 → 1.3).

Read more