Fspy with Blender 2.8 | Camera Matching Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you've ever tried to model directly from reference image you may know that the right camera settings can be extremely frustrating and time-consuming to get luckily there's F spy f spies at camera magic software which essentially means it's designed to extract certain camera settings from an image not only that but there's an F spy blender plugin which makes it super easy to import the settings you extract from F spy a lot of what I'll teach in this video comes directly from the s PI website the website is really detailed yet easy to follow so I won't be explaining everything there is to know about the software but instead give you an example of how you can use it to install F spy you're gonna go to f spy IO and if you scroll down just a bit you'll see this big green button here that says download click on that and you'll be brought to github now here you're gonna choose the package that's right for your operating system I'm on Windows so I'll download this one and once that package finishes downloading you're gonna want to create a folder somewhere I made one of my desktop called F spy and you're gonna want to extract all the contents of that package to that folder that you made once you've done that you'll see the F spy executable right here if you want you can right-click go send to and desktop to create a desktop shortcut next we're gonna install the blender plugin so go back to F spy - IO and scroll down a bit more to where you see importing to blender and then this link right here that says official s by importer add-on click on that and you'll be brought to get hub again you'll go over here to clone or download and then click download zip now this file you're not gonna extract you're just gonna put it somewhere on your hard drive and we're gonna install - blender directly from the zip file later on so before we happen let me just give a brief explanation of F's by essentially fsy allows you to define vanishing points within an image by matching line segments in the image to axes si uses these vanishing points to make estimations about the cameras parameters it's important to keep in mind that some images will not work with F Spy directly from their website this includes photos taken with lenses with severe distortion such as fisheye lenses images with perspective that has been tampered with 3d images rendered with an orthographic camera and stitched panorama images so steer clear of images that fit this description and you should be good to go so upon running f spy you'll be prompted to either drop an image here or load an example project I'll be using this image of a bathroom alright so on the left hand side we have some set in the middle we have our image and a bunch of control points that we'll talk about in a minute and on the right-hand side we have all the features of the camera that have spies trying to extract so without talking too much I'm just gonna start doing things and explaining as I go along so right up here this number of vanishing points let's change this to one and you'll see we have two red lines and one green line now if we go to these vanishing point axes if I change this X to Y you'll see we have three green lines I know it changes this Y to Z we have two green lines and one blue line and as you probably guessed the green lines represent the y-axis whereas this blue line represents the z axis now the goal here is to line these up with lines in the image that correspond to that axis now I'll usually treat the y is going in and out of the camera so what I'll do is I'll take this control point bring it right here and you can hold shift to zoom in like so and I'm gonna take this line over here and match it up with the base of the shower doors like so and you can see that this thin line coming off meets and that is the vanishing point on the y-axis now this blue line here will control the rotation around the other axis so because it's the Y you'll see as I rotate this this gizmo rotates around the y axis so I'm gonna line this up with this edge of the door here and if you grab this gizmo move it around you can see that this works out pretty well now when dealing with one vanishing point there's a couple of things to note you actually have to give F spy the camera sensor width and the focal length which a lot of the times may not be possible because you may not know those parameters you can try and play around here and see what works but that just involves a lot more guestimation than what we want and a lot of the time I will use two vanishing points however I want to point out that I did this previously to recording this and I ended up going with one vanishing point because in this particular case it wound up working well for me I also want to point out that for some reason I had the Y set to X in the example that I'm going to show you inside a blender and a little bit so when we get into blender you're gonna see the X is moving away from the camera and the Y is perpendicular it's really not that big of a deal but I just want to point that out anyways though I want to talk about more of these settings and show you an example of using more vanishing points before we move on so we switch this to two vanishing points you'll see that we now have two z axes so I'll bring this one to match this line right here and I want to show you something to be careful of all right so you can see now that that gizmo disappeared and on the right hand side it says invalid vanishing point configuration and essentially that's because these are two parallel to one another or because they're diverging rather than converging and there's no vanishing point they never meet at any point and as I've said previously F spy relies on those vanishing points so a good way to make sure this doesn't happen is to pick lines that are on the extreme of the image so in this case this line here is pretty far to the right so we'll go further to the left of the image say to the edge of this mirror and we'll put this line right here and you can see now that it's able to figure out that vanishing point and our gizmo comes back and it looks pretty good overall the goal here is to have your parallel lines have an angle between them so that they eventually converge at a point and as you can see on the right-hand side here we're getting the image width and height we're getting the field of view the camera position and the camera orientation now principle point I'll briefly talk about but it's not something we have to worry about too much for this particular image so directly from f spies web site if you imagine array going into the camera the point in the image that that rate comes from I'm sorry if you imagine array going in directly to the center of the camera sensor the point on the image that that rate comes from that is the image or that is the principle point and it normally coincides with the image midpoint sometimes it may not and I have yet to encounter a case where it doesn't and if it doesn't you have the option of picking manual principle point where you can drag and drop the principle point manually and you can also solve from a third vanishing point so real quick let me change that x-axis back to Y and then you'll see this changes to X so in this case we would do something like this and in this image in particular it seems to be getting it completely wrong like I said I have yet to come to a case where I had to rely on this to find the image principle point so in this particular case I'm just going to go back to one but I wanted to point that out just so that you had an understanding of what that meant now 3d got here you can bring in different objects to have a look to see how well they sit in your scene this line matches up pretty good on the base of the shower doors here this line matches up pretty well with the line on the trim here you can also bring in a Y Z grid an X Z grid and an XY grid and that's really as deep as I'm gonna go into EPS by for the sake of this video so when you're happy with the results that you have and everything looks to line up good you want to do is you want to go to file save as and save it somewhere with the default dot F spy extension now we're gonna hop into blender alright so we're inside a blender now and I'm just gonna select everything and delete it and we're gonna install that F Spy importer add-on so what you're gonna do is you're going to go to edit preferences and on the add-ons tab you're gonna want to go up here to install and you're gonna want to locate that zip file that we saved earlier once you find that zip file you're gonna click on it and you're gonna click install add-on from file once you do if you go back to the add-ons window and you type in F Spy you'll see it here import/export import appspot project just check that X out of this and you should be good to go now if you go to file import you'll see this F spy extension right here and you can click on it and navigate to the file that you saved out of s by and you'll see that it loads up the background image and it sets your camera's position rotation and feel the view or focal length now at this point you can snap into camera mode and you can start trying to line shapes up with the room as a whole so in my case what I would do is I would add a plane grab it pull it down on the Z match up this edge line right here to where the floor meets the wall grab it on the Y pull it this way and it's not perfect but again it usually doesn't have to be it usually just has to be good enough to get you started and that's kind of the point of this it's not a lot that you're modeling directly from a reference image unless you're practicing or if you're doing something called camera projection which we're not really going to talk much about in this video so if it's not perfect don't be discouraged just get something that looks good and use your own creative license to finish out the scene all right so that floor looks like it lines up pretty good boat to make sure what we're gonna do is go into face mode here and we're gonna extrude and bring this up on the Z now I'm gonna pull this back so that the cameras inside this box and I'm gonna go into wireframe mode alright and you can see that the ceiling is not high enough so let's bring that up and also this wall over here is too far over here the corners not matching up so let's bring this over on the Y so that looks like it's lining up pretty good and we have the overall shape of our room now which is awesome and saved me a lot of time in comparison to if I were trying to model this just freehand so another thing I want to talk about real quick before I end the tutorial is an illusion that you can fall into so let's try and make the base right here where the shower door meets so what we'll do is we'll add a cube oops I'm still in edit mode let's go into object mode I'll add a cube size it down a bit bring it down on the z bring it over on the Y size it down bring it down and just try to line up these edges here do something like that now that looks pretty good however if I go into solid mode you'll realize it's not even in the room and that's just one of those illusions of perspective in 3d that you can fall into so what I suggest doing in situations like this is first putting it against walls that you know it's gonna be again so in this case we know for sure that this is gonna be touching both the floor and the back wall so let's position it like that I'll actually go into solid mode for this just like that now we can snap in the camera view and we know that we can't move it on the X or on the Z because doing so will either pull it off this back wall or bring it into the air so while we're trying to do this we know okay we have to move this on the Y in this case and we can size it down but you just got to be sure that it doesn't lift off the floor or come off that back wall which I think it is right now so just go in grab it on the X and now that looks pretty good no weird illusions it's touching the floor and that back wall and this is a great start to modeling this bathroom and from here it's really just a matter of going in and lining up with the rest of the objects in the scene now obviously you're not going to model every single thing from this camera view unless you really really want to try to but like for example I wouldn't sit here trying to model this knob for the shower to be exact or anything like that one thing I would do though is model this little shelf that they have here in the shower so I would go I would select the room go into edit mode and it doesn't want to let me add a loop cut in the right direction so I'll just do that hit G twice drag it right there add another one drag it right there one above one below and now I can select this face extrude it and we now have that nice little window right there maybe it shirt a little bit more and that's really all there is to this tutorial from here on out I'm sure you can see what you you have to do to continue modeling this you just want to try lining things up again with the with the the counter here you're gonna want to put it against the walls that you know it's against we know it's against this back wall and this wall here so we can do something like this and size it on me why bring it back on the UI because it's probably not against the wall now pull it up like that grab this face grab it on the X so here's the image that I wound up with it's certainly not perfect but I'm definitely happy with it it's a lot closer to the reference image than it would have been if I had tried to do it freehand so yeah that's all there is to this tutorial guys thank you so much for watching if you enjoyed please slap a like on it if you have any questions comments or concerns put them in the comments down below as I mentioned earlier this is also a useful technique for something called projection mapping if that's something you'd like me to talk about in a future video let me know in the comments and again thank you for watching I wish you all the best results
Info
Channel: Tyler Serino
Views: 119,698
Rating: undefined out of 5
Keywords: blender 2.8, how to, camera matching, blender 2.8 tutorial, camera matching in blender, fspy, fspy tutorial, blender 2.8 modeling, blam, blam alternative, reference image, vanishing points, fspy with blender 2.8 |, fspy with blender, fspy addon blender, fspy blender 2.8 install, blender tutorial, fspy software tutorial
Id: PSeBh5HdDVs
Channel Id: undefined
Length: 15min 14sec (914 seconds)
Published: Sat Aug 31 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.