The main reason why alot of these methods have poor performance isn't because of the number of rendered triangles, but rather, the constant communication between the GPU and the CPU, you should really look at the number of draw calls per frame. Drawing everything (or even better, not redrawing) in a single draw call with minimal CPU work will always lead to the highest performance so you should always try to achieve this when trying to solve performance issues. This is why GPU particles in Godot are almost always the best option for performance if you can implement it that way. They are similar to how multimesh works in Godot, but a multimesh is essentially doing the "vertex shading" on the CPU, then sending that vertex buffer to the GPU to be drawn in a single draw call. The advantage with a particle shader is that you simply pass a single mesh instance to the GPU and it will do the vertex shading + fragment shading on the GPU in a single draw call. For a voxel engine, unfortunately it's not possible to take advantage of Godot's particle shader due to its limitations, so the mesh method you explored is pretty much the best way to do this. Overall, great video! I love benchmarks and was thinking about making a series where I improve the performance of various open-source Godot projects.
@SDGGames2 жыл бұрын
Thanks for the explanation! I knew about the theory of batching, but I didn't think to measure the gpu performance during this video. A lot of my focus was on the generation speed, which is a CPU thing, but that part is a lot faster in Godot 4, so I'm seeing a lot more frame rate limitations now. I'll definitely keep and eye on draw calls and the visual profiler going forward.
@blox61802 жыл бұрын
this was honestly, a interesting video, you explained about optimizing, making chunks, mesh chunks, and alot more chunks, but pretty cool video. thanks for everything :)
@Anvilfolk2 жыл бұрын
If the documentation tripped you up, it might be worth creating an issue in godot/documentation's github! :)
@manuelnaim92062 жыл бұрын
Excellent, I try that too but at the end I'm using Zyllan's voxel plugin.
@SDGGames2 жыл бұрын
I looked at that one too. This project was about the journey, which is why I used so many different tools, but a good plugin is definitely a great solution in itself!
@Spartan3222 жыл бұрын
I get that its the journey and solving chunk and block problems is the goal, but I am just as much curious about how things like Zylan's voxel module implemented in your game compare against your solutions, in the least it would be a expected perfect world for Godot.
@SDGGames2 жыл бұрын
Honestly, "should I have just used a plugin for this" is a really good question to ask, and one that I unfortunately never stopped to consider. I'll add it to the list, it might be worth a revisit.
@KhainiSader2 жыл бұрын
nice video!, I personally think the traditional way is the best :) Will love to the same examples applied in godot 4 without major changes in your algos. good luck!
@thomasbjarnelof21432 жыл бұрын
Thanks for making the mistakes, so I don't have to 😀