[Thin Translucency Raster] Fog blending issue

Hello,

I’m encountering an issue with the Thin Translucent shading model: it appears that Fog is being applied to the asset even when it is in shadow. The default Lit shading model behaves correctly.

In the attached debug scene, I am using the Translucency Method set to “Raster”.

[Image Removed]

I attempted a workaround by binding SceneColor to the Emissive input, but I’m facing the same problem.

I haven’t found any console variables to resolve this.

Could you please share any tips or solutions?

Thank you in advance!

[Attachment Removed]

Steps to Reproduce
Please find attached a debug scene featuring an ExponentialHeightFog (with Volumetric Fog enabled) and a Local Volume, along with several spheres showcasing different materials.

[Attachment Removed]

Hello,

Not sure what is happening and what is wrong from the image sorry.

So I would like to check the the project but I cannot find it. Could you reupload please or give me a link?

[Attachment Removed]

Looks correct:

  • shadow for the lighting
  • fog always applied on translucent regular and color trnasmittance

Maybe a shadow bug instead? I would need more details.

[Attachment Removed]

[Image Removed]

[Attachment Removed]

Hello Sebastien, thank you for your feedback!

Here is a re-upload of the project “DbgThinTranslucent.zip”. Please let me know if you encounter any issues downloading it.

To clarify the issue: the two spheres outlined in red should also appear black (Hidden by the wall’s shadow.), just like the two spheres outlined in green.

[Image Removed]

I also tried enabling Ray Traced Shadows along with the console variable

r.VolumetricFog.InjectRaytracedLights 1

, but unfortunately without success; I am facing the same problem.

[Attachment Removed]

Ok so this is because our fog application on thin translucent model is an approximation (because fixing that with rasterisation is not possibible, only alpha-as-coverage can correctly be composition).

And in this scene setup you are accumulating the bad values that exacerbated the problem even more:

  • volumetric scattering on the light setup to 200 so the fog thin translucent divergence due to approximation will be exacerbated by 200.
  • You have two sided enabled which is not recommended for such sphere as you can see triangle ordering issue + here it will accumulate the fog error twice.

If you disable two sided and reduce volumetric scattering intensity, the problem is still here but less visible. If you get into the shadow area, the error no longer accumulate. So in short this is a limitation ofthe thin trnaslucent shading model and you will have to live with it and workaround it with your scene setup.

[Image Removed]

[Attachment Removed]

The technical explanation:

  • UE uses opacity as coverage.
  • For coverage of 0.25, 75% of the scene is visible as is, and 25% is covered by the trnaslucent surface.
  • And on the percentage the surface is covering, one can have a coloured transmittance when using ThinTranslucency shading model only (ignoring Substrate here).

Reminder about passes:

1- scene rendering

2- apply fog on scene w.r.t. depth

3- render translucent over with fog on them.

Applying fog on particles using coverage only: the math works perfectly. A percentage of the scene-with-fog is visible, a percentage of translucent-with-fog surface is visible. that is a blend.

The problem is when transmittance is into play with ThinTranslucent.

  • The fog is integrated from view to scene depth in step 2 above.
  • We apply transmittance of a ThinTranslucency surface over that integrated scattered luminance color. From View to scene depth.
  • When in fact we should have transmittance applied for the integration from surface to scene only. And then surface coverage as weight from view to the translucent surface. This is were the math is wrong and is not fixable without ray tracing and integration fog by part: once from view to translucent surface. Then account for the surface throughput to evaluate what is being it.
  • Right now we integrate from view to scene, apply throughput on it, then blend overtranslucent surface with fog over it accounting from the surface coverage. And doing so is not equivalent to integrating by part from view to surface then from surface to scene. Integrating participating media is not linear this way and diverges in some cases you have seen. And it can get worse when more surfaces overlaps. Depends on participating media, scattering and scene setup.

I do not know of and I have never seen any solution to fix that in a rasterising context.

[Attachment Removed]

Thank you for your explanations, Sébastien.

