Download

Cull and Foliage Question

Hello I have got some Questions about Culling and Foliage.

  1. Is there any possibility to add Culling to Blueprints? I have managed to add Cull for my Foliage with the Foliage tool and for Static Meshes I Use a CullDistanceVolume but I can’t seem to find any ways to do that for a Blueprint. I only found that “Net Cull Distance Square Value” but that seems to be for the multiplayer? Other than that I haven’t found anything remotely related to Cull when it comes to Blueprints.

  2. The Other Question is about Foliage. I want to have a lot of Grass where the Foliage Tool is perfect for, but I also want to be able to Destroy it maybe with a Cast to. But interestingly there are only option for the whole Actor “Cast to InstancedFoliageActor” but there is no “Cast to InstancedFoliageComponent” where I was looking for. I could also don’t use the Foliage tool and just use the Grass as normal StaticMeshes or Blueprints to be able to Destroy them, but I would much prefere it to be able to via the Foliage Tool. Is there any way to do so?

Greetings

as for 1. I don’t have an proper answer for you, I believe it’s only LOD and bounding box that Epic will handle with visibility and draw distance to cull you foliage.

for 2., you can’t cast to a component, but you can cast to the actor class that has the component and then get the component.
You can essentially create some visibility volume where when player exit the volume, it emits a event to all foilage actors with in it to not even be considered in render.
But I’d say if you have proper blocking geos, UE4 should already handle this automatically.

Thanks for your Answers.

  1. Hope Someone else knows if there is a possiblity to change the culling of a Blueprint. When you want to have a huge amount of them then you really need the ability to Distance Cull them without the need for example using the WorldBrowser.

  2. Basicly I wanted the ability to destroy certain Components of the Grass and not like a Visibility thing. Like when for example a bomb goes of in the middle of a grass field that only where the bomb exploded the grass is gone and not at other places even if it is the same FoliageActor.

You can do a sphere trace around the player to set the start of the cull. From that it should be pretty simple to get verson 1.0 up and running (change visibility of all grass actors outside this trace). That should create a hard falloff around the actor. You can refine it a few different ways I think - one of them being to do another sphere trace that’s much larger. You can set it up so that grass actors that are hit in the second sphere (but not the first sphere) should be deleted based on some math value that corresponds to the distance of the vector between the grass and the player.

You could send yet another sphere trace outward from the bomb’s explosion epicenter and have all the grass assets that collide with the trace destroy themselves. You’d want to put all your destroyable items on their own collision type I think, or group them in some way so that it’s easy for the trace to pick them out of the crowd of other assets.