DaVinci Resolve Fusion: Animating with Easing Curves

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is simon obstal and welcome to this tutorial for blackmagic fusion in which we're going to be taking a look at the topic of easing curves now i was going to start with a long and detailed explanation of the mass of these curves and how we can graph them and their application in terms of image processing but i figured you'd probably all have turned off long before we got to the useful stuff which is how they can be used for animation so i've skipped all that and we're going to get straight into the good stuff now so let's get down to it so let's set up a little test composition first of all i'm going to add a background node to make it a little bit blue so we can see something let's just zoom to fit i'm going to copy that paste it let's make this a little bit green let's make it 80 pixels square so my main background is 1920 1080 that one is a 80 pixel square and let's merge the two together and look at the result and i'm going to turn off the overlay there and i should just point out that we're using the default project duration of a hundred frames and i just actually want to make this into a little ball which make it look nicer so i'm going to select that one and just add the ellipse tool and set the width and height to 1. okay so what we're going to do is we're going to add an expression to the merge center so i'm going to right click on the merge center and then modify it with expression and you'll see that's popped our ball down in the bottom left hand corner there so we need to come to modifiers and the point out tab so i'm just going to set the point y to 0.5 so it's sitting there in the middle and we're going to work on the point x expression and i'm going to set that to n1 so then let's come to the config tab and the number controls now what i want to do is i want to hide all but six of the controls and i'm going to rename them so we're down to just six controls the first one is called normalized time that's n1 then function then start value end value start time and end time so the first thing we're going to do is we're going to enter an expression for normalized time so right click expression and what we're going to do is we're going to type min open brackets one comma time over n6 close brackets oh i should have been lowercase m for the min so we need to set a value for n6 which is the end time so i'm going to set that to 75 and then if we press play we get that linear animation from left to right ending at frame 75 as you can probably see so it's going from left to right because it's animating between zero and one obviously in fusion zero is the left hand side and one is the right hand side zero is the bottom and one is the top on the y-axis but we want to be able to also adjust the start time so i'm going to adjust this normalized time expression to be able to do that so i'm going to paste that in and you you can see what that is on screen i won't read it all out it's a little bit long to read out so now what we can do is we can set the start time so if we set that to 25 you'll see that as i play through nothing happens until 25 frames and then the animation ends at 75 frames so we've got our basic sort of timer set up now that's good but what we also want to be able to do is to adjust the start and end positions so over in the point out tab i'm going to enter an expression for the x and that's going to be this and again i won't read it out to you because it's a little bit long and convoluted you can see it on screen there and we also need to have a value for the function so let's add an expression there and just for time being we're literally just going to use n1 so if we set our start and end values so i'm going to set that to say 0.15.85 and now you'll see that our starting position is over here so that's at .15 on x and i press play animates across and it comes to rest at 0.85 on x at frame 75. so now we've got a nice linear animation we can control our start and end values and our start and end times but our n1 is a pretty boring function because it's literally just linear so let's make it non-linear and let's use what is known as a cubic ease in curve so to do that i'm going to raise n one to the power of three so n one to the power of three and so then let's look what happens we start slowly and we accelerate rapidly to our end position and we could increase that power a lot if we wanted so go for 10 or something and that would just exaggerate that effect barely starts and then really zips very very fast so that power function is is a very useful way of making a kind of acceleration curve but let's look at the opposite curve which is cubic ease out and that's what this looks like so what that does is if i press play is it eases into the end position so it's the opposite of what we did with the ease in curve and we can combine those two curves to create a cubic ease in out so let's have a look at that again i'm just going to paste that in so there you go and increasingly complex expression and what that does is it starts slow and end slow it's a nice smooth beginning and end so that's cubic ease in out so i'm going to give you a cheat sheet for these expressions in the description because they're starting to get a bit too long to read out and type in and you don't be listening to all of that let's just have a little bit of a closer look at this particular expression though because you'll see that it uses a conditional so if n1 is less than 0.5 use this curve and otherwise use this other curve and that's how we get the ease in out but what we're talking about curves that ease in at both ends let me just quickly show you something called smooth step which is one of the most simple and elegant curves of all so paste that one in and you'll see it again it does a smoothing just like that and it doesn't actually in this case as you'll see it doesn't need a conditional it's a very very simple elegant uh and very very widely used curve in in all sorts of image processing and animation situations so that's smooth step but we can get a whole lot fancier than this and let's try something called elastic ease out i'm going to grab that and i'm going to paste that and let's have a look at what that looks like and you'll see that that has this crazy bouncing effect i'm just going to increase that end time to 100 so we can see this a little bit better and maybe the end value needs to be further in so it doesn't shoot off the screen and we're using things like sign and pi to get us there and we could get even fancier by having an elastic ease in out and that's going to look like this pretty long expression there i keep getting longer i'm afraid okay so let's have a look at that you can see it is a little initial bounce before it gets going which is kind of quite nice like it's a road runner-ish kind of animation very very handy you know this sort of thing would be a pain to have to keyframe and then if you wanted to change it you would have to change you know that it'd be much harder to change these values whereas here i can just literally just change my start value while it's playing and um you know we've we've got we've got so much more control than the way we're trying to to keyframe all this stuff and again you'll notice that expression uses a conditional that pivots effectively around the the midpoint there but for our last example we're going to look at a technique that slices time into a number of different sections not just the start and end and it will create what is called a bounce ease out so let me paste in that expression it's an absolute monster as you can see let's not look too closely at it and let's just have a look at how it actually works so you'll see that that bounces against the end point let's let's set the end value to something like 0.95 and that's a fairly nice bounce and it's done it by just slicing the as i say slicing the ends time into various different sections and then applying a curve to each of those so it's an absolute monster of an expression and it doesn't use just use one conditional it actually creates a nest of three different conditionals so nested conditionals are a bit difficult to lay out in fusion's expression editor as you can probably see i mean that's pretty unwieldy and you're best off just kind of pre-building them in a text editor and then pasting them in as i'm doing here but they're perfectly possible and they they lead to some very very powerful results so let's just make it a little bit more interesting by applying it to the the y position instead so i'm going to copy that x expression and paste it into the y and actually before we we do the y only let's just see what that happens there so we're actually applying that to both axes at the same time but i don't want that i want my x expression to be 0.5 so it's in the center of the screen and i'm just going to come over to the controls and let's just change these positions start value 0.95 and n value .05 and if we have a look at that we're now getting it is bouncing more or less off the bottom of the screen so there are plenty more examples that we could look at but i think that's giving you enough of a taste what we've looked at is using these expressions for position only but we could also make use of them for any other animatable parameter so let's have a quick look at using our most recent expression on the rotation i'm just going to disable that elliptical mask so we get a square so we'll be able to see it actually rotating and i'm going to come over and i'm going to copy that expression for y that's command c i'm just going to set that y value to 0.5 so put it in the middle of the screen i'm going to come over to sorry i'm come over to the number out tab and i'm going to paste the expression that we copied so command v and then i'm going to come to tools and i'm going to connect the angle to that number result and i also just need to enter some slightly different values for the start and end so we'll be able to see this so i'm going to have a start of negative 360 and an end of zero so let's have a look so it rotates and bounces into its final position like that now a bounce is probably not ideal for this so i'm actually going to copy our elastic ease out expression into here and i'm just going to reset some of these values so the start value i'm going to set to negative 180 and the start and end times let's actually start at zero end at 100 like that so we can get a better idea so you can see it now very gently sort of rocks into its final position like that with that kind of elastic bouncy effect so that's as far as i'm going to go here and as i say there'll be a cheat sheet in the description from which you can copy and paste all the expressions that i've used in this tutorial now there are plenty of places online where you can go looking for more of these easing functions but they'll obviously need a bit of reworking so as to be readable by fusion's expression language so i hope that's been a useful overview animating with expressions is very useful and flexible and in focusing just on easing curves i've only scratched the surface of what we can do and i hope to show you some more at another time so thanks for watching and see you again you
Info
Channel: Simon Ubsdell
Views: 2,766
Rating: undefined out of 5
Keywords:
Id: 24viXNhwBDk
Channel Id: undefined
Length: 13min 37sec (817 seconds)
Published: Fri Jul 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.