Skip to content

General Animation Class #1869

Open
Open
@DragonMoffon

Description

@DragonMoffon

While working on some controllers for cameras, I started forumlating an idea for a general animation class.

I was going to add it to the Camera PR, but I realised it was a major scope creep.

Basically, I've written a while bunch of bezier (like photoshop pen tool) curves that are commonly used in animation. They take a number of points and a value from 0 to 1 (similar to easing functions). It returns an interpolated point. If mixed with easing methods, you get some extremely clean looking animations.

So my idea is you would have a queue of these curves and a callback method.

It was going to originally just be for cameras, but I realised I could generalize for any method that accepted the correct type.

Anyway, it'd be a big undertaking that would be fully backward compatible (I believe) so it can come in 3.1 or later.

Here are some more deets from Discord:

I propose we put together a generalised animator that uses a callback to change a 1D, 2D, and 3D value.

  • There should be a standard interface/object for defining part of an animation.

  • It should accept kwargs to pass to the callback.

  • It should also provide timestamping and some form of event system (could be even more callbacks) for syncing effects.

  • There should be a way to fire one-off events repeatedly.

  • There should be a way to fire an animation after a delay.

  • Should have flexibility to use any clock system we come up with.

  • The length and speed of the animations should be controllable (non-uniform b-splines, knot vectors. Tryna figure this out).

My idea for the callback is that you can use args and kwargs.

the args values you want passed at animation time to the callback (t value, curve info, delta_time, etc) while kwargs are constant values you want passed.

See issue #1869

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions