Cinema 4D: The Motion Tracker

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Applause] hi guys it's Sam for digital me and today I want to talk about the motion tracker in cinema 4d r17 now before I start if you're wanting to track your footage from that you'll then solve a 3d camera and then that'll allow you to drop 3d objects into your scene and it matched the camera movement and give the illusion that your 3d object is within that scene but with a lot of lenses when you take footage they'll be some slight bending and warping of what amenity vertical and horizontal lines because of the lens so in cinema 4d r17 if you go up to tools and go to the lens distortion you'll get this tool there so this is where you drop your image that you've taken with your camera and it will obviously show you your distortion now I've got a picture here that demonstrates this is obviously a fisheye lens but this is the kind of image you'll be that I'm talking about so basically what you do is you pop your image in here and this is the tool that you can use to straighten out your image this will give you a lot more of an accurate track now I'm not actually going to go into um into the lens distortion tool because the camera that I'm using I'm using my phone it's a Nokia Lumia 920 and there isn't a lot of distortion on there so I'd like to point you if you are getting distortion point you in the direction of sinner versus Vimeo channel and it's got a great QuickStart guide on the lens distortion tool for under store in wide-angle fridge and that will give you everything you need to know about correcting lens distortion and adding it back into your 3d so give that out the wait let's crack on so we need to track our fridge up here we've got motion tracker if I select this and select the motion track I've got this object in my scene now now on footage it's asking for some footage here so this is my JPEG sequence my original footage was actually this let me clear this I'll do it from here just so you can see just turn this down so this is my original footage not particularly interesting but um cinema 4d doesn't particularly like him you to drop video files in here it isn't mp4 and it will play it's just not very quick so why did was I drop this piece of footage into Premiere Pro you can use After Effects or what any other piece of software they use and I exported it as a JPEG sweet sequence because cinema 4d definitely prefer prefers that to a video file so let's open up my secrets click on the first one open it we'll bring that in now you can see this resampling bar and it's basically saying thirty-three point three three three percent so that's actually three percent of the sort of clarity if you like you of the quality of the original so if we went this right back up to a hundred that is 100 percent of the quality of the JPEG and as you see if I break it down to five percent it's not very good there sometimes you might want to do that and others not in this instance I don't want to do that I'm going to put it right up to 100 percent also something to keep in mind I know my footage is 24 frames a second so I'm gonna go all the way to my project Saenz and you as you can see it's FPS is 30 frames a second so I'm gonna set that to 24 and in my render settings if we go to render settings its 1920 by 1080 I haven't put that in what happens is in the motion track when you drop your fridge in it detects another resolution of it but again it doesn't detect the framerate it doesn't change the renders framerate so I'm gonna well change that to 24 because I know that's what my fur is so now we're all set there we can get on with the tracking okay so what was talking about before about the lens correction you can actually save that as a profile once you've saw it there and you can drop that file here in my case I don't need to do that again you can look at the video that I talked about earlier on Cinna vs. give me a page I think that's everything we need to worry about on this tab next tab is 2d tracking so number of tracks 300 I'm because of the resolution of the footage I'm actually going to put this up because we're gonna we're going to actually get rid of tracks that have got errors or they don't accelerate properly all that kind of stuff so I'm gonna actually crank this up to 1,500 it should be enough minimum space and this is just the space in between the tracking points so you can say how close the fact let's have a look I don't know what that's in in pixels maybe this Center finds minimum distance in pixels the tracks should have two neighboring tracks so 19 pixels there is the minimum distance and just round that off to 20 so you can actually manually track missile options here as well do you file patent size but we don't need to worry about these too I'm something's gonna stay on the automatic track in here and then we've got the auto track button so this will basically track through the footage and create tracks based on points they can track so what I'm going to do is go about formation tracker 2d tracking tab I'm gonna move my timeline indicator to somewhere in the middle because this means that what it would do is it will track through the frames here and then track through the frames backwards remember which way around it is it's over that way then that way but it will give you a good sort of point in the middle where but will the tracks are there and correct so somewhere in the middle that's fine impress auto track as you can see at the bottom here we can see this process in frame 1 okay so it's actually going up so it's started here and it's actually process and the frames upwards when it gets to the end which will be shortly so check yeah I did say that 24 frames good yeah so I should get all the way up there new frames are actually in this okay sorry for my ear guys baby gate it's a process in frame so it's creating a load of tracks on points of interest probably the corners of here would be a good place to put tracks and when you will a track cinema automatically sort of identifies these points and it will then try and track those points of interest as the footage moves throughout so me ain't got long now a few more frames here I could have put me done with making the footage a little bit short or really but um there we go so now it's actually processed the frames it then goes back over them just to check so like another pass really you and there we go we have finished so you can see these tracking points now so if I scrub through these tracks I start to the floors you can see up here they will be tracking up a place and then it will disappear and then you know you can see a lot of sparkling there but there'll be other tracks such as let's pick this one on the floor here where we'll scrub through and it doesn't disappear it stays with it so all in all we got our tracking points now from these tracking points we can actually clean up a lot of these tracking points actually so let's let's deal with that first go to the motion tracker we'll go to the graph view and this is I think this is also new inner hour 17 as well this is basically it gives you am I'm just gonna hit H to frame everything and you can actually stretch these out and as you can see here there's a load of red in here red is a bad track green is good so really what we want to do is eliminate the red I actually prefer to work in this view up here if we go up here you can click this and you got like this sort of graph view and just do this if we click on this error threshold here and you can see that it puts a red line on our graph and it basically eliminates any points that lie above this threshold and we can actually lower this so if we lower it to 14 actually I'm not just put it up to 15 it crushes down a lot of the errors though really we were having so let's just get rid of the graph from it you can see there's a lot less tracking points now and but the ones that are left are far more accurate tracks minimum lymph frames so you can say that any track that lasts 15 frames or less is eliminated and I think I'm like tweak this fresh out down to 10 and see see what kind of result get there it's not bad yeah I think I'll leave it at 10 and then yeah I'll leave it at that okay so you got to reconstruction now basically what happens here is the way that cinema 4d solves the camera it looks at the relationship between points so here you can see this point in relation to this point here and how it rotates around it and then it takes this relationship and looks at all the other points basically all their relationships to each other and it works out the parallax that's happening between them and based on that information that's how it solves the camera so if we go back to the beginning reconstruction with full three 3d construction the focal length now I don't know it but I'm gonna seem its constant and I don't know what the sensor size is either known constant and then but constant unknown I don't even know if the focal length is a so I'm just gonna click on unknown actually and see what result we get so on the 3d solver so as you can see at the bottom now it says running 3d solver and and this probably going to take a couple of minutes so what I might do is uh sort of pause it here for you and then come back to you in a sec okay so we're back and it's ER itself the camera let me just get back in here so this is what our scene looks like why can't I I'm just having a bit of a mare what the looks of things okay there we go okay so we can see from this picture these green spots here they are obviously our ground plane but they're not lying flat on the floor if we go into our camera view this is what it looks like sound to be self this so first of all I'm going to click on the motion tracker right click go down to motion tracker tags and I'm gonna go to a plane our constraint and it will give me this triangle with three points on it and it's basically gonna it's basically asking what is the plane the floor plane so I'm gonna put this spot here and as you can see in here it brings up the the track that I've connected that point to and this is green which basically means it's a good track if it was red you probably wouldn't want to put that point on it because it could be jumping around or whatever but we actually eliminated you know quite a lot of those bad tracks earlier with the EMF threshold although you can see quite a lot of red in here still so I could have maybe brought that down a little bit lower but I think all three of these tracks are gonna yet the real green they're all pretty good so that basically [Music] features define plane that's correct and then he wants to know what direction is so I've put this on the floor so Y Direction Y is usually up well it's always up in cinema 4d so now we've done that you can see that it's flattened it out in our world now which is great okay so the next step is we want to tell cinema4d that one of these points in our room is world zero I'm tempted to choose this point here because it's nice in the middle of our scene so right click on the motion tracker motion tracker tags position constraint now it will create this dot here I'm gonna choose this this one here our target appears here it's green feature to position your leader on them you can see that our if I click off of this our grid is laying on here now and it's sticking pretty well everything's moving along yeah it looks fine ok what if you'd would like to line our grid up so they actually sort of follows the floor that could be something that we want to do so you go to motion tracker again right click go to motion tracker tags and then vector constraint so it will create this tag here and it'll create this line with two points I'm gonna use the edge of this I'm gonna put that there I'm gonna put that there so in this direction you can see this line is in line with the lines of the floor now features to find Direction axis unknown I'm gonna make this the x-axis so now that I've chosen that the x-axis runs this way so if I click off our grid is more aligned with our floor now it's a little bit off there and all in all I'd say that's not bad and if we wanted to if we really wanted to we can to choose some other points so I could it oh I think I've chosen yeah I need to actually choose the tag that helped there we go something I can grab this and say bring it down to there's a pretty good point and grab the other end and put that up here to this point I'm just saying that's our x-axis and now our grid it's kind of snapping along I find detected a little bit of sliding there actually so what I'm gonna do is I think I want to leave it where it was that was a that was good enough frozen we know the tracking point of a good as well say where yeah that's pretty good Brutus is stuck there excellent okay now what if we render this obviously you know it renders nothing because this is all part of the motion tracker say if we click on the motion tracker and go to footage scroll down to the bottom it's got this create background object and if I hit that you can see these create the background is put this material on it and this material is um our footage in the color Channel and if I open this up you can see this call these frames near in the movie framerate is 24 so that's correct and now if I scrub through and hit render actually renders that back plate South great now we've got that in our scene and we've actually solved our camera and we're happy with the solve we can actually grab our solved camera pull out the motion tracker and delete the motion tracker and the UI features we no longer need them so you can see that you've got everything that we need there okay so if I come out the camera a minute and turn off the background what I can do is where where we created a point earlier world zero I selected that a tracking point and told you there is weld zero that helps because now when we create an object it will come in a world zero and if I'll just come out the camera here and turn off the background you know it's the event of a side view so this line here is actually where the floor is so our sphere is actually half in and half out the floor so I went back to my camera turned the background on it's probably this for you we need isn't it and then scrub through it actually looked like our ball is slipping over the surface because it's not actually at zero so again if we come out of this view let's go to frame default then we get bumped idiot then go to this view select our sphere we know the radius is a hundred percent me isn't a the radius is obviously half the total width for sphere so you can go to coordinates and type the same in here hundred centimeters and it will sit directly on the floor so now when we go back to our solved camera you don't want to be moving it up and down because it's actually um we had some kind of shifting somewhere there we go I spell so yeah so now this is sat on the floor when we scrub through now actually appears like it's just sat on the floor there and everything's fine so now we were into that this obviously doesn't look like it's in the scene because it's not being lit correctly it's not being lit the same way that this room was lit when the footage was taken so how can we approximate this well we can set up lights and so up here I know there's a window here and off screen here there's another window in this direction so I could set up lights there area lights to simulate the light spilling through the windows but what I did is I created if I just go to I created a 360 image it's pretty rough and you can see some you know I used the oh I cracked sorry the content-aware fill in Photoshop and you can see these lines here but for the purposes of light in our scene this is absolutely fine I'll actually use the app on my phone called Photosynth by Microsoft it's actually discontinued now the actual phone app but you can actually go on photo simps website and you can actually stitch photos together there there's also many other applications that do the same thing so if you can take photos of your room that gives you a much so accurate lying much more accurate lighting then well maybe not much more than setting up lights but it's definitely a time-saving so what I'm going to do is I'm gonna create a material open it up on but I'm gonna call this sky and we're gonna turn off my color and reflect in his channels and then activate the luminance channel and it's inside this though I'm going to dump my 360 image now I'm just going to turn off this background for a moment come out of my camera and I'm gonna create a sky object and I'm gonna dump this on my sky object boom obviously the resolution of the 360 in the eddo isn't very good so I'm going to go to the material editor drop down the D foul and choose 2048 by 2048 I think you can even choose bigger than that but I think it's needed though I'm gonna go back into my camera for you and I'm actually going to rotate my sky so I know from personal experience that let's have a look okay so that's actually gonna match that windows over here which is about where that is that'll do for now and obviously when a render I don't want to see that sky object on I see my background so if I on how the background and render again I'm still seeing my sky object so I'm going to right click on my sky objects and my 4d tags go down to compositing and I'm gonna take off seem like camera so the sky objects still there but it can't be seen by the camera and again I can see my background now right so how do we use the sky object with this aluminum material to light the scene well go open up my render settings first of all I'm gonna um turn it to physical render because I find they get better results with that also the depth of field and motion blur is a lot more accurate so if I click on physical my so first thing I'm going to do and as the camera moves it will you can actually see in the footage actually if you will look at this that you know when it moves faster there's some slight motion blur and we want that to be on our 3d object as well so I'm gonna turn on the motion blur for the settings I'm going to leave it in adaptive and put it to automatic so basically what this does is where it needs to do more it will do more it needs to do less it will do that and this sheriff shading error threshold and me down to 15% that should be enough I am gonna put some ambient occlusion in the scene and I find that this sitting here isn't quite enough so I'm gonna back down to four it's going to save make sure I ain't gonna save out anything no it's not and the output is this big just so I can fit it on the screen and it'd be quick I'm gonna lock the ratio of this bit drop this down to 800 it'll take less time yep that seems all good yeah obviously it's going to be moving footage so the filter for the anti amazing aliasing even I'm gonna put to animation okay I think that should do is now when I render not a lot happens because I haven't added global illumination so go back to render settings go to effect hit global illumination I'm gonna leave these settings for now they'll do while we're arriving a look and when I hit render is going to calculate the global illumination and everything else and you can see that the lighting for this is a lot more natural but obviously if we hide the background and say the sky is visible it's gonna be taking all the information from this guy to like the bottom of it but really there's a there's a floor there so what we're gonna do about that alone I'm gonna make sure my sky isn't seen by camera again go to my background object and unhide that and I'm actually gonna put a plane in now the plane is automatically created 0-0 so I'm gonna make this big I'm gonna make this and they're say three thousand centimeters that's probably a little bit overkill but let's try tooth 2500 still I could kill and does it start coming in okay that should be enough then 1500 and do the same for the height it's not quite enough shift up here and that should be enough for what we need it for and if I render in the viewport now you can see that it's calculating the bounces off the floor and everything but now our floor is obscuring the background so what we actually want to do is select the plane I'm going to rename that floor actually I'm going to right-click on this cinema 4d tags compositing tag I mean the compositing tag you've got compositing for background because we this is what we want to see behind it so if we hit that I'm pretty sure they will still render as a floor yeah that's right but our floor also needs this background in fact I'm Lily named the motion tracker material to background so it's a bit more clear and we drag that onto our floor obviously the protect the projection type isn't correct I'm just gonna have a little sip a drink cause I'm getting a bit dry lovely and we want to set the projection type in the material tag to frontal and there you go now it matches up I'll go back to the tag and take off this compositing for background just so I can show you what it would look like normally you can see a huge line at the edge there and obviously it breaks the illusion but if I take that on and render he's blending with the background but not only does it blend in with the background it is still calculates the GI on the floor and it's even created a little bit of shadow underneath the ball itself there [Music] so next step let's add some ambient occlusion for you go to our render scenes effect ambient occlusion I will just leave those sense as they are now just take a little render you can see there's a little bit more occlusion going on on a floor there in fact let's start rendering these out to the picture viewer and then we can compare them to each other so that's we then be an occlusion and this one's that without so if I flip between them there you can see that that one's definitely a lot darker on the floor maybe a little too dark but we could easily combat that by going back to our render settings notice the ambient occlusion tab turning it on and raining in the white a little bit pushing the white into this all like the black zone up there just render that out again so let's get rid of that middle one right click on that and remove image yes I wanna remove it it's there we go a little bit light a little bit more soul to Iquitos that for the time being right let's create a another material pull this sphere I'm just gonna color it red now do ya it's deeply saturated the color we can move up a little bit so it's a bit more vibrant gets the reflections Channel you see that this got this white specular on it the default specular you know it can simulate you know something's got a white specular because of roughness or whatever it's good way of simulating that fast I'm gonna remove it I prefer to I think you get a lot more of a realistic result if you earn use actual reflection so I've chose my reflection here obviously looks like a perfect mirror at the moment you go down to a layer of for now Fresnel a dialect right the difference between these is a dielectric is something like water or plastic a nonmetal pretty much and a conductor will be a male strictly always the case bit and that's a good rule of thumb and we'll give it the index of refraction of water that'll be fine and then we can whack this on our object you know render because it's a reflective material now even though the sky is invisible to camera because if it was we wouldn't see our lovely back player it's still visible to all this other stuff raised GI transparency refraction and reflection that's the important one in the case of this material because it's reflecting our our sky material which helps ground the object in the room and not so that that don't look half bad I mean if we scoot forward a bit and render again that's not half bad say that's pretty good what I am gonna do is I'm gonna add a displacer I'm like it under my sphere object and choose the display so go to shading open this up and choose noise and then I'm gonna go in and select actually so I can see the actual subdivision of this I'm gonna change my display to ground shading lines and now I can see the actual mesh of the sphere there and so I get better idea of what this noise is I'm going to sphere and YX segments up to it might be 500 there we go that's better go back to the display sir go into the noise and then choose what time for noise you can choose it from a list like this or you can hit this little arrow and you actually get a pictorial representation of what that noise is meant to be so I'm gonna choose that one for the sake of argument actually that's quite let's have a little look-see see what we can see that's quite maybe if we actually go to the displacer go to object we can actually ramp down the the amount a displacement that's taking place I'd say seven is enough there and what I might do select my sphere hold down alt and click on this the subdivision surface and they'll put it in one and as you can see there I'm gonna go back to my other display motor you can get a better idea you've got all kinds of em knob leanness going on there now see some pinching at the top there so what I'm gonna do is go back to this you can see this turnoff the subdivision just so you can see the bit bear on a slip my sphere and actually choose the hexahedron method because it keeps quads and you don't get as much pinching it looks like far more uniform shape so if I render this now yeah that's a pretty good result okay that's good now if I go to this displacer hugging that I can take my lines off now again and I've done this a few times in other tutorials but you should press the end button you get a list of options if you move you keep your mouse cursor will disappear but you can see the ground shade in there is a and go out shading lines is B so NB na it's just a nice quick way of doing it okay I say choose the displacer got a shade in and it's white noise and scroll down a little bit there's a this value here called animation so if I hit that and then go back to the beginning and play you'll see there are we getting some movement the noise has been animated there it's actually quite slow so what I'm gonna do is if you hold this down and we're all frames is select that you can see that all frames isn't no longer selected so basically all skip frames to make sure that the performance is bow you can see that's running a lot Dino it's probably because I'm recording this at the same time who knows I'd say that that movement on the bull is probably a little bit too fast so I'm going to take this animation speed and make it point five and there we go a lot more self so there you have it and in places where [Music] you can't really see it here I I think that with motion blur if you go to the physical being the render settings got it turned on but it doesn't look like it's doing much you know someone can correct me if I'm wrong but I'm pretty sure when you render to the view poor it doesn't actually show motion blur I may be wrong there but I think it does in the picture viewer so we just render it there obviously you'd probably just want to render out the 3d elements of this and then dump it on your plate ie you're in original footage inside of compositing software such as After Effects so that'd be the way to go about that but um that's how you get a pretty good result there that's not bad at all now I actually went through this once before I started the tutorial and I actually made a video this is the final render of it I think you'll agree that's not bad at all this tracking well is sticking to the floor you know for all intents and purposes it looks like it's there in the scene I think one thing I did do actually which is worth mentioning I didn't think that the sky object was actually pushing enough light to this object in the room so I think I actually went to the sky object went to the illumination and the generate GI tab I think I whacked up to a hundred twenty-five percent so it just pushed a little bit more GI into the room yeah but that's that's pretty much all I did but yeah that's how the the motion tracking works and that's how you can composite stuff into 3d elements into footage like I said you'd want to composite positi like oh you wouldn't typically want to render out of cinema 4d like this but yeah there you go guys don't forget to visit the website at digital meet UK and keep up to date some new tutorials coming out by following me on facebook.com slash digital meet 3d so I guess that's it
Info
Channel: DIGITAL MEAT
Views: 133,251
Rating: undefined out of 5
Keywords: Greyscalegorilla, Greyscale Gorilla, Tracking, Digital Meat, Digitalmeat.uk, R17, Motion Tracker, Animated, Cinema 4D, Digitalmeat, Cinema4d, The Motion Tracker, C4D
Id: 6ZWLIFmmGPA
Channel Id: undefined
Length: 41min 55sec (2515 seconds)
Published: Tue Oct 20 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.