Archive 17/01/2023.

10,000 grass nodes

Lumak

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

Lumak

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:

rasteron

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

NiteLordz

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 )

Lumak

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

Lumak

Added simple wind velocity animation.

Lumak

Added an option to override geom normals.

coldev

Thanks 4 share…

God Bless You

Lumak

10k grass animated: