How to Properly Export a 3D Camera from After Effects to Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to go over how to properly export your After Effects 3D camera into blender there's one setting that everybody messes up and I'm going to tell you what it is okay so here we are inside of After Effects and then we'll drag our footage into a new comp and this is 9x6 footage shot on my iPhone the process is the same for 169 footage the first thing we're going to do is do a 3D camera track on our footage so I'll just right click on our footage go to track and track camera and we'll let this do its thing and while this is going I just want to mention one thing this is not the only way to do this this is just my preferred method for this type of shot you can use whatever you want okay so this is done tracking there's a couple things that we can do here we can move our Mouse over and analyze the disc that appears there and whatever looks good like it's locked onto the surface and not slanted so maybe right here if you just click there you can see it selected three tracking points so that's one option the other option is we can click and drag and lasso select a bunch of these trackers here and it'll use the average of all those I think I'm just going to select the three cuz I think that looks good that's that looks like it's locked onto the surface and I'll rightclick now the one thing that I think a lot of people are forgetting to do that's preventing the ground plane from actually being aligned with the world grid inside of blender is that they don't select set ground plane and origin so if you don't do this the camera and the ground plane will come in all messed up not aligned to the world grid inside of blender so when you right click just select that then right click again and do create solid and camera and if you want you can create some null objects here so create three null objects it's not necessary to create them and the reason why we're creating a solid is that that's going to be our ground plane inside a blender now if for some reason you forget to set ground plane in origin or you just for some reason you can't do it then I'll show you a manual option inside of Blender at the end of the video so now we'll just go down to our camera here I'll press U on the keyboard or you can just twirl down the transform here and select the position and orientation and hit contrl C to copy them or just go to edit copy and we'll switch over to blender here we are inside a blender I'm just going to open up the side menu here to show the ae2 blend menu the only thing we need to do from here is click on create camera and what that's going to do is paste in our camera and of course it's all the way over here so that's actually a pretty big scene because the camera is all the way out here so one of the things I can do is just undo this and instead of dealing with a very large scene we can do is actually set the scale here so I'm going to set the scale to 1,000 instead of 100 and then I'm going to create camera so now you can see here that the camera is set right there and you can see the camera's animated and everything I'm actually going to select the camera and I'll just scale it up so that we can see it better one thing we need to fix is the key frame offset so if I select this parent this is what the camera is parented to you can see it here the camera is parented to an empty object if we zoom in here we can see that the key frames start on frame zero that's because after effects starts on frame zero but blender starts on frame one so what we need to do is just shift this over one frame okay so that's all set before I go further I actually want to adjust my camera settings so we want to match our footage so I'm just going to do 1080 by 1920 which is what our footage is and then another thing to note is go to your frame rate and switch it to 24 typically it would be 2398 if you're shooting on most professional film cameras but I shot on my iPhone and it does 24 natively so we'll just make sure to use 24 so that the track is accurate going to switch back to After Effects and I'm going to click on the plane we're going to twirl down the properties and just go into transform and select the first four so Anchor Point position scale and orientation those are the four that you want we can copy that or just go to edit copy switch back over to blender and hit create plane now watch the world grid and the origin of the world grid so when I hit create plane it creates a plane at the center there it's hard to see so I'm just going to scale it up so there we go and I'm going to select the empty so the ground plane and the camera are now aligned we have this extra camera over here that blender created by default so I'm just going to delete that cuz we don't need it so if I go into our camera you can see that this is what the camera track looks [Music] like now it's kind of hard to judge if this is accurate so what we need to do is actually select the camera go into the camera settings here and one last setting that we need to fix in order to make sure that our track is accurate is the focal length right now it's set at 50 as the default and this is going to cause some problems with our track our track is going to be off so let's load up the footage and take a look at that before we switch this so I'll click on background images add image movie clip open and load that in and I'm just going to change this so that the opacity is up all the way so that we don't see through it and I'm going to add an hdri so that we can actually see this because if I just switch over to the rendered view you can see here that it's working off of this default light so that's looking pretty good now the only thing is that we can't see through the hdri so we have to go to our scene settings I have it mapped to my quick favorites so I just press q and then I have transparent here but if you don't have that if you didn't set that up then you can just go into your scene settings scroll down to film over here and then click on transparent and that will enable that and then what we can do is select the ground plane go into the properties here and go to visibility and select Shadow catcher so that'll just make it a shadow catcher it'll be see-through and the only thing that'll appear there is the shadow we've done a bunch of stuff but I just want to remind you that we didn't change the focal length here it's still at 50 mm so this track is most likely going to be off so you can see toward the end here you can really see it shifting if I zoom in here you can really see like the person's floating there and that's because our focal length is wrong so we want to go back in select our 3D camera here and bring up the camera properties so layer camera settings or just control shift Y which is what I typically use and then if we take a look at the focal length here it's actually 308574 so we'll cop that go back to blender and paste that focal length into the camera focal length here now if we scrub the timeline we can see that that track is locked on there this is the area that was giving us problems before but that looks pretty solid let's just move around here a little bit and see yeah yeah so that's that's pretty solid I like that track one final thing is that this male human model is actually supposed to be 6 ft tall and he's looking a little small compared to the rest of the scene so I'm going to show you a trick to fix the world scale this is going to get you roughly in the area if you want to fix it manually by I here's a good trick we'll come into our 3D viewport and we'll create an empty make sure the empty is at the center of the world origin what we want to do is take the empty that the plane is parented to so this one and we also want to take the empty that the camera is parented to so this one so just shift click and then one more time shift click on that empty that we just created here and then hit contrl p and we can parent that to this empty so now the plane and the camera are parented to this empty that we just created and what we can do here is actually scale it up and down and as you can see they all scale and this is not going to mess up our track if we look at it inside of the camera if I hit s and scale this up and down you can see that our world and the guy is scan you keep an eye on the grid in the background you can see that that's moving so let's say I don't know maybe around there is the proper scale roughly now the good thing about this is that because both of these the camera and the plane are parented to this empty whatever transforms we make are not going to mess up the track so we can actually rotate this like this and even though it's rotated it's still locked on it's just not aligned to the world origin so don't do that but so that's just to prove my point that we're not really going to mess up the track so the reason why it doesn't mess up our track is because we're doing the same transform to the camera as well as the plane it's always going to be locked on the only thing we're changing is the world around the plane and the camera so that's a good way to adjust the scene to scale if the scale is not right hey guys sorry to interrupt this video I just want to remind you to like And subscribe so you don't miss out on future videos including future film making and visual effects tutorials all right let's jump back in so now I want to show you what happens if we don't click on set ground plane and origin so we'll start over from the beginning here and I'll retrack our footage okay so we have our tracking markers here and we'll just select a point on the ground that's looking good so I'm going to right click again we're not going to select set ground plane and origin we're just going to create the solid and the camera so let's do that and if we scrub through here we can see that that's locked on there it's looking good so again we'll copy over our camera data so position and orientation copy or just edit copy come over to blend let's get rid of the camera and the light and we'll open up the menu here and set this to 1,000 scroll up and create camera click on that you can see the camera imported if we just kind of move the playhead it jumps into player I don't know why it does that but again we have to change the offset here so just move all the key frames over one frame there we go immediately you can see that the camera is just in the wrong spot it's below the world grid and it's facing straight on when it should be looking down at a ground plane so as I move this around you can see already how bad the alignment is so we'll switch back to After Effects and we'll grab our solid and we'll grab the transform data so again Anchor Point through orientation copy that and then click on create plane let me move this view so you can see where the plane comes in so create plane and we're going to actually scale up the plane so you can see it immediately you can see that the plane is just all messed up it's not flat with the world grid it's in the wrong spot the plane is tilted instead of the camera so let's set up our footage inside the camera and see what this looks like so I'm just going to change the settings here so 1080 by 1920 switch the frame rate to 24 go into our camera settings import the background movie clip we'll go into the camera and we'll just change the opacity bring that up to one I won't make it a shadow catcher yet so as you can see here this is still kind of messed up it's kind of floating as you can see here if I just zoom in you can see the plane looks like it's floating right there and again that's because we didn't switch our focal length so let's change our focal length we'll go back to After Effects and bring up the camera settings copy the focal length here so it's 30.8 574 switch over paste it into the focal length of the camera here and now if we look at our footage this actually looks locked on to the ground so the track is actually still good the only problem is that it's not flushed to the surface of the world grid so so always click on set ground plane and origin but if you again if you can't I'll show you how to fix this so so what we want to do is just like last time we want to create an empty at the center of the world grid and we want to select the empty that the camera is parented to and the empty that the solid is parented to and then finally we'll select the empty that we just created and hit contrl P so same process as last time but now we're going to have to do a little tweaking to fix this scene so I'm going to press one on the keyboard to go into the front view and you can see here that this is the x axis so we want to align this plane with the x- axis and then also with the Y AIS and we'll get to that in a second so if you remember from earlier because the camera and the plane are parented to this empty here we were able to make adjustments and not mess up the track right we were able to rotate it and everything and it just rotated the world around the track but the track wasn't affected at all what we could do is press one on the keyboard and actually make some adjustments here so that this plane is flush with the X and Y AIS so what we're going to do is select this empty that we created and then we can start rotating this so we'll hit RX and again we pressed one on the keyboard so the x axis is going left to right here that's very important so now we want to rotate on that axis so we'll hit RX and we'll just kind of spin this until that plane disappears and then we'll hit gz and move it up until it aligns with the x axis and one thing to note is that we can't see the plane right now but we can see the empty that it's parented to and if I jump out here you can see that that empty is right in the center of the plane we'll press one to jump back into this front view and we'll just align we have to zoom all the way in for this so we're just um we're just going to move this up so gz and align that empty with the x axis and you can see here that we can see the plane so we want to rotate it a bit more so RX and if you hold shift you can instead of making these big rotational movements we can hold shift and it'll do smaller increments here so let's just um rotate this until it kind of disappears I'm holding shift to get a more fine tune rotation and roughly there so we'll hit gz bring this up if you notice here this is the empty so use that as a guide this is the empty that the plane is attached to to so we'll go back and select that world master empty that we created and I'll just change the name here to master empty so you know what I'm talking about we'll select that and we'll zoom in all the way and let's just fix this so RX and we'll just rotate this until it disappears so roughly there so you can see that line and we'll just hit G Z and bring this up and make sure it's aligned with the x-axis so now that that's aligned we can press three and go over to the Y AIS we'll zoom out here and let's see where we're at so this is actually pretty good but we can see that this is the plane here and it's not flat so we'll select our Master empty over here zoom in we will press r y this time now remember by pressing three on the keyboard we're actually in the right orthographic View and this is the horizontal line here is the Y AIS and you can tell by the color so we'll select our Master empty and hit r y and now we can you can see that we can just rotate this until it flattens itself out and we'll have to zoom in to get even more accurate so roughly here and hit r y again and just rotate this until this kind of disappears right there and then we can hit gz and just bring it up now we can't see it so we'll have to rely on the empty that the plane is parented to so right there we'll zoom in all the way so we can get this accurate and hit make sure our Master empty is selected hit gz and just bring it up and align it to the Y just keep on zooming in so we can get as accurate as possible [Music] and right there okay now we'll press one on the keyboard and we'll find zoom out to find everything here so so here it's looking like that plane is also aligned to the x-axis cuz we're zooming in and we don't see it so that's a good thing all right perfect so now if I go back out into our perspective view you can see that it's actually flat and line to the surface now the only thing is that it's not at the center so what I can do is just hit G and then shift Z to prevent it from moving on the z-axis and we can just move this into place here and then I can hit one on the keyboard to make sure that this empty which is again that's the one that the plane is parented to so one make sure that that's aligned with the center here make sure your master empty is selected GX to move it on the x axis and we'll just kind of align that to the center zoom in as much as you can to get this accurate GX and then just shift and I'm holding shift to get a more fine movement so right there I think is perfectly aligned and then I'm going to hit three to make sure that the Y AIS is aligned here and it's close it's close so make sure the master empty selected press gy and we'll just move this now into place you can see that that's the empty that the plane is parented to so we'll just align that and then we'll zoom in zoom in all the way gy and just move this around until we get it right in the center there perfect and and now we can see that our camera and our plane are aligned to the world origin the camera is looking good it's pointed down at the plane instead of the plane being rotated and if we jump into our camera we can see that that track is locked on there and now we have the ground plane aligned with the world grid so one final step is that the scene scale is a little bit off so this is where it gets a little bit tricky because we can't just take our Master empty here and scale this technically we could but it's going to change the position of everything right so as I'm scaling you can see a lot of things are happening that we don't want so I'm just going to undo that and what I'm going to do here instead is create another empty we'll just make it make this a cube just shrink that down and we'll name this master scale empty so then we can click on the master empty here and I probably should have named this Master position rotation empty again the master scale empty you want to make sure that it's created where the center of it is in the middle of the world origin so we'll select the position and rotation empty and then shift click the master scale empty and then hit contrl p and parent that and now we can select the master scale empty going to our camera view and we can scale this and this is going to scale it around the world origin instead of scaling it around this point here which is sort of just some arbitrary floating Point here so this is going to make our lives a lot easier so we can just scale this and I'm going to say roughly I don't know let's say roughly there is good when we scrub the timeline you can see that that track is still locked on there so one final thing we can do is we can just select all these empties and everything that's parented to it so we can kind of let's say the master scale empty we can just go into item here and under transform lock everything we can go and select the master position rotation empty lock everything there so we can't move it uh we can select our camera transform empty lock everything there and we can also select our camera lock that we can do the same thing for the plane empty lock that and the plane as well so just lock everything so that we can't accidentally move it we're pretty happy with with this track so now we can start adding all these different things to the scene and now we can start adding all these different things to the scene and we should be able to have that kind of locked onto the ground because our tracking data is all set if you want to use this plane as a shadow catcher you're going to have to scale it up so we can just go back into the plane unlock it we can scale everything up and then go in here go to visibility and click sh Shadow catcher so now all of this is going to be a shadow catcher we'll add an hdri so this plane's going to be a shadow catcher we'll make it transparent and you can see that we have our shadows and this track is looking good nothing's slipping it's looking good so that's another way we can flatten the ground plane to the world grid it's pretty timeconsuming to do that so I would just suggest going into after effects and always selecting set ground plane in origin but if you forget or for some reason you can't do that then this method I just showed you is a good way way to align the ground plane to the world grid and like I said earlier you can use whatever method you want you can use the blender tracker you can use a different 3D camera tracker it's all up to you whatever you feel comfortable with in the end it doesn't matter as long as you get a solid track so use whatever you feel comfortable with but if you were curious about using After Effects and the ae2 blend script to get your camera and ground plane data into blender from After Effects then this is a good method to do that I hope you liked this video if you did please like And subscribe once again my name is Paul Doo and I'll see you next [Applause] [Music] time
Info
Channel: Paul Del Vecchio
Views: 2,620
Rating: undefined out of 5
Keywords: 3d camera after effects to blender, after effects 3d camera tracker to blender, export after effects 3d camera tracking to blender, 3d camera tracking after effects, 3d camera tracking blender, 3d camera tracking software, after effects tutorial, 3d camera tracking text in after effects, 3d camera tracking video, 3d camera tracking sofware, 3d camera tracking after effects to blender, 3d camera tracking after effects tutorial, blender 3d camera tracking masterclass
Id: ep1D1QlWdXw
Channel Id: undefined
Length: 22min 44sec (1364 seconds)
Published: Wed Jan 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.