Fusion Planar Tracker in DaVinci Resolve - Introduction and advanced Tips

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to a tracking tutorial with the fusion planar tracker I want to attract the glass panels on these skyscrapers and want to do some basic compositing with them you see that they are overlapping there are reflections on top of these last panels they're moving out of the screen so there are some minor complications that I have to take care of during trekking however all in all this example will not be too difficult so this is more like a beginner to intermediate level tutorial you can do this in the free version of DaVinci Resolve or you can do it in fusion studio whatever you prefer feel free to download the exercise files from my website to follow along and let's get started [Music] let me start by tracking the window plane in the front and I just bring in a plane tracker control space bar playing our tracker and bring that into the flow and what I often see people do is just track exactly the area where the effect is supposed to be I will tell you in a second why this isn't always a good thing but let's say I want to bring composite something exactly on top of this last plane I might be tempted to just put some tracking points on this glass plane right so that sounds like a reasonable thing to do then many people will tell you that if you have here point and hybrid that hybrid is more accurate than point that is usually a good default assumption and then I can click on set to make the current time as the reference time because where I draw this vector from there I'm tracking doesn't make sense to start at the beginning because it's not even in the frame in the beginning right so I need to go to someplace where it's real visible which is here at frame 386 and from this frame I can now track forward and let me show you what happens you can zoom in a little bit and you see it's the edges here are jumping around and here towards the end you see I'm no longer keeping the surface I'm tracking something very strange so what went wrong here the building looks pretty clean there's high contrast it's completely in the view yet the Trekker lost its track the reason here are the clouds the reflections so if I look at the image you see even though the building looks pretty easily recognizable you see there is cloud movement and this cloud movement on the reflection has nothing to do with the movement of the actual building of my of my glass panel that I want to track so what can I do two things first of all if I go back to my frame 386 where I started first of all there is no reason to track only the glass panel itself if I have other areas even though I might want to do my final effect somewhere here inside I can still go outside and take like parts of the building which don't suffer from the reflection and take those into account as well which could help me get a better result because I have more reliable points around that that I considered um so I definitely want to take these side areas I don't want to go up in the top here because there's a different building in the back which will have different perspective movement so I don't want to take this I could go further down I could even take all these balconies here I could even go till here so I only need to make sure everything is in the same plane although I'm a little bit skeptical of these balconies because they are like slightly in front of the plane that I actually want and that could be like these corners could change a little bit if there's some minor perspective movement so maybe I just stay above the balconies for now so I stay here and I can delete all the tracking points that I had before delete everything from before and the second thing I can do if I go here into tracker hybrid Point area is my my usual default this usually works best usually works better than point because it's not only considering points but also frame by frame comparing the whole area as it's being transformed by the tracker so the algorithm is typically more precise however because taking the whole area it automatically takes the clouds as well if I don't do this year and only use point what does point mean it means the trekker will look for high contrast points in this image what are the high contrast points here well these intersecting lines here this grid this these are the high contrast points the clouds don't give that much contrast so the clouds won't really I won't get a lot of points from the clouds and if there are points which as part of the tracking don't make sense to the tracker it will discard those points so in this case point may be more stable so I stick the point perspective is correct in this case I think if you know that your movement is a pure translation or a pure rotation then you can go to to these or scale however it's possible that the building when it moves to the side that there's also some minor perspective change so I want to be on the safe side and and leave that on track channel luma is probably okay here if you want you can check the contrast in each channel and perhaps go to a different channel in this case look at the contrast of these lines but also the contrast of the clouds so if I go into the blue channel for example I have less contrast in the clouds compared to the red channel so I might argue that the blue channel perhaps gives me a better solution because there's less risk for confusion with the clouds which have a less less contrast here so you can play with this in this case I think every channel will probably work let's see if it works let me make sure I'm on my reference frame and from the reference frame I can bring in the color image again and track forward track to the end and let me see if it works this time you see where I get my tracking points and I think I it most likely worked at the end so you see I have some tracking points on the side and if I go back to my reference frame its easiest to see where the points are so you see I'm having points exactly on this grid point so you can see these tracking points and these are the points which give me a good result okay track done I should to verify this pin something on top then it's really better visible if I have a solid track or not let me just switch this to corner pin for a second and use the corner pin and I would just move it the way I think I will later do the compositing I want to do some form of projection on top of this building and maybe I don't use like the outside corners but leave like one row of glass panels unaffected and then kind of like a projection in the inside wall like a big screen which has some some boundary so I might do something like this use this for a corner pin and for now I will just use a oops for now I will just add a background node attach this and if you want give it a color whatever and now let me see does this stick yeah this seems to stick perfectly to the building to the end not in the beginning because I didn't track to the beginning let me do this now let me go back to the track to my reference point and now I should also track to the beginning so from my reference track to the beginning and in the beginning the building will move out of frame but usually you see that works quite well now at the very end you see there's some things strange and and then the track stops here but until until this point it looks pretty good so if there's that's again an advantage of tracking a wider area here because at the end my compositing I only want to do two like here but I have additional points on the side which help keep that track alive a little bit longer and now it fails but that doesn't matter because I'm already out of it so having a few additional points here it's actually helping as well here that's why I'm tracking wider than necessary back to my overall corner pin let me just enable it one more time and now see throughout the frame yeah even in the beginning this is sticking perfectly to the building so that's a good start um before I do the compositing I all want to do the building in the back now the building in the back in principle works the same way right however there is the problem that the building in the front moves on top of it so here I'm getting this building on top of this so before I start trekking I want to build myself an occlusion mask which I can then use to cover up the building here so I need a mask which covers this and for this mask I can actually use my tracker again so I will first take a mask on the front building and then transform this mask to put it on to whatever I'm doing next with the rear building that's my plan I will first go from the corner pin again back to the track here in my planar tracker so that I can export a planar transform and this is now a transformation which does the exact same transformation that the corner pin is doing inside the planar tracker now I have it as an outside transformation and I can apply this transformation to a mask for example I want to mask off the edge of this building and I can do that with let's use a click polygon mask and actually here it's a bit difficult to see the edge so I just go I think it's a straight edge so I will just take it here from the top here I can really see it well and then I'll go down to the bottom here I can also see it pretty well so whatever I can see the edge I hope it's a straight edge but I think so so let me take the whole edge mask it off like this pay attention you need to make sure you're on the right frame was I on the right frame let's see in the planer transform you see again the reference time that is the time from where you start at the tracking which I did on frame 386 so I also need to draw my polygon on this frame 386 ok I didn't do a mistake that's good so I did draw the polygon on the reference frame because from there I am transforming it if I draw it on a different frame it will my transform will not match to the original starting point of of this transform so now I need to attach this polygon it is attached but it's not attached correctly this is the mask input I need to attach it to the transform input so that I transform my polygon not mask of my transform operation so pay attention to these polygons sometimes go to the wrong input easily so this way my mask should be transformed so if I look at the mask and see what's happening so you see the mask is being transformed however I'm not done yet with my masking here so this will work here to the end I am asked of this edge here and this should be fine but if I go back you see there are some parts of the building here this part of the building which is also hiding this covering up some parts and which don't belong to this edge there just a few frames where my up till here so here I have my final edge that's fine but in these few frames here I am covering ups the back building not with the edge of the front building but with some parts behind the edge like from here and I I won't be able to attract this properly because it's not directly linked to this front surface nor to the back surface there's something in between here but it's only in like this edge here it's only there for a few frames so I won't even bother about tracking I will just go to the first frame where I see that issue I will create a polygon here just over the edge like this it should probably zoom a bit and just you know with this polygon edge make it a bit cleaner like this on the first frame where I have where I'm starting to see that issue and then I go to the last part where my edges I think that's a bit hard to see here and I might have to adjust this later but I will go to the last part and again make sure I have that edge here it's possible that I didn't see that exactly right so if if things go wrong later I might have to find you in a bit you know like always but let's not spend too much time I think this should work let me be sure I don't use this polygon where it doesn't matter so this polygon I need only in these few frames so I will animate the level and after the last frame I go one frame further animate and just set it to zero which just deactivates the polygon so it's only active to this frame one frame later level is animated same in the beginning I will animate the level here go one frame back you can just use the keyboard one frame back animate to zero so my polygon is only active here and I still need to bring it in you can use a channel boolean and math control whatever you want let me use a bitmap tool there like a hundred different ways in fusion to combine masks let me use a bitmap tool this takes the image from here so after the planar transform it's technically an RGB image which now is being by the bitmap to transformed into a pure alpha channel image so to speak so doesn't really matter it's just conversion of the data type but the point what it does is now that it's in the bitmap I can attach it so I can attach this to the polygon I couldn't do that before you can't do that directly from the transform from the bitmap you can attach it to a polygon and then here in the polygon I am merging this together which looks about right no that doesn't look right and so when the level is off its subtracting so let's not merge let's take a maximum so maximum yeah so here my mass comes in and stays in and then here it's it's gone anyways ok so that's my combined mask now here out of this polygon to all this I just made to mask off the area of the building which may be interfering with my rear building so with this masking I can now attend to the second building you know now the general idea so I will again attach a second planer tracker now for the second building and use that occlusion masks that are just to eight so first of all the planar tracker again track a planar tracker bring it into the flow and I create again the polygon for the tracking area in on a frame here I mean now on 372 doesn't matter just a frame we had the whole glass panel as well in the view and this time I can go definitely down because this here I can use the building there are no balconies or anything interfering and just have the full surface here to track I use the point luma doesn't really matter perspective should also be fine let me start from here and track from the current frame let me track backwards first to the beginning sorry I need to set the frame set the frame where I built my tracking area and then from this reference frame first track backwards and from first side of it I think this looks pretty stable all the lines here are straight lines mostly so that's also a good indication that my track is mostly working if these points are stable and somewhat move in the same direction that's a good sign and let me go back to my current frame I didn't attach the mask yet so let me do that attach the mask here to the occlusion mask input I could have done that even before it shouldn't matter but now I definitely need it because now I'm tracking in the other direction so let's see what's happening now if I track to the end from again from my reference point to the end and you see that my tracking points kind of get squeezed the area where they attract so I only have tracking points in the valid area and not here on this building so that gets smaller and smaller that's good but there's also some problem here I might have a few incorrect points now I see some red points here that should be fine so red just means that they are sorted out oh I think I forgot to extend this polygon here so that could be one point issue that I have some red points which just points that the tracker discards that's fine but you see that somehow my rectangle here my polygon gets changed in perspective a bit so that doesn't make so much sense and then here it completely loses the orientation and it's there's some incorrect perspective shift towards the end now it makes sense that it's getting more and more difficult for the tracker towards the end to get this accurately because well I'm getting in a very small range of of points here so there isn't maybe not enough reliable information anymore to to calculate the track accurately but all in all this seems to have some impact here now there are two things I can try to adjust my occlusion mask see if that is the reason maybe I can get some more points down here where perhaps my mask was not accurate another way that I can do is I can actually change the area in which I'm tracking so let me first go back to until the point where I definitely have a good track so till here I know I have a good track and perhaps even further but somewhere where it's starting to let me start from here so somewhere after this where the occlusion starts there I'm somewhere getting into trouble especially towards the end so instead of letting this full occlusion here on the complete side instead of letting that happen I will just reduce the area here and just use only half the building I can still do my effect on the full building I'm just using this part of this surface for reference and see if I have the full area not occluded if I get a better result and this occlusion mask typically it's used like if people run into the scene of objects are crossing in this case where like the whole plane is moving out it's possible that it's not working that accurately here at least that's my my suspicion but let me just show you this I wanted to show you this trick anyway so it's a good opportunity and I will just take half the building here and use this to track to the end okay so I'm I'm I'm definitely now it looks pretty stable until definitely wild the whole area years in focus I get nice tracking points straight lines that looks good and then to the end I assume that I'm running again into the same issue yeah so here again something is a bit strange so I will go to the last point where this worked well and let me do this maybe one more time I will again reduce this a bit perhaps like this and I will also now change from perspective to translation so I know that the perspective shift of this building if there is any at all will be very minor and I know that especially towards the end I saw that there is some form of perspective distortion happening to my tracker so for this end piece I want to disable the perspective motion and just keep a simple translation which should be accurate enough for a few frames and I hope that this way I get even the last frames let me try that so again let me track to the end from here and apps I bring this into full view and let me see so these are the last frames now and okay that looks pretty good so I think I might have a stable track here I will now really see if it's stable once I put something on this like before I can go from the track to the corner pin attach a background note to the corner pin this time maybe let's make it green to get some variation here bring it into the view pin it to the points like I did before okay these are my four corners that I want to have and now let's have a look through the time line with this sticks so in the beginning I'm not worried but you see it sticks very well and let me see now towards the end maybe we have the overlap of course it's now overlapping here but I think it's stable to see that even better I should mask it off and I can use my occlusion mask also to a mask of this so I will just use the occlusion mask and attach it to the effect mask input and is this working so let's see side by side so right now I don't see anything this is my occlusion mask the effect mask needs the opposite so it needs white where I should see the effect so I need to invert this so let me go into my planar tracker and do here in the settings apply mask inverted so now I should have I have to be careful sometimes the viewer is not updated fast enough so let me disable the second viewer again and look at only one okay so this looks pretty good alright I think there's a tiny little bit of sliding at the very end so somewhere from so until here it looks stable and then in the last frames here that the edge seems to slide a little bit and this I can just fix manually so if I have something like this left over which I did not get right from the track I will just go into the last frame red matches let's say here I go into my corner positioner from the planar track and in the corners in the corner pin I will just animate these points so I'm just animate all these points on this frame and let's also look at the bottom point this looks good and then a few frames later shortly before there's nothing left to see I will just see never just manually fix this just go I just need to bring it a little bit down and I'll bring this point roughly down so that the perspective is still correct and here actually I'm still accurate the bottom seems to work so just keep it this way and now if I look again over the last frames now I should really have yeah I should really have a pretty good solid corner here on the edge this was it for the tracking part now I have tracked a green and a blue rectangle maybe I should put some image in there too a tiny little bit of compositing just to have a nice finish for this tutorial so let me bring in some footage so from the media pool I just bring in a media clip via media in in DaVinci Resolve let me see what I have here so I have this guy that I want to now bring in and the clip clip length doesn't match so I have here my my end point should be at frame 50 so I can attach the global endpoint so I have edited in the edit page a bit so I'll bring this in a bit later and then not hold the last frame but I will loop so that it it's looping around so alright so I have a clip which is long enough of course you can use whatever clip you want for this doesn't matter or any still image will do and I can attach this guy now to the corner pin and get him now here you see he's terribly squeezed because here I have a normal 16 by 9 image and here I have something more vertical so instead I will crop this image just with a simple crop node I can crop to the guy let's try to get the aspect ratio roughly matching I won't do any like scientific measurement I will just look left and right if I think that the aspect ratio is is roughly the same if it if it looks good sorry naught Y X offset so offset and some crop and I can get him here in full-screen something like this so does that work or maybe maybe a bit more not too much okay so now I have him large on this skyscraper and I should probably change the blend mode a bit so now he is merged over I have in the corner pin there is the merge operation so instead of normal I can go to I can try so screen brightens multiplied darkens overlay is like a mixture so perhaps overlay may would be good or multiply and you can reduce the gain or perhaps I go for an overlay and I might still adjust this a bit with the color correction so I could bring in the brightness and contrast here sorry brightness and contrast into the floor and then do a little bit of gamma correction maybe bring it a bit up see how this looks like in the rest of the scene yeah perhaps something like this might look good for this kind of screen or projection so I still need it see a lot of reflections from the sky on top of it it's the glass there shows through but at the same time I have this projection one more thing I always like to look at edges so here depending on your story here if this is like a kind of a projection maybe you want it to be a bit soft at the edge if you want something like this then I would take the composite out of the tracking so here I have my planar tracker which is doing the compositing which is doing the merge but you can take it out so I can do merge mode to foreground only so normally it does foreground over background so it does the merge automatically if I do foreground only I only get here the foreground which I should now set to normal and not to overlay because overlay needs the background but if I do foreground only set it to normal I have only the corner pin and I cannot disconnect this and merge it myself with the merge outside of the planar tracker so one more note but this way I have some additional control so first of all I can go back set this to overlay the way I did before if I want I can put the brightness and contrast even out I can put it here doesn't matter or leave it here before after I can leave this here but I can do one more thing I can do a blur now and blur this image over its edges so if I do a blur of a few pixels and bring this in you see that's way too much so maybe just like this so you see I get a blur on the edge now I'm not only getting a blue on the edge I'm blowing actually everything but I can mask off the blur with a mask of the inside and if I attach the same output here as a mask to the blur I am [Music] masking off something and I'm masking off the inside but I need the I want the edge I want the outside so I go into the settings and apply the mask inverted so this way I have hopefully some blur let me just go to the Alpha Channel it's a bit more visible here so in the Alpha channel you see how far my blue actually goes and then I can adjust this like this bring it a bit down a bit up and here I should see the effect so no blur with blur so I can further this out a bit maybe even a bit more like like this okay so that's that's one option you might actually if you're going to go really nicely you would color correctors a bit and bring this a bit up maybe only on the blurred area you could intensify this a bit so that you don't have this kind of jump and other like hundreds of ways how you can improve edges further and come up with all different kind of things but just to get to give you an idea so if I do that track it doesn't mean I need to do all in one I don't need to do everything in the planar tracker sometimes I just retake it out do my merge manually and you can do different operations like the blur or any edge treatment in between and thereby improve your composite okay I leave it at this I will also do the same with the background and then I can leave you with my final solution I hope you enjoyed it if you do let me know if you don't let me know what you do need to know and see you next time thanks for watching my name's band Cheers [Music] you
Info
Channel: VFXstudy
Views: 34,887
Rating: undefined out of 5
Keywords: Blackmagicdesign, Blackmagic, DaVinci Resolve 16, DaVinci Resolve, Fusion 16, Fusion Studio, VFX, Fusion, visual effects, compositing, Mograph, Planar Tracking, Planar Tracker, Matchmoving, match moving, corner positioning, corner positioner
Id: aJaGZ2a2BwQ
Channel Id: undefined
Length: 31min 41sec (1901 seconds)
Published: Sun May 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.