Realistic 3D? EASY - Blender Lengthy

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so i'm not exaggerating when i say that today i'm gonna blow your mind i'm gonna give you the best treat of all blender tutorials because the slinky shot that you saw over at the cg matter blender quickie if you haven't seen that go and watch it that shot i'm going to teach you how to make from beginning to end the full process in its entirety in completion and the nice thing is you're going to be able to render this thing in eevee in a matter of minutes it doesn't use cycles it's nice and quick and still you somehow get fairly photorealistic results so as you might expect something like this takes quite a bit it would be a long tutorial if i didn't decide to split it into a tutorial series plan is we're gonna make this a three part thing and part one being this one i'm going to show you how to make the 3d environment this kind of corridor that we're moving through that's what you're going to learn today where really it's just an image that i converted into a 3d environment that's a cool little thing in the next part i'm going to show you how to do the slinky so it's a bit of a recap of the blender quickie but we're gonna animate it going down this corridor and then finally for part three we're gonna do the integration with the 3d volumetric stuff and compositing and materials i guess we should just get started and not waste your time so part one making the environment let's do it to do this you're gonna need a program called fspy it's a free thing and there's gonna be a link in the description make sure you have that downloaded and what it's gonna let us do is it's gonna let us take an image being in this case we're gonna be using this source image you could use whatever you want in this case i'm just using one that i took of a corridor um ideally you do have a lot of lines because that's gonna help us with our camera alignment but what i was saying is what f-spy does is it takes this image and lets us calibrate our camera so it makes a digital camera exactly where we're standing facing the same way with the same focal length so it eliminates that part of the process because it automates it you're going to open up s you're going to open up f-spy if i can talk make sure you have this thing downloaded and and soon we'll be back in blender this is just a quick detour uh take your image and drop it into here which is automatically going to make a project file it's nice it's quick it's easy and again we want to do our camera alignment and as you might guess to do that we need to define you know which lines are the x-axis which lines are the y that i already say why which lines are the z-axis etc so uh first of all you might have not seen this interface before and i'm not going to explain it in its entirety because you don't need to know just disable dim image so we can see everything and you're going to see some y in other words green line so you can see we have y this could be a z which makes them blue in this case they're y axes and we also have x axes and we're just going to align them to our image so for example let's say we want our y y-axis to be depth so it's going into the corridor well we just take one of these handles of our line position it here have it go down the wooden plank and now this green line is parallel to what we want to be our y-axis and our 3d scene to do this you're going to need to do this two times so let's take our other one and just put it on a different line that also goes along the exact same thing so let's have it go down here and to make this more accurate just hold down shift which is going to magnify it i know the magics of f-spy it really is a good program not gonna lie um put that there uh the more time you spend doing this the better uh the results are gonna be so maybe don't waste your time but i also like just kind of doing this very fast i think what i meant is don't do it fast either way um x-axis is going to be perpendicular to this i wanted going from left to right unfortunately we don't have these nice wooden planks going this way so we're going to kind of eyeball it one way to do it is uh we do have this line going along here so we do get one for free again i'm holding down shift whole point of this is camera alignment how many times do i have to tell you before you remember one goes here the other one we're just gonna approximate uh so roughly it's perpendicular so it's something like that um you know ideally we make this thing perfect but that's not the case so how do we check that this is at least within the ballpark of acceptable x and y axes or maybe of z axes uh going up here well you're gonna see this midpoint and this you can think of as in origin for in this case our x and y floor whatever two axes you have picked we can visualize this a bit better by enabling our 3d guide and enabling in this case xy grid floor and you're going to see this floor that kind of looks like it's sitting on the floor of the picture if we shift this around it's going to look a bit different it's going to tilt and ideally this does look like it's resting there so all we should really be fixing is our x-axis because that's the only one we're really guessing on so something like that is kind of right although i'm seeing that this line isn't parallel uh to what we want so i'm just gonna reposition this until it looks like semi okay i think chances are it's not gonna be perfect but what you're going to learn is that this is a fairly forgiving process okay so that looks pretty good this looks like parallel parallel do whatever you want so you could either do this process or another way just a quick detour you can enable rectangle mode and that's going to have these all linked together so you just draw a rectangle on your floor that's another way you can do it i'm just going to disable that and luckily it did save my progress uh once you've done this it's going to calculate a camera alignment that's why it has this grid floor if you do something wonky like move it off to the side it's not going to have that you're going to see a whole bunch of stuff to the right like the resolution of your image uh what it thinks your field of view is and degrees and that's essentially focal length don't worry about all this that's nonsense just go to file go to save as so we've done our f-spy stuff and just save it as camera alignment is done cool we're done with that next we can open up blender which means we never have to touch f-spy again but the question is how do we get this f-spy data this camera that we've calibrated into blunder and here's the idea um f-spy the program which is free again download link in the description we use this to align our camera also in the description there's going to be a link to an add-on that imports f-spy information so the program makes the information the add-on imports it into blender so make sure you have that installed once you have it installed and you have blender open doesn't matter what version as long as you have the thing installed you're going to go to edit preferences add-ons and if you type in f-spy you're going to see this thing which you want to enable i'm using 1.0.3 there might even be 1.0.4 by the time this comes out i don't know make sure that's enabled and once you have that you can delete everything for a fresh scene and you're going to see a file import f-spy this won't be here if you don't have the add-on installed so if you don't see it i don't want you commenting on my video you can leave and install the add-on and then come back so just make sure that's there or you can run the f-spy command does the same thing you are going to locate wherever you saved your file for me that's right here and when you open it you're going to see a camera with the correct aspect ratio so this is one by one because my picture was a square resolution was this it automatically sets that it's also going to put our camera in 3d space pointing the right way and it's kind of above the ground because outstanding the phones above it and you can almost picture how this is going down the corridor it's pretty cool additionally you're going to see the images in the background why because it enabled background images and imported it in you can disable that there or here so it does all that work for you so now all we have to do is create the geometry so right now we have the camera we need to make the corridor the geometry the mesh and then we just project textures how do we make the mesh well it's easy because we can just start adding things in and they look like they're sitting on the floor because our camera was aligned correctly if instead our camera was in a different view so i'm just going to move it around it will kind of look off so so that was the point of uh f spy okay so once you have this i'm just gonna save our progress very quickly let's call it lots of progress because that's what it is it's a lot of progress um let's take this and start creating our mesh now this part is going to be very different depending on what picture you have for me i have two walls a floor a door in the back maybe a ceiling for you it might just be like cylinders or whatever just model your scene so in this case we have a simple one we create a plane i'm going to go into edit mode so i can reshape this and additionally wireframe mode i would recommend because you can now see through it and still see the background i'm going to just select this edge and move it now we can just lock it to the x-axis and it moves exactly where we want it to we can move this backwards so that's back on the y-axis until just make sure that no matter where you're looking in your photo inside the square there is geometry so if it was up here wouldn't be good because this corner is exposed okay so just move it uh same thing for the other direction doesn't need to be perfect so you see we went all the way to the door however this corner isn't in the exact correct position it doesn't really matter it's a forgiving process we can fix it later now that we have that let's quickly block out our scene so i'm just going to make some edge selections e for extrude z for upwards so now we've made our wall and the thing in the back and really if you wanted to this could be it you don't have to be that precise like for example this door should be its own cube this its own piece of geometry and i'm not gonna do that because i don't care it's gonna be shallow depth of field it's uh you just kind of wing it and it will look good i swear but uh this door frame right here that's punching into the wall that's something we should maybe uh consider adding so i'm just going to add a loop cut ctrl r put that there put another a bit past it so like i don't know somewhere there it doesn't need to be perfect uh for this one we kind of want to i'm trying to select the face if it lets me boom you have to select that dot to have the face selected uh this thing has a uh it has a name whatever we're gonna extrude it e i think it's y axis no x axis extruded until it's in the position for the other one we could add a loop cut here i'm not going to do it perfectly and we're just going to take this face which is the door and we're going to punch it in so in other words so you can actually see what i'm doing the ideas were going to extrude inwards like that so there's a door back here and you just go to wireframe so you can see what you're doing we're going to extrude x-axis something like that is it perfect no is it good enough yeah so for example all this geometry that you know there's a rectangle and a bar and this mailbox i'm not doing it it just kind of looks like that it's one face um the closer you are the more detail you need to add but the further you are the less detail you need add that's the magic so you're going to see that this is pretty good we've blocked out our scene it should be generally the correct not necessarily size but relative size um only thing i would fix is this corner is exposed so we're just going to take this and move it backwards so just kind of occupies the whole shot and boom we've created our geometry is it perfect no but it's good enough uh generally a good test to see if you've kind of finished as you go to your camera you're going to go to viewport display password part out i don't know what that word means you go like this which will eliminate the everything that isn't in frame if you only see mesh you're good but if you see some stuff exposed no good so you shouldn't see your background is you know the general idea uh so let's undo that and save at this point um we're gonna do a bit of adjustment to our mesh uh to make it look correct so to do this let's go back to wireframe now some would argue some would argue that we've already created the mesh correctly right like everything's right angles to each other and that at this point our only responsibility is making the uv map the texture kind of contort to our mesh and that's it's an approach you can take it's not what i'm doing i'm just literally going to manipulate the shape of the hallway until it fits our image so it's not correct but it looks fine and that's kind of the theme of this tutorial so for example don't know why i did that for example if we have our mesh selected go into edit mode this corner should really be in the corner so i'm just going to select this edge and just move it along the x-axis until it's kind of there does this distort our geometry so that this wall isn't like flat yeah does it matter no so just kind of keep doing this until you're happy with it you don't need to do this everywhere maybe just a couple adjustments so stuff doesn't get wonky so this should be like here this should be here i'm just aligning it so that the base of it hits that wall to floor thing uh these two can have the same thing going on and notice i'm not just hitting g and moving it where i want them doing it along the x-axis so it's at least somewhat accurate again the alternative is you do this with a uv projection type stuff which doesn't mess with the geometry but i just don't care and neither should you okay so this is our basic geometry and now we have a camera geometry that is you know in the correct position and the question is how do we make it look like it has textures how do we make it look like our hallway to do this what i'm going to do is i'm going to go to the shading workspace this is where we're going to create our material i'm going to create a new material this works in eevee bsdf toss it out it's garbage get rid of it don't need that instead we're just going to use a raw image texture as if we were doing an emission pass no bsdf nonsense just directly in there and for the image we're going to be using the you know the original image the one we used for f spy which is imported in here why uh because f-spy made that background image from before keep up that's why it's there put that there cool it looks horrible why well because the image is being slapped on here with what instructions with the texture coordinates right now it's going to be using our uv map okay so if our uv map is bad it's going to do stretching in other words if we were to go to the uv at any workspace and let's uh have this be rendered mode if we were to take this uv map and manipulate it it's also going to manipulate what we seem to texture so we need to give it better instructions um instructions that are kind of relative to our view to get this slapped on correctly the original method that ian hubert and other people recommend is doing a project from view which kind of gets us there you can kind of see how that's getting us closer and the reason it's distorted is because you need a subdivide and if you just subdivide a lot it will get us kind of close so you can see some of the textures there but then we get some weird distortion there's a technical reason for why this happens i've noticed that this happens more and more and more when parts of your geometry from the camera view are like way up in the corner so if you don't have that projection view is fine but generally it's kind of broken so instead what i would recommend a full proof full proof method and the reason that i had us manipulate the shape of the room instead of the uv uh the uv map that we're going to be making is because we're going to be using modifiers a alternative is you're going to use the uv project modifier this is going to make a uv map using using the position of our camera and some other stuff so when you add the uv project modifier first of all it's saying what uv map should i be affecting we're going to affect the default one the one that it comes with now we're saying what's a source point where should i be projecting from so in other words if i'm slapping textures onto this model from what view should i be looking at it from what side should we be projecting it from well obviously from our camera okay and as for aspect and all this keep it the same if you have a square image so for example we have like a 3000 by 3000 resolution image that's a one aspect ratio you might have something like a 1.778 if you have that then uh do that so you put in the aspect ratio right here or you could do this in scale so already again we're kind of getting what we want but it's not it's not perfect and let's clean this up a little before we actually fix the thing so shading workspace you're going to see that this tiles a lot so we're getting the image again and then again and again and again of course we can change that by disabling repeat and making it clip so it's going to be black wherever there isn't the image and also a yeah well actually forget what i'm about to say i'll we'll get back to it but right now it's black everywhere else so the question is and the question is why is it distorted same thing as the uh project from view thing uh the issue is for some reason blunder's broken and you need more geometry to get a correct projection so for example this entire face of the wall side of the wall is a single face uh and that doesn't have any geometry so there's of course can be heavy distortion if we start subdividing it you can see that some of that texture comes back so you can either start like subdividing the entire thing and i'll fix it or what i recommend is procedural approach we're going to add in a subdivision surface not after not after the uv projection because the projection is what's up we need to fix it so it needs to happen before so put that on top set this to simple so it doesn't add any kind of curvature so simple so if we kind of hide this it doesn't really change much other than the texture we're going to take this and bring up the viewport number and look what happens each time it's going to approximate better and better and better and better what we want now of course this isn't exactly what we want because if we were to hit render what do we see what do we see we see the distorted version because render the number of divisions that happens when we render is different from the viewport so make sure that these numbers are matching or at least renders higher than viewports and now if we render it's going to take a hot second but and now it should just very very closely look like our image except at the very very top pixels so make sure these numbers are the same in other words now we've created the geometry of our scene from the correct perspective so you can see the floor this face you know these faces have floor texture the walls wall texture et cetera and notice the thing i was talking about the door we don't have the geometry so it kind of stretches weird but from back here from where the camera is you can't really tell and especially if we had depth of field it looks a bit wonky it's forgiving i've said it a million times i'll say it a million more i'll say it close up it's forgiving it's fine okay so let's say that we're happy with this of course you can always uh the process with this is you can always go to edit mode and actually add more geometry and the interesting thing about this i've added a cube is the uv project modifier will still work and it's going to kind of project from this view so if you were to look exactly from the camera it will look like it's matching up kind of the point is whoops don't do that point is if you want to go back and start like adding stuff like for example you want to add in your cube and make that the shape of the door make it skinny make it tall so it captures the thing of the door and rotate it on the z-axis you can do that i'm just not going to okay i just want you to know it's a possibility okay a question is fine we have the black where there isn't image but do we want that there like what if we put an object and it's reflecting its surroundings do we want there to be black visible here the answer is no so how do we get how do we fix that well the clip is better than repetition right so let's keep it on clip but instead of blackness we want transparency so how do we say where do we want black and where do we want transparency well you're going to see that there's a second socket it's called alpha ha it's white wherever there is image and black wherever there isn't when you set this to repeat it's going to be everywhere because it's showing up everywhere but clip makes it like that so this is going to be our mask in other words we can add in a mix shader make it transparent let's uh view that so we're mixing transparency and kind of emission in some sense just the raw image we're going to mix them using the alpha and i think we need to flip these and that's already doing it of course it doesn't look transparent and that's just an eevee thing if we go to cycles should be transparent right uh you're not seeing that black anymore uh with eevee same thing except you got to go to the material blend mode and set this to one of these hashed is okay does the trick some of these give weird results like blend will give you like a see-through thing which is fine when you're down the middle but otherwise maybe hashed maybe hashed is okay um and now you have kind of the completed thing and this is fine if you're from the camera view and more interestingly more interestingly if you were to duplicate your camera so the original camera is the one we're using for projection we can call that the projector meaning if we go to this we go to the modifier the modifier now it's using the projector camera because we renamed it if we take the second camera and call this the viewer and make this the camera we look through and the way you do that is you go to view camera set act of this camera you can move this around and now we're looking around our 3d scene let's actually disable the background from different perspectives different angles than our original camera so in other words we're moving we're moving this camera but keeping our projector the same because if we moved it what would happen our texture would start shifting right we didn't we don't want that um so let me undo so it's in the same position and now let's do a bit of an animation so we could do a keyframe here on frame 80 it can just kind of move up a little something like that keyframe this isn't going to look too hot i'm just warning you but now you can see that we're kind of moving through space three-dimensionally it's not like we're zooming into an image there's a perspective change and because we're going to be very low to the ground and all that to follow the slinky it's going to be again it's going to be forgiving it's going to be absolutely fine you can even add in some depth of field which is interesting so depth of field let's make this like a 0.2 and have it focus real close so you can see we're kind of let's make that more extreme you can see we can kind of do some depth of field that goes along the hallway and then you can really not see all the messed up stuff in the back that's what i did for my shot um last thing last one or two things i want to talk about before we move on to part two which hopefully you're moving on to part two what a waste of time would be to only watch part one uh the colors are a bit off you might have noticed that just go to render tab color management set this to standard it's going to fix it so this is the before and this is the after before after ideally you should be able to set some textures to filmic and some to standard but you can't so that's what we're dealing with for now until blender 3.100 comes out that's what we're dealing with um okay so we've got the you know we now have the idea the theory of the cameras and all that um and before we wrap up let's in fact uh position our camera somewhere a bit more useful to the goal and the goal is going to be low to the ground but also close and another interesting thing is you can change the focal length you don't have to say have to have the same focal length as your original camera that took the picture so i'm going to change this to uh millimeters because i don't really understand how uh field of view angles work uh it's the same thing but you can have like a a kind of gopro thing or you could have a more normal dslr thing so in fact i'm going to change mine to like 75 whereas the original is something like 30. and let's in fact let's disable depth of field so we can see what we're doing i'm just going to move the camera around to a position i like and to help us do that again very useful nobody knows about this passer part out just do that so you can actually only it's kind of like a viewfinder you can only see what we want to see so we want this nice and low to the ground and maybe maybe um maybe 75 was extreme maybe 50 is what we want so that it looks like a longer corridor and we enable depth of field again and all that background stuff or the door kind of looks distorted that goes away okay final animation location here frame 80 let's move it down the y-axis in other words like down the whoops in other words down the corridor but not too much boom animation let's make that linear no so make that linear it looks like a 3d thing and because we kind of did a okay job at modeling this like part of the door it looks kind of correct and you know okay one more one more thing and then we'll move on uh to part two i'm just kind of overloading you with information maybe um you're going to notice that it kind of looks fine but you know we're just kind of projecting an image it doesn't really have any crisp and it doesn't have any lighting interactions uh to do that well we're gonna do shading workspace so again the transparency part is saying where do we want this to be gone that's fine keep that um instead of using our image as kind of an emission we can have this go through a diffuse bsdf in other words now lighting matters that's why it's dark right because there's no light if we add a light now it actually affects stuff you see what i mean so we could also re-light our scene what i'm going to do is i'm going to set up an area light so let's set that up area light put that above best to do this kind of thing from side view we're also going to make it massive so a giant square light is this the same lighting as our original shot hell no it doesn't matter though and now you just want to crank up the brightness until it's kind of similar to what you had before 3000 i don't know something like that and it is very flickery let's move it up a little and you just want to do your best to match the lighting doesn't need to be perfect again these things always do look better better in cycles because you're getting the real lighting interactions or whatever but i would recommend putting one light there i would also recommend duplicating we're going to rotate this by what is a negative 90. and we're going to put this at the door because this is where light is coming from from the scene and the real scene uh where that's the outdoors and that's another source of light so you don't want this to be like too far up the hallway otherwise you're not going to get light in the back here so just move it back is a janky yes are people going to notice again they're not okay so now we've lit our scene something like that and the interesting is now the thing is now that we have our lighting we can actually use some bump mapping some normal mapping uh because we're using a diffuse bsdf now instead of just the raw image so just put in the bump thing to convert our image into a normal map so plug that into height and you're gonna see it's gonna make everything look like very crisp and weird like very weird uh so you're gonna make that something like 0.2 so it's less intense but still has some lighting interaction it's going to make our thing look better let's kind of see a final shot here disable that let's make the depth of field not crazy 0.2 boom that's our shot doesn't look great yet because there's not much going on uh but that is how you make a 3d environment and in part two which is the next part we're gonna make a slinky and just kind of put it in the hallway so that there's a point of interest something for our camera to follow so i hope you learned a lot in part one about making the thing either way uh i hope you enjoyed this free tutorial if you want to support this channel there's quite frankly only one way to do that and that is the patreon why would you want to join patreon besides just wanting to effectively keep this channel sustained and all that because you get one files for example the finished project that's going to be on there um so yeah it's going to be there behind the scenes exclusive tutorials it really depends on what tier you are but in general i really appreciate all my active patrons right now there's like 400 some 420 actually and um the people watching this video who might become patrons i do appreciate it anything helps seriously uh but this entire tutorial series is going to be free regardless some stuff is exclusive but this is free it's an advertisement what can i say uh hope you enjoyed it hope you learned something and i'll see you for part two and part three bye-bye
Info
Channel: Default Cube
Views: 89,803
Rating: 4.9677982 out of 5
Keywords: blender, tutorial, 3d, cg, cgi, vfx, easy, lengthy, realistic, slinky, fspy, camera alignment, addon, uv, uv project, project from view, camera
Id: uWkKV0HxwFQ
Channel Id: undefined
Length: 27min 28sec (1648 seconds)
Published: Mon Aug 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.