#Vegetation performance

1 messages · Page 1 of 1 (latest)

safe elbow
#

Hi, I am testing the Vegetation Gem using o3de-workshops-2022 as a starting point.
I tried the level "Grass-biome-layer", which has a 32x32 meter terrain covered with grass. It runs flawlessly at 100 FPS on my PC.
However, when I increased the terrain and grass size to 100x100 meters, the performance dropped drastically to nearly zero FPS.
For my project, I need large terrains (at least 4x4 km) covered with grass and trees. Is this possible with O3DE? Is the Vegetation Gem the right tool for this?

I am running on ubuntu 22, o3de is on main branch.
12th Gen Intel(R) Core(TM) i9-12900HX
NVIDIA GeForce RTX 4080 Laptop GPU

subtle rock
#

I'm not absolutely sure, and would welcome someone to correct me but:

I don't believe the vegetation system does frustrum culling, or pooling and indirect instancing yet. It's something that would need to be added.

wild river
#

you can use the in built imgui cpu/gpu rofilers to see where the bottleneck is. If I had to take a guess you are probably cpu bound on encoding gpu commands for all the meshes. Try enabling instancing to reduce the number calls for the same mesh to one draw call. If all the meshes are opaque then simple set r_meshInstancingEnabled to true. If the mesh is using transparent material you can try enabling r_meshInstancingEnabledForTransparentObjects but use with care if the scene has multiple different transparent meshes intermixed with each other as they may not sort correctly.

#

Outside of this you can consider having lower LODs of grass mesh and really for such use cases we want to have support for billboarding for far away geometry.

safe elbow
#

i made a simple scene from scratch with a 64x64 meters of grass and enable meshinstancing, i don't notice performance improvements

#

with this setup it runs a 30 fps but for the first 30 seconds it lags a lot while loading the grass

wild river
#

I think the 30sec lag is probably related to generating new grass patches. That should hopefully only be a one time thing. As for your framerate I recommend using the imgui cpu/gpu profiler and post some screenshots here to help isolate where the bottleneck is.

safe elbow