meshoptimizer
meshoptimizer copied to clipboard
Split meshes can also be an optimization
Nice tool you got there, but for my purposes I need something that can split a gltf/glb mesh Into multiple meshes (with max_Vertices_Count and max_Faces_Count), as the desired game engine only supports maximum indices of 32.767. Would it be possible to add such a feature or is it too complicated?
My current workaround is loading the model in Blender and reducing complexity :/
Mesh splitting isn't too complicated so it could be implemented I think. Are you sure the limit is 32767 vertices as opposed to 65535?
I'm sure, the reverse engineered Data says Face Indices are signed shorts :/ when I go above the value the model gets out of hand.
Another thing is that there are two separate meshes representing the whole sub meshes as one. This is used for collision detection I assume. Right now I'm merging all sub meshes into one by hand and if Face count exceeds short.maxValue I give an error message to the user.
So at best I would need to split a bunch of meshes I to meshes with Face Index < short.maxValue and then a way to generate one unified mesh with also Face Index < short.maxValue (like simplifying).
Idk if this is the right tool for this but I feel that you can give me some nice ideas hints too. π₯Ίππ
I would probably look into https://github.com/donmccurdy/glTF-Transform for this kind of involved processing - I don't know OTOH if it supports mesh splitting, but it tends to be better when you want to execute a series of specific processing commands, whereas gltfpack tends to be better at processing scenes optimally with little configuration.
Thanks for the hint I'll check it out!
And a hint for switching left/right handed? π
gltfpack doesn't do coordinate system transforms; similarly to above, this seems to be a task better suited for glTF-Transform (unsure if it already supports it or not).
Thank for all π
Looking at this again, this is probably specific enough that glTF-Transform would be a better fit.