ossos icon indicating copy to clipboard operation
ossos copied to clipboard

Why there are "poses" in gltf

Open yangfengzzz opened this issue 2 years ago • 3 comments

"poses" is not a standard field of gltf, so it cannot be read directly in my program. Why not set the data in the TPose directly to the node?

yangfengzzz avatar Apr 06 '22 03:04 yangfengzzz

Why not set the data in the TPose directly to the node?

Because the nodes is where I get the bindpose, the matrix bind pose that's stored in the bin section sometimes gets exported badly from blender but the nodes always works plus I dont have to go the extra step of decomposing & localizing the matrices which doesn't give you back the original transform data. I personally feel GLTF spec didn't make the right decisions in how to serialize this data especially considering most engines will need to decompose the data back into local space transforms anyway. It also assumes all rendering engines use matrices, which I often like to use Dual Quaternions and my new Hybrid Approach. Disney uses Dual Quaternions too. But short answer is really, I'm trying to use the format for animated character assets but the format is not designed for that, its a scene serializer, hence my work arounds.

"poses" is not a standard field of gltf, so it cannot be read directly in my program

Yep, its not and it should be. Another problem with the spec that got glossed over. Any animator would LOVE to have a pose library export & import. MMD format knew enough to include that & you'll find tons of pose collections on deviant art. Now the problem with your program, you can read the data or copy that bit out of the gltf loader I've made to use in this project. Nothing stopping you from doing that that I can imagine. Side note, VRM which is an extension of GLTF might be adding poses, so that functionality will be a somewhat standard since VRM has a blender export plugin, woot.

sketchpunk avatar Apr 06 '22 04:04 sketchpunk

Thank you, Is there any tools to generate the "poses" section for another new model?

yangfengzzz avatar Apr 06 '22 05:04 yangfengzzz

I have a page where I can hack together a tpose, but no easy to use tool for the general public. https://github.com/sketchpunklabs/ossos/blob/main/examples/threejs/999_tpose.html

Another solution is to take the model into blender & pose the character in a tpose then do some funky shenanigans to make it its new bindpose. I've done that a few times, but overall I find it better to keep the models in its bindpose which typically its an APose, then generate a TPose myself with my scripts for use of animation retargeting. Reason being that detailed meshes tend to bend better from an APose then a TPose, mostly around the shoulders & pelvic.

sketchpunk avatar Apr 06 '22 12:04 sketchpunk