xtanion's Blog

Week 9 - First working skeletal animation prototype

xtanion
Published: 08/24/2022

What did you do this week?

  • This week I had the first working example of skeletal animation ready. I was able to render the SimpleSkin model. Here's a quick preview:

    <iframe height="390" src="https://user-images.githubusercontent.com/74976752/184981715-a83a8a36-f2bf-4ff1-9366-0c302dcf3f9b.mp4" width="600"></iframe>
  • I wrote a custom interpolator (just like the tangent cubic spline interpolator) for interpolating two transformation matrices.

What is coming up next week?

  • Generalising the skinning code to work with other models as well (it supports only the SimpleSkin model as of now).
  • Creating a custom interpolator to interpolate more than 4 matrices at once.

Did you get stuck anywhere?

No, I didn't get stuck this week.

View Blog Post

Week 8 - Fixing animation bugs

xtanion
Published: 08/24/2022

What did you do this week?

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.

    <iframe height="360" src="https://user-images.githubusercontent.com/74976752/184015060-48d79f0d-1377-4f69-b147-cd53448ccf02.mp4" width="640"></iframe>

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.

    <iframe height="360" src="https://user-images.githubusercontent.com/74976752/184015110-035f1ce7-5a5c-4480-b49c-ae575d4b7ccd.mp4" width="640"></iframe>
View Blog Post

Week 7 - Fixing bugs in animations

xtanion
Published: 08/09/2022

What did you do this week?

  • 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).

Expected animation: Interpolation Test Sample

  • 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.

View Blog Post

Week 6 - Extracting the animation data

xtanion
Published: 08/02/2022

What did you do this week?

  • This week, it was all about reading docs and extracting the animation data from buffers.

  • Currently, the glTF class can extract simple node transformation and morphing data, as they are stored in the Animations of the glTF file.

  • Skinning (Skeletal Animation) data is stored in Nodes inside the skin parameter. We shall be able to load that before our next meeting on Wednesday.

  • Created a tutorial using keyframe animations (#626) and adding multiple timelines into a main timeline as suggested by Mohamed.

    <iframe height="400" src="https://user-images.githubusercontent.com/74976752/180841262-7356204e-2097-4ea4-ab71-39f04a1e7a07.mp4" width="550"></iframe>

What is coming up next week?

As of now, we've decided the following:

  • Create a custom Interpolator (for simple node transformations, morph and Skeletal animations).

Did you get stuck anywhere?

No, I didn't get stuck this week.

View Blog Post

Week 5 - Creating PR for glTF exporter and fixing the loader

xtanion
Published: 07/25/2022

What did you do this week?

  • Finalised the glTF export PR #630., adding tutorial, docs, and tests for all functions.
  • Added support for exporting lines and dot actors.
  • primitive.modes is now set if the rendering mode is a line, dot, or triangle.
  • Working on importing different primitive modes, the current glTF importer can render only triangles.

What is coming up next week?

This week I'll be working on the following:

  • Get the PR #630. merged by this week.
  • 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.
View Blog Post