My translucent object seems not to sort correctly and does not get affected by exponential height fog. How do I fix it?
Translucency is fogged per-vertex, so make sure your mesh has suitable tessellation. Exponential height fog should automatically affect it, otherwise it’s a bug. Sorting is done per-object, by the center of the object’s bounds. Best results come from somewhat evenly sized translucent objects. It’s not a robust system, but these are the limitations of current graphics hardware.
My expectation is that translucent material would look same as opaque material if opacity is 1. Left ball is opaque and right ball is translucent. Both material has nothing but red fed into base color. Not only translucent material look unaffected by fog, it receives lighting different way too. Why the discrepancy?
I can also say I’m experiencing the exact same behaviour.
I am experiencing the same issue. It only occurs when using exponential height based fog with atmospheric fog. It’s obvious that both of these fog solutions are essential for outdoor level or open world games. Things like water don’t sort correctly with the two.
This is what I see when setting up a side-by-side opaque and translucent material, with a heavy exponential height fog in the level. Both are fogged as expected. The only way I can get your result is by unchecking ‘Use Translucency Vertex Fog’ on the material.
The lighting difference is because we are missing the ability to do accurate translucent surface lighting in UE4 atm. This is something we hope to improve.
I get his bug if you have Atmospheric Fog and then you add an exponential fog. The Exponential fog overwrites the translucent matieral
If you have both types of fog in your world, you can get translucent materials to be fogged correctly by ticking ‘Compute Fog Per Pixel’ in the Translucency section of the material properties.
Yep. This fixes it. Thanks.