Indeed, I forgot to disable “Two Sided”; that was just a test. Sometimes we need to increase the volumetrics of lights specifically for artistic reasons.

I also tried using a Diffuse material instead of Thin Translucency to slightly tint the glass.

However, I’m encountering another issue with this workaround. Perhaps you have a solution?

The problem: Translucent objects do not seem to receive Ray Traced Shadows.

Please find the attached project “DbgTranslucent_Raytraced_Shadow.zip”.

[Image Removed]

In this example, I applied a Diffuse material to the “Sphere_TranslucentDiffuse” on the far right and increased its opacity. As you can see, the sphere receives light through the wall (which also affects the specular highlights). There are no issues when using Shadow Maps.

[Attachment Removed]

Yes, that is because raytraced shadow do not work for all cases. Cannot RTShadow from the surface of translucent (forward shaded) and the translucency volume does not support tracing. It was never implmeneted. And with RTShadow regular shadow map are not rendered so cannot impact translucent lighting volume.

Why is it you want to use them may I ask?

You should skip RT shadow I would say since it does have some short coming like that. MegaLight is our future proof tech that works with ray tracing and target at better real time performance than RTShadow. This is what you hsould use and enable if you want RTShadow.

https://portal.productboard.com/epicgames/1\-unreal\-engine\-public\-roadmap/tabs/129\-unreal\-engine\-5\-8

https://dev.epicgames.com/documentation/unreal\-engine/megalights\-in\-unreal\-engine

I hope this helps.

[Attachment Removed]

I tested this several months ago and encountered certain limitations, particularly regarding SSS and hair lighting.

We are currently on UE 5.6.1, so we likely don’t have the latest Mega Light improvements yet. Could you confirm this?

If you have a list of known limitations for version 5.6.1, I would be very interested to see it.

However, I might be mistaken. If it works, it would certainly be very useful!

Thank you for your responsiveness, it’s greatly appreciated.

[Attachment Removed]

I do not have a list no unfortunately and could not find one. Simple documentation is here https://dev.epicgames.com/documentation/unreal\-engine/hardware\-ray\-tracing\-in\-unreal\-engine\#hardware\-ray\-traced\-shadows. And it says it does not work great with Nanite also. Megalight is our focus for the future so rtshadow will likely never work with translucent volume and might even be removed at some point since MegaLight handle this with a focus on performance.

When it comes to Megalight, it was beta in 5.7 and it is production ready in 5.8.

[Attachment Removed]

I can’t wait to use UE 5.8, but unfortunately, our current show’s production is too far along to switch to the latest version of Unreal.

For UE 5.6, I found this list here:

MegaLights in Unreal Engine | Unreal Engine 5.6 Documentation | Epic Developer Community

Therefore, this is too limited for our needs with version 5.6.1.

Limitations

General limitations:

MegaLights is incompatible with the Forward Renderer

Current limitations, which we want to improve:

There’s a legacy per light CPU overhead tracking primitive interactions, which aren’t needed for MegaLights

Directional Light isn’t supported.

Currently, MegaLights fallback to either Virtual Shadow Map or Ray Traced Shadows depending on the project settings

Subsurface scattering thickness estimation isn’t supported

Strand based hair isn’t supported

Translucency isn’t supported.

MegaLights falls back to unshadowed and slower Deferred Renderer lit translucency

Water, Clouds, Heterogenous Volumes and Local Volumetrics aren’t supported

Lumen handles lots of lights with reasonable performance, but it will be greatly improved when MegaLights is fully integrated with Lumen.

Software Ray Tracing path is under development and has limited shadow quality.

[Attachment Removed]

Yes, that sounds like end of experimental / beginning of beta.

If you need anything in 5.6 at this stage, you will need to update the engine from code then.

[Attachment Removed]

Will Ray Traced Reflection and Refraction support hair strands in the future?

[Attachment Removed]

Good question: if you mean see hair in reflection/refraction, this is planned when we will have hair rendered as curve as part of Nanite which is WIP RnD. This is a mid to long term goal.

[Attachment Removed]

Ok good to know thank you!

[Attachment Removed]