Learn to Create Your First VFX Shot For FREE!!!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you've never touched blender or V effects before then this is a tutorial for you over the course of the next hour or so you will be able to make a realistic visual effect shot that will fool anyone so sit down relax and let's learn a new skill like always if you want to work along with me I have everything I use down below now since for this tutorial I'm going to assume that you don't have any experience inside a blender or visual effects I'm going to try to explain everything as I can but of course if you do run into any trouble make sure to leave a comment down below and I'll try to get to you as fast as I can if not you can also look on Google and see if anybody else is running into a similar issue so first thing we need to do is we need to go ahead and render our movie sequence into a image sequence and that is uh because of two reasons the first reason is because we don't want to be tied down by frame rate if we have it as individual files then we don't really care about the frame rate and we can export the final frame rate at the very end the second reason is that it's the most compatible between software because sometimes the codak of videos get a little bit funky if you trying to transfer files from blender to let's say da Vinci or after effects so in order to do that let's come up here two plus to video editing video editing this is just a new workspace that's catered towards this let's go ahead and add our movie okay so let's select our movie here add movie strip and then down here we can actually set the start and end key frame I'm going to set my end key frame to 87 uh just because we have some uh bicyclists that kind of come where I want the statue to be so I don't want to have to deal with this for this beginner tutorial of course you can set your own range now a couple of things blender automatically set up in the video editing workspace is that it automatically detected the frame rate of footage it hasn't detected our resolution and so if you wanted to kind of you know save the uh correct resolution I believe this footage is 4K or something like that you would have to manually put that in here I'm just going to stick on 1080 for this tutorial and then the other thing uh without getting too complicated into it in this color management section the uh view transform is on standard and all you need to know for now is that standard is the best view transform for videos and image sequences you'll see what I mean in a little bit so anyways let's go ahead and save out our image sequence that so uh I'm going to go to Output output properties and let's save a new file location okay so once you found your folder let's go ahead and create a new folder just so all the image sequences are in that and then I'm just going to name this folder whatever you want uh and then when you have that let's double click inside here again just name it whatever you want to kind of name that and at the very end make sure you put a underscore just so our main text of our uh file name is actually separated from the actual text and string out of our frame uh number and so once you have that let's go ahead and hit accept you can of course select whatever file format you want I'm going to be sticking with PNG uh I'm going to work with RGB uh since I don't need any Alpha for this and then the color depth and the compression you can play around with I believe for PNG it's actually a lossless compression so it really depends on how long you want this to render I'm just going to leave it on a 15% uh compression ratio and then once we have all of that set up we can go up here and render and render animation okay so once that has finished you should get a folder that looks similar to mine where you have uh basically each frame of your video rendered as a individual uh image file and so that is looking good you can see that our final frame is 87 like we had set before so you should have something like that now let's actually open up a new uh file inside blender so we can start completely from scratch again I'm not going to save this since we don't need that project anymore and now we are in the general file inside blender and so the first thing that I want to tackle is uh to actually camera track our footage and so that might sound really daunting and not a lot of beginner tutorials actually go over it but trust me when I say it's not bad at all so let's go ahead and get started in that uh so I'm going to come up here again we're going to open up a new kind of you know custom workspace we're going to go to plus bfx and motion tracking this is the default kind of motion tracking workspace uh I'm just going to pull this little uh menu up and this one down uh just because we want to deal with uh the actual main window for now uh these other windows will come into play in a little bit so first thing we need to do is open up the image sequence that we just made so let's go uh locate that here's my image sequence I'm going to go ahead and hit a to select all of my frames and then open the clip and now you can see that we basically have uh this kind of you know footage in our scene it's a little bit choppy playback and so what we can actually do first of all is come up here to the tracking settings right here we're going to set the scene frames and then prefetch our footage and so now you can see this blue bar down here is completely blue and all that's done is basically baked it into our cache uh so now we have super smooth playback and everything looks super nice now might be a good time to save your project so contrl s and I'm going to save that to a new location okay so like blender automatically did before it automatically set our view transform since we went to a different workspace in the motion trkking work workspace it actually didn't automatically update our color transform to this like I had said before any image sequence or movie video actually works best in the St standard uh view transform and so we need to go ahead and manually set that so let's come up to render and then go down to color management and it's uh automatically set to filmic agx is actually a new thing with blender 4.0 so we'll get into that a little bit later um let's select standard and now you can see our colors are way more Vi vibrant and actually match to our original plate and so now uh to actually Mo motion track if you want to get kind of more in depth I actually have a full dedicated tutorial on this but I'll kind of work uh work along with you guys and kind of you know show you how to motion track this specific scene first thing I want to go ahead and set is our focal length now I guesstimated the focal length to be about an 18 if you're actually shooting your own footage you do want to write down your own focal length but I actually took this into a separate program and was able to calculate kind of a basic focal length that it's close to and so what I want to do is I want to come over here to the track settings over here if you don't see this menu if you just hit in it'll kind of pop up over here and so uh whenever you're doing what camera tracking you do want to kind of have some of the camera data in front of you it's not a huge deal blender can automatically detect it uh sometimes when we're uh doing the camera check but it's always just a good Ru thumb to kind of go over here and give it kind of a base kind of number to work with so if you go to camera and then lens my focal length uh it gave me in the program was uh 18 so you just want to put that there um so that should remain constant uh because we're not zooming in in this shot at all and so now we want to go ahead and uh let blender detect some features in our camera track uh now when camera tracking it's going to try to pick up areas of high contrast uh and so like if I zoom in here you'll that some of these build uh uh kind of Windows back here are actually pretty high contrast and it's going to be easy for the program to kind of you know automatically detect those let's go ahead and delete those uh again I am hitting control and clicking just to kind of you know make those markers but again I'm not going to really manually do that I want blender to do as much work for me as possible and so let's come back out here you'll notice all these settings on the side uh without getting too into it again uh you can you know change all these settings I have uh the full dedicated camera tracking tutorial if you are interested I break down each setting uh bit by bit so you can get a better camera cheack but for the scene we're just going to keep it super simple we're going to leave the pattern size and the search size on its default values the uh match we're going to set to previous frame and then we're going to also normalize the footage now previous frame I just find uh Works a little bit better in trying to track the markers automatically and then normalize basically takes a luminous uh value change of all the pixels and make sure that they're kind of level all throughout the uh video basically that means that if there's any luminous changes like exposure or anything it's not going to throw off the tracker and so it's always just a good uh kind of rule of thumb to keep that on finally over here I just like to set up the tracking settings extra I want to set the correlation to a point line that basically just means that blender has to be 90% sure that the tracking marker is correct in the correct location for it to actually continue tracking the marker and if not it'll actually stop tracking at that point which uh will give us a better camera trck and so now that we have all this set up again I do want uh kind of blender to do its own thing so I'm going to come up here to detect features and you can see that we have uh now blender is automatically detecting some of the high contrast features of the video that it thinks is going to be the best track we do have a couple of problems so first of all we don't have as many markers in our scene and second of all we have some markers that are kind of Clinging On to this black little border down here and so I don't want uh you know markers to be affected by that black border so first of all I want to come and uh Ral this kind of uh menu down here the detect features menu we can see this margin I just want to increase that margin and all that is going to do is it's basically just going to say uh hey don't you know don't put trackers uh 72 pixels away from the border of my footage and so if we just increase that you can see that it's basically 72 pixels uh kind of Border down here that it's not going to select a Tracker so we have a little bit room of error right there second we want to go ahead and change down the threshold this is basically what blender automatically kind of you know calculates to uh you know select those good trackers like I said before the idea that we're going to do is that we're going to have as many tracking markers as we can possibly track in this scene and then uh little by little we're going to kind of delete those and Whittle it down so that we get a good camera track and only get the uh good markers in our scene and then finally the distance I want to put to an 80 again this is just kind of giving us more markers in the scene and so now that we have all of that let's go ahead and I want to control T and that will actually track the markers forward uh there are also buttons down here if you don't want to do the hotkeys but I always recommend you learn the hotkeys and so now let's go back uh to the frame that we started on which was uh 37 for me so uh now that we have this we don't have any kind of thing uh in the start of our footage we started the trackers from the uh kind of middle of the footage and so what I want to do is control shift T and that'll actually track the markers backwards and so now we have these markers basically going throughout the entire length of our footage so now that we have markers kind of in the middle of our footage let's go ahead and do it from the exact start so again we're just going to detect some features and it saved our kind of values down here so we don't have to change those again now that we're at the first frame we can just hold contrl and press T and all those markers will track until the very end and then finally now that we have the start and middle I also like to do one uh from the kind of end of the frame sequence and go all the way back so again detect features control shift T and that'll track all the markers to the beginning of the footage so now we basically have three sets of markers at the beginning middle and end of our footage and so now uh we have all of this data you'll see these kind of blue lines right here and that's kind of the path that the markers are going to take uh it's kind of just a visual way to kind of tell the past and future of some of these markers if we actually bring this window up here uh one thing I like to do this is kind of the graphing out of all the markers and uh the one thing that we want to do is kind of start eliminating some of the bad markers and so if I come here let's select uh let's zoom in here I'm just going to select this green one that kind of like dips down a little bit uh we want to try to select as many kind of outliers as possible so with that marker selected you'll see if I come up here this is the marker that we are talking about and you'll see that the branch is moving itself and this is very important you only want to track things that are kind of stationary and uh solid in your scene so any people that are moving around any branches or anything that's moving around is actually going to cause uh some bad tracking and so you can visually tell that from the graph down here and so again uh since this branch is moving we just want to go ahead and delete that so with that selected right here you can hit delete and delete tracks and we want to do the same for all of the other kind of outliers of the graph down here so we have this one that's kind of doing its own thing we can go ahead and try to locate that that's actually ATT tracking to his head and again we don't want any tracking markers that are moving uh around with the scene so I'm just going to go ahead and delete that I know some other kind of wonky ones down here um I'm not going to view them all since we have so many tracking markers in our scene it's fine to just go ahead and delete some of the ones uh you know that are a little bit wonky right there and so we have this kind of Spike right here and uh we have this kind of one here going out a little bit haywire and that looks pretty good that looks uh pretty clean and you know I can see most of the markers actually following now so now once we done a kind of a graph pass we can bring this down and we want to go ahead and do kind of a visual pass up here and so we're going to be looking up here uh through all of our markers and kind of look for ones that kind of Jitter around or jump around or anything so for example I'll notice that there are some markers back here that kind of uh follow these people walking in the background you can see that it's like tracking onto them again I don't want those since that's going to screw up our camera track and I'll notice that there are some more ones kind of over here this one gets tracked to him and so you just want to kind of go uh back around here and testing I've noticed a lot of the markers back here kind of track to the p people and so we don't uh we want to try to get rid of most of those as possible so this is where you kind of um you know just need to zoom in and make sure they're not tracking any uh people uh you don't have to get all of them out we're going to be doing a thing in a little bit that's going to get uh you know the all of them out um but again we do want to try to give the blender the best possible scenario for the first camera track uh so then we can work from there and so now that we have that that's gotten most of my uh most of them out I'm sure there are a few that we missed uh like this bird up here um that's flying we can go ahead and delete some of those but now that we have that let's go ahead and get a camera solve now a camera solve uh with these you know tracking markers as we have it now they are doing nothing they are completely worth worthless they're not going to give us a good camera TR uh nothing so what we actually have to do is tell blender to take these points and actually try to calculate where the actual ground would be and where the points would be in 3D space and so to do that we're going to come over to the solve Tab and uh we have all of this information super basic uh the am key frame is basically going to be the uh kind of frame range where we get the most camera movement and since this is a pretty like uh you know solid uh smooth movement it doesn't matter too much where we put it it's actually the reason I chose this uh you know shot is because you can't really go wrong here with the A and B key frame and so uh in testing I just did uh frame one to 60 because uh that's where we actually have the uh you know kind of most amount of movement and that's just a nice little range to select um you do want kind of a lot of Parallax in your scene and what that means is that you want kind of uh things in the foreground that we track so right here and then you also want things super in the uh way in the background to track that's actually because if you kind of check here you'll see that these lines of The Trackers in the foreground are longer uh than like some of the lines here in the background and that's actually because when we're when we have a moving camera things in the foreground move a lot more than things in the background and so blender is actually going to use all this position data uh to tell that hey this uh marker is moving in the background and it's not moving as much and so it must be this far away and so blender is going to work all of its magic uh so let's just go ahead and get a solve let's go ahead uh again we already found our focal length so I'm not going to uh put that we're going to uh try to do our optical center and radio Distortion we're going to refine that our our El and then go ahead and solve the camera motion okay so once your camera track has finished we have two new things that have popped into this window first of all is the solve error now that's actually not a physical error you didn't do anything wrong so don't worry about that uh what it is it's basically telling you how well the camera is actually tracked in the scene and so basically we want to try to get that number as low as we possibly can a really good solve error is below 8.1 I usually try to stick below 8.2 if I'm doing a more advanced scene where I need a high accuracy you can see by default we've gotten to a 0.5 which is really nice the other thing that's updated right here it might be hard to see on YouTube but there's actually a blue line in our graph now and that's actually the solve a line and so what you basically want to do is you want to view your uh kind of solve Air Line throughout this cleanup process and make sure that it remains as flat as possible you don't want any spikes anywhere because that might mean that uh it has a very good track at the beginning of the footage but then if it spikes up at the end and go all Haywire then that means that it's actually losing some of the tracking at the end and so you just want to make sure that's as uh you know consistent as possible okay so now let's actually clean up the tracks what we're going to do is we're going to come over to the cleanup section we're going to clean the tracks and then the reprojection era all that is is kind of the error of each specific marker and so what I want to do is basically take the worst markers and just select all of those and delete them and get those out of the scene and then we can resolve the camera motion to get a lower average solve error and so if I go go ahead and click and then drag you'll see that it starts to select uh some of the higher reprojection errors of our tracking markers so once you get a uh you know good enough result that it's kind of skimming off uh you know not that many but again um you know just kind of the ones that would visually be wrong in the scene so let's go ahead and just delete that track and then now that we have this we need to go ahead and resolve the care motion and in theory since we uh you know deleted the bad tracks we got a lower salt error uh overall and so we just want to do that a couple more times so again clean tracks push that reprojection error up and delete and then solve the cam motion again we are doing it bit by bit because if we did it everything from the start then I actually find that it deletes some potentially good tracking markers because of you know some of the data that it's using and so I like to go and just kind of skim off the top every single time and do that multiple times I just find that that leads to a better kind of solve error so let's again clean the tracks projection error up and this time I'll just do a little bit more so something like that delete all those and solve the camera motion again okay so I was able to get my Sol eror down to a0 29 which is perfectly fine for this scene uh so that's where I'm going to leave it at if you are running into any problems where your solve error kind of jumps up all you can do is just undo kind of your markers that basically means that you've selected too many and it's actually deleting some of the good tracks and so um you know you can play around with it just get kind of a happy medium again my line down here is perfectly straight and so that is a good sign uh you do want to make sure you have that so now that we have that we can go ahead and set up a 3D scene so I want to bring this menu down here let's go ahead and right click I want to join the areas and make uh this a little bit bigger up here uh so we can actually see our 3D scene we're done with the graph so we can go ahead and pull that down here and so now what we want to do is we want to go ahead and scroll all the way down to this menu set up background and then set up the tracking scene and so now uh we have the background into our camera so we can actually see the footage uh but also we have the tracking scene in here and then a bunch of dots now these dots are basically uh the tracking markers and kind of where blender has put the uh markers in the 3D space uh now one thing that we'll notice is that we have all these uh kind of points here that are on the floor and these are actually misaligned right now because blender can't uh you know automatically put that down and so we need to basically tell blender where the floor plane is so we can align that to our scene so that this cube is kind of resting on the floor so let's come back to camera and then I want to go ahead and set up the floor plane first since that is the most important thing for camera tracking uh now I'm going to set it up kind of where I want my object to be I I want the kind of horse statue that I'm going to put I want it to be around this area so what I'm going to do is I'm going to select kind of three points in this area this one this one and this one uh all are on the floor plane uh so you just want to select kind of three points that uh are going to be on the floor around where you're going to put your object and then we're just going to go ahead and hit floor over here and and you can see that's automatically rotated our scene so that the cube and the kind of ground plane it created is automatically on our floor now uh this scene is a little bit wonky since uh the floor plane is a little bit uh you know convoluted to uh locate here so if for whatever reason your floor plane isn't aligned and everything's not tracking uh correctly you just want to play around with some different floor points so like maybe this one uh this one this one and this one we can go ahe and try that one so right there so uh and again that's just because the floor of the actual scene isn't perfectly level it might be a little bit curved um but since we're not really going to mess around uh to advance with that we're not going to uh you know worry about that for now so this is looking pretty good for me what I want to go ahead and do is set up uh the rotation of our scene and then go ahead and apply the correct scaling of our scene so first let's do the rotation so that since that is super simple I'm going to select this point to be my origin and then this point I am just going to select to be my x- Axis so now uh we just have the cube kind of rotated this way uh next thing I want to do and probably the most important uh thing in setting up your scene is to actually get the correct scale and this is to do with a multip multitude of reasons uh motion blur might be affected if the scale is wrong depth of field is probably the biggest because uh if you want to put accurate you know camera values like f- stops and all that you do want to make sure you have the correct scale of your scene and so uh in order to do the scale we have this uh kind of scaling section here the distance is actually in me and so uh whatever you want to do you want to put uh the you know correct uh distance in there as meters and so let's look for a set of points so this one right here uh I would think that this one would be about a meter a give or take uh we just have to be kind of in a uh you know margin of error for this since I did find this footage online I didn't take measurements on the day and so we're going to have to guesstimate a little bit here um we could also like take a person's hide and all that stuff but uh you know these look to be about a met so all I'm going to do is set the scale and then depending on your scene you can of course uh change that scale if you find two points and you think that's about 2 m you can plug that number in down here and it'll apply the scale up there and so now we have uh that scale applied now we can finally uh come out of camera tracking and get into the 3D uh kind of layout of our scene so let's go to layout and then uh let's come and save the project and we want to go into camera view now when blender we automatically set up the tracking scene and background it set up a lot of stuff up here uh the first thing and the most important thing that you have to do right out of uh camera tracking is to actually uh undistort the image because blender and Camera tracking kind of distorts the image and then sets that as our background uh you can tell up here we had these like black kind of bars uh mat bars up here and they were perfectly flat along the top and bottom however now they're kind of curved and they don't even go uh to the to the entire Edge anymore and so that's actually because blender is you know trying to solve for the radial Distortion and kind of the lens uh Distortion and all that uh to change that we're going to select the camera go up to the data background images and we're going to come down to render undistorted and uncheck that and now you can see our background image is back to the original View and nothing is going to be changed there so that's very important you do want to make sure that you have that in your scene okay so next we need to go ahead and disable some of the stuff that blender automatically set up let's delete the background uh collection and also the foreground collection you can keep those if you want but it's going to get a little bit confusing later on as we do this tutorial then also it created a background uh kind of view layer we don't need that as well so I'm going to go ahead and delete that and then finally in the compositing tab it's created a bunch of nodes and you know we're not going to have to deal with all this this is very confusing setup uh so let's just make it super easy for this uh beginner tutorial delete those four nodes and then finally let's just get this movie clip and plug the image into the image of our outfit over and now we have uh a basic thing set up we'll come to the composite a little bit later so you don't have to worry about this for now so let's come back out to our layout tab and you can see now we do want to check that our camera is tracked correctly so if I actually select this Cube I want to g z and then if I hold control and uh you know move my mouse up it'll actually snap to the floor uh you do want to make sure whatever you do is on the floor plane of your scene to do that if you hit one on your numpad you can kind of come over to the side view and you'll notice that the cube is resting on this red line which is you know the ground plane of blender again uh when camera tracking it actually set up our floor plane to be that plane and so if anything was kind of Above This Plane it would act as it if it's floating in the scene so we don't want that we want our statue to actually be on the ground and so uh whatever we do we just want to make sure it's on that red line so let's go back to camera view Let's uh click this plane and hide that by hitting H and then I want the uh statue to kind of be around here so I'm going to g g is to move and then if I hit uh shift Z that'll move on every axis besides the Z axis right there so I want the uh kind of statue to be over here and what we are looking for as we play this is uh that the cube is kind of following our scene and you know there's not too much drift in here again the floor is a little bit curved and so there's a little bit of drifting here and there um but again since we're worrying about kind of the beginner side of things I'm not going to go into how to actually you know get that to uh match perfectly and so now that we have all of that we are actually ready to import in a uh custom model that I downloaded from online so let's go ahead and delete our uh Cube and then we can unhide our ground plane up here by hitting that I dropper okay so now you want to go ahead and go in the description and download the model I have I went ahead and just stuck with the 2K blend version of the file so you just want to make sure when you're downloading that you download the right thing if you do want to follow along um and then it'll provide you with the zip file you just want to go ahead right click and then extract all and then extract it to its own folder so we can actually see the blend file and everything here uh and that's the nice thing about poly Haven is it actually provides you with a blender file and so it's really highres you know I I love poly Haven for kind of you know testing shots like this and so we don't need to open up this file yet so let's uh go ahead and minimize this and a nice thing that we can actually use is uh called a pending and a pending will basically be like importing a file uh that's already inside of a blender project uh from that blender project into uh this blender project and so it'll save all the materials all the modeling all the geometry details everything and so it's just really kind of streamline process uh for uh working within uh different blender files so it's super easy we're going to come up here go to file append and locate that blend file in that folder that we just had okay so here is the blend file we can go ahead and double click inside of there and I want to locate the object folder and just double click inside of there and there's one singular object it's the horse statue 01 we want to go ahead and pin that in and you can see that now we have the model actually inside a blender and everything is looking good let's go ahead and scale it up so I'm going to select the model here hit s to scale and I'm just going to scale that all the way up until we get kind of a uh you know good height that I want it to be we can go ahead and hide this again that's H and then I want to go ahead and rotate it so the horse is uh facing more towards the camera so select this R is to rotate any object and then I'm going to rotate it on the z-axis which is the up and down axis and I can just rotate my mouse until it's kind of facing a direction that I like so right there it's looking pretty cool and now you can see that it's done most of the hard work for uh for us thank you to the model modelers and textures and you know all of that I'll have their names in the description below so um you know send thanks to them I didn't do any of the work here they did most of the heavy lifting for us but um again we're going to be using this to compos it now and make it look super realistic and like it's actually in our scene and so let's go ahead and uh see what we're actually going to be rendering and so a way to do that is if you hold down Z it'll bring up this menu and we are in the solid view right now there's also the material preview uh wireframe and then rendered right here of course we do want to go and see what our render is going to look like and uh we have this you know beautiful result we will see that we lost our background and that's actually because uh blender doesn't automatically come default with transparency and so you got to enable that uh super simple come over here to render down to film and we're going to turn on transparent and so now uh you'll see that we have a pretty nice result um just with basic lighting super basic we don't have shadows and then we also uh you know it's not looking too realistic with the reflections and so the first thing I want to talk about is the render engine over here in the render properties you'll see that we have this render engine section by default it's set to EV which is a great kind of realtime uh you know screen space renderer however the renderer we're going to be working in is cycles and that's going to be the most realistic renderer inside of default uh blender you can of course use octane or some other uh render engines uh third party render engines but I'm going to stick with uh Cycles if you do have a GPU you want to make sure you set the device to GPU compute since it's going to be much faster to render and kind of preview like that also if you want to come up here to edit preferences and all the way down to system right here uh if you do have a RTX card you can uh select this Optics and then select your card right here and this will help render out the scene blazing fast um honestly if you are looking to build a machine for blender specifically I highly recommend you guys stay with Nvidia gpus they are just unmatched right now inside a blender and uh hopefully AMD will catch up here soon anyway so let's go and exit out of here and you can see that we have all of this set up uh we do have a kind of like default light in our scene that I never deleted uh you can use that if you want it's giving me two harsh of highlights so I'm just going to go ahead and delete that also Let's uh unhide our ground plane so we can see this back and you can see that it's here and it's basically set up to be a shadow catcher object and this is something that blender automatically set up when we were uh you know setting up a tracking scene uh like we did before and so all uh we can do to kind of view what it's doing is come over to the object properties all the way down to visibility and right here you can see it's set it to be a mask Shadow Catcher And so if I turn that off you can see it turns that off but um we do want to leave that on for now since we're actually going to be using a shadow catcher object like that okay so now we have the model in our scene and we also have kind of our basic uh scene camera tracked and now we're actually ready to light and shade our scene and get into the compositing of everything so I'm going to keep it super simple for this tutorial I'm going to go ahead and use a HDR image and all that is is basically an image with multiple kind of exposure ranges uh that basically has lighting data baked into it and so in order to enable that you want to go ahead and download down the image I have linked down below again poly Haven is a great resource for that uh so once you have that downloaded we can come to the World Properties we want to go all the way up and uh select this kind of yellow circle right here beside the color once we have that selected we can go to environment texture we want to select that and then we can go ahead and of course open the image and here is our HDR image we just want to select that and open the image and now you can see we have a lot of lighting in our scene and it's looking much much better then we uh the default lighting inside blender and unfortunately it is that time to go ahead and talk about color space again now if you remember when we were camera tracking and also uh rendering it out as a image sequence we changed the color view transform into standard and again that's the best for videos and image sequences however it's not the best for rendering out of cycles and so what we want to do is we want to come up here to the render properties go down to color management again again it's on standard since we set that for we want to set it from standard uh to agx now agx is kind of the new standard inside the blender it is actually a new feature inside of blender uh 4.0 and so that's the correct kind of color space for actually rendering out CG objects so if I actually come up here to the camera settings and then go to the background images I can change the opacity all the way up just so I can demonstrate a point so now you'll see that our background kind of image is super dull looking it's lost all of its saturation and Vibrance and all that and that's actually because again it is using that agx color space transform to actually apply it to everything in the scene and so that presents a problem because now we have our CGI which works best in the agx view transform and then we have our background footage which works best in the standard transform and now on standard if I look at my CGI everything is washed out all white and we're losing a ton of color data and so we don't want that at all we want to have as much data as possible for actually compositing it and to make it look realistic and so a way to get around this is we're basically going to render out just the horse and the shadow uh with transparency and render those out as kind of their own individual passes and then we're going to take it into a new blender project and then using the standard view transform that's where we can actually go back and composite everything together in the correct view transform I know that was a lot of information but I'll try to explain it as we go since it's not really that difficult so first thing we want to do is render out the Horse Pass so let's go ahead and go to view transform agx and you can see we have a lot more data right now uh it's not blowing out as much now you will notice that the shadow is going in the wrong direction if I kind of go to the end of the footage uh we can see these bicyclists their Shadow is basically going down into the right and so we want to mimic that direction as much as possible in order to do that what I'm going to do is I'm going to go ahead and come up here until we see kind of this uh thing on my cursor we want to click and drag a new window out here and so uh we have a duplicate of our 3D uh kind of view layer right here we want to go ahead and select this menu up here go to the Shader editor and now if I hit in we can hide that panel over here and now we have uh you know basically where you can mess around with material nodes and all of that stuff that's where you get really complicated into blender uh the nice thing about our object if I select that is that the nodes and everything were automatically set up by the creators and so we don't have to touch any of that what I do want to go ahead and play around with is if I select instead of object I want to go into the world Tab and this is actually the nodes for uh the kind of world shading again since we did set up a h we can see that we have this uh image node plugged into our background and so that's basically how the HRI works is that it's using this image to influence the background of our scene which is giving us lighting and so what we want to do is we want to go ahead and tell the uh you know image to rotate itself so that the shadow is facing this way now what we do need to do is go ahead and uh enable a add-on that comes free with blender so come up here to edit preferences down to add-ons and then if you type in node n o de uh we can see this node Wrangler add-on pops up it should be unchecked for you but you do want to make sure that it uh you have it checked it's a very good node inside of blender one of my favorites so uh once you have that we can go ahead and save preferences down there and then exit out of that and with that node installed what we can go and do is uh with this kind of image selected we can hold control T and what that has done is added a texture coordinate and mapping node and uh both of those are you know kind of nodes that you use a lot for uh you know materials and all that without getting too complicated and everything all we're going to use this for is to rotate our image so we have all this kind of vector data here um we're going to go ahead and with the Z rotation again Z is kind of the up and down axis we're just going to set that and rotate that if we click and drag and you can see our light is now moving around in our scene and and so that is giving us the exact result that we are looking for you can see that our uh we basically try to want to match the direction of the Shadow over here so maybe it's a little bit kind of back like that and so now the kind of sun is exactly where the sun would be in the actual real world environment and so let's go and save the project there uh what I will notice if I bring this menu over here is that we're having some of the Shadow cut off here and that's actually because our shadow ground layer isn't big enough so what I'm going to go and is just kind of s and scale that all the way up just so our shadow runs the entire length that it needs to and so now this is looking super super realistic um and you know giving us a really good result so let's go ahead I want to position this a little bit better so G shift Z again I'm just going to position that right there uh just so it's you know rule of thirds all that composition uh mumbo jumbo that you'll learn throughout your Artistry now let's go ahead and uh get a first render out so I'm going to come up here here and render the image okay so now you can see what I'm talking about of uh we want to actually get a alpha background with our horse you can see that we basically don't have our footage in here anymore uh it's going to continue to render and then you know combine that it is taking a super long time to render so I'm going to go ahead and mess around with some of the render properties now so let's exit out of here just stop that render and come to solid view what I do want to do is let's go uh up to the render settings uh the sample count is basically how noisy the image is going to be this is the main thing that affects your render time uh we'll change around some of these values in the future I want to Denise the viewport because uh that'll actually let us kind of view it uh without all of the noise applied so here's it before you can see it's very grainy and then if we denoise it it'll just gets rid of the grain uh for viewing purposes only I'm going to change the max samples down to a 64 so it's a little bit less taxing on our uh Hardware then I don't want to uh denoise the render and I want to turn this down to like a 28 for now we're of course going to change this at the very end to get the highest quality possible but since we're still in the creative stage I don't want to really worry about super long renders right now and so uh let's now go ahead and come to the compositing section and we can uh if you hold shift control and then click you can see uh the node selected if I hit V on my keyboard it'll actually Zoom that out so we can see that node and what this is basically doing is it's taking our kind of horse render layer and it's uh combining it over top of our kind of background render layer again uh you can see the image is super washed out but our horse is looking very nice and so what we want to do is we basically want to render out multiple passes out uh out of blender in this project and then take it into another project to composite and so what I want to do if I kind of bring this out here I want to separate the horse from the actual Shadow because I want to uh basically play around with some of the compositing and have uh you know that flexibility and compositing to to mess around with them separately so what I'm going to do is uh to actually separate them let's come back out to the layout tab and let's come to uh the solid view for now and what I can go and do is I want to create uh two new collections so I'm going to right click new collection right click new collection going to name this first collection the horse collection and of course the second one I'm just going to name Shadow I want to place the ground object into our shadow collection and then the horse statue object into my horse collection so now we have the two different Collections and if I toggle them on and off you can see that it's toggled the you know respective objects on and off and so now that we have that control we also need to control the different view layers because right now if we were to render this out it's only going to render out this foreground view layer if I come back out to compositing you'll see it's set to be our foreground uh view layer so we actually need to have two view layers to basically render out the horse in one and then the shadow in the other so let's come back out to layout I want to go ahead and name this uh foreground one I'm just going to name horse and then let's create a new uh view layer I'm going to name this one of course shat and so in these you know right layers we need to enable and disable uh the correct things and so uh for the shadow we're in the shadow view layer right now what I want to do is set the horse to basically affect all of the Shadows but not actually be uh seen by the camera and then I want to do the vice versa for the actual horse uh layer and so what I'm going to do is if I come up here and select this menu it uh basically gives us a lot of toggles that we can use for the different collections so the one I'm looking for here is set to indirect only so if I select that you'll see that we now have an extra kind of toggle uh option over here and if I go ahead and toggle that on for my horse collection we can see what it's doing it's basically telling uh blender that for this specific view layer the shadow view layer we want everything in the horse collection to not be seen But to affect everything everything else indirectly and so indirect stuff includes like Shadows um includes Reflections all of that uh nice uh you know Ambi occlusion all that stuff and so uh basically all that's giving us is the exact result that we want is just the Shadow and this later and so now we can go into our horse view layer and we want to do the opposite we want the shadow to be indirect now and so now we don't have Shadow on ground and we have our horse object right there so now if I uh save the project let's go up to compositing and we can still see that uh we this render layers node is just the horse one if I go and shift d duplicate that down I want to select this one to instead of horse I want this one to be Shadow so now we have two render layers nodes and that's going to basically split up the two different passes of our image so now let's go ahead and render out another image okay so now that that is done rendering we can exit out of here and now we can see what uh we have accomplished so if I uh kind of view this again and that's shift control and clicking we can see that we just have our horse with the transparent background and then now we have our shadow and its own uh kind of pass and view layer in of itself and we can use those to kind of composite them separately and so that is exactly what we want now we are actually ready to go ahead and render out the final passes uh for our shot and you know get them ready to actually composite now in the old days we would actually have to go ahead and render out the individual passes all the way through uh manually and individually so I would have to render out the entire Horse Pass uh stop the render at the very end and then render out the entire Shadow pass and change all the settings there uh blender has come long way and it's actually introduced a new node that allows us to do it both at the same time and so let's go ahead and use that node it is uh if I shift a add a file output node right here uh this is the node that basically allows us to take whatever uh sockets are in here and render them out all at the same time and saves us a lot of manual labor and uh you know render time in the uh in the future and so let's go ahead and uh you will notice that it has a image socket and then also this kind of base path uh the settings are a little bit hidden inside of blender so if I you select this and go up to node uh and then properties these are all the settings of the node I don't know why it's kind of hidden in there I don't really like that layout uh but basically all this node is is if we add a new input we can add as many inputs as we want again since we're only running two passes we don't need kind of those other ones so I'm going to go ahead and just delete those work with uh these image sockets um and this is basically just a replacement of the composite section and also the output properties and stuff like that so for this method you won't have to worry about any of the output properties like we did before and so now let's just select that file output node again I want my first pass to be named horse and then my second H pass I want to be named Shadow and so uh to actually go ahead and render this out let's plug the Correct images into the horse and Shadow and what I'm going to do you could also render this as a exr kind of multi-layer file which is just one singular file um however I'm going to render them out as kind of image sequences um in of itself PNG sequences um so it'll make sense once I kind of show you uh how it's done and so uh you want to go ahead and of course name uh where you want the files to be saved uh so you want to locate that name um that whatever uh you don't want to name the actual file in there because what's going to happen is when we render out the files it's going to take the name of this uh for each of the respective files so basically we'll have one folder with two separate passes two separate image sequences uh inside of the same folder and so one image sequence is going to be named horse and the other one is going to be named Shadow and so uh of course set all your uh file formats here we do want RGB a this time since we do want that Alpha Channel like I said before compression we can just leave at uh 50 15% uh all of these settings are fine for what I'm going to use it for if you do want higher quality you can maybe render it out um you know at a exr which is kind of the industry standard at this point uh one very important not and kind of a bug inside of blender is that for the file output node you do need to have the composite node still uh within blender what that's basically going to do is just it'll send a composite um out to your output settings so uh by default it's sent to your temporary file location on your computer and so um it's just very weird I guess it's a bug inside a blender and so you just want to make sure you have it you can even unplug it and make it black if you want uh but I'm just going to plug that in there and so now we have pretty much everything set up again you do want to set the base path you don't want it to go to your temporary file location um so now that we have set that set up let's go ahead and you know um render out an image just to see what that's doing okay so once your render is finished you do want to locate wherever you save that file uh here's just like a little test folder I made and you can see that we have these two separate uh versions uh of the different passes so we have the horse of course uh that's going to be whatever you name it plus our frame range so horse uh this is frame 26 and then of course we have the opposite pass we have the shadow frame 26 so those are going to be saved in their own folder and so let's just kind of view these different passes you can see here what I will notice is our horse is super super grainy it's so I want to try to get that out as much as possible um to you know make it look uh more natural the shadow I don't believe is as granny so we're just going to leave the shadow as is so I'm going to come out of here I do want to denoise the horse kind of pass and the nice thing about how we have it set up is basically we can you know have all the nodes uh that we want and as long as you know the final node is plugged into the correct path here uh that's actually going to give us the uh correct you know multi-pass rendering inside a blender so let's go ahead and D noise this uh I could come over here to uh you know the render properties and use this denoise uh button but I don't really like doing that I like to work with a denoise node inside blender so I'm going to come over here to the view layer properties and I'm going to enable denoising data and you can see here uh that's enabled some more denoising data for the correct uh render layer and since I was in the horse render layer it went ahead and add it uh added it just to the horse not to the actual Shadow right here so if I shift a I'm going to add a noise node plug that into this kind of uh file stream and then if I plug the normal into the normal and then the albo into the albo once we render it out it's going to take the d noise version of that and send that into our horse uh pass instead so now with all of that set up we are pretty much ready to go ahead and render out our uh multipass render before I do that I do want to make one point and that is to actually come back out to the layout tab and if we are in the horse section over here it doesn't matter too too much for this scene but if you do have a object that has a lot more Reflections in it uh we will actually kind of get the bounce sliding of whatever material we have for our ground so if I actually disable the indirect and then go ahead and object properties down to Shadow catch or turn that off you notice the default material is white and so if uh there is a huge uh you know reflection you can actually see a little bit of the reflection over here it's basically going to take the sunlight and reflect it uh the light is going to hit the material here and bounce some of that color onto here and so what I want to do is I want to go ahead and make the material of this ground match the material of the ground in the real world again not too big of a deal for this scene since uh there's not a lot of Reflections but if you are dealing like with uh you know metallic things then you'll definitely be able to see uh some white highlights that you want to try to get out of and so let's come over here go up into object properties and I'm going to add a new material going to just name name this ground for now and it's set up a principal bsdf by default let's go ahead and add a image texture and then I'm going to go ahead and open up our image sequence okay so again here is our background image sequence I'm going to hit a to select everything open image and you can see it's uh imported in the correct number of frames and the start frame it's not going to Auto refresh uh you actually do need to go ahead and press this button and that'll basically uh make it you refresh to the current frame instead of just being a single kind of image so let's plug that into the color of our principal bsdf and you can see it's totally black and that's actually because we aren't projecting it on the uh you know object at all we actually need to go again and add uh some Vector data into our scene and so let's uh select this image socket we're going to again contrl T to add a texture coordinate and mapping node again this is what you use a lot of times inside of uh you know materials so uh if you are interested in that you better get used to kind of this workflow and so with the texture coordinate it's automatically set to the UV uh and not to get any like into any technical stuff or anything but we don't want it to be the UV of our object we want it to be instead uh our window so if I plug window into Vector it's basically going to take our window that we're viewing it from and since we're viewing it from our camera it's going to project whatever image uh we have over here to the object from our camera view and so that is really nice you can see though it's creating a little bit of a problem outside of our camera and so let's fix that I'm going to come over here instead of repeat we're going to set it to be mirror and now it's a little bit better um so we'd get more accurate kind of tiling uh outside of our camera view uh you will notice it's not matching our background if I actually come up here and change the outline selected off you'll notice that there is a huge seam right here so we want to try to get that out as Mo uh as closely as possible what I'm going to do is I'm going to increase the roughness all the way over here and then go to the specular and and decrease that all the way over here that just kind of removes some of the uh light values of our scene and making the object not as reflective as the actual ground would be so now let's bring both of these nodes over here and I want to go ahead and shift a I'm going to add a gamma node and a gamma node is just going to um you know dark darken this a little bit to try to match it to the light levels over here and so let's zoom in a little bit I'm just going to increase the gamma uh 1.4 looks perfectly fine again uh since it's is a shadow catcher we're not going to be seeing it as much so it doesn't matter uh too much but you know that matches pretty closely over there so now that we have the material set up let's go ahead and outline selected back on uh now that we have our material set up correctly and it's going to you know provide us correct bounce sliding we do need to go ahead and set it to be a shadow catcher again uh so let's come over here make make uh in the object properties make the mask a shadow catcher and then also uh for the horse layer we need to go ahead and set this back to indirect only again uh since we just set up the materials and everything the bounce light and the reflections here are much more accurate it's a very small detail but one that matters a lot more if you are dealing with highly reflective objects inside of a blender so now with all of that set up we are finally ready to render out to uh a new file inside a blender so again here's the setup that we are running for uh runer around multipass files uh both of our render layers uh were denoising the horse layer and both of those are being sent into our file output node which I have going to its own folder that we are going to separate later and so with all of that set up now we can go ahead and render the animation okay so once your render has finished we are actually ready to open a new project and go ahead and composite so I want to come up here to file new general and then we can go up to the compositing section we're going to hit use nodes uh since we're not rendering anything in the layout section we can go ahead and delete this and then we just need to go ahead and shift a add a image note and we need to import in our different passes so the first one I want to import in is our uh video sequence so again here's our image sequence I'm going to hit a open image and now we have that it's automatically set to Auto refresh so we don't have to worry about that let's go ahead Shifty duplicate that down next we want our horse sequence so let's open that up okay so now you can see this I want to select the first uh kind of frame of our horse so horse 01 for me let's scroll all the way down until we get the very last frame but before our shadow we don't want to select the shadow yet so I'm going to hold shift and then uh click and that has selected basically uh the entire frame range of our just horse uh you know PNG segment let's open that image now and again uh 87 frames you do want to check that auto refresh finally Let's uh shift d duplicate that let's open up a new file and then of course we just want to do the opposite and select our shadow uh first frame and then uh shift control click uh the last frame and open the image so now we have all of our different passes in then again if you hold shift control and click we can add a view load and then V to uh kind of Zoom that out and now comes the uh amazing part where we have everything finally in the correct color transform and this is very important inside a blender because if you do not you're going to be messing up the colors uh with within your you know compositing and everything so now it's looking super dull and again that's because blender automatically comes with the film uh color transform so we need to finally go up to render properties down to color management and set it from filmic into standard and finally everything is the correct color and we can finally composite everything as we would uh elsewhere in another program like Nuke or after effects or you know whatever there and so finally let's go ahead and combine some stuff Let's uh shift a I'm going to add a alpha over node because again that's how we combine different layers inside of blender if you think of it like a video editing tab it's basically putting a uh you know layer on top of another layer and so let's uh take this image of our horse I'm going to plug it in the bottom socket and then the image of our background clip into the top socket and then shift control click that and now we can see that we have the two things kind of on top of each other if we kind of scrub down here you can see that our horse is moving along to the background and everything is looking nice if I do uh kind of alt V zoom in there you will see that there's like this white line going around our horse and without getting to into the technicals it's basically uh because our Alpha channel right here uh if we click that this is our Alpha Channel and it's not being applied to our image yet um and so that's where this kind of convert pre multiply button comes in if we just press that that'll basically get out the white line um I'm not going to go too much into that since that gets a little bit into the technical stuff but just know if you do see that white line just to click the convert pre-multiply button so now we have our horse on top of our footage but we have lost our shadow and so in order to get that back let's go ahead and instead of like you know normally uh in you know render or layer softwares what you would do is you would you know add another layer kind of maybe here and then You' plug your shadow in here and then maybe your horse in here and then that would go into uh you know the final Alpha over and so now we have the shadow back in and all that stuff uh I'm actually not going to do it like that and that's actually the kind of wrong method if you care about uh color accuracy and all that stuff what I actually want to do is I want to take the alpha of our shadow and actually use that to infuence the actual pixel data of my plate and so that's going to give us much more uh control of kind of the values of the Shadow and try to match that more closely to uh kind of the Shadows we see in the background and so let's again I'm just going to plug the image into the alpha over of our background image and let's go and delete the Alp over that was just for demonstration purposes so now we have it uh back to the original thing so like this uh what I want to go and do is I want to add a a node to color correct our footage right here so the my node that I like to do for that is uh shift a I'm going to add a color balance node so like that click that and place that in the Stream going into our Alpha and so if I kind of play around with some of the values here you you'll see that it's color correcting our background footage uh but it's color correcting the entire thing and so that's where this Factor section comes in uh I have this Alpha kind of mat that came uh you know with the PNG sequence of our Alpha of the Shadow so I want to plug that Al into the factor of our color balance and now if I view that it's basically telling uh you know blender that for this color balance node I only want to affect the alpha of uh you know where the shadow would be and so let's go ahead select this and backspace to undo everything uh I like working in the uh offset power slope so I'm going to select that and then uh over here we want to try to match the shadow to the background Shadow as much as possible so maybe I'm going to decrease some of these and decrease some of the slope uh now you can just play around with it or follow along with me uh so that's kind of roughly around the same uh value of that if you do want to kind of match it a little bit more uh maybe you can go ahead and add a blur node after our color and then uh we'll set it to fast gajen and maybe do it to a three um and so now you can see uh we actually need to uh undo that we need to set that to our Alpha instead of our actual image so let's bring that here and now it's only blurring the alpha and so if I go ahead and uh M to mute that we can see if we uh kind of zoom into the shadow here we can see if I mute and unmute that it's basically making the shadow a little bit softer so of course you can play around with it for your scene I believe for my final composite I didn't have it in so I'm just going to plug the alpha into the factor like that what I do notice is that all the Shadows back here are very blue uh whereas mine is very like black looking and so that's where we can come inside of the uh offset plower slope and mess around a little bit with kind of the Hue here so I might add some of the blue selection um in the slope and then might play around with some of the values in the uh Power section just to Tin it a little bit Bluer you can of course play around with that but that's looking much much more accurate and that is uh the exact reason why we do the color balance node instead of combining it with the PNG um Shadow sequence uh just because we can have that kind of ability to play around with the pixel data instead of the uh layers data okay so finally with all this set up you can uh have a lot of fun inside of compositing play around with that um I think our black values and white values match pretty well to our scene so I'm not really going to be showing you how to match those but uh with highle uh high level compositing that is something that you want to match is uh make sure the blackest thing in here matches the blackest pixel in your footage and so finally now that we have all of that set up we can go ahead I want to put the image into the composite uh because if I didn't nothing would actually render out let's uh set the inframe to be 87 if you remember and this is where we're actually going to render out as a movie sequence uh so let's come down to the output properties of course I'm going to change the file format into an FF imp video and then encoding I want to go ahead and set it to be a quick time and then for me I'm just going to stick on h.264 high quality of course this is where uh whatever you're doing you can uh for format it to however you want since I'm uh doing this straight to Youtube this is kind of the workflow that I like to use uh for me once you have that set up we of course have to set a new file location uh this is where you want the final render to actually go once you are confident with all of your settings over here uh you do want to pick your frame rate um I believe the base footage is 24 so I'm going to keep it as a 24 uh you know frame rate uh but of course since it is independent of frame rates because we have rendered it out as a image sequence you co uh can of course change it to 60 if you wanted it' just look a little bit sped up if you did that uh but again just going to leave it 24 and finally the last thing we have to do is go ahead and render and render the animation okay so here is the final result that we got from this tutorial hopefully you guys got something similar and learn some things on the way again this is the basic workflow for like 90% of the uh CG integration shots that you do inside blender for my own workflow I usually camera track in a separate software called synthis then I bring that camera TR inside a blender and then blender is where I render out the CG and lighting and all uh do all that stuff and then I actually take my compositing inside of nuke uh to do that and so that's where you can uh try to work in your own workflow and you know you don't have to use blender for everything I actually recommend you guys try to stick uh to you know only doing specific things inside blender uh just because you'll find that your artwork is much better in the long run anyways if you made it this far in the video I'd greatly appreciate it if you consider liking and subscribing as it would greatly help out the Channel with the YouTube algorithm but anyways I hope you enjoyed and I will see you in the next one
Info
Channel: Jacob Zirkle
Views: 33,627
Rating: undefined out of 5
Keywords: blender, blender tutorial, vfx, beginner blender tutorial, vfx blender, blender vfx tutorial, blender beginner vfx tutorial, beginner vfx tutorial, blender vfx, vfx in blender tutorial, easy vfx in blender, blender beginner tutorial, blender beginner, blender beginner vfx, camera tracking, blender 4.0, blender 4.0 tutorial, blender 4.0 features, blender 4.0 alpha, create your first vfx shot, your first vfx, how to make vfx for free, blender 3d
Id: 7_uwEg_NlcY
Channel Id: undefined
Length: 62min 5sec (3725 seconds)
Published: Wed Nov 29 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.