DaVinci Resolve's Secret Weapon - AnimCurves Explained!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I've said it's coming for so long and now it's here let's talk about anim curves anim curves is one of the most powerful and honestly I think one of the most exciting things in all of Da Vinci resolve and with it you can do some pretty incredible things as a baseline example check this out I have one of my free effects this progress bar uh preset and you can see I have it on an empty timeline here and as I play through it's just a progress bar it fills up the screen great you can change um the color and the width and even some like cool Styles here whether you want to go all around the screen that's pretty cool but look you can see as I get towards the end of the clip um the progress bar is almost done filling up the screen this is a five second clip it just runs its course it's done cool but watch what I'm about to do right now I will take the end of that clip and just extend it out and then now oh wow the bar got way shorter but if we start playing from here you'll see the bar isn't moving nearly as fast but when we get to the clip again it will also complete however long we stretch this clip to be that that's how long it will take this animation to play out and that is because of random curves I'm going to try to go really in depth on this one we'll cover as much as I can going into several like pretty Advanced uh use cases towards the end maybe we still won't cover everything because anim curves is pretty wild but we're going to cover a lot if you want to go deeper in the fusion page especially if you want to create uh presets and plugins like this one atom curves is going to be beyond your best friend it's great let's get started I'm going to go ahead and delete this effect and just drag on a default 5 Second Fusion composition here click this button to open the fusion page we're here in the default layout of fusion we have our nodes viewer down here and the only thing here we have is our media out anything we do on the fusion page we will plug into that media out it will get sent back to the edit page so let's rig up something super basic I'm going to create a white solid I'll pull it up in viewer one my media out into viewer 2. if I connect those you will see why I have that solid uh out in media out as well now I am going to click this button to create a polygon mask um make sure that is connected to the background node instead of the media out I will click once then click twice pull up border with will have a little line I'm going to change up our border style so that it's straight here and we are going to start by looking at this length parameter here you can see it just goes 0 to 1 and it it just sort of writes on this length this is exactly not exactly but this is the main process of how I built um that progress bar preset so instead of perfectly lining this up and doing this all uh we're gonna see hey we've got a line we're going to build around this great I can right click on this length parameter and go to modify with and if you've never used modifiers there is a an entire other world in here if you think Fusion is crazy you tag modifiers on top of it oh it gets fun but crazy and right at the top we have anim curves I will click that and instantly um it will start to work and because of how it's a little aware of where it's been applied um this will by default be that same sort of progress bar preset over the course of our timeline it will go from zero all the way up to one and we can see a lot more info about what's going on if we click over from this tools tab to modifiers tab now we see anim curves on and it will say whatever node it is on this time a polygon one and it even says afterwards which parameter is it on like cool let's start going through these right at the top we have source and by default this is set to transition uh however we also have duration and if you're just toggling back and forth between these two options in a setup like this they will look completely indistinguishable and on effects like this where it's mostly Graphics built entirely fusion um they are kind of indistinguishable but I wouldn't recommend that you you just choose one and go with it you'll see your options are duration and transition and I would say the only time when it is a hundred percent uh totally fine you're not gonna run into any issues um with transition is when you are using it to build transitions that's a super popular use case for anim curves and if you are doing that set this to transition if you want it to function like this is functioning Now set it to duration you're much more likely to run into issues with transition when you are creating Fusion effects that you will drop directly on media on the edit page this has to do with like the in and out point and like the total length of the clip versus the composition it's a little tricky um it can cause a lot of issues at first but a great rule of thumb is that if you want to look at the total length of your uh clip um and you are not making a transition just use duration of course underneath those we have custom we're going to come back to custom because custom is custom is cool super flexible but but it's intense okay we're gonna start with duration and you can see yeah by default it just takes that duration writes it on cool underneath that we have uh curves this is linear so it progresses at the same speed throughout its entire course or we can set this to easing and we have easing controls for both the in and out sides of that animation we have a bunch of cool options here um mostly saying like how much ease or even some cool um like extra things like elastic and bounce you see if I start coming in here it does that little bound that comes and then it sort of my violence is back at the end not as much sense for a progress bar especially at the beginning let's have a little ease there you know it's going up and then bounces if you were animating something else this would make a lot of sense especially something like scaling in that would be really cool for this example I probably wouldn't have any easing but for a small number of examples like a simple like sign would be really nice here just for giving it a little just a little like ease right at the beginning and end this is definitely flexible and this might largely be a matter of preference but underneath that curve you also have custom and this gives you something that you might be more used to using especially if you use the spline viewer a lot and it's just as a graphical representation and I can interact with this like I do on the spline viewer I can select these two points and if I click f it will flatten those and you'll get that traditional easing curve I can even pull out these bars to have that have more influence over that move so it has just a little ease at the start and then lots of ease right at the end and even though uh we have the source and a lot of controls later to drive timing as well um this custom curve is is is is very powerful especially when dealing with complex timing again we will touch on that as we dive further in we're starting at a very general level here so I will yeah I'll keep these out with just a general curve for now great we have these in and out options here um which Drive the position inside this custom curve then we also have mirror and invert if I click on mirror you will see that instead of playing that animation over the entire um course of our clip it will play that through and then mirror it back so it will uh complete the animation like we see here but when it gets to halfway it's done and then it mirrors back out if I uncheck that and click invert then it will you know invert instead of going from empty default it will start full and then invert back out to empty you can toggle those both on and then it'll be full down to empty back up to full you've got flexibility for now we will not mirror this keep it straight just a little bit of easing we can move on to scaling options and you know while we're talking about scale um let's mix up our example a little bit I'm going to create an ellipse mask now so now we are dealing with this circle I'm going to very quickly just tie this width to height so we have one control for this little circle and on this width I'm going to create a new atom curves now remember when uh by default on that length it created an atom curve going from zero to one on this width parameter it will automatically go to two if you put on something like angle it will automatically go to like 360. it tries to get you know in the ballpark of what you might be going for I'm just going to set this back to one for now and you can see what we're dealing with over the course of this animation it will go from a scale of zero all the way up to a scale of one which almost completely fills the screen so you know what let's go um something like point two as our scale and you probably see what's already happening here oh I'm going to follow my own advice set this back to duration this duration by default is generating a value saying hey at this start of the scene just give it a value of zero at the end of the scene give it a value of one we are timesing that Source by these scale options this will come back into play um when we check out that custom source very powerful but for now we can see that when this animation is complete we get that value of one then it looks at this scale we are timing it by that so we will end up with a size of 0.2 as well and if we are at the end of our scene we can use the scale to set like the actual size of the shape this is especially powerful if you are building presets um and you go through the whole publishing system for that because this scale option is what you actually want to give the end user control over in their custom preset you can't Point them to this with parameter anymore because that is being acted upon by this modifier and if they were to change this it would start messing up things but if you give them this scale option then it will retain any animation but it will just animate to the point that they control oh it's cool so if we're at the end of our scene that scale will sort of uh set the size of that if we come to the beginning of our scene of course that is starting at a value of zero and nothing we change on the scale will change what we see but we have offset and if we change that well at the beginning of our scene oh now we are starting to see this circle come up this offset is an offset um if this duration is giving us a value of zero at the start one at the beginning this offset is just a straight addition or subtraction to that value it's not multiplying like it is by the scale just straight addition and subtraction so if I bring this up just a little bit then it will start at that value and then add that 1 times 0.6 that the scale is giving us so now this circle is much larger even if we keep that scale value the same because we are executing that move on top of a different starting point now I said we were going to cover a lot we might not be covering everything because underneath that we have these controls for clip low and clip High which I've never used they're in these scaling controls you're influencing like the color of a scene in some way um or if values just get like really out of hand I've never had a reason to use them maybe they're like mind-blowing um and they'll be something I'll have to Circle back to but we're already going to be talking about so much more in this video clip below clip hi I've never used them and I've been doing just fine but that brings us to these timing controls because we are set on this duration Source it does execute this move over the entire length of our clip and that is represented by this time scale okay ah that a little food truck in my apartment well there's like little little mini Donuts is that cool but I also took um a break because I run into a bug I think I don't know what else to call it here's an issue to be aware of we're looking at this time scale option and I showed off if you set this to one it will execute your move over the entire course of your clip if you change this to two the default Behavior should be um what it is uh what it will show now um that I have this curve set to easing it executes that move at two times the speed so it finishes in half the time and then stays still but if uh you have this curve set to linear it doesn't stop it still executes twice in it still executes twice as fast but then it just keeps going and I don't think there's a way this is intended Behavior even if you keep this curve at linear if you change this to transition it goes back to functioning how I think it should uh work but we want to keep it on duration so if you want to mess with time scale and you're using duration don't use a linear curve use either easing or custom but with that little bit out of the way you see how this time scale is supposed to function a default of one will operate at the sort of intended time based on your source and if you increase it or decrease it that will affect how it plays back if I set this instead to 0.5 the animation will play out through the entire clip but at the end it will only be half the size of it you know should be based on your other settings that's great I'm gonna set this to two for now to demonstrate this next time offset option we have this time scale set to two so it will play back at twice the speed and it will finish halfway through our comp now this time offset operates on a zero to one scale like some other stuff where zero um it will start the move at the beginning of our comp one it will start it at the end so that's just useless we have this time scale set to two so it is only taking half the duration of our comp so if we set this time offset to 0.5 it will only start that animation halfway through our comp and then it will play back at twice the speed and end at the correct value at the end of our composition now these are fun and like pretty useful in their own right but you can also um keyframe and add Expressions to these and this is probably some of the real real advanced stuff I won't go over in this video but in some upcoming uh plugins I'm working on I am using Expressions um on on these parameters to do some pretty wild wild stuff if you have an animation you've built with the rest of ending curves you can place that animation and have that play back at pretty much whatever speed and at whatever place you want in your timeline it's it's powerful all right that is what I would consider a baseline or fairly entry-level a m curves that doesn't mean it's not crazy super awesome powerful because it is you need to so much with that especially if you are in the world of working on uh presets and plugins for resolve infusion whether those are something um that you are creating for your your own use or you're sharing those or even selling them atom curves add so much flexibility and makes it so much easier to customize complex animations but with that I think we can start um stepping into some of the deeper stuff inside animal curves and that starts with the custom source I cleared out some of these settings here so we are back to just this standard scale up anim curves we do have a custom curve here as well so just a little bit of easing but over the course of this duration on that ellipse width remember this is just scaling up cool and this is currently set on a source of duration remember like I said this is generating a value zero at frame zero and however long the composition is at the last frame it's giving you a value of one but what if you could have more controls over that specific value it's generating well you could bump this over to custom and look now we have a slider we can keyframe and if we scroll through our scene absolutely nothing is happening and that's because we can see this input value is zero so it is not changing that it's just staying at that for our entire our composition but if we add a keyframe and we can sort of like re-rig what was happening before a keyframe at frame 0 at 0 come forward to the end of our frame and add a keyframe of value of one and we will have sort of what we had before but if we go back to the edit page and now extend this clip it doesn't change that it doesn't keep going grow anymore it animates that move but stops when that second keyframe is set and that might seem like it is far more limiting but what's important is that this is another layer of control and importantly instead of just keyframing this on the variable or or the parameter itself we now have access to these other options here like the scale offset time scale and time offset and this is going to be the first really really big uh trick I'm going to be showing off and for this we are actually going to be hopping back into time scale now the groundwork you need to know Fusion as a system is frame rate independent you can see here that the numbers on our timeline are the individual frames you don't have the normal time code of like minutes seconds and then frames so that means normally if you animate something on a 30 frames per second timeline and then either save that make it a preset whatever you do drag that onto a 60 frames per second timeline everything will be playing back at two times the intended speed but remember in anim curves we have that time scale to adjust for sort of intended speed so remember I set this keyframe at the default like 149 150 of this uh what started as a five second animation and I'm actually going to do something I am bringing in a little template here and this is from my uh text animation pack so it's just this text that has this really cool little like slide in pop in here and this was built using anim curves and if we hop over to modifiers we see anim curves and on that time scale we have a Nifty little expression I'm going to just copy this all for now um and then we will break it down I'm going going to right click on time scale on the animation anim curves I'm currently working on press expression and paste it in there now my text pack I built on 60 frames per second timeline this composition is 30 frames per second so I'm going to start with 30 and then we are looking at a divided by this little bit of code here let's see how much we can get go ahead and drop that in a Nifty notebook zoom in a bit we've got this expression now now one of the things you can do with Expressions inside Fusion is pull data from whatever timeline in the edit page that Fusion composition is on so we have this comp get preferences and then comp frame format rate so all of this is going to return the frame rate of the timeline that we are working on on the edit page this one it's a 30 frames per second timeline so because we originally designed this animation to work in 30 frames per second we have 30 divided by 30 which means this time scale option stays at one if we didn't have this and then we then move this to a 60 frames per second timeline this animation would naturally play back in half the intended time but once we apply this expression it will be 30 divided by 60 which will get us 0.5 that will set the time scale to 0.5 which says Hey play this back twice as long now that expression meant for 30 plays back at half speed but remember this isn't dealing with those frames it's dealing with the keyframes so you're not going to get any of that choppy motion it's moving that animation to play back in uh twice the original length which would work on the 60 frames per second timeline I think this is something I originally picked up from Mr Alex Tech actually I think I was messing around with this and like discovered it and then found out that Mr Alex Tech had discovered it like a few weeks earlier and all of this is possible um because of this really valuable time scale option we have inside anim curves even if you were to drop it to like a 24 frames per second timeline timeline that would be 30 divided by 24 which would get you a number larger than one I don't know what is that what is that it doesn't matter but it would be the appropriate proportion to play back in the appropriate amount of time so I have this in time scale now this exact expression and remember these keyframes um were originally set five seconds apart so now whatever timeline and I drop this on it will take five seconds to play back that whole animation this is pretty complicated stuff especially I'm diving into how Fusion deals with time uh but this is is so powerful if you have effects um and you want to maintain real world timing regardless of your timeline frame rate this is a great example of a place you can use anim Curves in a place you might not traditionally think of like you're not executing a move over the entire duration of your composition you're only executing a move really for uh normally probably a few frames but if you want those frames to adjust for your frame rate you got it right here that's very cool um this tip is slightly incompatible with some tips we are about to go to so that's cool to know but I'm going to clear that out for now and we're going to go back to talking about this custom source although here's something cool let me actually go back to linear so we have this circle that will scale up over those five seconds and this is linear so that's a straight move we don't have easing here we're not using the custom but because we have those keyframes on this input if we open up our spline viewer we can look at those keyframes and use all the powerful tools in the spline viewer so even if our easing inside random curves is set to linear we're not touching it we can ease the keyframes on the custom source before it gets to the anim curves easing so now I could do things like add extra easing on there which would come we could even you know shorten this up quite a bit so now it's much faster and then we could do fun things like come to any of these options down here you could reverse that you could click this button to set a loop so it would go up up uh ping pong back and forth very cool and remember you could have this animation up and if you like publish this you could publish the scale option bring the scale as high as you want it and then it will still scale all the way back to zero but now it'll scale up to a much larger degree you don't have all of these options um in this custom curve inside anim curves but you can do all of this in the spline viewer um just on this input value before you get to all these other anim curve options that's cool I will take those back to normal so now we just have this nice little and I will bring this back down to a value we were at before cool let's keep talking about anim curves because right now we are still just going from zero up to one but in improves we can do much more safer whatever graphic I'm making I want this to scale up hold for a bit and then I'm going to set a keyframe come forward a few frames and actually go past one you can see as I do this it's getting bigger because now we are are creating a new input multiplying that by our scale so we can increase this number it'll get larger and then I'll come back and bring this all the way back to zero and we can see on our spline viewer what we're doing I will even uh smooth that out a little bit so now we have just this straight animation we do have easing on this but then towards the end we have a scale up and then it goes down I could even add like as much extra using as I want here it's going to be a little extreme but so I'd go hold and then at the end we have this completely separate animation now if you are using the duration source and the custom um you can do some really interesting things with timing here remember we have this easing curve we do have these keyframes here but now it is not using those we are using back to that Source just to demonstrate this uh so I don't forget we are back on duration so now it is just doing this one move and we have this little curve here but I can drag either of these if I drag this end one pull that up to half it will sort of do what that time scale was doing earlier where it'll do that whole move and it will be completed halfway through and then it will hold this is really valuable if I then mirror that then we'll go up hold and then do that move back out with an appropriate amount of a gap if I go all the way up here change that time scale to two and mirror that then it will go up instantly go back down and then be gone this is back on the duration uh the point being just remember that that in this custom curve menu you can add points you can do some really interesting stuff you can see I can even uh using easing sort of push things past this 1.0 line but this is a little bit more finicky I don't use this as much as just using uh the custom source mostly because I really love working in the spline viewer as well but let's look back at this okay we have this custom source these keyframes it scales up it holds and then it oh I have mirror it scales up it holds and then it goes boom all the way down but as you'll remember this is not tied in any way to the length of our clip on the edit page what do we do enter keyframe stretcher now keyframe stretcher a lot of you might think that anim curves you know it's so powerful it's so great it totally replaces keyframe stretcher and in a lot of circumstances I do think anim curves is probably a better tool it's certainly more powerful um but um what a lot of people don't know is that well you can always create a node that is a keyframe stretcher and it will take whatever is plugged into it and you know it will like stretch those frames as keyframe stretcher does I have an old video All About keyframe stretcher on any parameter that you have keyframed you can apply keyframe stretcher as a modifier we're talking more about modifiers okay this is pretty wild I'll try to walk through it we have this animation on the custom input of random curves scales up holds scales up more and then zooms back out I can right click on that input and go to insert also maybe it's a little different it's like a modifier but but it's different insert keyframe stretcher oh and that adds this here and we can look what we've got we've got Source start Source end and then stretch start stretch end this little animation we've rigged up ends at frame 150 so that's what I can type in there frame 150. uh sometimes you want to give yourself like an extra like frame buffer so I'll move that final keyframe back and we can see this Frame up uh we want to look at when this initial movement stops and that looks like it stops at uh just before frame 70. so I'm going to go to 70 on stretch Dart and the animation out starts at like what 119 119 boom now you do have these depictions of keyframes right on your timeline viewer here and we have some interesting things happening um I think I can toggle this off to see where we originally have cl's up holds and then goes up and back down as long as we toggle this back on oh that's back and now it scales up holds until the very end of our timeline and then plays those keyframes back so now if we go back to our edit page we have that all here scales up holds and then at the end and however small up hold plays back or long up holds plays it back this is cool this is cool using that custom source you can execute different animation at the beginning and the end of an animation all on one and I'm curve and you're able to play back those frames at the beginning and end of your composition and then all of those are affected by the rest of those options now you might be wondering um I I said that interesting thing we did uh with the time scale to play back at different frame rates that is not compatible with this specific tool because time scale happens uh in the processing after the fact right so for instance if I were to play this set this time scale up to two then it would execute that move in twice the speed so that would still animate out um you know in half the time we would wanted to you can use that time scale option uh when you're only animating something in if you wanted to animate in and hold that's great for more complex stuff like this um uh that isn't something you can totally rely on but separate tricks both very cool and you can combine all of these tools in so many different ways even that one tip of just inserting a keyframe stretcher uh on the parameter itself is valuable especially if you're working on things like Fusion effects if you're dealing with real footage on the edit page um you normally don't want to push footage through a keyframe stretcher because it will actually like pause it and stretch it and it will will not work but if you have Graphics or effects over footage and you can apply keyframe structure only to those specific parameters that have a keyframe then then you're golden and I'm curves uh has driven some of the coolest things I've done and some of the coolest things I'm currently working on and honestly it seems like there are are dozens of super approachable presets and plugins to be made using the system that no one has attempted so far so if this is interesting to you uh dive in and you can do really really foundational work for the rest of the community maybe you've never even touched modifiers in the fusion page even though I've talked about perturb a whole lot those are very powerful if you're diving into Fusion there's there's so much depth and it can be intimidating but it's it's super rewarding as well and it's all very very cool at least I think so I hope you do too hope this video um was valuable thanks for watching I'll see you next time
Info
Channel: Patrick Stirling
Views: 14,987
Rating: undefined out of 5
Keywords:
Id: 1ZbGpF5l8Js
Channel Id: undefined
Length: 28min 52sec (1732 seconds)
Published: Tue Feb 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.