PathTracer WorldDepth AOV values on refractive materials are infinite?

Brand new Unreal learner here, coming from Maya/vray land. This is Day 2 for me so I’m unsure how to troubleshoot this issue.

Using Unreal 5.6
Coffee Shop Environment (From Fab)

I rendered out a still frame and opened it in Nuke. I noticed that all of the objects with refractive materials (windows, light bulbs, salt shakers) are evaluating to huge values or effectively infinite. This is causing wonky results with ZDefocus.

I tried swapping the glass materials translucency pass attribute between before and after dof but there was no change. Is there a setting to ignore the translucency when calculating the worldDepth pass?

Thanks.

If you just put a simple/default translucent material on those objects, do they still render crazy?

@comlys Applying a basic translucent material does fix it, but I also just learned that if I use the WorldDepth on one of the Deferred Rendering settings (instead of on the Path Tracer setting) it also solves the problem.

Having WorldDepth and MotionVectors added by default, albeit disabled, on all of the rendering setting options is a bit confusing. Anyways, I think I’ve found my solution though, thanks.

Hey, so you are saying the same setup, but if you render the depth out of Deferred rather than Pathtracer, it’s fine? Same material, same everything?

Yep, same everything.

I finally had a moment to have a look. The reason why the depth in both of the renders is incorrect is due to the Opcaity Mask Clip Value in the glass material being set higher than the opacity. This will clip that material out of passes like depth and alpha in an effort to save resources. If you set that value to 0.01 or something small you will see that your passes render correctly.

That being said, why they are different between the pathrtacer and deferred when being clipped by the opacity mask is something we need to look into. In the deferred path the actors with this materials simply are not visble in the render. In pathrtacer they are visible but reporting incorrect values.

Ah, interesting. Thank you for looking into that.

1 Like