I have no idea if it is me or UE4’s Foliage Paint with a transparent material is entirely broken:
Any mesh placed with the Foliage Brush Tool that use Transparency instead of Masked Opacity is rendered absurd,
while manually placing the exact same mesh renders fine.
I reproduced the error with my two sided grass mesh in 4.7 and 4.8.
It seems like any mesh placed with the foliage paint mode has no depth-test for the transparency.
For testing purposes i used a simple sphere and a opacity=1 material, where the blend mode was set to “translucent”. (See screenshot of material below)
Why is the scene depth a total mess and occluded spheres are rendered so absurd?
I need to fix that, since i need transparent material for a grass shader i would like to try.
Transparent objects does not write to depth buffer so to get correct results they would have to be sorted back to front to get correct rendering. In general case this is only possible if you sort per pixel which is slow and not implemented in ue4.
could explain a little further why it works fine with normal objects, but not when i place them with the foliage painter?
Nevermind, i found some older posts:
Basically: Unreal Engine 4 can’t handle transparency for two sided foliage. Which limits all foliage down to opacity masks only. Now that’s some really disappointing news.
It’s like that in pretty much every game engine there is. (I heard DX 12 has some tricks that allows order independent transparency though).
The reason why individual meshes work with your sphere test case, is because they’re sorted by actor distance I believe.