Different Runtime World Partition grid for different foliage made by procedural foliage tool?

I am using a custom child of the “foliageinstancestaticmeshcomponent” but it is only used to set a custom data INT that is used to set the opacity of the instances material when I want it to be visible or invisible.

Nothing different happening though as far as initialization or any extra functions etc. Just receives a custom data INT when I tell it to.

When I say disabling collision I mean the collision setting in the “StaticMeshFoliage”, which is a FoliageTypeInstantStaticMeshComponent

Yeah, kind of hard to figure out what’s going on without being able to look at your project.

The only suggestions I can think of is to either use World Partition HLOD to switch to between the instances with collision enabled and the ones with collision disabled, (with the downside that keeping the instances in the HLOD synced to the non-HLOD instances is difficult, but not impossible), or start with collision disabled and get all Foliage actors within a given radius of the camera and enable collision on them after the world has finished loading.

Yeh, thanks for your help anyway

Do you have any suggestions on how to get all the foliage actors within range of the camera when the collision is disabled? or how to enable collision in a performant way?

My current setup that I’ve been trying requires looping through all the foliage actors on the map and then testing how far they are from the player. But even when enabling collision on a small number of foliage instance components around the player there is still a massive stutter while the collision is applied.

Cheers

Technically you are right, but since this is Epic we are talking about here, try and doubleckick the node to read through the function and what it does - verify that what you assume is correct.

Also, instead of trying to figure stuff out you are probably better off starting from scratch in .25 or .27 or any engine version that actually works (so nothing makred as 5).
The engine is years if not decades away from being out of beta and reliable - and i think you are definitely experiencing some of that here.
On a thing thats always worked well before but which they just messed with to get Nanite running.

On that note, before you do make the migration (which can take loads of time), you can try to turn off all the newer stuff - related or not - which you are able to turn off. Like Nanite.

Short of that. Nothing much for your specific case.

One thing maybe.
Try and access the foliage, select invalid, and delete them.
Its possible that invalid elements are causing the issue - but your error log, if you know enough to monitor it, would have been screaming at you about stuff like that for months…

Yeh im trying to test out other engine versions to compare the results I’m getting.

I’m also getting another really annoying problem that I shouldn’t be that i’m working through in another thread. So there’s definitely something broken going on.

I’ve never bothered with nanite or lumen etc, world partition is the only new thing that I really use.

How would one get invalid foliage?

Thanks for your help so far

The engine itself, or editing a map, or moving/removing instances, or the reapply tool.
Plenty of ways reallt…

Incase anyone is interested I believe I have discovered proof that this map load problem is due to the creation of the collision bodies of the instances at map load or when collision is enabled for the first time. I have posted a new question in the forum to continue this discussion if anyone wants to head over follow the link. Static mesh foliage collision causing long load times

1 Like

Why don’t you try adding the trees in HLOD