Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation Rotation Question #472

Closed
nopjia opened this issue Nov 6, 2015 · 4 comments
Closed

Animation Rotation Question #472

nopjia opened this issue Nov 6, 2015 · 4 comments

Comments

@nopjia
Copy link

nopjia commented Nov 6, 2015

Under Animation section:

The animation's parameters define the inputs to the animation: a set of floating point scalar values representing time (the "TIME" input); and sets of three-component floating-point vectors representing translation, rotation, and scale. Each of these inputs is stored in a buffer and accessed via an accessor.

Under sampler.interpolation:

When an animation targets a node's rotation, and the animation's interpolation is "LINEAR", spherical linear interpolation (slerp) should be used to interpolate quaternions.

A couple questions:

  • Providing a 3-component Euler angles alone is ambiguous. We're missing the rotation order. Without it you cannot correctly construct the rotation since different engines have different default rotation orders.
  • Is it valid to directly store 4-component quaternions for rotation instead? This would solve the ambiguity plus avoid the conversion at runtime. If so, how do we distinguish it from the 3-component Euler rotation? Would it be "VEC4" under accessor.type?
@pjcozzi
Copy link
Member

pjcozzi commented Nov 9, 2015

Hi @nopjia, I'm excited that you are checking out glTF! Let me know what you think.

In glTF, animated rotations are defined by quaternions (x, y, z, w). They were defined by axis-angle in and older version of the spec (#144), and this is just a typo. I fixed it in the new 1.0-final branch. Let me know if you find any other errors in the spec.

For an example glTF model with animated rotations, see https://github.com/KhronosGroup/glTF/tree/master/sampleModels/CesiumMilkTruck/glTF

@nopjia
Copy link
Author

nopjia commented Nov 9, 2015

Thanks for the clarification @pjcozzi!

We've been using glTF 0.8 for a couple months now, and it has served us very well. We've been privately maintaining an Assimp exporter plugin in-house, which we hope to open-source at some point.

Will definitely give you feedback when I come across them, and hope to make more contributions in the future. Looking forward to the 1.0 spec!

@pjcozzi
Copy link
Member

pjcozzi commented Nov 9, 2015

Wow, @nopjia that exporter would be great. You might want to coordinate with @kimkulling: #456 (comment)

@pjcozzi
Copy link
Member

pjcozzi commented Dec 23, 2017

Nothing left to do here.

@pjcozzi pjcozzi closed this as completed Dec 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants