TUTORIAL: Fspy and UVProject in Blender! - making photoreal scenes with little effort that look ace!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] what's up guys gary here with gmvfx welcome to another little tutorial on my 25th i'm actually we do this now for almost half a year i'm i can't believe it i'm happy and i keep on going i'm gonna keep on going but if you want to keep on going make sure you subscribe and make sure you hit that notification button so you know that every single week every single friday one of these things rolls out and it becomes another little thing for an arsenal anyway today you might notice we're not actually looking at a blender screen we are going to be looking at the blender screen so don't think it's not going to happen it's definitely going to happen um but what we're going to look at right what you can see right now is a picture on the incredible wonderful website unsplash.com which allows people to take free photographs from other people and use them in their own projects and you can give us some love give them a bit of attribution just say hi say thank you and uh but you don't have to but uh still nonetheless it's great why not i mean for example this picture that we're looking at right now which we in fact we are going to use uh in what we're going to do this has been taken by a gentleman called nolan isaac and um he's one of the people who puts lots of pictures up on on on splash he goes by at nolan isaac um on their on their site and he produced some great stuff but this one in particular is going to work out really really well for us so uh what we've got here if i just scroll this down you can see we've got this let me just close that down now mention this name now i've mentioned you nolan um what we have here is a really lovely slightly mucky room in upstate new york chapter rochester the united states so it's an abandoned building basically but it's got some really lovely walls and paper and muck and all that sort of stuff and uh it's just really quite beautiful but i'd really like to be able to move around it but i can't guess as a picture but maybe i can oh yes yes we can because what we can use is a wonderful piece of software called f-spy now f spy is also open source like a lot of things and um f spy is called f spider i o and uh what it does is it takes a picture and then you basically show it where the axes are in this picture whether it's an x-axis or a wax or a z-axis and it calculates you the camera that was the camera angle that it was taken at the camera position that it came from and also the lens um it's incredible and then you just basically import the exported file out into blender by using the plugin that is on their website and uh which basically you get to from their website it's actually on github but you then you then sort of like compile this thing and drop it in and it becomes an add-on inside of blender that allows you to just pull in the picture and the camera straight out of f-spy and then you can start using something which is even better which is called uv project which we are going to be using today so enough of me talking about all the stuff let's just get on with it so i've got this picture i've already opened it and i've put it in to let's look here very quickly so i've got it here in critter which as you're very aware i absolutely love don't know when the background's pink i still like it though um and as you can see i went in here and i had a look around in fact let's put them in basically i started went to the picture and went right okay let's just look is that straight the red line's straight but the line the two points is going to aren't quite which means there's a little bit of uh curvilinear action from the lens on the camera now obviously 3d is not a curvilinear system it's a rectilinear system which basically means when you take anything when you generate a render the lines are always going to be straight it's not going to lends in the way it's got a virtual camera which does not have a lens unless of course you actually put distortion into the render but obviously this is for building and creating a scene so we want it to be absolutely 100 flat so what we do is uh in this in this wonderful package called critter we go to a filter sorry called uh gmikqt and i'm not gonna bother going into it right now but basically it's got a lens distort tool and i've gone in there and i have un distorted this image so that line now is perfectly straight uh once that line was perfectly straight i knew that it was correct and i've got this image here which essentially is a slightly more slightly tighter version of it which is good i'm not going to complain that's good good good and forgot to zoom in slightly because obviously when we un squished it we had some edgy bits i'm going to save this out as and we're going to call it nolan isaac k flat blah blah and just go under splash underscore wrecked because i've made it rectilinear so let's do that let's go okay and now what we want to get into is f spy and here it is this is just how it is what it looks like yeah bland but so not bland there's nothing bland about this at all so let's go into a little file and let's grab our picture which is uh where's the record wrecked right there i'm going to drop it in there and straight away now you can see what the working environment is like we have here two sets of these beautiful angles like this and there's uh weak at the moment they are the red ones are for the x and the green ones are for the y now what we want to do is we do want to use them x and y but probably better if we used z and y because z is obviously our up and down which we can very distinctly see we can go like a crack on a door frame and uh or let's let's say leave it as x so x is coming towards us so x is generally in our general direction because it generally is because it's general general and i don't know what i'm saying general but it sounds good so i'm going to move this over to here i'm going to move that so that's along that line there let's just turn off the demon on the image there we go so that can go there and let's take the other red one which we've got up here which is totally in the wrong spot and do this with this one so we're doing another line along here you'll notice our axis that you can see is vanishing because it's not it's going well if those are the two x's what are these bad boys and these ones are going to be our zed so let's put that as zed and i'll put this one up here and that one there and then this one can go on this door here and that one can go there there we go so now if i bring this down you can see the axial plane this is where essentially our floor might be for example just there yeah and if you push it up you can pass the middle of the wall and you can see it goes up and there's there's that bit there and that bit there that's absolutely bang on that's that's that's perfect but the best thing about this is and i'm going to just very change this to the xy floor there we go because obviously we're working zeds you can see that this also matches up well to the floor space so we can say right okay well if that's where our floor is on that let's say we will pop that up there so that line is up against that wall and let's move it up a little bit there so this is exactly where our floor here is going to be and then we'll go right okay so the file will go save as and let's point it into this same folder where we've got all our stuff going on and we will call this because it is obviously the f-spy file that we want let's call this let's call it uh nolan isaacs nolan isaac it's his those and i looks f spy i can't spell f spy there you go right and let's go save so that's now save that that's as good as saved in fact it is exactly saved and now we're going to go into blender now of course we've done what we need to do in here there's nothing that needs to be done here at all now we shall just go straight into the blender blend even blender blendy blendy mouth is not working i think i might just leave that bit in blender blendy blendy so and so you can see this is generally a standard blender skin and let's go file import oh basically so very quickly when you if you haven't installed an add-on before you go edit preferences and you get to add-ons and i'm going to just go fs because i don't mind it's imported but there it is it's f-spy there it is any documentation you want if by dot io and here apart from the little basic tutorials in the video you've got um if you go to download mac windows and linux you've got all those there but then you'll also want if i go back you'll want to make sure that you also download the official f-spy importer add-on which is in the stuff it one here and this basically that's where you as i said you download um uh a zip and then that's where you install anyway back to where we were so you've got the add-on you've installed it that's absolutely fine so now your file you go import you go f spot in the bottom there and then we will very much uh point it at a gen vfx folder there we go twits and we go f by camera proj and there's nolan isaac's f spy dot f spy import that and immediately you can see up here we've got node and isaac's f spy spy that's actually the group camera and that's now been made the master camera so if i click on that camera there we're back that puts it back to the main camera then one though but if i click it back on this one and then we press o there you go that's our scene camera but you can and you can see we have our cube in there all final good or lovely so let's just delete that and i'm going to add into the scene i'm going to add a grid so let's go mesh and grid and now you can see that let's just basically turn on the wireframe let's say it's a little bit too high for the purposes right now so let's set this oops oh didn't want to do that let's try again f9 f9 let's set this to something a bit lower four three four four four five four five let's set that to five and five okay right so there we are that's five and five which means basically we've got four by four in terms of the actual polygons and i'm going to leave that roughly worse because we already set up the floor in blender is that floor in there so what i'm going to do first of all is i'm going to split this down the middle and i'm going to make this a different camera view just by doing that nice and simple and we're going to take the edit we're going to take these edges i'm going to move them all the way over to this wall here and i'm going to take and i'm going to take these edges i'm going to push these all the way across until they reach roughly that wall over there in fact if i zoom in on this you can see because because we're not uh locked to change the camera i can zoom in as far as i want on this one and not actually shift what our camera is looking at which is great so i can just go right let's take them up to there and then let's take these front ones and if i just zoom back a little bit let's move these over to here let's take these ones let's move these a bit further down to here let's take these back ones and let's zoom in again just to be sure we're getting oh it's a nice big quality picture you forget actually how good that take that to there that's just right up to that wall which is good great great great great goody goody goody uh oh and it looks a little bit looks a little bit odd of that does it not is that door bit further back that might be it's weird because it actually looks like it's bent the wrong way but it's not because our wall line is straight anyway that's fine don't worry i'm worried now um that's probably just some subsidence in the floor or something like that very likely yeah let's let's go with that let's go with it being something wrong with the building it is a collapsed condemned kind of building so we're okay i'll sort it now now what we've got here is pretty much our wall to a certain point but obviously we have a bit the crops go into water our floors a certain point but what we've got here is a bit that needs to just go down to here and then let's select where are we where are we where's that that's right okay so we're up here let's select these two edges and let's go ey to extrude them in the y and move them to there that's good lovely so the minute that just looks like a boring regular floor as in it has nothing on it so that's why it's boring but we need to give this this image as a texture so what we're going to do is we are going to very quickly go into the modifier for this object and add uv project so that basically now says i've got a hue projection it's going to be the uv map basically of whatever its object has and it's going to come from our camera projector so that's where you link the object is actually from the camera therefore what you what that means is you can actually link um it from most objects so but but what you can also do is you can increase the number so if you've got a basically if you've filmed or taken photographs of a room and you've taken five photographs or six photographs of a room you can then create individual spy cameras and use each of those as a projector so for example if you're looking down a hallway out through that wall out through that hole in the wall that big thing what do they call it it's a door gary okay so when you're looking through the door and you can see the hallway when you shoot a bit more in that hallway and then you've got something to project that hallway onto from the camera from that so you can actually get quite a large area of stuff projectors and combine them all together and it just combines all the images that you actually indicate from those particular cameras onto the object it is really quite something so you can basically take the uvs from the camera and in the shader connect them into a separate image which you then merge into and mix with the one that's currently there it's brilliant we're only going to use one though so let me set those back to one and there we are there's our one projection now still we can't see what's going on so also you'll notice the aspect ratio is currently at one to one we will come back to that so let's go to shading and here is our s by camera and here is our floor so let's add to this uh well let's let's not add one of those let's very quickly change this up here to animation shader if you do it actually in the modifier sorry not in the modifier but actually in this in this wonderful wonderful panel which name escapes me what's it called the editor okay so the properties tab so you go down to the settings at the bottom which are for your material and you click on where it said uh principled bsdf brdf bsdf i do i always want to call it br bsdf i got that bit right and then you can just change it to mission and it saves your home to go add a disconnect and blow that away just does it all in one file swoop so we're gonna have the emission because obviously this is a room which is actually self lighting itself and we don't need any lights to light it and we are going to add into here a texture and image texture just like this which i'm going to plug in and of course there's nothing in it so it's going to be a black so let's open in our no not that folder in our gen vfx and uh in our f spy camera we're gonna pick on our wrecked image and we're gonna go open image and you can see that it's trying to use the camera's actual projection so you can see it's actually there but unfortunately it's it's kind of projecting it onto the floor and the wall halfway up there as well and it's not right and the reason for that because what we didn't do and this is where we go back to our model is we did not edit the aspect ratio of our image so if i push this up and i won't believe it i'm not going to do it this way i will do it properly accurately what will happen is at some point we'll get the exact angle correctly for that for that bottom of that wall and you can tell i've got it wrong because you can see the other part of the wall on there so the best way to find that is to go back to your f-spy so where's the f spy and up here we've got our image our width is 6000 and our height is 4000 which is uh 1.5 by 1 really isn't it because that's half again so our aspect ratio is 1.5 in our picture so if i change that to 1.5 that is now correct for the floor and it means i can see all the stuff on the floor as i would like to see it but of course it's completely flat and inaccurate but we'll come back to that now you'll also notice we have breakage here in the texture while there's a very good reason for that and that is because there are not enough pieces of geometry for the uv project to calculate itself correctly so the best way to do that is for us to go back to our layout and we will put this in rendered mode so i can see it and here now you can see where i mean about this and then this one we are going to go to wireframe because we just want to be able to see what we're doing so what i'm going to do is i'm going to add some more little bits and bobs of stuff i let's go into edit mode and start sticking in some extra edges now you can see straight away on the left hand side i've basically fixed that hole in the floor just by doing that i haven't because i actually want to create that hole in the floor so i'm going to do that and i'm now going to do that and that and that you you can see what i'm i can hope you can see what i'm doing i am trying going to try and build this hole in the floor by actually cutting it out um and i'm going to do that and i'm going to do whoops i'm going to do i'm not going to do whoops i'm going to do that so i've kind of let's let's just zoom in here in fact you can you can do it here as well if you want to but it's more accurate to do it in in the view that you're looking down let's do this [Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] my [Music] [Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] [Music] [Applause] [Music] [Applause] [Applause] [Music] [Applause] [Music] [Music] [Music] [Music] and that's that's that's not too bad that gives us a little bit more a little bit more there really and then just to be absolutely certain we've got nothing i mean that's that's no i'm going to go with that i'm going to go with that so what we're going to do now is going to press o and that basically puts us to this camera and i am going to have a look at the um position of this item so let's go back to edit object mode and let's pick this camera and we've got it at -10 minus 0.6 so what i'm going to do is i'm going to go up to here camera let's go minus 10 let's just double check minus 0.6 minus 0.6 um i could actually probably if i'm honest select i haven't actually i've never done this before i've never done this before so let's see what happens if i can i copy the path data copy the data path let's try copying the path go to the camera and let's go uh paste it a path no no i'm not adding drivers okay that's fine i'm not copying the data path that's actually for using drivers not a good idea uh so don't do that that would be silly and so what i'm gonna do instead is i'm gonna do what i was doing before just have a rough look at the camera i say 1.38 so let's get back to our camera and go 1.38 so it's kind of in the same position and then let's have a quick look at this so it's 90 00.1 minus 90 so let's say 90. minus 0.1 now was it point minus 1 but 0.1 there we go 0.1 i think that was minus 90. there we go yes that's kind of that's kind of does it doesn't it so i can now see down here with my actual camera so i'm going to change that to our actual camera now and let's change that to f z again so what i want to do is i want to just take our camera camera which by the way the mode is 50 mil and i'm going to change that down to 24 now as it makes absolutely no difference to what we've done so i can take that right into our little room like that yeah and i can take it across here a little bit and i can rotate it round a tiny bit i mean i can do what i want with it really as long as i don't try and get into the in the wrong the wrong wrong angle but you'll notice if you look at this this is actually still point five by one now we don't need our scene to be actually an aspect ratio of one point five to one or one to one point five at all for it to work we just have to have that information in the uv projection so that's all done and dusted so i can now go back to this and you can see the render viewport it's uh sorry the uh yes the uh render the dimensions are six thousand by four thousand because that's what size the images but i can change that to 1920 by 1080 and we've basically got exactly what we would want if we were just using some hd i mean you could change it and make it 2.35 if you wanted in terms of aspect but what i want to do is i just want to have some fun i've got a feeling i'm not the only one um i'm going to bring this over here and let's let's have a look so we can see what we're doing that's that's not that's not too bad let's let's leave it there and let's change our animation timeline to 125 so it's only five seconds and let's actually go into animation and go z2 in there and you can see that and i'm going to change the password to in the camera so let's go into the viewport display and the passport 2 is set to 0.5 which means it's semi-transparent so let's push that to one so all we can literally see in there is just it's just our room and that's that is actually just the picture as looking down on camera it's actually when you look at that when you think of it like that it's actually quite good you know i mean it really is something i think it's really quite special so let's get back to our camera i'm gonna pick the camera and let's press the n key and we'll just go i on location and a rotation and i'm going to move it across to frame 125 and let's just uh press t so we can pick the transform and just i'm going to move this into the room and i'm going to move it this way and i'm going to rotate it this way and maybe dutch a little bit yeah so we've actually now got a little camera move let's just very quickly go uh i and i in those so if i just now scan this you can see that if we move this across here so this is bigger and i press play now we're actually moving into our room i'm going to change that camera actually because at the beginning of it and also at the end you can still see a little bit of the other object coming in the other side of the texture up coming in sorry so if i just pop this a little bit forwards to that and maybe push it over here and let's push it forwards a bit [Music] we're kind of seeing it thing is i'm seeing that wall through there i know it's not right but i'm just trying to do things for speed and making it feel a bit more a bit more nice sound like my dog um how about if i pop it there that's fine it's fair i can live with that so uh i and i for saving the key frames and then just go up to here and let's move this so the angle is lower and raise it up yeah so we're gonna feel a bit more a bit more like a motion around the room in fact let's just pull it back a little bit as well a little bit yeah there we go i i i i through the keyframes and then boom and we'll just play this back so there you go so what we're getting is end of playing it backwards let's play it forwards there you go and essentially you have a really nice room but you have done absolutely no modeling beyond some very very basic stuff now you could actually and this is this is when things get really can get really quite nice you can actually stick other things in there obviously so let's very quickly let me just go back into the layout for the sake of argument and let us let's go and add a mesh we'll add a uv sphere let's scale it down so let's go edit mode select all and go scale and then go back to object mode and lift this up and let's just shade this smooth so i should be sure that's all going to work and i'm going to go into shading and i'm going to very quickly i'm going to add into this a pvr um and not a pdf sorry a principal bsdf i'm going to make the color noir i'm going to bring this roughlus down i'm going to take the metallic up to the top specular and as you can see you can't see a think until i push this all the way up and that is currently reflecting well that's currently reflecting just our environmental area that we've got in that so i'm going to actually change that as well let's change that to something which feels a bit more like a room which isn't a room uh that is a room there you go so that's good so first we've got a room which is reflecting it's not correct i'm not worried about that so much what i do want to do though is i want to go into our settings and i want to turn on screen space reflections so i can then take this ball and i can move it if i just do this i can let's i can move it down and back so it's just inside of there and we can assume that it's reflecting the room that's there that lovely lovely room is the other side of this nasty awful room um in fact what happens if i take it up to this wall yeah we can you can do all sorts make it look really quite quite tasty but now so if i go back to our animation viewport and then we view this now so we've got and it looks a bit looks a little bit ropey because it's not it's doing a lot of stuff in the viewport at the same time so let's set this to 128 and set this to 256 so we can actually get some other stuff going on in there but it actually you see basically it sits in the middle of the room it actually it's like it's really there it is i'm telling you um so yeah you know you can actually build a chair i mean you can see that plank actually looks more like it exists the reason for that is because we've modeled it to exist you can actually build a 3d model of a chair or or a table or something and put it in there as well um i've done that before and certain jobs are hard to paint out lamp posts and all sorts and then actually put them back in as 3d geometry so you can do it you just have to light that with this environment and bob you know bob as we say in the uk uh rob is your mother's brother bob's your uncle you can get some great stuff going on so let's just very quickly just take that to the rendering tab and let's just stop this and go here and i just pressing f and 12 not f9 as you can see now it's obviously it's not reflecting the uh environment that was just there that was visible at the time because that's only really for reviewing not in the renders but there you see you've got this whole lovely thing going on there with your object so i can then take that up to uh 512 and oops and then let's just press f12 again so the render settings are even higher quality is a lot better in the reflection it's it's just really really really great you know you could even put shadows back in here as well so you could actually use the scene as a shadow catching object on a separate render pass and then add that shadow back in so much you can do so much you can do with this but at the end of the day it is just a lovely way of making something look pretty it's making it look pretty and if that isn't what this is all about then i don't know what is um so there you go that's how you use f spy and you uv project and how you basically build your geometry based on that projection as i said this is uh quite rough but it does give you the indication of exactly how you go about using it um you do make cleaner images which you put in behind for the geometry branch at the wall behind behind uh the door wouldn't necessarily look like it was the door because you'd actually have a set extension that you basically painted onto a texture which you used to replace the one at the back and so on but yeah no i i um i this is basically the way that most people do a lot of their work when it looks real it's not because they've spent hours basically making it look perfect it's because they've found the right image or they've taken the right image and then they've projected it onto a surface it's by far the most prolific way of doing this stuff and i hope that's some good to you and um i'll get this up as fast as i can because i know actually i'm doing this on a friday and i'm already doing it later than i normally uh send something up so um i'll speak to you soon guys take care and there may be a few fluffs and stuff in this one just to speed this along but i hope you've enjoyed it please subscribe don't forget there's 24 more of these uh click on the notifications tab you'll get to find out what's going on every single friday and uh yeah thanks very much for subscribing and i will thank very much for watching it to the end i mean i know i'm just doing this for 52 minutes you'll probably got a slightly truncated version um or maybe not who knows so speak to you soon guys look after yourselves bye [Music]
Info
Channel: GENVFX
Views: 7,303
Rating: undefined out of 5
Keywords: blender, cg, krita, b3d, fusion, resolve, inkscape, animation, effects, vfx, learning, unsplash, fspy, uvproject, polygons, modeling, texturing, photoreal
Id: I5f98URP2LM
Channel Id: undefined
Length: 33min 45sec (2025 seconds)
Published: Sat May 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.