In 5.6.0-43139311+++UE5+Release-5.6 (and others releases) we can see that we don’t have to get very far a translucent object to see that the shadow will stop affecting it, making it standing out from the environment.
My basic unreal user understanding here is that when using Volumetric Non Directional, the pixels of our mesh would get it’s lighting based on a spatial volume grid that would be attached to the camera and potentially have more definition when close to the camera than when far away. This grid would try to replicate the opaque lighting but would be limited to the range and resolution it’s covering.
Does it make any sense? Is there a way to have a visual representation of that volume? Volume Lighting Samples doesn’t see to help much here unfortunately.
Is there a way to still keep some approximative shadow values even for far away translucent objects?
We have been trying to play with r.Lumen.TranslucencyVolume.EndDistanceFromCamera and other r.Lumen.TranslucencyVolume commands without much success but still see that something is going on.
Thanks in advance for any input on this.
Hi there, thank you for the great repo steps.
I did some investigating and was able to reproduce the same effect on 5.5, 5.6, and the latest source version.
This appears to be a limitation of how translucent materials are handled within Unreal Engine. There are some console commands you can tweak; however, there are performance implications to this.
However, if you need a distant translucent material, you might consider changing it to a Masked material and enabling the Dither Opacity Mask check box on that material (and swapping the opacity pin to the Opacity Mask pin) for a decent translucent effect, especially at a distance. If the camera moves closer to the object and you find this doesn’t hold up, you could consider swapping to a translucent material when the camera is within a certain distance. This would have the added benefit of being less expensive when the camera is further away.
If this is for something like water or glass, you could consider changing the lighting mode to surface forward shadowing, but this is more expensive.
Here is the documentation about Lit Translucency within Unreal Engine, including those console commands.
https://dev.epicgames.com/documentation/en-us/unreal-engine/lit-translucency-in-unreal-engine
Let me know if this helps.
Kind Regards
Keegan Gibson
Hi there,
Once the translucent material is outside of the two volumes (the inner and outer volumes), it receives no shadow information.
You can visualise it with r.TranslucencyLightingVolume.Debug 1, which will show both volumes and sizes.
Increasing the dimensions of the volume textures (default 64) to 128 will be 8 times more expensive. r.TranslucencyLightingVolumeDim
You can tweak the size of the volumes with r.TranslucencyLightingVolumeInnerDistance & r.TranslucencyLightingOuterInnerDistance. Try changing the inner value to 100 to visualize this change quickly.
Further to my suggestion of changing materials at distance, because this is a translucent material and won’t be running nanite, you could create a second material slot on the static mesh, add another LOD ( or use an existing one) and set the material override for that LOD to be the new material slot, in that slot add a masked material with dither on for it to swap at distance automatically..
Kind Regards
Keegan GIbson
Hello Keegan! Thanks for all your answers. It’s very appreciated. I now have a better understanding of the volume lighting. Have a great day.
No Problem,
If there is anything else we can help with, please don’t hesitate to open a new support request.
Hello Keegan!
Thanks for your reply and suggestions.
Is the problem the fact that, for a lack of precision, CSM are simply stopping to contribute to the Volume Lighting at a specific distance? Or is it just a matter of volume grid size and resolution?
Hello again Keegan! Thanks a lot for the detailed response. Those debug commands are very useful. I hope you don’t mind asking a few more questions… 
- As you said, changing values on r.TranslucencyLightingVolumeDim would affect precision therefore have performance implications but changing r.TranslucencyLightingVolumeInnerDistance and TranslucencyLightingVolumeOuterDistance would only have precision implications right?
- Are both Volumes are sharing the same VolumeDim values?
- Are those volumes currently uniformly subdivided? I am guessing no which would explain the need of two volumes (One smaller closer for higher lighting precision and one bigger with lower lighting precision but more distant) ?
- Also, when using r.TranslucencyLightingVolumeDebug 1, I see that we have Translucency Light Volume0 Size = 4251, 4251, 4251 with r.TranslucencyLightingVolumeInnerDistance=1500 and Translucency Light Volume1 Size = 14156.4, 14156.4, 14156.4 and r.TranslucencyLightingVolumeOuterDistance=5000. Would you know what are those Translucency Light Volume0/1 Size values representing exactly?
In our case, the issue was raised on particle smoke columns when seen in buildings shadows. Using Blend Masked is lowering the visual quality by a lot even for far distances unfortunately. Since in distance, using Forward shading could potentially be an option too but was about 3X more expensive than volume lit particles in the basic benchmarks we did.
Thanks in advance for your attention.
H ithere,
- The TranslucencyLightingVolumeDim resolution of the 3D texture, and so the precision/accuracy of the shadow.
- Each volume’s inner and outer have their own textures of the same size.
- Correct.
- The volumes are frustums from the shadow view position, forward along the view location out to the inner distance, then from the inner distance out to the outer distance, so the size might not a be an extent as such. I’m unsure how the volume size is calculated for onscreen.
I’ll see if there are any further suggestions I can offer for the smoke particles in the distance.
Kind Regards
Keegan GIbson