Solve for unpredictable animation output between timeline and state machine previews (requiring ...
The Problem
A very common issue I’ve encountered while using Rive is that a given animation may preview fine but when it is hooked to a state machine, the resultant visual output winds up in an unexpected state.
This is because in preview mode, the animation is additively blended with the default state of the artboard. However in the state machine, the state of the artboard was mutated by the previous state. Thus the channels that aren’t bound to the animation in the current state are left unchanged.
To fix this issue in the current version of Rive is a tedious process of identifying which channels are causing the issue and manually adding keyframes to each animation set to the “default” state of this channel.
This problem has collectively cost me a lot of time.
Solutions?
The are quite a few avenues that you could go down to solve this problem. I’ve thought of a few directions, though I’m sure there are more:
Layer Channel Sets
Track all the channels used in a given state machine layer. Add the ability for users to insert a keyframe into each of the channels used by other animations in a given layer.
Alternatively one could just directly show these empty channels as a hideable segment of the timeline view.
Allow Users To Select an Incoming and Outgoing edge in Timeline View
Users can optionally select a participating edge for the start and end of a given timeline. The timeline shows a time configurable read-only lead-in and out for the animation, along with participating channels and the keyframes seen within this channel.
Show All Used Channels In Timeline View for Selected Object and Its Descendants
Similar to the layer channel sets idea but instead of basing it on the state machine layer, base it upon the selected object