10,000 grass nodes

I saw a Urho3D video on youtube some months ago demonstrating replicated grass in the scene. I don’t know how many grass nodes were placed in the scene, but I clearly remember the low frame rate at around 20 - 35 fps.

I wanted to test this and test to see if some optimization can be made for sometime now and got a chance to today.
Rendering 10k grass nodes created individually using staticModel, the frame rate sat around 67 fps.

Repo: https://github.com/Lumak/Urho3D-Geom-Replication/

Replication w/ normals overriden:

Added wind animation:

Edit: added another screenshot

Just curious if I had 50k replicated grass:

replicated w/ normals overriden:

FPS is still decent. Note: you’ll want to make these replicated models in small patches, and not like the 50k example shown :wink:

great stuff Lumak! I think this should be added to the examples. :slight_smile:

Agree, this should become a sample, i have been looking for a solid vegetation sample, and this could definitely help out ( or integrate into the Terrain sample even )

I’ll try to push a PR for this. I think a Replicate() function in the StaticModel would be ideal.

Added simple wind velocity animation.

Added an option to override geom normals.

Thanks 4 share…

God Bless You

10k grass animated: