Blender Camera Constraints

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone i'm adam kelly in this video i'm going to show you how to set up a camera that can follow a path and keep pointing at an object the entire time we'll also set up some very basic keyframe animations so that you can see what that looks like animated this was particularly useful for me while i was creating a synthetic data set so if that's something that you're seeking to do then make sure to check out the links in the description to more information about that so let's get started this is our camera this is our object this is just an animal that i was playing around with modeling i'm not currently using it in a project but i just thought it would be a more interesting thing to look at than a cube so what we'll do first is we're going to make our camera point at our object so as you may know if you move it around right now i just hit the g key you can see what i'm doing down here in the in the corner the g key it's not pointing at the object even if i move it around i'm going to right click to cancel that we would like it so that if i move it around the camera at least points at the object so that's pretty easy to do we go to the object constraints properties and we add a track to constraint and all this needs is a target so what we could do is set our target to be this object and if we do that it's going to point at the center of this object which happens to be right here at the base that's not really what i want i would rather that it tracked maybe somewhere up here so in order to do that we can create an empty object that's going to sort of represent where the camera points at so if we go to add empty and then you can choose any of these it really doesn't matter but i'm going to do a cube and then i'm going to rename this like track to [Music] empty just so that i know what it is and then all we have to do is move this to the place where we want it so i'm going to view this from the side and move this up so that was numpad 3 and then g to move it and now it's it's kind of pointing right there which is which is a little better then all i have to do is set this to our track to empty object so we just have to set the target now the first thing you'll notice is that the camera is not pointing at the thing so that's not good pretty easy to fix we just need to set our up axis to y in this case and then negative z for r2 you'll notice if i set it to positive z it actually points away from the object so that's kind of interesting maybe that would be useful in some case where you're trying to do the character's point of view or something so now we've got this thing that should track it and sure enough if we move it around then it's going to track our object which is great i would like to have a curve that i can animate along so that this can sort of circle the object so what we'll do here is we're going to create a new curve so add curve path and then if you look at it it just looks like a line for now so let's switch into edit mode we'll go tab we've got edit mode and i'm going to view it from the top and we can now move these points so that they create an interesting curve so i'm just going to quickly pick each point hit g and then move them so that they kind of follow an interesting path here okay so maybe it starts kind of further away and then circles and then ultimately gets a little closer and now we've got a nice close-up look of the face i also would like to select all these with the a key g z and move it up so that it's kind of in line with the face of the animal and who knows maybe i want to like move this up a little bit too so that we got kind of start up here and then kind of swoop in so this i want well i'll tab out of edit mode i want this to follow this and you might think okay well i'll just place a constraint directly between the two in my experience that doesn't really work very well so it's better to create a an empty object that follows the path and then make this a child of the empty so we're going to do i'm going to create an object with shift a this time same as picking it from the add menu up there it's just quicker so we'll go to empty and i'll do another cube this cube is going to be way too big so if we click here then we can change the size of it to 0.2 and that's going to be a much better size for this for following this path now we can create another constraint here and this one is going to be a follow path constraint and what we want to do is pick our path so you could pick it from here there's only one so it doesn't really matter or you can use the eyedropper and pick the path all right so now we've got this path that it's going to follow and you can mess with the offset and you can see that i'm not sure why it goes between 0 and negative 100 but that doesn't make much difference to us so it's going actually uh from zero to negative and then it follows this path so that's ultimately what we want it to do and we can also follow the curve first of all take a look you'll notice that the cube is not spinning at all it's not turning if we follow curve then it seems to follow this curve a little bit i'm not sure how important that is right now so we'll just turn that off now we need to make this sort of a child of this cube and one way you can do it is through the typical way of parenting objects to each other but another is the object constraint so what we'll do is we'll add another object constraint and this one's going to be a child of constraint and when i've played with this it seems to work a lot better or maybe only works if you move the child of constraint to be at the top before it starts tracking two then we just need to pick our object and you'll notice that it's kind of far off here in the distance that's because our offset here needs to be zero zero zero and by the way if this isn't showing at any point you can hit the n key and it will show it or hide it depending on whether it's visible or not so now i've got this cube that should follow this path and then so i'm going to mess with the offset i've got this empty here so i'm just going to call this camera container so that it's more obvious what i'm working with here and then i'll mess with the uh constraint and i get this i've had some weird things happen when the constraints are out of order or something like that and let's say you've got let me make sure i pick the right thing the camera here and you just switch this and for some reason it's just not working properly i've been able to select the camera hit g and kind of just wiggle it around and then right click and then sometimes that resets things i'm not sure what causes that but this seems to work pretty well so now we've got this view and if we view it from the camera view and we go to our camera container and we mess with the offset we can kind of see this this view where we're coming in so that's that's kind of it for how to set up these constraints now just to show you really quick if we want to make this follow our path and animate let's say we take it back to zero then we can set a keyframe so we're on frame one right here so hover your mouse over this little offset thing hit i and then we're going to move it out maybe 100 and set this to negative 100 and hit i again and now if we hit zero to whoops up here hit zero to see this from the camera's point of view if we cycle through you can see that it's now animating along here as we move through the animations all right i hope this video has been helpful i mentioned at the beginning that i was using this for creating synthetic data sets so if you've never heard of that term before basically what it means is training artificial intelligence to understand images by only giving it images that have been rendered in a tool like blender so we can 3d render an animation or a scene or an object from lots of different angles and then use those renders to train artificial intelligence so if that sounds really cool and interesting to you then check out the extra links in the description and i'm going to teach a lot more stuff on that topic over the coming months you
Info
Channel: Immersive Limit
Views: 198,486
Rating: undefined out of 5
Keywords: blender, blender 3d, camera path, follow path, track to object, blender track to, blender constraint, blender camera constraint, camera constraint, blender constraints, follow camera, blender orbit object, camera path blender, camera animation, animate camera, synthetic, 3d, synthetic dataset, dataset, computer vision, ai, artificial intelligence, machine learning, ml, deep learning, blender datasetimmersive limit, custom dataset, ai training, image dataset
Id: LeYUk3Ob5W8
Channel Id: undefined
Length: 9min 43sec (583 seconds)
Published: Mon Aug 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.