SpeedTree performance issue

Hi there,

I’ve seen a lot of topics related to SpeedTree performance but none of them have actual solution
I’ll describe it a bit. If you have a lot of SpeedTrees on terrain (100k+) you’ll start having issues with Camera.Render → Culling → SceneCulling and PrepareSceneCullingParameters, actual rendering performance is fine

Most of solutions recommend to disable Smooth LOD and lower visibility distance, but even removing all fancy graphics checkbox I can’t achieve acceptable performance. As a comparison - previously we used old Tree system with 150k+ trees, our fps was ~100, cpu Camera.Render was ~4ms, switching to SpeedTree and lowering tree count we have 40fps and Camera.Render takes 19ms while SceneCulling and PrepareSceneCullingParameters takes ~15ms (all tests made on same machine)

Is there a way to optimize SpeedTree performance and avoid SceneCulling and PrepareSceneCullingParameters?

Our temp solution is to use AltTrees, but this asset is too early in development to be used in production

Thanks!

There is no official solution other than waiting for a proper SpeedTree implementation, I guess.

What does help performance-wise (in my case) is creating tree groups and painting those on the terrain. Also, be sure to uncheck “random tree rotation” because it does not affect tree colliders, if you need those.

To illustrate, here’s how a single group of 18 trees looks like:
2940430--217608--treeGroup.jpg

And here in motion:
2940430--217609--Forest4MB.gif

5 Likes

Your solution looks extremely good (and animation is wow!), but we don’t need dense forests, we need spread trees across 64sqkm terrain…

Ah ok. AltTrees has also been recommended to me by an expert - but as you wrote, it’s still early buggy.

Just as comparison - scene which works at ~5 fps with SpeedTree gives 100+ with AltTrees…

looks like there is no obvious way to get SpeedTree working properly in Unity. Kinda sad - technology made for performance kills performance in Unity

is there a way to get “official” report saying that SpeedTree performance is low priority task and it won’t be fixed till… some version?

Hello. I have been having the same exact problem as you describe. Speed tree still seems to be very poor in terms of performance. Scene culling takes considerably more time than just rendering. Since this thread was started have you discovered any solutions? Thanks.

Speed Tree? Pfft!
Don’t get sucked in to their money grabbing dysfunctional rubbish.
They look good up close and that’s about it.

Im also having some issues regarding prepareSceneCullingParameters. Few days before it was fine (around 50 FPS). but now when i go i have 22 ms lag due to this. Even GPU instanced trees tear my game from 70 FPS to 28. I have no explanation for that, Even with smallest occluder set to 12, i have real issues with these standart trees. This is hopeless…

Did you try baking occlusion culling data for your scene to see if it improves performance?

I did, even with that performance is really weird. I had situation when game performed better without occlusion

1 Like

I’m getting PrepareSceneCullingParameters taking about 30ms on a large terrain with thousands of LODed trees (2019.4.0f1, URP 7.4.1). Occlusion culling is off so it must be just frustum culling. It used to perform pretty well on the same scene a month or two ago…was getting ~60fps, now ~10fps. Not sure why, I’ve been working in other scenes for a while but haven’t touched this one.

I know that this may be an infeasible solution for some people, but I was able to drastically increase my performance be placing the speed trees as separate gameobjects rather than having them painted as terrain details. This quadrupled my framerate in a scene with a few hundred trees in it.