How to Add 3D Objects to Your Videos with Blender & After Effects | PART 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys and welcome to another very exciting visual effects tutorial now it is finally time to probably crap that was close now it is finally time to show you how to insert a 3d rendered object realistically into your video footage now that can be extremely simple to outrageously complex depending on whether you have a static or moving shot a simple static object or and fully animated dinosaur whether you want to add physics destruction smoke or you want to even interact with the object so I do see this being a little bit of serious with this being part 1 in this video I want to show you how to insert a simple moving 3d object into a static shot where the camera sits on a tripod for this tutorial we are going to be using blender to create and animate the 3d object because it's free and awesome we're going to render it out and then take that footage into Adobe After Effects to composite it back onto our original video clip but let me just get that out of the way oh sorry Jimmy yeah well this is going to be an intermediate tutorial and I will assume that you are pretty comfortable using both blender and Adobe After Effects if you're just getting into it I'm going to link you some beginner to Charles down below so be sure to check them out before you come back here but now before anyone else gets hurt let's jump right into the tutorial [Music] welcome to blender before we get into it do note that I've decided to break this video up into two parts just because I was getting a little bit too long in this video which is part one I'm going to take you through everything you need to do in blender this includes creating and setting up your 3d scene matching it up with your original footage that we want to add our 3d objects into and then creating and rendering out our 3d objects with the transparent background in part two I will then take you through how to composite those rendered 3d elements back onto your original footage using Adobe After Effects but for now let's focus on blender I have a default scene setup here and there are two points to keep in mind whenever you trying to essentially composite a 3d rendered elements into a real life clip first off you want the lighting that you see in your 3d scene to match the lighting that you had in the actual footage because if the elements you're rendering aren't lit the same way as the elements and objects in your shot if this won't match so I'm going to select this light press X and to leave that because we're going to set up some different light pretty soon the second thing you want to make sure is you want to make sure that the scale matches if we select this default cube here and go into the object tap you can see that the scale of this object is one meter by one meter by one meter and that is important to keep in mind especially when you're dealing with animations of physics because if the objects in your 3d scene are hundreds of meters tall but you're compositing that next to a person or a cat or something really small but it won't match the scale of the object in your 3d scene kind of have to match the size and scale of your real-life shot otherwise this won't work so just keep in mind that this cube is one meter by one meter by one meter and the other thing I want to do in order to help us composite and you know visualize what this 3d rendered element in our shot is going to look like is I want to import the footage that we want to composite this element into into blender so I can actually see it now we already have a camera in the scene and if you press 0 on your numpad you will go to the camera view so this is what the camera looks at right now and I want to import a background image so that the background of this image is essentially the clip that we want to composite is 3d elements into so we can visualize it and preview it and see what this will all look like for that with the camera selected in the properties panel let's come down into the camera settings and in here you'll find an option to enable background images let's take this and expand it and in here I can now select to add an image now I can either import a background image or a movie clip let me just make this a little bit bigger so you actually see this so it says movie clip right here let's select to import a movie clip as the background for this camera view come down a little bit hit open let's navigate to the tutorial folder and the video clip I want to import is this barrel drop dot mp4 and as always if you do want to follow along with this tutorial you'll be able to download these files from our website so simply go to surfaced studio comm /downloads and you'll be able to grab these files to follow along but obviously you can just use your own footage if you prefer this clip selected let's hit open clip and you can now see this background image or this video sequence in the background for the camera of you do note that you will only see this image when you actually looking through the camera the moment I middle mouse click and rotate around and a breakout of this camera view I will no longer see this background image so press 0 onion and pair to go back into camera view and the background image is back and this is a clip that we want to composite this element into if you scrub through you can also see that this actually plays back this video clip itself but let's just stay at frame 0 and we now need to align the 3d view of our 3d scene in blender with the actual space in this clip now in order to do that I actually want to move the camera itself now do note that this cubes cannot below ground and I kind of want it sitting on the ground plane because it will make setting this scene up a little bit easier so with the cube selected I'm going to press Shift + tab to enable snapping you can also enable that at the top here in the 3d view press G to move the cube around z to lock the move onto the z-axis there's a shift this up so the cube kind of sits nicely on the ground let's press 0 again to return into the camera view and now let's press shift and tilde or the back tip on your keyboard this is going to get us into first person view and we can now move the camera itself now another way to do that it's right click press n to bring up the transform panel go into view and you can actually enable here lock camera to view it you can kind of move around and the camera kind of gets locked to the view but I'm actually prefer to use first-person use let's disable there - press n to hide it shift and tilde so it just allows us to kind of move the camera around with WASD E and Q on your keyboard it's like a first-person game and what I'm doing now is I'm actually kind of positioned good camera in a way that I hope you can see the faint 3d grid I'm kind of aligning this as best as I can with the actual ground in my shot I want this cube to kind of sit maybe over on the right hand side here but this whole 3d space I want it to be aligned for the ground plane in my shot now because this shot as static is on a tripod this is actually pretty easy if this was a moving shot like the camera was moving you will need to do 3d camera tracking which I want to cover in a later tutorial this is religious simplest possible case let's make sure we remain in first person Vietnamese move the camera back a little bit remember this cube here this 3d cube is one meter tall so I actually want to move the camera far enough away so that kind of the size of the cube matches the size of me in the shot I'm about one meter 75 4 cells so the cube should be a little bit more than half of my size I'm just going to keep position in this camera just it kind of feels like size-wise this does somewhat mesh and again I'm kind of know I'm kind of fudging it here I'm not going super precise but for a shot like this probably don't need to go all the way out so that actually looks quite good so didn't see the ground plane is aligned the size matches about and if you hit f12 now to render this out this is going to render out the cube on nothing because the background doesn't actually get rendered so this is just our cube here it's a little bit hard to see because it's been rendered out on gray but we're going to fix it up in a little bit now in order to composite a 3d element into this shot if there was an actual cube sitting here there'd be a little bit of a shadow on the ground potentially on the wall there might be reflection on the cube of this environment and that's the next thing we need to set up to actually make this fit together you can see down here under my feet there's actually a little bit of a shadow now it's a diffused a there was no Sun and I highly recommend if you want to do 3d integrations use shots where there is no direct Sun it will get a whole lot easier if you have direct Sun you need to be pretty precise because then the shadow of the object needs to match exactly the geometry of your scene and the extra lighting situation so it's a bit easy on a diffuse day but there is still a bit of a shadow and we do need to replicate that when we render this out so that in the image we can composite onto this shot we have the shadow for our cube in order to do that we need to create a ground now I can press shift and a to go at select mesh and at a plane but because I actually want to add a bit of physics just to make this a little bit more interesting I'm going to have to cube kind of drop down and you know it collide with the ground and the back wall here if it needs to I don't want to add a two-dimensional plane I just want to add a floor a ground that has volumes so I'm actually going to add another cube instead so shift a name mash let's add another cube so that's going to be my ground also going to come into the outliner double click onto the cube and actually call this one ground now I'm going to break out of the camera view and that is going to lose as there's background image but it's going to allow us to kind of see a bit more what we're setting up with our 3d scene now I want to scale this cube down but I also wanted to sit directly on the ground plane so what am I going to do with snapping still enabled and again shift and tap to turn that on off if you wanted to come up into the top right hand side of your 3d view point and options unable to transform only the origins if you don't see this option make sure you have at least blend a 2.81 which is what I'm on because there was a new option that got edit so now we're only going to move the origin press G and Z so now I'm actually just moving the origin of this object I'm going to snap that to the top of my ground cube come back in to the option go out of the origins number to move the cube G and Z and I'm going to shift this cube down so now the cube cos it's exactly on that ground plane here but now the cool thing is because the origins at the top of the cube if I press s to scale so now I'm scaling this cube down in relation to that origin point so let's press Z to kind of the scale that in a little bit it's flattening out come out press s again I'm going to press shift and Z to lock the transform to only be X&Y I'm just going to push this out and it's going to create a big ground plane but again it's not a plane it's actually a physical 3d object it'll work better with the physics which is why I'm doing it this way let's preserve again to return to the camera view so you can see where this ground plane sits s and X and the scale is out just a little bit more so it kind of covers the entire area I can just shift it over a little bit so this is now going to be our ground plane in my 3d view now I also have a back wall here right in my camera view you can see there's this building here and I want to have a bit of a plane for that as well because Y at physics and this object bounces I wanted to bounce off that wall for that shift and D with the ground plane selected it's going to duplicate it go to right-click to cancel that again let's break out of the camera view press R and 90 it's going to rotate this new ground by 90 degrees but in relation to the camera view so let's press X to lock the rotation to the x-axis and now I want to move this back a little bit so I kind of want to shift it along the y-axis and now this again it's going to be a little bit you know just a little bit fudgy I don't want to move this wall back too far even though if you return to your camera view you can't actually tell how far it's back but if I hide this for a second and actually let's rename this to wall as well and if I hide the ground you can see that from the cube to this wall it's probably maybe half a meter or so so again I want to make sure that my scale is kind of fairly spot-on so I'm going to rotate around grab this wall again G Y just kind of you know I just want to move this a little bit maybe I'll disable snapping as well the second move this may be about half a meter back from this cube and I'm also going to move it up because it doesn't really need to be penetrating all the way through the ground let's return to the camera view and we can't even see our background image anymore which isn't great so with the viewport shading set to solid view come over to the right hand side open up this shading options units enable x-ray mode just so we can still kind of see that and just lower it a little bit and again I'm just going to position this now and what I'm going to do is I'm going to drag this over so this wall doesn't actually extend past the edge of this building here because this wall is going to receive the shadow from the cube just like this ground is going to receive the shadow from this cube and if this block here extends past this building you're going to see a shadow on an invisible wall that's next to this building some kind of fake remodeling some of the sweetie geometry in my scene now I am keeping this deliberately simple in the intro to this turtle that you saw I actually remodeled some of the shape of this background building here with the entry the ledge here and I kind of remodeled the curve a little bit just so that the shadow of this 3d barrel that I've essentially rendered into the shot it matches a bit better on to the geometry this is a very simple examples where we just have two flat planes but the principle is the same now I just want to go over the basic techniques first and we're gonna get to all of the more advanced stuff a little bit further down the road so now let's come to the cool stuff and actually start setting up how we need to render this let's come into the render properties and our render engine is already set to EB so if you now go into rendered view hmm yeah not really I don't actually want to see the back wall or the ground I don't see my cube but I want the cube to cast a shadow but we also haven't set up any light or anything else that really helps us with this scene now we will need to utilize something called a shadow catcher which is a material that essentially transparent but you will be able to see the shadow on it and we do need this back wall and this ground plane to be shadow catchers we don't want to see the geometry but we want to have objects cast a shadow on it so that in the end what we'll have as we won't see this but the cube will cast a shadow on those pieces of geometry now Evie doesn't yet natively support a shadow catcher there's a hack for it which I might cover later but there's no simple way to do this in Evie so I'm going to change my render engine from Evie over to cycles I'm also going to change my device from CPU over to GPU compute which will render this whole thing out of it faster let's enable visibility for the wall and for the ground and you can see the cube is actually casting just a little bit of a shadow but let's just set up a few lights and a few other things now ideally and I didn't do that I would recommend whenever you want to do a 3d integration like I'm doing here take an environment map like use your iPhone there's some apps I'm going to drop you some links in the video description down below to some apps that allow you to capture an environment map which is a 360 degree photo of your surroundings the cool thing is that you can then use this environment map to light your 3d objects and that light will be exactly what you had in the actual shot that you're trying to integrate those 3d objects to now because I didn't do that I'm just going to use an approximation so I'm going to come into my world settings now and my surface my lighting setup right now is to set the background which is this nice gray color by the way if you don't want that you can also just change that to black or any other color you want this is essentially the light that the world casts onto the objects in your scene but I want to use environment maps and want to click this little circle here on the right-hand side of color select environment texture then select to open and one that kind of matched similar ish to my scene is this tortoise Burke out 4k which I got from HDRI Haven again link in the video description let's just open this image it's kind of this industrial graffiti'd space which didn't match a little bit of what I had in my actual shot and if this is all starting to look a little bit too messy let's come back into the render properties let's expand the film options and enable transparent so this is going to not render the background itself but that light that environment map will still cast the light onto our cube if I now press there to go back into the camera view our cube now receives light from this environment map now it is a little bit too bright so I might go back into the world settings install this strength a little bit to maybe 0.5 but again during compositing we can fix up some of the lighting issues as well I also want to enable em with occlusion so the cube will cast a little bit of shadow on the ground and the background just by being close to it and I do want to set up another light because in my shot I kind of the Sun was up here on the right hand side which is why I've got some shadow underneath my feet so in my camera view or you can break out of that as well shift and a let's add a light I'm going to add an area light s scaled it up just a little bit G and zette to move it up and you may notice that well we don't actually have a shadow yet at all and it's because well I've disabled the visibility on the ground at the wall so let's enable the ground plane and the wall and you kind of start seeing a little bit of a shadow but we don't want to see the geometry let's select the back wall come into the object properties and let's come down here to visibility let's pop this open and when you're rendering objects in cycles you have two option here to enable a shadow catcher you don't have that in evey yet hopefully you'll get added soon let's nail the shadow catcher for the back wall and the object kind of vanished but it does to show the shadows that are being cast onto it let's select the ground and also enable the shadow capture option for that and now let me zoom in a little bit I hope you can see that can you see how this cube is actually casting a shadow here on the ground if you disable to keep that shadow is gone if you enable it that's casting a bit of a shadow and that is crucial to integrating a 3d object with your shot because that's what's going to make it believable right like the object is actually there in your scene and this is why it's also important then to essentially model your geometry in the scene as accurately as you can because if this cube moved forward here the shadow would kind of float above this ledge because I haven't modeled out the curb or you know the edge up here but again simple example here just note that it the light and the shadows on your 3d object that will make that effect work and sell and really feel like that 3d object is actually sitting in your shot but again keeping it simple for now let's zoom out again let's reselect that skylight I'm frantic right here come into the lab properties I'm going to pump this up a little bit more to maybe two three hundred watts maybe scale it up a little bit as well just it's a little bit more diffuse rotate that around a little bit and maybe I'll just move it up just a little bit further and I recommend that will probably work alright now we could continue on with this beautiful cube here for the intro of this to trial I replace this with the model of a barrel but you can obviously use whatever you want to now the cube is a bit too boring I don't want to go with a barrel because it's a bit heavier geometry and might not render as fast on your machine so let me just delete this cube for now shift and a and let's add a monkey mesh into it G and Z let's just move this up a little bit so here is my monkey hat you can rotate that around a little bit and that's a little really dull and boring so let's come into the material tab let's create a new material let's call this one monkey and none of this is necessary it'll just make the turtle a little bit more interesting for the base color let's click on this little circle here and I'm going to select an image texture hit open and after loaded this green metal rust for k-j pack pack from texture Haven and again link in the video description with all of the different maps in them which is really cool some wanted to select green metal rust defuse 4k hit open so that's going to assign that as a base color onto this monkey X I'm going to right click and select to shade smooth just so that this Susanne hat looks a little bit more interesting let me just zoom in a little bit so it's a bit easier to see what we're doing let's come down a little bit I want to make it a little bit more metallic that's right click onto the circle next specular let's just scroll all the way up and I hope they fix this menu at some point it'll be easy to select select image texture hit open green metal rust 4k and there's a specular map in here let's select that again it just adds a little bit more detail come down a little bit and for the roughness same thing let's click on this little circle here mouse wheel to scroll all the way back up I think you can just all just hover the mouse at the top image texture hit open Green metal rust and I think that there's a roughness one as well we could also add a bump map and other things but it's just getting a little bit too detailed how think this should do fine for the tutorial and you could just render this out right if I hit f12 now and render up my image I have the monkey yet on a transparent background but you can see it's got a shadow on the ground it's got a little bit of shadow for the wall here and let me just make this a bit smaller and that if you composite it on to the actual video footage should match really nicely into the scene to have a monkey sitting on top of your real footage with a shadow on the ground and a little bit on the wall so that's kind of the concept that's kind of the idea of how you composite 3d objects into your scene but lets us wrap this first part up a bit nicer I'll make this a bit more interesting first let's just add some physics so it looks like this object is actually just dropping out of the sky onto the actual geometry in our scene make sure you add a frame 0 let's grab the monkey hat G and zetas pull this all the way up just above and out of frame it's gonna press R and let's rotate this a little bit more randomly just so that the monkey starts out just a little bit more often at position let me actually switch back to material preview to so this whole thing renders out a little bit quicker and I don't if you want to see the back wall or the ground because it kind of makes it hard to see what my footage looks like so in my outliner let's come up into this filter tab let's enable this viewport switch right here so now we have this viewports which I'm going to disable it for the ground and the wall the objects will still be rendered they're just not going to be visible in the viewport so we can kind of see our monkey head now over on the right hand side I want to come into the physics settings and enable rigid body on this Suzanne monkey yet this is going to be active wait maybe I'll give it 15 kilos I want this a little bit more solid I want to leave everything else on default again you can kind of tweak this and fiddle with this anyway you want let's select the ground and because we don't see it in the viewport let's use the outliner for that let's select the ground and everything's disabled I think it's because I've disabled the viewport visibility yep there you go so let's add a rigidbody to the ground this is going to be passive because it's just the floor let's select the back wall enabled viewport visibility of rigidbody and let's make this passive and I'm pretty sure I can turn these ones off I don't think that should actually affect the physics but now let's just press space and play this back and there you go you've now got the monkey kind of bouncing on the ground and rolling over now I don't actually want the monkey to cannot be bouncing towards where I said I can't want it to drop and kind of stay where it is and for that you may just have to tweak some of the physics properties what I'm going to do is select my monkey head surface response bring up the friction also going to re select the ground and bring up the friction we select the monkey head maybe I'll rotate it a little bit as well and you may just have to experiment and just play this back a little bit yeah see I think that will work much better for now now you can see that it doesn't actually time up with when I'm flinching but we can fix all of that up in compositing I just want to make sure that the physics look alright so we've liturgies got the monkey head dropping onto the floor and is bouncing off right there and again once we render this out there'll be a nice shadow down here let's just come back to frame 0 let's go into the scene settings and in here you'll find this option for the rigidbody world which is for all of the physics and again I've covered how physics work in a totally separate triangle to drop you the link for that down in the video description if you're kind of new to all of that what I want to do is expand the cache down here make sure that my simulation start and end matches my frame from 0 to 250 and then I want to present baked and if this option isn't enabled make sure you save your file first so the big option will become available let's press bake and that has essentially baked in a pre calculated the physics we can scrub through this at will and this should review pretty nice and easy because all of that is now cached and safe with your farts we're not going to lose it and I'm actually pretty happy with this again you can keep tweaking this you can change the physics and again if you model out your geometry a little bit better than just you know these two flat objects you'll get something that we'll look a little more realistic but again we'll get to that a little bit later now the next thing you need to do is configure how you actually want to export the rendered images what I'm going to do is I'm going to come into the output settings and then my output let's define an actual path unless you want to dis dump it on your temp folder I'm going to create this render folders go in here let's give this a file name as well let's call this monkey drop underscore on blender we'll just add the frame numbers after that let's hit accept I'm going to write this out as a PNG sequence and do make sure that you enable RGB a which is red green blue and alpha so you render out this transparency channel otherwise if you go RGB the background will be black and you won't be able to composite this nicely so go RGBA and before you render out your final sequence I highly recommend come into the render properties and under the sampling options make sure you increase your sample rate for the final render maybe two to three hundredths to make sure that your final render looks nice and clean and not grainy and ugly and will actually fit into the final shot also expand the Advanced Options and make sure you enable this little stopwatch item just click on it next to the seed for the sampling this ensures that from frame to frame the sampling noise will differ and it won't look like static noise in the final render which will make it really hard to composite this into a real-life shot so just make sure that this is enabled so that it looks a lot more organic when you finally render it out and finally because we actually have a moving 3d object in our shot and if this was filmed with an actual camera there would be some motion blur on that object so in the render settings come down a little bit and make sure you enable the motion blur option here as well and now let's come back to the main menu select render render animation let's render out our final PNG sequence now this is going to take a little bit so let's just fade to black and come back when this is done and this is the final rendered out animation this is our monkey head falling down and colliding with this invisible ground plane that matches the geometry of the scene of the shot that we want to composite this image sequence into their shadows on the ground and on the wall behind it and again if you want more detail just you know put more effort into modeling out your 3d scene with more detail and it will look more realistic but for this part hopefully this is enough and in the next part we're going to look at compositing this animation back onto our original footage and blending everything together nicely but let's wrap this up for now and go back to the street and that's all there is to it if you enjoyed this video please hit that like button if you new here hit the subscribe button and because YouTube is a bit weird be sure to check that Bell to actually get notified if you want to support me in what I do in this channel be sure to check out all of the links down in the video description and as always thank you very much for watching and until next time I will see you later
Info
Channel: Surfaced Studio
Views: 248,979
Rating: undefined out of 5
Keywords: after effects, blender, tutorial, 3d objects, add 3d object to video, insert 3d object into video, compositing, destruction, physics, how to, instructions, visual effects, vfx, special effects, surfaced studio, environment map, shadow catcher, 3d camera tracker, combine 3d with video, adobe after effects, blender 2.8
Id: aA2XzTDad0A
Channel Id: undefined
Length: 27min 9sec (1629 seconds)
Published: Tue Feb 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.