Volumetric Fog / ExponentialHeightFog - Ray Tracing Translucency Problem

Hello,

I am pretty new to Unreal and I have been having issues with volumetric fog and translucency materials with ray tracing enabled.
Essentially, I have a scene with a ExponentialHeightFog and an object with a translucent material. The issue is that when I enable Ray Tracing on my translucency type - the material renders over the fog instead of under it. But when I change the translucency type back to Raster the issues disappears.

Is this a limitation of Unreal or am I missing a step.

I’d be grateful for any help.

Thank you!

1 Like

Hello there,
TL;DR: I don’t think it’s possible right now.

As far as I understand current (4.26) Ray Tracing implementation in UE, it still does not support volumetric fog and probably that’s why it glitches when using RT Translucency. Take a look at supported features here.

You can actually test it when using Directional Light with “Cast Ray Tracing Shadows” feature OFF. You will be able to see things like god rays, with the Volumetric Fog enabled on your ExpHeightFog actor. It just shows that Ray Tracing is still not completely coherent with other features in the engine.

Having said that though, Nvdia has its own UE branch on GitHub, called NvRTX and only recently they’ve added Ray Traced Volumetric Fog Shadows, with some new console commands:

HELP for ‘r.RayTracing.VolumeFogMode’:
How to handle lights with volume fog when ray tracing shadows
0 - Do nothing, no volume shadows cast from ray traced lights (default)
1 - Compute shadow maps for lights attempting to shadow volumes
2 - Ray traced volume fog shadows

This makes my aforementioned comment about “Cast Ray Tracing Shadows” sort of obsolete - it just works as expected but has no effect on RT Translucency which still looks wrong, basically rendered on top of the fog.
Soooo I suppose we just need to wait …

However, if anyone knows how to make it work, maybe with some sorting hierarchy in the frame buffer or similar witchcraft, please let us know :smiley:

2 Likes