V-Ray Tip: VRayZDepth-Driven Post DOF: Setup and Best Practices

November 15, 2025 2 min read

V-Ray Tip: VRayZDepth-Driven Post DOF: Setup and Best Practices

Use the VRayZDepth render element to drive depth-of-field (DOF) in post for flexible, fast look development and revision-friendly finals.

Set it up correctly in V-Ray

  • Add VRayZDepth: Render Elements → Add → VRayZDepth.
  • Units and range:
    • Depth black = distance where objects begin to blur least (near limit).
    • Depth white = distance where blur reaches its maximum (far limit).
    • Set these to bracket your whole scene to avoid clamping; push Depth white beyond the farthest object.
  • Filtering:
    • Start with Filtering = On for softer transitions and fewer edge halos in most compositors.
    • If your comp tool expects an unfiltered Z (e.g., math-based kernels), set Filtering = Off.
  • Bit depth and color management:
    • Save 32-bit float EXR (multichannel if possible). This preserves precision and prevents banding.
    • Work in linear; disable display LUTs on output. Keep “Clamp output” off for EXR saves.
  • Camera notes:
    • Disable in-render DOF when planning to do DOF in post to avoid double-blur.
    • Use the VFB focus picker or your DCC’s measure tools to note focus distance for reference in comp.

Compositing workflow (Nuke, After Effects, Fusion)

  • Nuke: Use ZDefocus. Pipe the VRayZDepth channel, set math to use true depth, set focal plane to your picked focus distance, and adjust f-stop/defocus amount. Invert the depth channel if the blur direction is wrong (V-Ray is black=near, white=far by default).
  • After Effects: Use Camera Lens Blur (or a quality third-party lens blur). Assign the Z-depth pass as the Blur Map, check the layer is linear 32-bit, and invert the map if needed.
  • Fusion: Use DepthBlur. Ensure the Depth channel is selected, verify range, and set near/far accordingly.

Quality tips

  • Halo control:
    • Pre-multiply your beauty properly and keep depth unpremultiplied where the node expects it.
    • Use edge-extend or matte dilation on foreground elements when halos appear against bright backgrounds.
  • Noise:
    • Denoise the beauty before defocus; DOF magnifies noise.
    • Prefer the native V-Ray Denoiser or a high-quality temporal denoiser for animation.
  • Banding:
    • Stick to 32-bit float EXR for the Z pass. If forced to 16-bit, add mild dithering to the depth map before blur.
  • Transparency and volumes:
    • Standard Z-depth doesn’t look “through” refractive objects as you might expect; consider comp mattes for glass and combine with VRayAtmosphere if volumetrics are present.
  • Animation:
    • Keep depth ranges consistent across shots or publish per-shot reference values to avoid “breathing” DOF.

Why this workflow

  • Iterate DOF without re-rendering — huge time savings during lookdev and final notes.
  • Creative freedom to art-direct bokeh, focus pulls, and rack-focus timing in comp.
  • Cleaner pipeline handoffs: one master beauty plus Z-depth and denoised variants.

Need V-Ray licenses, upgrades, or expert advice? Visit NOVEDGE. For V-Ray bundles, training, and support tailored to your studio, reach out to the NOVEDGE team for personalized guidance.



You can find all the V-Ray products on the NOVEDGE web site at this page.







Also in Design News

Subscribe