Add Argument to disable merging of mesh primitives (or making them instances) #678
Replies: 2 comments
-
That's why |
Beta Was this translation helpful? Give feedback.
-
I did try the
It is merging mesh primitives. What I mean is that I can't individually control each of the original 103 mesh primitives if they get merged into 25. Obviously because then the model loader only creates 25 meshes. And there are other reasons for why you might not want them to be merged. |
Beta Was this translation helpful? Give feedback.
-
Wether mesh primitives are merged has multiple implications for my (and other peoples) renderer.
Most obviously merged primitives share per mesh(-instance) properties like transformations or additional material data affecting individual control.
Picture the curtains in Sponza. I think it makes sense to have each curtain be its own distinct mesh primitive, instead of having ones with same material be merged. Especially because they are disconnected which can affect spatial data structures. After running gltfpack over the Sponza model this is no longer the case (no matter if I use
-kn -km
).Baiscally I am interested, just like others have been, in an argument that disables this:
meshoptimizer/gltf/gltfpack.cpp
Line 364 in 2605089
It would also be interesting to have otherwise merged mesh primitives become instances instead (using
EXT_mesh_gpu_instancing
). Then the engine could still be aware of them being distinct entities, solving the aforementioned problems, while also ensuring efficient rendering. But this is just an idea and and most likely out of scope.Beta Was this translation helpful? Give feedback.
All reactions