This week I had to fix the transformation issue in glTF animation. As discussed in the last meeting, I disabled vertex transformation and applied the transformation after the actor was formed.
Creating transformation matrix using the TRS data from nodes.
Extract Translation, Rotation, and Scale matrices from the transformation matrix.
I also started investigating more on the skinning animation.
I created functions to extract and apply the InvertBindMatrices to the vertices.
Also, applying the globalTransformMatrices to the mesh.
What is coming up next week?
Skeletal animations support
Did you get stuck anywhere?
Even after applying the transformation to the actor, after it's created. Some models did not behave as intended. We still need to figure this issue out and fix it.
This week I started with implementing scaling to the animation example.
I had a meeting with Mohamed in which we discussed the rotation issue, and we found out that glTF uses Slerp interpolator instead of the LinearInterpolator. Using Slerp interpolator for rotation fixed the rotation issue.
Another issue we faced was with the multi-actor system. Some actors weren't rotating or translating as intended. This was caused because the transformations were applied to the polydata before creating an actor; Mohamed suggested applying transformation after the actor is created from polydata (keeping the center to origin).
Created functions to return a list of animation timelines and apply them to the main timeline for keyframe animations.
CubicSpline has not been implemented to glTF animation yet since it works differently than other Interpolators (takes tangent input to smoothen the curve) but it'll be done before our next meeting.
What is coming up next week?
Adding skinning animations support
Did you get stuck anywhere?
I still need to figure out how to apply the transformation matrix to the actor and not to the polydata.
Loading the animations (simple, morph, and skeletal) data as dictionaries from the glTF model so that it can be sent to the timeline.
Try different examples on Mohamed's PR (#626.) and try running glTF animations if time permits.
Did you get stuck anywhere?
There wasn't any model in the Khronos glTF samples repository that uses the LINE or POINT modes. So I had to rely on the models that I exported using the glTF exporter.