cybereality Would you mind explaining how to check that or pointing me the right way? Very new to optimisation and such because I've been just specifically studying navmesh on Godot since that was annoying me the most 😃 I've seen the profiler which looks interesting and helpful but that's about it.

https://docs.godotengine.org/en/stable/tutorials/performance/gpu_optimization.html

It has something to do with this, but to be honest I'm not exactly sure how it works.

https://github.com/godotengine/godot/pull/40313

It may be that 100 characters is too much for Godot, as I have not tested it specifically. But a good PC should be able to handle it (like in other engines).

I haven't done enough character work to tell you the steps specifically.

Interesting, since you mentioned draw calls specifically I had a look at the debugging stuff in Godot again while it was running, I'm getting about 3fps - 4fps with this setup.

extra info on my hardware for reference:

CPU: Ryzen 5 2600
GPU: Nvidia Asus 1660 Super 8gb
RAM: 16gb

I may need to have a look at tweaking view distance among other things as well and poke at the LOD settings now because I bet that will have a fairly dramatic effect.

4,600 draw calls sounds crazy, that scene does not look that complex.

So it looks like there is a material change for each object drawn, which doesn't sound right. The terrain should only be a few materials (depending on how you broke it up) but the characters all look identical and should be able to share resources.

You can try using instancing, but I am not sure if that works with animation, or if they need to be playing the same frame. But 500 material switches for that scene is way too much.

Baffling, may need to have you guys take a look at my local villager hierarchy and see if anything could be setting if off in that case, you're right though that the villagers themselves aren't complex and neither is the landscape that I've made so I'm going to have to do some digging to see where I've potentially gone wrong.

A bit random as well but part of why I switched this project over from Unity to Godot is it will be a great case study of how to do a fairly sizeable game in Godot so I'm of course trying to document everything and post up my progress as much as possible. This should also show people what Godot is capable of and we can really put the engine through it's paces rather than have people potentially ignorantly snubbing it because it's mostly only been used for small 2D games so far.

So polygon count is not really a problem anymore. You can easily draw millions or tens of millions of polys, even on budget hardware.

It's mostly down to shader complexity and material switching. If you are using the standard material, then the shader should not be an issue. But having too many materials, is a huge problem.

Because the objects have to be batched by material, to minimize the state changes, and that way multiple objects can be drawn in one draw call. So the material switches and draw calls are somewhat related.

I'm not sure how Godot handles it, especially if each character has multiple objects and/or materials inside. But I have to imagine they thought about this, and there is some way to optimize it.

I've just never got that far with animated meshes, most of my work has been with static scenes, so I am not 100% sure how to do it in Godot.

We may need to poke around and ask people who may know more on that front in that case, it's really odd though because the materials in the scene aren't that many and they're incredibly simple and low res on purpose because I wanted to try making a fairly large sandbox god game which can run on lots of hardware.

cybereality I think for retro graphics like that you should be able to have a few hundred characters (or more on a higher end system).

Graphical fidelity/polycount isn't the bottleneck here. One would have to take a deep dive into godot servers to do a more data oriented design thing for mass npc/crowd sim in realtime.

Now that I think about it, in AAA games with lots of characters, they usually use imposters or instancing, not hundreds of unique independently animated people.

Still though, the scene looks fairly simple so I believe it should be possible with the right settings.

Here's how my hierarchy is looking right now for my male villager, there's likely a clue somewhere that I've missed if it's possible it's down to setup more than the issue of rendering hundreds of villagers, the top most parent has been highlighted.

No way! LOL I think it was just because I hadn't made the villager into an instanced scene, hang on, I've got to do some more testing on this now.

Okay, it's chugging a bit at 400 villagers but that's a massive improvement already.

I can get 30fps at 300 villagers but it just tanks after anymore than that, that's very interesting I bet it will run a lot better with multi-threading regardless if instancing does this much for performance.

    Interesting. That is good news. I still think the model has too many pieces. You might want to find a way to combine the clothing and accessories so it is one mesh. I think that is the main issue.

    I'll look into it, that would be extremely tricky because the idea is the villagers have their own tools and everything that they use like woodcutting and so on and I need to be able to hide/show them pretty cleanly like in RPGs for weapon equipping, this will be something else for me to poke at.

    Lethn I can get 30fps at 300 villagers but it just tanks after anymore than that, that's very interesting I bet it will run a lot better with multi-threading regardless if instancing does this much for performance.

    Now what if you disable visibility of villagers at a certain distance from the camera or it's point of focus/view intersection with terrain?