There we go. 300 hex chunks. 250,000 trees. 1000 draw calls. 100 FPS. All the trees vary in size and shade, and sway in the wind based on position. I love GPU instancing!

The draw calls are higher than you'd expect because each chunk handles its own instancing, but this is acceptable as I'm never going to load anywhere near this many chunks at once.

#UnrealEngine #UE5 #ProcGen #GameDev

@jargon Thanks for posting this! Trees are fairly soon on my roadmap, and it's comforting to know that these numbers are feasible. I'll probably have no at most 40k trees, with (even) fewer polys than yours. Let's see if #godotengine is similarly up to the task.

@thomastc Haha no problem! GPU instancing is always on the roadmap somewhere... then suddenly you're running at 12 FPS and it's become the next stop!

To give you some more information. Each tree is 3 draw calls... which should be 2 tbh (leaves and trunk). Terrain is 1 and water is 1. So each chunk is 5 atm. I removed the terrain and water calls when coming up with the 1000 number.

I had about 35k trees in a previous test running at max 120 FPS cap without dipping. I have a 3080ti.

@jargon I don't have such shiny hardware (AMD RX 6600) but that's good – most of my players won't either. Why are leaves and trunk separate draw calls?
@thomastc I have a custom edge line shader so there are no textures and the UV coordinates need to be set up in a certain way. I haven't been able to determine a decent way of changing the base colour without using a separate material instance.
@jargon @thomastc Maybe irrelevant, but for my current project I'm doing indirect draw, so I technically have just 1 draw call for all objects (not including terrain), and for color variation each instance stores a 16-byte colour transformation matrix which I apply on the vertex shader.
@lisyarus @thomastc I will need to look into this. I am not wholly familiar with indirect draw calls but am aware of the basic principles. I've only scraped the tip of the iceberg when it comes to GPU instancing and still I'm looking at what else UE will allow me to do. I was hoping to find something that would allow me to do a colour transformation per instance like you mention.
@jargon @thomastc I see! I'm using my own little engine, so it's dead easy to add custom stuff like this :)
@lisyarus @thomastc I've been following your dev on your village builder and it looks awesome. It initially caught my eye because of the similarities. And I saw that you're rolling your own engine... impressive stuff... and brave! :D