I am THIRSTY, Animation, TRACKING, Expressions & MEDIA Control Tutorial | Davinci Resolve | Fusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] my name is william justice today we're going to experiment with tracking and expressions to control animations and video playback in davinci resolve fusion but before we get started i'm just a bit thirsty i think i need a [Music] drink [Music] so to create this video i put a couple of trackers on my fingers and use some expressions to measure the distance between my fingers and as a percentage i use that distance to control the animation and video playback if you enjoy my videos please subscribe like this video comment below let me know what you think i'd really love to hear from you let's get started okay this is not too difficult to set up we have a couple of clips here in the timeline the first clip is the one where i'm pinching my fingers right there the second clip is the pouring of the orange juice so what we're going to do is we're going to take these both of these clips bring them into fusion track my fingertips and measure the distance between the fingertips and use that to control the orange juice clip so first thing we want to do is take the orange juice clip and put it right on top of the fingers highlight both and we're going to make a fusion clip out of this we're going to right click on these and say new fusion clip and we'll go into fusion by clicking fusion at the bottom of the screen so we have both clips loaded into fusion now the orange juice clip is on top of the fingers clip they're going into this merge and put the uh orange juice on top this is the green one and we can move it over to the side you can see that it's sitting on top what we're going to do is we're going to go to the merge and move this orange juice over to the side right there with merge one selected i'm gonna click the rectangle mask and we're gonna use this to set which part of the orange juice we wanna see we're gonna move this over a bit and make it the full height so there we go we have the fingers over here on the left and the orange juice filling on the right so to get this set up we first need to track my fingertips then we're going to compute that distance right there and then we're going to use move that down and then we're going to use that distance to control the orange juice filling up and down this is pretty easy to do all we need to do is add a tracker node in here so right after media one which is the the finger pinch clip which you need to add a tracker so let's select media in one hit control space and search for tracker and add that we've added the tracker and you'll notice that there's this little red box here what the tracker does is it allows you to identify an area or pattern on the screen and as the video plays the tracker is going to record the position of that pattern throughout the video and in this case that's my fingertip we have a this red box here so we're going to take this and we're going to move it right on top of my fingertip what you do is there's this little square right here in the corner and you click that and allows you to zoom in and pick the object that you want to track the inner box lets you set what you're tracking so i'm going to put it right around my fingertip and the outer box is kind of like a search area where it's looking for that pattern so we make that just a little bit bigger and this is something you kind of need to play with now you notice that we did this here and we're kind of in the middle so usually what i like to do is go to the very first frame so let's move this over to the first frame and you'll see that my finger moves so let's move the tracking point the tracking box right up here and this is where it's going to start tracking so the nice thing about the tracker is you can actually add multiple track points in set a tracker for my thumb we're gonna click in the tracker list over here we're gonna click add and you'll see we have tracker number two and that's this green box here let's move that over to my thumb the thumb is a little bit bigger so let's increase the size a bit and make the search box a little bit bigger right in there okay now that we have both of those set um we want to make sure we're on the first frame to see if we move the the playhead the tracking positions aren't moving yet so we're going to go to the first frame make sure that we're right on where the fingers are right in the middle we're going to hit the track forward button and that's going to go through the entire video and track these objects and points and save data for where they're located at each frame in the video [Music] okay that's close enough so you see that as the video moves we have this tracking data here so for every frame there's a point that we can use to either animate or do a computation let's click off that tracker we're going to use the tracking data to put the little green tracker square on top of my fingers so let's go to the media pool and this is this little spot tracking image we're going to drag this into the node area merge it in with the node tree and we want we want this to follow where my finger is so right now we have the merge and we can move it up to where my finger goes when we play the video it's not going to be there so it's really easy to get it to fall to track you're going to merge and this is the position of where that object is in the composition so we can right click on center and do connect 2 and this is going to show us the different data that we can use for the center property so we're going to connect to the tracker path 1 position so what this means is the little green box is going to follow the tracker let's do it for the other one this is the green box we can just take the output of this and drag it into the output of the merge to create another merge and that gives us a second green box and we want it to track that one so let's go to the merge right click on position and we're going to connect that position to tracker path 2 position and now we have both boxes are following my fingers how do we actually get this position data and do a calculation on it it's actually very simple so we're going to use a text node so we can see what's going on we're going to take the text node and drag it in we're going to take the output of the text and drag it into the output of the merge to create another merge and we have our text here so let's take that and we're going to move it up just up here out of the way right now so we can see it and make the text a little bit bigger and we're going to hit the horizontal anchor on the left so that allows to position position it a little bit better because we're going to get a big number in there so to get the tracking data let's um go to the text one we're going to hit the we're going to pin text one up here and we're going to hit the select the tracker now so what this means is we have tracker one up there and the text is down below so both of these are in the inspector in the tracker list we can hit tracker one and the position right here is tracked center one you notice for every frame these numbers move so that's the position coordinates for where it tracked for that one tracker two is the same way to get that coordinate and actually do a computation on it all we need to do is go to the text node and we're gonna right click on style text and hit expression and i'm just doing this so that you can see it you don't really have to use the text node to do it but this lets you see what's happening and we're going to hit this plus here and we're going to drag it up to track center one now everything goes red because this is really a point and it's not a data that you can use but it has xy coordinates so if we do dot y enter that's the y position of the top track and you'll see it's changing so let's do the same thing for the second track okay so we have our track center one let's copy that and we're gonna subtract off that's a minus the track position two [Music] and you'll see there's the difference so what we want to do is we really want to turn this into a percentage and then we're going to use that percentage to set the percentage fill on the orange juice to do that you kind of need to go through here and try to find the highest value okay so let's try to find the highest value it looks like the highest value is about 0.36 so to get a percentage we're going to get the difference and we're going to divide it divide it by 0.36 so when we divide 0.36 by about 0.36 that's going to be about 1. so that's going to be about 100 we're going to take this difference here let's put parentheses around it so we can get the difference first and i'm going to divide it by 0.36 and that should give us a number that's going from almost one to up and down so that's that's what we're going to use for our value so real quick i'm just going to turn this into a percentage so we can kind of see it so i'm going to type in floor of that and that's going to take the value and strip off the decimal places we're going to multiply this times 100 and we get 90. so that's our percentage and so on the end of this let's put dot dot quote percent that's just going to do a percent for our number up there we'll hit enter so we got 48 that's just a visual so you can kind of see what it is it's not really going to be used to do the animation okay so now it's time to make the orange juice move the way we want to so that's this media into right here with median 2 selected hit ctrl space and search for time speed so time speed allows you to adjust how a clip plays you can make it go faster slower you can delay it what we're going to do is we're going to set the speed actually to zero when the speed is set to zero you'll notice it doesn't move at all we're going to animate the delay property to get it to fill and go up and down so what we want to do is go to kind of the very end of it what's the highest number there so it looks like about about 1 let's say 138 we'll go with 138. 138 is completely full so about 138 is the max so if we multiply our max value say one frame 138 and we're multiplying times 0.1 which is like 10 percent we're going to be around frame 13 or 14 in the delay so let's right click on delay and choose expression let's see if so if we type in frame 20 it's going to go to frame 20. so let's go to 138 i'm going to multiply that times our tracker 1 y position minus the tracker 2 y position divided by 0.36 so that that is our percentage so you'll notice now that this is set this value is going to change and this is the frame that's being displayed and it's going to change based on the percentage that my fingers are apart let's see what it looks like [Music] so we can also use this to animate the size of something let's uh let's bring in this logo here and merge it in make it a bit bigger and let's do add a transform node and we'll use the same thing to animate this size property so we're going to right click on size and say expression and the expression is going to be basically our percentage it's going to be the the track the difference in the tracker y divided by the max which is we figured out around 0.36 it doesn't have to be exact and now we have that one animating as well i kind of did a little cheat i only use the y position of these points if you have the x y coordinates of both points you can use a formula i'm going to put it up on the screen to get the actual distance so if my fingers weren't on top of each other if they were going side to side or a little more diagonal you might want to use a little more complicated formula to compute the distance i don't know exactly what you would use this for but i thought it was kind of interesting i wanted to see if i could get some expressions and some computations actually driving the playback of a clip and controlling how it plays the speed and the direction okay so we've used some tracking and expressions to control video playback and animations in davinci resolve fusion it's not too hard just takes a little bit of a setup subscribe if you like this video if you have any comments or questions leave them below i'd love to hear from you and i will definitely get right back to you thanks for watching [Music] you
Info
Channel: William Justice
Views: 7,735
Rating: undefined out of 5
Keywords: Video Effects, Davinci, Davinci Resolve, Davinci Resolve 16, Fusion, Davinci Fusion, Tutorial, Filmmaking, Effects, tips, tricks, davinci resovle tips, william justice, expressions, tracking, timespeed, media control
Id: 0-DFcSI8GRk
Channel Id: undefined
Length: 12min 29sec (749 seconds)
Published: Tue Jul 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.