ClarkThyLord / Voxel-Core

Voxel plugin for the Godot game engine!
https://godotengine.org/asset-library/asset/465
MIT License
453 stars 28 forks source link

Optimize Greedy Meshing #27

Open ClarkThyLord opened 4 years ago

ClarkThyLord commented 4 years ago

Optimize the greedy meshing of VoxelObjects, such as VoxelMesh, right now it's iterative, maybe it can be optimized with a recursive method.

ScorpionInc commented 3 years ago

Hmm would recursive actually be faster? I did a quick test and it seems to be slower. Not trying to sound like a downer or rude, but maybe there is a different method that could further speed up the processing but I don't think that this is it... Code: https://github.com/ScorpionInc/Godot-GDSandbox/blob/main/IterativeVsRecursiveTest.gd

ClarkThyLord commented 3 years ago

Hmm, you have a point, it's not always that recursion improves performance; I've implemented both the iterative and recursive method for greedy meshing, would be be good to run some benchmarks as you did. Either way, I'll look into exploring more options to improve performance 👍