Skip to content
New issue

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

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

Already on GitHub? # to your account

Animation: sampler.interpolation values #156

Closed
pjcozzi opened this issue Oct 21, 2013 · 5 comments
Closed

Animation: sampler.interpolation values #156

pjcozzi opened this issue Oct 21, 2013 · 5 comments

Comments

@pjcozzi
Copy link
Member

pjcozzi commented Oct 21, 2013

AFAIK the only valid interpolation in glTF 1.0 is LINEAR, e.g.,

"sampler": {
  "input": "TIME",
  "interpolation": "LINEAR",
  "output": "rotation"
}

For rotations, both @tparisi and my implementations use slerp, which is "spherical linear" so don't we think LINEAR is misleading?

Perhaps we

  • Introduce SPHERICAL_LINEAR for rotations, or
  • Drop interpolation from the 1.0 spec and say that all values are LINEAR except a node.rotation target, which would be SPHERICAL_LINEAR.

Thinking forward to material targets that may have rotation matrices as animated parameters, we may want SPHERICAL_LINEAR here (although it implies conversions to/from quaternion) since linear interpolation of rotation matrices does not maintain an orthonormal matrix except at the key frames. Having an explicit SPHERICAL_LINEAR would also avoid the case of trying to apply slerp to a scale matrix just because it is 3x3.

@fabrobinet
Copy link
Contributor

That's a possibility, but I would say only if we agree here: #144 that we support quaternion explicitly.

@pjcozzi
Copy link
Member Author

pjcozzi commented Oct 21, 2013

only if we agree here: #144 that we support quaternion explicitly.

OK. I suppose this adds some pressure to supporting quaternions then.

@pjcozzi pjcozzi added this to the Draft 1.0 spec milestone Apr 30, 2014
@pjcozzi pjcozzi mentioned this issue Aug 11, 2014
@pjcozzi pjcozzi removed this from the Spec 1.0 milestone Aug 27, 2015
@pjcozzi
Copy link
Member Author

pjcozzi commented Aug 27, 2015

@fabrobinet do you recall what interpolation the converter expects for rotations?

@pjcozzi
Copy link
Member Author

pjcozzi commented Oct 9, 2015

@tparisi to close this issue, I suggest we add the following wording to the spec:

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.

@pjcozzi
Copy link
Member Author

pjcozzi commented Oct 14, 2015

This is in the spec now.

@pjcozzi pjcozzi closed this as completed Oct 14, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants