Instanced Static Mesh Update Lag

So I made a runtime procedural foliage placement system that gets the locations for foliage to be placed and this has been working well. Since I will be placing about 1000 grass meshes I want to use a instanced static mesh component.

The problem is that anytime I update the instanced mesh component (Updating transform or adding instances) it costs a lot more to run and I haven’t found a way around this yet. Placing actors with a grass mesh isn’t doing any better. So is there a better way to do this and if so I’m also looking for a way to remove the grass meshes once they get too far away.

For more context I need procedural system that can place grass on any terrain since what I am building is a massive multi layer cave (its actually the first layer of the abyss from made in abyss to give a better idea) so I cant use the regular terrain grass. So to fix this I wanted to make a foliage system like the one in horizon zero dawn but I ran into this problem and haven’t found any solutions on the internet so I thought I should come here. I am using unreal engine 5 but I don’t think this is a UE5 specific problem.

1 Like