donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.37k stars 148 forks source link

Remove skin bind matrices #1434

Open UltraEngine opened 3 months ago

UltraEngine commented 3 months ago

I am looking for a tool to remove skin bind matrices, so that the inverse bind matrices of the model are just the inverse of the initial orientation. Currently we cannot correctly load some glTF models that specify skin bind matrices so stripping them out and resetting the model would be great. In our loader, we flatten skinned meshes, so if the flatten feature already does that it's perfect.

donmccurdy commented 3 months ago

Hi @UltraEngine! I'm not sure yet that I understand how this should be implemented, so I've followed up on the prior discussion at https://github.com/KhronosGroup/glTF/issues/2411#issuecomment-2171769519.

donmccurdy commented 3 months ago

The flatten() feature does not affect joints or animated nodes today, but I imagine that some of that implementation, or transformPrimitive(prim, matrix), would be part of the solution.