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

Added support for tracks with cubic spline interpolation to AnimationUtils.makeClipAdditive #20021

Merged
merged 2 commits into from
Aug 14, 2020

Conversation

c-morten
Copy link

@c-morten c-morten commented Aug 5, 2020

The current version of this method assumes that a track's valueSize is the number of values the target property can hold (3 for vectors, 4 for quaternions, etc). However for tracks using cubic spline interpolation it is actually 3 times that length to account for in/out tangents, resulting in the in-tangent values being used for the reference value rather than the actual keyframe value. I added a check for the interpolation type and offset the reference and target indices accordingly. I also fixed a small issue in PropertyMixer where the quaternion buffer does not get set to a valid identity quaternion for cubic spline buffers when using PropertyMixer._setAdditiveIdentityQuaternion.

Fixes #20025

Christine added 2 commits August 5, 2020 10:23
@mrdoob
Copy link
Owner

mrdoob commented Aug 14, 2020

Thanks!

@FlorentMasson
Copy link
Contributor

Thanks, I spend some hours on this exact issue a week ago

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

Successfully merging this pull request may close these issues.

Additive animation does not always evaluate properly with cubic spline interpolation
4 participants