To provide an Animator component that you can add to an Entity and specify which components or component properties are animatable.
These animatable values (attributes) are named and can be animated individually or be a part of one or more active animation.
The user can create animations for a set of attributes and describe how they change over time, using animation paths, springs, etc with animation values that are constant or dynamic.
The user will have fine control over how animations are played, transitioned, queued, looped, sequenced, blended, and scaled.
Concepts
Subject: An object that has attributes that can be animated. Ex: A button.
Attribute: A named property of a subject that can be animated. Ex: The color, size, or rotation of a button.
Attrimator: Handles animation for a single attribute. Ex: Tweens the color between red and black
AttrimatorDefinition: The data for animating a single attribute. Ex: A linear path of colors.
Animator: Handles animation for a subject and any number of attrimators.
AnimatorFactory: Instructs an Animator how to get named properties from a Subject.
Animation: A named map of attribute names to attrimator definitions.
Path: A collection of values to interpolate between.
Value: A constant, computed, dynamic, or parameterized value.
Features
Animating with constant, computed, dynamic, and parameterized values.
Constant = a constant value
Computed = a value that is determined at the start of the animation and can be based on the current value
Dynamic = a value that is calculated each animation frame (could be based on a mouse, the value of another object, etc)
Parameterized = a named value that is given when the animation is played (ie animate a bone to a user specified orientation)
Attrimators for animation paths, springs, physics, or instant.
Paths interpolates an attribute's value between values
Springs have a resting, current, velocity, and gravity values.
Physics has an initial reset position, velocity, acceleration, and terminal velocity.
Instant sets an attribute instantly to a given value
Queueing (play this animation after current are done)
Looping (play this animation X times)
Scaling (play this animation and scale the values by some constant)
Blending (play multiple animations in different amounts that can change over time)
Delaying (delay playing animation for given time)
Transition (transition current animation into a new one over a given amount of time)
Sequences (plays an animation over a collection of animators with an increasing delay)
Pause, resume, stop, finish, nopeat, or end all or specific attrimators
Easing
Movie (a timed sequence of animation actions to perform on any number of subjects)
Paths
point: a single value
jump: jumps from on value to another, no interpolation
tween: two values, linear interpolation
integral: a list of values evenly distributed
linear: a list of values evenly distributed by distance
delta: a list of values distributed at specific points in time
eased: a list of values distributed at specific points in time with specific easings at each interval
duration: a list of values distributed with specific intervals of time in between
quadratic: curve with 3 points
quadratic-corner: a list of values with curves at the corners
cubic: curve with 4 points
hermite: curved path with starting and ending values and tangents
bezier: curved path with any number of points and optionally weights
parametric: curved path with custom matrix, weight, points, looping, and inversion
catmull-rom: curved path with optional looping
basis-spline: curved path with optional looping
kramer: curved path
chaikin: curved path
compiled: precomputes N values of a given path evenly distributed
uniform: precomputes N values of a given path distributed by distance
combo: multiple paths together
sub: a subset of another path
scale: a path scaled by some constant amount
additive: values are the sum of two paths
Springs
box: a spring where a distance is maintained which is defined by a value
distance: a spring where a scalar distance is maintained
linear: a simplified spring with a distance of zero
Design Decisions
Should we treat attributes like components in an ECS, where given an entity it resolves to a particular type? This may help solve some problems with how do we define these things and avoid clashing of similarly named attributes with different types.
The dynamic values may need to be defined ahead of time and made available to the editor since they are functions and won't serialize?
Should we allow in the editor/code to play animations with string values that convert to numeric ("3hr", "infinity", "3.2s", etc).
Final Thoughts
Is there anything above that's not compatible with your view for NCEngine? Open to ideas!
Is there a better place or format for this sort of brain dump?
Animation
Goals:
Concepts
Features
Paths
Springs
Design Decisions
Final Thoughts
Is there anything above that's not compatible with your view for NCEngine? Open to ideas!
Is there a better place or format for this sort of brain dump?