Open u3shit opened 4 years ago
Disregard what I wrote in the last paragraph, keyframe 1 is a 179deg rotation around almost -z axis, while keyframe 2 is 178deg rotation around about the z axis, so they are pretty near, but it looks like none of the gltf viewers I checked (babylon.js and https://gltf-viewer.donmccurdy.com/) use slerp with CUBICSPLINE (Checking the gltf spec only mentions slerp at the LINEAR interpolation, in appendix C it only mentions that the resulting quaternion must be normalized and exporters should take care not to produce 0 length quaternions.).
There's more discussion of this in #960.
Describe the bug I have a simple blend file with some bezier curves animation. Upon exporting it to gltf and opening in a viewer (like babylonjs sandbox), the animation sometimes jumps.
To Reproduce Steps to reproduce the behavior:
Expected behavior The animation is exported correctly.
Screenshots Here's the output opened in babylonjs (I can't upload a webm, sorry for the bad quality):![babylonjs](https://user-images.githubusercontent.com/17014489/82128609-b8e6ca00-97bc-11ea-8071-ba090f294eb5.gif)
Here's the curve I'm exporting:
An interesting info is that I ended up with this curve by repeatedly exporting to gltf and importing back to blender this curve:
You can see that w became y, x became z and got inverted.
.blend file/ .gltf example.zip
Version
Additional context The problem manifest itself first between keyframe 1 and 2 (at frame 3.2 and 4.8). If I look at the exported gltf data, the target values for these two keyframes are:
The tangent values are pretty small so they shouldn't matter much, but the z values for the two vertices are -0.9945357441902161 and 0.9912505149841309 for keyframe 1 and 2 respectively. According to my f-curves both of them should be positive, around 0.99.