Compositing Green Screen in Davinci Resolve | FULL WALKTHROUGH

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up so by now you probably have all seen my little short video Alice cupcake and if you haven't you should go watch it because um the context of that video is what inspired this tutorial today if this is your first time to the channel welcome my name is Tyler Seaman I am a DCI resolve YouTuber I dabble in blender sometimes and my computer allows it and today I'm going to be teaching you how to comp deposit a green screened asset into a new environment using 3D so quick disclaimer to this video um this particular example we're using a static shot which means there's no movement so this can actually be done in the free version of Da Vinci resolve as far as I know um if you wanted to track a moving shot though for something like this the best way to do that is with the 3D camera tracker and that is a studio only feature and just another slight addendum this video is going to be a little bit different than all my other tutorial tutal because I'm actually going to walk you through how to do this in real time so there's going to be a lot of us there's going to be a lot of ums and there might even be some slip UPS of the tongue the slip up of the tongue kind of like that one so bear with me but it's good stuff so keep keep a so here we are in a brand new timeline in Da Vinci um this is my project from when I actually edited the Alice Cupcake short video uh but I made a new timeline 1920 x 10 80 30 FPS and I've only got two pieces of media so I've got my environment here which is the where I'm going to composite my my little tiny self and um and then the green screen right here uh the green screen is not well lit I was in my house and I was trying to film this I had to kick my kids out of the house with my wife to film this so in our living room so I didn't have much time to light so I did the best I could um and also I filmed in uh 9 by6 aspect ratio and that's actually a uh a tip that I learned from another fellow YouTube YouTuber who's a game review Channel he goes by manly reviews um and if you're into video games or if you're just into awesome edited videos my favorite drink is battery acid go check him out because his stuff is masterful he's got a patreon too which shows how he does all the stuff in the disgusting inferior Adobe After Effects filming this in uh 9x6 it uh eliminates all this un needed real estate basically um so I was able just to focus on the actual green screen when I when I Delta ke it out basically so um You probably notice that this is short and this is incredibly long um it always helps to have an excess of Clean Plate so you always want to have more than you need so you can never film too much Clean Plate so the first thing we're going to do is we're going to um we're going to key this out so we're going to just hover our play head over you know it could be anywhere as long as it's touching the uh the clip you want hover the play head over the clip that you want to um to composite with or just to mess around with and go into the fusion page so you can see here by looking at the top right that this is filmed in 2160 by 3840 and that's 9 by6 it's vertical what we're going to do is we're going to bring in a Delta key so we're going to take this uh take a pipe from the media in and plug it into the background input of the Delta ke I'm going to select it and press one to bring it up in the first viewer so when we're uh doing some when we're doing Delta keying here in Fusion my favorite practice is to just automatically se you know click in the first viewer and press a to bring up the alpha Channel um and this helps a lot When selecting your colors and helping to um refine the mat and I'll show you what I mean in a second here so here in our Delta key make sure we have it selected and up in the inspector over here uh it says background color right here in the key section background color we're going to grab this little eye dropper we going to click and drag and we're going to drag it over the green so now pay attention in viewer one how everything's changing that's because the black is what is being keyed out so what you want to do is you want to drag around until there's the most black that you can get as much black in the background as you can and that's pretty good right there so I release and that's what our key background color is set at oh my God I just scrolled okay well I had a dummy dangus moment anyways we're all good um anyways as I was scrolling in before I fed everything up you can see that the key is not quite perfect we've got these pixels that are kind of showing everywhere and it's grainy and as we play through you can see that there's like a bunch of noise you know cameras film and there's there's noise if you don't have uh if you don't have perfect ISO and perfect lighting which I didn't I told you already um but that's not a problem because what we can do is we can come over here in the mat tab first off we can clean the foreground up and that's the white the white is the foreground so we can boost up the clean the foreground and you can see some of the pixels the little pixel from the noise are starting to go away so that's at zero and that's at let's say like 0 or 0 02 which is all right cuz you don't want to go too too heavy with the clean the foreground I know it seems like it would be it would make sense to just complete it completely or clean it completely rather but you can see if you maximize it that you start to lose some of your Edge and that's not what we want so so 0.002 I think was where we were at which was okay and then we can do the same thing with the background which as you might guess is the black so we're just going to boost the black a bit and and you can see that some of the some of the some of the pixels in the back are starting to disappear as well and again we don't want to go too too heavy with it so the next next mode of uh refinement I guess you could say is to play with the thresold sliders here so when I grab from the the bottom threshold slider and I boost it you can see that it refines the black which is the background so I'm going to boost until I have like wood is basically perfect black that doesn't fix our white problem though which is right here we fix that by grabbing the high slider and bringing it down and you can see here that we have a perfect black and white image here and that's going to be our mat and that is how the Vinci knows what to cut out from the green screen you might notice that this is our final our final image and it's not working on the final image that's just because we're in a separate Branch if we just connect this to the media out there you go you have Alpha in our final you might notice that uhoh we've still got some uh leftovers from you know where the other places that weren't um that weren't covered by the green screen that's okay we can fix that pretty easy what we're going to do is we're going to pull a polygon node down and we're going to mask these little areas out I'm going to plug it into the uh the garbage mat this little gray input is the garbage mat and that's what we're trying to get rid of that's that tells the Delta KY hey all this data just get rid of it outright we're not going to use it and it replaces it with Alpha so anyways now that we've got it plugged into our garbage mat we're just going to start doing a rough rough mask on what is oh you can see there's a little bit of fuzziness up here I'm going to go back into the delta here and I'm just going to refine that some more by bringing up the black level that looks pretty good all right anyways back in the polygon node I'm going to select and continue my mask so uhoh that's not what we wanted to do it masked out our our body that's okay simple fix just go into the polygon node click the invert button and there we go we've got our little cut cut out so anyways you might you might notice that actually we got a pretty we did a pretty good job on this one now that I'm thinking about it however there is a a slight Edge to uh to my ear my my bald head right here and uh we can refine that a little bit further if we wanted to by using the erode dilate uh slider here so I'm going to go left for erode just to kind of uh bring that edge down a bit and uh see that's looking pretty good um but however we don't want it to be too sharp so we can restore a bit of The Fringe by bringing this up slightly you can see that it kind of blurs it so that's no fringe and that just gives it a little bit of blurriness and that just kind of that it's more pleasing to the human eye at least so now we're keyed out and go back to our edit page it looks like we got a pretty good key so you can see yep yep blah blah blah blah blah blah so what I'm going to do is I'm going to take this bring it over H well my tracks got a little bit messed up that's okay bring it over my environment so you can see that this is what we want but the problem is like it's two separate tracks we want it to be on the same track and that's easy to do you can just come over here um contrl B to to blade tool to make them the same size and then uh box select both right click and then new Fusion clip so that combines both pieces of media into the same clip now our little man disappeared but that's okay it's just a it's a slight bug with Fusion that it kind of just throws them out of order um so let me show you what I mean here we are in Fusion in the new Fusion clip um yellow is background so the yellow is our environment and then media two here that's that's us that's our little man whoops fat finger it that's a little man so I'm going to go ahead and rename these so we've got our media in where we want it um but like I said we're going to use 3D to composite this in so first things first I'm going to select both of these and shift hold shift and click to drag it off so that that's you know we disappear basically first things first I'm going to delete this merge not cuz I don't need it right now now that we've got all our media in there and uh named and organized separated and so forth we're going to build a 3D scene so we're going to push shift we're going to put shift space rather and we're going to put in an image I've done this three times already but we're going to bring in an image plane 3D so the image plane is what is going to uh to show our man in 3D space so what we do is we plug the the little man media into the foreground of the image plane you can bring it up in uh the first viewer and you can see this is it in uh in 3D space so we've got our image plane set up but we're uh we're going to hold off on that for just a second because the first thing we're going to need besides the image plane is we're going to need a camera 3D node so you can see that pop up in 3D space um we're going to put it off a little bit offc Center here and we're going to you can select it or not it doesn't really matter it's just easier if you do uh select the camera 3D shift space and we're going to enter merge 3D so you can view that in the first viewer and then this is what the merge looks like we don't have uh the little man here because the little man is not connected so you can go ahead and connect the little man if you want and here we are in 3D space boom right there so the next thing we're going to need is we're going to need a render 3D node render 3D the render 3D 3D node rather is what we can connect to the 2D comp and that's basically how we merge it over merge 3D over 2D who so we're going to grab here merge it back over and uh well we don't see them what's going on here simply it's because the camera is right up here all up in my guts right up in there you can BAS basically see what I had for breakfast that day uh so we're going to make sure you have the camera selected and you can either use the translation rotation controls here in the inspector or you can just use these arrows so I'm just going to grab this and uh pull him back and you can see whoa I'm going to zoom out a bit because uh bit yep and that I think I'm pretty sure that's about that's pretty close to how small I was so I'm basically going to use the camera to position my character in the scene so I'm going to adjust slightly just to I till I got him in a spot where I think he looks [Music] good yeah I think that's pretty good so now we've got him positioned um so you might notice there's a slight problem he's looking pretty good in the scene so far but um the my brother's got no Shadow got to have Shadow we're not a vampire we're not a not a ghost got to have Shadow so how do we do that in 3D the first thing we're going to do is we're going to shift space shape 3D so if you look in the shape 3DS inspector you can see by default the shape is a plane and that's what we want we need a plane so you can go ahead and connect the shape 3D into the merge node it's the wrong orientation and it looks weird because the the infinitely small image plane and the infinitely small or I'm sorry the infinitely flat shape plane are occupying the same space and that causes these artifacts simple fix you can just click on the shape 3D go into the transform little section here and um on the x axis you can type in 90 and that rotates it 90° so what I'm going to do is I'm going to use these handles cuz I have the shape 3D net uh node selected I'm going to use these handles to position and I can even get in super close if I want and uh get the the plane to get down to about my foot level now it's not perfect because we're not standing perfectly flat on so like if we were to create a shadow this way um the foot the shadow of the this foot would be touching but the shadow of this foot wouldn't be anywhere near it so what we're going to do is we're going to use the leading lines of the scene to help position the ground plane so I'm going to do this by altering the rotational values of the image or the the shape 3D plane so I've I've pretty much got my X where I want it I'm going to adjust the Y and then I can adjust the Z for a bit it's it's going to take a little bit of adjustment just like playing around with it and trying to figure out the the best the best fit maybe I'll bring up the scale is what I'll do cuz I'll bring up the scale yeah that looks all right so the leading Line's still a little bit [Music] off and then we can we can refine this in post when we actually have our shadow so so that's looking pretty good we've got our we've got our plane set and this was uh just to give it a look basically Okay so we've got it to a relatively basic 3D scene so this is what we want our next step is we're going to copy everything right here we're not going to copy the shape 3D we're going to copy everything except the shape 3D and we're going to paste it well I didn't copy it looks like contrl c contrl v there we go so we're g to copy all of these and we're going to merge them over in front of our little man um merge right here and the reason we do that is because this is going to be our shadow okay so if we view this in isolated view like say we uh say we uh contrl p on this merge here it turns off the that turns off the shape 3D it turns off all the stuff that we did prior what we're going to do is we're just going to grab the shift or I'm sorry the shape 3D shift click drag down so we're going to merge the shape uh 3D here over this merge so we're still seeing this the first thing we're going to do is we're going to go into our render 3D here and we're going to enable lighting and we're going to enable Shadows so it goes perfectly black why is that well we don't have any light in our scene so to do or to fix that we're going to shift space type in Spotlight there's our Spotlight we're going to connect it to the merge nothing's happening because we need to position our light so whoa there we go um we're we're our light is uh affecting our little man but it's not affecting anything else so let me position this and I will tell you why in just a second okay so you can see here I've got my light roughly where I want it um you can see our little man is being like completely blown out by the light and our ground plane which is the shape 3D plane um nothing's happening to that why is that well we have to do some messing around in the materials of each object so firstly we're going to go into the shape 3D and we're going to go into the oh I'm already in it going into the material section down here to transmittance we have receives lighting and we have receiv shadows we don't want it to receive lighting so when we turn that off the light is you know it doesn't register that light is hitting it so it goes back to Pure White so you can probably guess what we're going to do with our image plane 3D we got to do basically the same thing go into the material settings and under transmittance we're going to say receives lighting we're going to uncheck that so our little guy goes back to normal and we're going to uncheck Shadows cuz we don't want the man to receive the Shadows we just want the ground plane to receive the Shadows okay so now that we've got our materials all set up um you'll notice that there's no Shadow well that's only because the position of the light um our light if you can see right here our light and our camera are going in the same direction so it's not possible for the camera to see the Shadows so we adjust the side adjust the spotlight direction right here you want to make sure you're uh either in the merge or in the spotlight I'm going to go jump into the spotlight just so I can have these controls and I'm going to adjust the rotation of the light and you can see as I do that the shadow starts to show up it doesn't look like look quite right but that's because I just need to mess around with the I have to mess around with the position of the light [Music] okay so I did some slight micro adjustments to the plane into the shadow just because I needed to get it to fit a little bit better it doesn't have to be perfect but it's sitting a little bit prettier and that's what I like so the problem is we've still got our man showing in this layer cuz don't forget this is only supposed to be the shadow layer this is going to be our our man layer and then this is the shadow layer so the way we fix that is we bring out our image plane 3D and our media source and we're going to shift space and we're going to enter in an override 3D node right here so with that connected we're going to come in here and uh under visibility we're going to check do unseen by cameras and then double check unseen by cameras and that makes our man disappear come back over here and we're going to unhide our other man layer so with that all done this is truly just the shadow layer and then this is the man layer so to get rid of this white ground plane all we're going to do is we're going to come into our shadow merge come over to the apply mode and we're going to set it to multiply and then you can see we've got our ground plane disappeared all except for the shadow so another thing you'll notice is that our shadow is looking a little bit sharp a little bit sharp for my taste that's okay what I'm going to do is I'm going to come down here into the spotlight and we're going to in the controls tab we're going to come down here to this Shadows drop down so all the way at the bottom we've got softness and it's set To None we want it to be variable so you can see right here it does a calculation where it shows the Shadow getting softer the further away it gets from the casting subject so now that we've got our shadow looking a little bit more natural with the blur and everything um you'll notice that the the feed aren't touching and that's okay because we can still fix that with um well by selecting the renderer 3D shift space and we're going to add in a transform node now there's a transform and there's a transform 3D since we're connecting from the renderer uh since we're going after the renderer 3D that is what converts the 3D data into 2D space so um that's why we're using a regular transform and not a transform 3D because it's technically 2D space now anyways so now that we've got the transform set I'm just going to adjust the center little by little so it doesn't look absolutely perfect but that's okay because if if it's a little bit too far off we can come in and we can mess with our light source again and try and get our shadow to fit [Music] better so after some repositioning of the spotlight and of the actual whole Shadow uh Shadow merge itself uh we've got it looking pretty decent um it would be a little bit tougher to get away with this if it was a track moving shot so on and so forth um but since it's static and it's not moving you can get away with little things like this um however if you take special notes notice the shadow of the man and the shadow of the book here they're not the same the shadow of the man's a bit darker and we fix this by going into our shadow merge and coming into the settings you know usually you'll start off here in the merge we'll go into the settings and we'll drop the blend down until the Shadows match somewhat all right so that's basically it we've got our little man composited on we've got our shadow we're not going to worry about color grading because that's just completely to your t P um however we can jump into the edit page and I forgot to turn on smart cache so I'm going to do that real quick let it render out for a bit so I ended up doing a render in place because OBS running and uh trying to render smart cash was making my uh encoding overload so hey Puget if you wanted to send a small YouTube or a computer hit your boy up so anyways as you can see after I did the render in place the shadow while not perfect is still passable and you can see that it moves along with our image plane 3D AKA our little man and it looks beautiful would look even better with some color thrown on you know what actually let me throw on a quick color grade just to show you and there we have it there's our fully composited green screen asset into a new environment with shadows using a 3D environment completely in the free version of D Vinci resolve boom but what if I told you there was another way to composite shadows in a scene like this without using 3D well it's true check this out okay so now we've got our media all uh labeled and arranged properly so what we're going to do is we're going to go to the Tyler layer or the man layer whichever you're compositing click it and we're going to shift space add in a transform node or XF transform um so the first thing we're going to do make sure you have your transform node selected is we're going to go over to this little um this pivot value here got X and Y we're going to drop the Y just a little bit until we see this green arrow that's the pivot so grab the pivot and we're going to bring it all the way down to the lowest part of the uh visible pixel data so I uh moved it on the x- axis a little bit so I'm going to reset that and I'm going to go down you know you can uh click inside this little box here and uh drag for more precise movements you can push uh shift um so that looks that looks pretty good that looks pretty much at the bottom um so anyways we're going to adjust the size and you can see that when we adjust it's going in the direction of that pivot point it makes sizing a lot easier so I'm going to drop the size down just a bit and try and match it to like however big the uh the last character was in proportion cuz this is a bit of a different shot and um then I'm going to grab this this is the uh the center value and we're going to drag to the right the correct position that we want and that's that's pretty good right there maybe I'll drop the size down just a little bit okay so now we've got our character sized right what we're going to do is we're going to select the the transform node and the media Source node which is Tyler and we're going to contrl C and we're going to contrl V to paste them so what we're going to do is we're going to merge both of these back over the Timeline under the uh the Tyler the the first instances of these nodes and uh I'm going to rename this Shadow merge and what we're going to do after this is we're going to first off I'm going to turn this off so we can you know contrl P to pass through the node disable it so we're not looking at the actual Tyler now first thing I'm going to do is I'm going to leave this transform Alone um but I'm going to select it and then after it I'm going to put in a brightness contrast node so after our brightness contrast node over our shadow Branch we're going to shift space and add a dve node so a dve node is kind of like 2.5d it's it's basically like faking 3D what we want to do is we're going to take our pivot of our dve node which is this green this green X here you can't really get to it so you can kind of like just adjust it to where it gets free from the center and then drag it all the way down to the most the lowest point of the pixel data and then we're going to adjust the rotation of our character and ever so slightly and when you've got your Shadow position to where you want it to be it's not perfect again that's fine cuz after because after all that we can add in a blur node and we can blur the size to look just like that and you can see that you know it's not lining up with the feet absolutely perfectly but if it really bothers you you can go back into your dve node and alter the rotation just a bit maybe not that make sure you know your values I I constantly have have a problem with this since we're using just regular merges on this one we can just simply look at the shadow of the book and then same as we did before drop down whoop the blend to match and since this is just basically a copy of the actual character data it still moves along with the footage so anyways that's it that is two count them two separate ways you can composite green screen asset into a new environment using 3D or 2.5d or fake 3D if you will thanks very much for watching I know it's been a while since I've uploaded but I've just been kind of busy with being a dead life and you know all this other stuff um but I hope you stick around I got some good stuff planned in the future but I guess I will just wrap up this video by uh quoting the great 50 Cent
Info
Channel: Tyler Seaman
Views: 1,553
Rating: undefined out of 5
Keywords: Davinci, Resolve, Green, Screen, Delta, Keying, Keyer, Compositing, 3D, Environment, DVE, Nodes, VFX, Narrative, Tutorial, Walkthrough, Step, by
Id: 1SGOBQFXJJU
Channel Id: undefined
Length: 30min 23sec (1823 seconds)
Published: Mon Feb 05 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.