UE5, Volumetric Fog and Translucent Materials

I am trying to build a scene with fog coming through a window but the fog never affects the translucent material in the window.

I have tried:

  • Messing with translucen sort priority
  • “Compute fog per pixel” in the materials

I am using lumen with Hardware RT and RT shadows (switching these on and off doesn’t affect translucent materials)

What can I do to correct this behaviour (or fake it somehow).
Intended use is cinematics

1 Like

You may have a few options:

  1. There is a new setting called ‘order-independent translucency’, and it essentially just sorts translucency per-pixel and may help you resolve some of these problems.

  2. What is your glass material using for rendering? Try setting it to ‘surface- forward shading’, which is the highest quality technique to my knowledge and may suit your needs, but feel free to try the different lighting models to get the best result.

  3. What is your translucency set to in PP volume? If it’s raster, you’re stuck with the older pipeline, but it supports GI and translucency volumes. If you’d like, try ray-traced translucency and see if it might integrate better for your scenes.

Failing all else, if you need the highest quality for cinematics, you could build a newer version of UE5 off of Github’s UE5_Main. In the newer builds, you have two advantages: Lumen supports mirror translucency, which seriously helps with glass quality, and the path-tracer can handle volumetric fog and atmospheric scattering for absolute highest quality.

Just a few potential suggestions that may help :slight_smile:

1 Like

You are awesome!

I am using RT for translucency. Turning off refraction in the PP “solves” it but translucent materials simply disappear or are just a color plane.

I have tried all volume rendering options. In the image it was set to forward shading.

I am not finding the “order independent translucency” option. Could you explain where to find it?

It’s awesome they improved this already in newer builds. I will probably refrain from using it though, since I am worried about stability.

Thank you! I appreciate it. I must say, whatever you’re working on caught my eye, it looked interesting and I’m more than happy to help; especially with Unreal’s weird translucency systems.

What I learned may be somewhat of a headache for you, apologies: Raster and RT translucency work vastly differently, differently enough that you may have to rework some of your materials to get your desired results. Essentially RT translucency may not even be aware that your volumetric fog is present, so it’s effectively ignoring it. Without getting into too much sorcery, you may just need to switch translucency to raster and live with the limitations.

Also, as someone who’s worked a fair bit with ray-tracing and lumen and related rendering (no expert though), raster translucency does work pretty well at this point for integrating translucent surfaces and volumetric effects like fog (not perfectly, but generally well). Refraction is screen-space, but that can generally be arted around.

By the way, is your material two-sided? Try enabling it if not, I’ve found it to help glass quality in a lot of cases .

Ah, I’ve checked 5.0.1. Order-independent translucency appears to not be supported in this engine version, only in UE5_main for now. Even then, it only solves sorting issues with other translucent objects, and how fog relates to translucency is somewhat complex.

And I can appreciate your point on _main, it is not stable, but if you’re only using it for offline rendering/cinematics and not shipping, I’ve found it to generally be good enough.

Thanks, thats appreciated.
I have been working with UE5 since Preview 1 so while I am not an expert by any means I can say that I am actively trying to understand it from an artist perspective. I’ve seen your posts on the feedback threads and they are always helpfull.

I never messed much with raster translucency because I have some scenes where we will be close to the glass AND there is fog in the scene. So while I probably can learn to make it better, from what I can gather it will never have the same fidelety RT trasnlucency has. It’s a shame, but yes, if it comes to a solid “no, doesn’t work” I’ll go with that

Raster translucency is definitely weird, I’ll say that. I’ve followed enough of the development to know that the systems were sometimes implemented ad-hoc without consideration for larger performance/use-case scenarios, but we’re stuck with what we’ve got. Raster translucency can get surprisingly close to RT translucency actually, with some obvious limitations.

If you really need it to look picture perfect, the movie render cue actually has some good options: you can output different effects and different passes, and sometime (a while ago), I figured out how to integrate volumetric fog as an extra pass to be integrated with the path-tracer later.

And thank you! I’ve been using lumen since it first came out in EA, and I went through every CVar to try to understand it. I’m just looking to help others myself struggling with Unreal’s lighting tech, putting it forward I suppose.

THANK YOU SO MUCH! I’ve been tearing my hair out trying to figure this out and I finally found the fix for it, you are definitely paying it forward man.

1 Like

Hey, same issue here, with translucent materials rendering on top of VDB clouds. Has this been fixed yet? @Griff_The_5th, which solutoion has worked for you?

Not sure if it is a new addition, but have been having the same issues with local fog volume. I have a building with stained glass in the middle of a foggy area, and stained glass was just showing through, ignoring the fog. Went to Project Settings, ticked “Local Fog Volume Apply on Translucent”, restarted the engine, it recompiled all shaders, and now my stained glass windows are actually disappearing behind the fog. You do need to tick “Apply Fogging” in your materials too. Engine version 5.4.2