I am placing meshes with the foliage tool (using SM_Bush from the starter content, on the VehicleAdvExampleMap from the templates).
When I set Cull distance: Min=2000 Max=5000, I don’t see soft culling between 2000 and 5000. Instead, meshes appear or disappear exactly on the 5000 line. Changing the min cull distance has no effect. I don’t have a cull volume and haven’t changed the project settings or the project itself much (from the template). I can see that the meshes themselves are culled by using the wireframe view. The mesh has only one LOD.
I’ve used this feature of the foliage tool before on my own game and it worked, so I am surprised it doesn’t work here.
From what you describe you are saying that at 5000 units away from the camera your foliage is culling. No matter what value you add to the Min culling there is no change. After a bit of research I came up with this exert from our documentation.
What you can do is go inside of the material that is assigned from to the “Bush” asset. Take the alpha from the diffuse map and plug that into the A of a multiply. Create a PerInstanceFadeAmount node by right clicking and typing that in. Connect the Fade node to the B of the multiply. Take the multiply output and plug that into the opacity mask of the material. This should fix the issue.
Thank you for you answer. I didn’t try this before because it addressed the problem of smoother fading (and not honoring min in “disappearing at a random distance between min and max”). I tried this and I see an improvement. I like how the meshes fade in and out. And the Min cull distance has an effect now.
However, meshes still appear and disappear way too sharply. My settings are: Min: 2.000, Max: 10.000 (thousands). However, the line where culling occurs is more or less around 4.000 (±500). This used to work well before, I’ve used it a lot. That’s why I am startled I cannot get it to work now.
My material is simple:
Texture sample (first pin) connected to Base Color and its alpha to a Multiply node. The other pin of Multiply comes from a PerInstanceFadeAmount node. The multiply goes to Opacity Mask.The material has Blend mode: masked.
Actually the screenshot you gave confuses me because it does not reflect the instructions precisely, as far as I can see. Cheers!
Yeah, that image does not reflect the document very well. I believe many of these changes came about through the use of the HLOD system when using foliage. This bases a calculation of clusters that are draw across the foliage instance. It then determines how far away and how big this cluster is on the screen and determines when to cull.
I will continue to experiment on this further to see if I am able to create a more gradual culling.
Hi, I also have problem with ‘Min Cull Distance’.
I found solution from this topic: How do you fade foliage out when culling in the distance? - #8 by AntonioModer - Content Creation - Unreal Engine Forums
I’m just taking away from 1, what result with the clamp function.
Almost a decade later, this topic is still unresolved, making all culling lines in foliage look sharp and ugly. Also, the above posted link to a possible solution is dead.
I think Epic should at least simply remove the “MIN” setting for the culling distance as it has no effect and only confuses people.