Realistic Refraction Effects in Foundry Nuke

Introduction

Refraction is a key element in VFX digital compositing, essential for achieving realistic glass, water, and transparent materials in CGI. Traditionally, refraction is simulated using ray tracing in 3D rendering software, but aeRefracthor provides a powerful solution for creating refraction effects directly inside Foundry Nuke.

In this article, we’ll explore:

  • How aeRefracthor works under the hood
  • The physics of real vs. fake refractions in VFX compositing
  • Best practices for simulating realistic refraction in Nuke

What is aeRefracthor?

aeRefracthor is a Nuke gizmo that allows artists to create realistic refraction effects using a geometry and a camera. It enables you to simulate different optical distortions, achieving a result similar to glass or water refraction without requiring complex 3D rendering.

Key Features of aeRefracthor

Real-Time Refraction Simulation – No need for external 3D renders

Works with Any Geometry & Camera – Flexibility for various shot types

Simulates Optical Phenomena – Chromatic aberration, thickness variation, and internal reflection

Supports Ray Rendering & Distortion Mapping – For greater control over reflections

 

Why is this useful? Instead of relying on external 3D rendering engines, aeRefracthor allows direct refraction simulation inside Nuke, saving time and integrating seamlessly into a VFX compositing workflow.

How aeRefracthor Works Under the Hood

The aeRefracthor gizmo operates by distorting an input image based on geometry, environment maps, and camera perspective.

aeRefracthor Processing Pipeline:

  1. Input the Image Behind the Glass
    • Connect the background plate (image behind the refractive object).
  1. Define the Refraction Geometry
    • Place a 3D object (such as a sphere, glass pane, or custom shape).
  2. Use an HDRI for Accurate Reflection Mapping
    • Load an HDRI environment map for more realistic lighting interaction.
  3. Adjust Refraction & Thickness Settings
    • Control light bending, internal reflections, and color absorption to match real-world effects.
  4. Choose Between Ray Rendering & Distortion Mapping
    • Use Ray Render for accuracy or Distortion Map for faster performance.

If you experience artifacts or distortions in deep areas, try switching from Ray Render to Distortion Mapping for a cleaner result.

Understanding Refraction in VFX Compositing

What is Refraction?

Refraction occurs when light passes through a transparent medium (e.g., glass, water), bending due to a change in speed. This bending effect creates distortion, which is essential for realistic renderings in film compositing software.

How is Refraction Simulated in 3D Rendering?

  • Ray Tracing: A computational method where light paths are traced as they interact with a medium.
  • Refraction Index: Determines how much light bends based on material properties.
  • Snell’s Law: Governs the angle of refraction depending on the medium’s density.

If you're working on high-quality CGI compositing in film, use physically accurate refraction indices to match real-world glass, water, or crystals.

Fake Refractions in Nuke: A Fast Alternative

Fake refractions are simplified optical distortions that create the illusion of refraction without full ray tracing calculations.

 

How to Create Fake Refractions in Nuke

  1. Use a Transform Node for Basic Distortion
    • Apply a custom warping effect to simulate light bending.
  2. Use STMaps for Image Warping
    • Pre-generate an STMap distortion to apply realistic optical shifts.
  3. Apply Chromatic Aberration for Extra Realism
    • Use RGB channel shifts to mimic color dispersion in glass.

 

 

When to Use Fake Refractions?

For quick previews & motion graphics

When full 3D ray tracing is too expensive

For subtle distortion effects in VFX shots

🚫 Fake refractions should NOT be used for high-end CGI where precise light bending is required.

How to Use aeRefracthor in Nuke

Step-by-Step Guide to Creating Realistic Refractions

 

1. Install and Load aeRefracthor

  • Download aeRefracthor from Nukepedia or GitHub.
  • Add the gizmo to your Nuke scripts and restart Nuke.

 

2. Set Up Your Scene

  • Background Plate → Connect the image behind the glass.
  • 3D Geometry → Place a sphere, glass pane, or custom object to act as the refractive medium.
  • Camera Node → Define the viewpoint for correct perspective distortion.

 

3. Adjust the Refraction Parameters

  • Front & Rear Reflections → Choose whether to reflect both sides of the geometry.
  • Smooth Edges & Quality Settings → Increase sampling for more precise glass distortions.
  • Chromatic Aberration → Control color shift intensity to simulate dispersion.
  • Thickness Absorption → Mimic how light travels through different material densities.

 

4. Render & Compare Results

  • Try Ray Rendering for higher accuracy.
  • If rendering is slow, switch to Distortion Mapping for faster results.

Use an HDRI map to enhance realistic environmental reflections and light behavior inside the refractive object.

Best Practices for Using aeRefracthor in Foundry Nuke

To get the best refraction effects, follow these VFX compositing best practices:

 

1. Match the Refraction Index to the Material

  • Water → 1.33
  • Glass → 1.52
  • Diamond → 2.42

 

2. Use HDRI Maps for Realistic Reflections

  • A good HDRI environment enhances real-world lighting behavior.
  • If no HDR is available, aeRefracthor will generate a default reflection map.

 

3. Optimize Render Settings

  • For quick results, use Distortion Mapping instead of Ray Rendering.
  • If artifacts appear, adjust the normal smoothing settings.

 

4. Control Chromatic Aberration Subtly

  • Avoid over-exaggerated RGB separation, as it can look unnatural.

Common Mistakes When Using aeRefracthor

Overusing Chromatic Aberration – Too much distortion makes the effect unrealistic.

Ignoring Refraction Indices – Incorrect light bending can make the glass look fake.

Not Using an HDRI Map – Reflections will look flat without proper environment mapping.

Using Low-Quality Geometry – Low-poly models create blocky distortions in refraction.

Conclusion

aeRefracthor is a powerful Nuke VFX tool for simulating glass-like refraction without external 3D rendering. By understanding refraction physics, real vs. fake distortions, and best compositing practices, you can achieve high-end, photorealistic effects in your VFX workflow.

Want to stay updated? Follow my GitHub for the latest Nuke tools!

Frequently Asked Questions (FAQs)

 

1. What makes aeRefracthor different from fake refractions?

aeRefracthor uses geometry and a camera for real-time refraction, while fake refractions use simple distortions without true light bending.

2. Can I use aeRefracthor in older versions of Nuke?

Yes! The gizmo is compatible with multiple Nuke versions but works best in Nuke 12+.

3. What’s the best way to enhance realism in refraction effects?

Use HDRI reflections, adjust refraction indices, and fine-tune chromatic aberration.

“Refraction is the principle that explains how lenses work
and how light can be bent to create magnified images.” – Albert Einstein