You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is one thing I wanted to do since the very beginning. I'm slowly implementing various bits here and there. Making this public so we can track the (non)progress better and to have a list of requirements in case someone is willing to help.
Interpolation
N-dimensional linear interpolation (Math::lerp())
N-dimensional Beziers with interpolation and subdivision (do we need more features?)
Something similar to what's in SceneGraph now, but without the scene graph and virtual calls
Start/stop/pause, play count etc.
Animation::Player::stop(time), Animation::Player::pause(time) to schedule stop/pause at given time (the animation continues until then) ... then I'd need also Animation::Player::state(time), right?
Non-linear time interpolation (OpenGEX needs that, glTF lists that as unsupported)
Caching unpacked keyframes in the Player class for better memory locality
"Connected" player making use of Corrade::Interconnect to report keyframe advances and state changes via signals (need to avoid hard dependency on Interconnect tho, maybe header-only?)
Ability to do a weighted merge of animations from multiple players (make it possible to create some second-order Player?)
Ability to easily combine an existing interpolator with an easing curve, ability to combine an interpolator with a unpacker function -- c98a936
Benchmark Player with multiple tracks and compare that to handling multiple tracks manually, as Keyframe-based animation support #191 does that only for a single track and the perceived overhead is big
Extend Animation::Extrapolation (?) with ability to use last keyframe as the "before" extrapolation (and vice versa) ... or in general, override the behavior when the animation doesn't play yet or after it was finished, as with the CSS animation-fill-mode property (currently finishing causes the last keyframe to be used) and not-yet-started (manually stopped) causes the first keyframe to be used
Support in importers
Transformation animation API -- currently all transformations are combined together into one 4x4 matrix, need to access them also separately if some are animated (10b4c06)
Skinning data API (list of bones joints, bone joint weights in meshes, bone objects skeleton assignment) (depends largely on Mesh Data rework #371) -- e8b6454, d7a4f3b, f447e99
Morph data API
Transformation animation import in OpenGEX not planned, nobody uses this format anymore
Reverse / bounce playback (forward then backward then forward ..., as in the CSS animation-direction property)
have an at() / interpolate() overload (a single template base for both?) that takes a signed integer as hint -- it'll still always only increment the hint but take abs(hint) as the frame index, so if passing negative, it'll go backwards.
what about wraparound? currently if out-of-bounds it resets it to zero, now it would need to reset to -size to go from the other side, can't really make that generic...
Ability to replace/delete/modify tracks added to Player
so we are able to use one player for multiple clips (think DOD-optimized player for all rotations in a scene)
reschedule a track to play later, for example
return some handle type from add() (Containers::Handle with index + generation for this?)
deleting frees a slot to avoid invalidating other handles, reusing a slot increases handle generation
sorting by time then track in a single array as opposed to having separate tracks sorted by time to have better memory locality
explicitly creating keyframes for start/stop time as an optimization step
another optimization step: storing animation data compressed (packed quats, half floats e.g.), uncompressing the nearest N (2) for every track and storing them in a cache (currently every track has a "last" cursor to speed up lookups, but that's still scattered around in memory)
how to make this parallelizable when every track can be of a completely different type with different interpolator? having some "joint interpolators" that take a bundle of tracks and interpolate that together? or interpolating a bunch of different animations at the same time?
This is one thing I wanted to do since the very beginning. I'm slowly implementing various bits here and there. Making this public so we can track the (non)progress better and to have a list of requirements in case someone is willing to help.
Math::lerp())Math::lerp()/Math::slerp())min/maxproperties which are currently ignored)SceneGraphnow, but without the scene graph and virtual callsAnimation::Player::stop(time),Animation::Player::pause(time)to schedule stop/pause at given time (the animation continues until then) ... then I'd need alsoAnimation::Player::state(time), right?tweeny.js, https://easings.net/, http://robertpenner.com/easing/ -- c98a936, docsAnimation::Extrapolation(?) with ability to use last keyframe as the "before" extrapolation (and vice versa) ... or in general, override the behavior when the animation doesn't play yet or after it was finished, as with the CSSanimation-fill-modeproperty (currently finishing causes the last keyframe to be used) and not-yet-started (manually stopped) causes the first keyframe to be usedbonesjoints,bonejoint weights in meshes,bone objectsskeleton assignment) (depends largely on Mesh Data rework #371) -- e8b6454, d7a4f3b, f447e99Transformation animation import in OpenGEXnot planned, nobody uses this format anymoreSkinning data import in OpenGEXnot planned, nobody uses this format anymoreMorph data import in OpenGEXnot planned, nobody uses this format anymoreanimation-directionproperty)hint-- it'll still always only increment thehintbut takeabs(hint)as the frame index, so if passing negative, it'll go backwards.-sizeto go from the other side, can't really make that generic...add()(Containers::Handlewith index + generation for this?)TrackView(needs some rework to make this happen because currentlyTrackViewStoragedoes a function pointer cast)Example opportunities:
More ideas: