Time Reverse Keyframes in DaVinci Resolve Fusion
To quickly reverse a keyframe animation so that a comp can wipe backwards off screen at the end of the clip (think lower third titles) - You just need 2 nodes at the end of your node tree. TimeSpeed and Dissolve.
Connect the end of your comps background into TimeSpeed and then Dissolve gets a background and a foreground. The green foreground will be the unaffected end of your last comp node, Merge 2 in my case below. Then pipe the output of the Dissolve node to the MediaOut.
TimeSpeed will play the comp backwards and Dissolve will act as a 2-way valve based on how far into the composition, if it will “look at” the foreground of the background of what feeds it. This will not be a smooth slow dissolve transition like you’re use to the term because we will control it with a simple iff expression.
TimeSpeed
Set the TimeSpeed node’s speed parameter to -1 to play the Fusion composition in reverse.
Dissolve
Right click on the Background/Foreground of the Dissolve node and choose expression to set the following expression.
This expression sets a value based on a condition.It works like this:
iif(Condition is true, return this, else this)
So our expression is saying, if the (comps duration minus the current frame) is less than (half the total number of frames) - return of a value of 0, but if not return a value of 1. 0 shows the background and 1 shows the foreground. So for the first half of the comp it will look at the green foreground (with returning a value of 1) and ignore the timespeed reverse node. Then the second half it returns a value of 0 and takes the background input which plays the time speed which is set to -1 speed, a 100% speed reversal.
The advantage to reversing out of a title animation this way instead of duplicating Fusion comp on the edit page, making a compound clip and reversing the compound clip is that this is dynamic. You now have a single Fusion composition that you can trim longer or shorter and still have all the in and out animation. The shortest you can make the clip is twice the length of the “in” animation.
If you want to be able to cut out of the animation instead it animating out, just remove those 2 nodes at the end of the node tree and you’re done!
So many more Lua expression tips can be found from William Justice’s website found here. It’s a gem.