MackeyK24

Test GLTF Animations

Recommended Posts

Thats what i dont get... I have the code working to skin and joints and weights... what i dont understand is at WHAT POINT and WHERE would i encode the bones and what node... Do i get the Skeleton first then iterate all the bones... and if so, what am i attaching to...

or do i just check each node and see if it is a bone of skeleton, also what am i attaching to in gltf...

And most import... HOW DO ACTUALLY code all the tangent in out stuff... like i think it input/time and output/value or something like that.

Could you please just thru some code (or even pseudo code) on actually encoding a skeleton... Dude it just me... Not fully getting the GLTF spec for encoding a skeleton...

but if i just saw some code doing it... i can say OH...thats what going on... and take it from there :)

 

Share this post


Link to post
Share on other sites
9 minutes ago, MackeyK24 said:

Do i get the Skeleton first then iterate all the bones...

There is no need to iterate all the bones (at least not going from Unity to glTF). You would need to do something like that going from Unity to Babylon because Babylon has a separated skeleton structure. The Babylon glTF loader will handle creating the Babylon skeleton and iterate the bones, etc. etc. Both Unity and glTF don't do this as the skeleton hierarchy is together with the mesh hierarchy.

11 minutes ago, MackeyK24 said:

HOW DO ACTUALLY code all the tangent in out stuff... like i think it input/time and output/value or something like that.

Assuming you are talking about cubic splines animations, my code is here, but it doesn't handle every case as you've already seen. To get things working, I would suggest baking the animations into linear form (which I think you already do) and tackle cubic splines later after sorting out the skeleton issue.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.