gsoc
fury

Google Summer of Code Final Work Product#

Proposed Objectives#

  • Keyframe animations API

    • Basic playback functions, such as playing, pausing, and rewinding the timeline.

    • Adding keyframes at a specific time for transformations of FURY actors and cameras such as translation, scale, rotation, color, and opacity.

    • Implement quaternion-based interpolation (SLERP)

    • Allow the camera to be interpolated by the keyframe system.

    • Allow the creation and removal of actors from the scene according to the keyframes.

    • Visualize the motion path of positional animation.

    • Speed the animation using GLSL vertex and fragment shaders.

Modified Objectives#

  • Adding a playback panel for controlling the timeline.

  • Billboard actor using the geometry shader.

  • Hierarchical animation support.

  • Animating primitives of the same Fury actor separately.

  • Color interpolators.

Objectives Completed#

  • Keyframes Animation API

    • Animation Class

    • The Animation class is the main part of the FURY animation module. It is responsible for keyframe animations for a single or a group of FURY actors. The Animation is able to handle multiple attributes and properties of Fury actors such as position, color, scale, rotation, and opacity. It is also capable of doing the following:

      • Set animation keyframes and events.

      • Animate custom properties.

      • Support add-to-scene/remove-from-scene events.

      • Can animate other animations (Hierarchical animation)

      • Set or change the keyframes interpolation method.

      • Visualize the motion path of the positional animation.

      • Timeline Class The Timeline is the player of FURY Animations; it controls the playback of one or more FURY animations. It also has the option to include a very useful playback panel to help control the playback of the animation. The Timeline can have a fixed length or get its duration from the animations added to it dynamically. It can loop, play once, change speed, play, pause, and stop.

    • Keyframes Interpolators

      Interpolation is also a core part of the keyframes animation. It is responsible for filling in the blanks between the keyframes so that we have transitional states between the set keyframes. Another factor is that interpolators must be super-optimized to interpolate data in a minimum amount of time as possible or else it would be the bottleneck that lags the animation. The following interpolators have been implemented as a part of the keyframes animation API:

      • Step Interpolator

      • Linear Interpolator

      • Spherical Linear Interpolator (Slerp)

      • Spline Interpolator

      • Cubic Spline Interpolator

      • Cubic Bézier Interpolator

      • Color Interpolators:

        • XYZ Color Interpolator

        • Lab Color Interpolator

        • HSV Color Interpolator

      https://user-images.githubusercontent.com/63170874/217738142-2dba8f6a-f8ff-4231-babd-048055074cc0.gif https://user-images.githubusercontent.com/63170874/190892795-f47ceaf1-8dd0-4235-99be-2cf0aec323bb.gif
      • Tutorials

        Also included 11 tutorials demonstrating how the FURY keyframe animation API works and how to use it to make some interesting animations. These tutorial will be added soon to the FURY website. Subjects explained in the tutorials are:

        • Introduction

        • Timeline

        • Interpolators

        • Camera Animation

        • Hierarchical Animation

        • Using Color Interpolators

        • Using Bezier Interpolator

        • Using Spline Interpolator

        • Using time-based functions

        • Creating Custom Interpolators

        • Arm Robot Animation

    Pull Requests:

  • PlaybackPanel UI component

    At first, while in the early development stage of the FURY keyframe animation API, basic playback buttons were used to play, pause, and stop the animation. As the API kept growing, more controllers needed to be implemented, such as the time progress slider, the speed changer, and the loop toggle. And composing all of these controllers into a single UI element was inevitable. While the PlaybackPanel is a main part of the Timeline, the goal was to make it completely independent from the keyframes animation API so that it can be used for anything else, i.e. a video player actor or a continuous time simulation or any other time-dependent applications.

    image

    Pull Requests:

  • Billboard actor using the geometry shader

    Fury already has a billboard actor implemented using two triangles to construct the billboard. But the new approach uses only one vertex and the canvas of the billboard is generated by the geometry shader. This approach is faster in initialization since only the center is needed and no additional computations to generate the primitive on the CPU side. Also, animating these new billboards using the method mentioned above in the previous objective is way much faster, and faster is one of the reasons why we use billboards.

    Pull Requests:

Objectives in Progress#

  • Animating primitives of the same FURY Actor separately

    Animating FURY actors is not a problem and can be done easily using the FURY animation module. The problem appears when trying to animate a massive amount of actors, thousands or even hundreds of thousands of actors, it’s impossible to do that using the animation module. Instead, primitives of the same actor can be animated by changing their vertices and then sending the new vertices buffer to the GPU. This also needs some discussion to find the cleanest way to implement it.

    Pull Requests:

  • Speeding up the animation using GLSL shaders

    Using the power of the GPU to help speed up the animations since some interpolators are relatively slow, such as the spline interpolator. Besides, morphing and skeletal animation would be tremendously optimized if they were computed on the GPU side!

    Pull Requests:

Other Objectives#

  • Added more enhancements to the vector_text actor

    Added the ability to change the direction of the vector_text actor, as well as giving it the option to follow the camera. Also added the option to extrude the text which makes it more like 3D text.

    Pull Requests:

  • Other PRs

  • GSoC Weekly Blogs

Timeline#

Date

Description

Blog Post Link

Week 0
(23-05-2022)

My journey till getting accepted into GSoC22

FURY - Python

Week 1
(08-06-2022)

Implementing a basic Keyframe animation API

FURY - Python

Week 2
(28-06-2022)

Implementing non-linear and color interpolators

FURY - Python

Week 3
(04-07-2022)

Redesigning the API,
Implementing cubic Bezier Interpolator,
and making progress on the GPU side!

FURY - Python

Week 4
(11-07-2022)

Camera animation,
interpolation in GLSL, and a single Timeline!

FURY - Python

Week 5
(19-07-2022)

Slerp implementation,
documenting the Timeline, and adding unit tests

FURY - Python

Week 6
(25-07-2022)

Fixing the Timeline issues and equipping it with
more features

FURY - Python

Week 7
(01-08-2022)

Billboard spheres and implementing interpolators
using closures

FURY - Python

Week 8
(09-08-2022)

Back to the shader-based version of the Timeline

FURY - Python

Week 9
(16-08-2022)

Animating primitives of the same actor

FURY - Python

Week 10
(23-08-2022)

Supporting hierarchical animating

FURY - Python

Week 11
(30-08-2022)

Improving tutorials a little

FURY - Python

Week 12
(7-09-2022)

Adding new tutorials

FURY - Python

Week 13
(20-09-2022)

Keyframes animation is now a bit easier in FURY

FURY - Python