hdri setup in blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to my tutorial on how to a method of using an hdr to build an environment um something like this and in considerations um which is the bit that i think sometimes glossed over um so this is a response to a video that i saw that someone did where they sort of implemented the hdr but they'd kind of neglected to mention that the horizon wasn't level and all this sort of stuff um so the main secret well i say secret it's not really a secret if you there's there's two methods of using hdr when you're if it's official effects they'll shoot um you know they'll shoot whatever like on a camera alexa or a red pick or whatever the plate photography they call that so they'll shoot that just conventionally and then they'll take an hdr either before or after the the shot um and so what they'll use is they'll use the plate photography as the background and the hdr to light it so that's one method which i won't be going into but i think it's worth explaining that's what's normally done and then there's this other method of if you've just got an hdr and you want to use it um putting a shadow capture on it and possibly distorting the hd the spherical image so that some of it's on a plane so if it was a street you might have the road plane and you might have building planes and then you project the um projected spherical hdr image onto the buildings that you've modeled um and the road in the model but that's that there's one important consideration that if you do that you must make sure that when you're modeling you're modeling from the center of the um of the projection because obviously there'll be parallax shifts so that the camera needs to be exactly where the hdr pano head is effectively and you can move a bit uh but you'll notice here um you can see that there's distortion that happens so you would have to you'd have to basically remove in photoshop or something um the lamp post and put 3d lamp posts in but it works amazingly well i mean i'll just show you this quickly if you'll let me um but you'll notice that the horizon is level because we're only going we're not going very high up the ground i positioned the ground plane two meters because i i figured that the hdr was taken about two meters above the road or something like that so you have to kind of come up with that and then position the road accordingly now you can you know if you're moving i know this is moving about sort of three or four meters around the main projection point it's not too bad you don't really apart from the immediate lamp post in the foreground it works amazingly well and that's one consideration that if you've got an hdr um stuff that's in in the immediate foreground unless it's on a plane will distort really badly so that's fine if the eight you know if the if the trees are like 10 meters away um and so let's let's let's get going with this and see if i can quickly walk you through it or try to at least anyway so the first thing we're going to do is start with a sphere um so we've there's basically three elements to this um there's the lighting sphere and which is a quick look you'll see that the shadows are soft now the lighting sphere is an hdr image but it doesn't need to be terribly high res it's the one i'm using is only like 1k but then i took it into photoshop and blurred it and that gives us lovely blurred shadows you see like the tree shadows there's a nice blur so that's what i recommend you do is get both a very high res one for the reflections and the immediate textures um and a low res one for the lighting and so the high res one will be projected onto a sphere for the reflections and the ground plane um and that the low res one will be on on the environment lighting so let's let's have a look at that um so let's create a sphere now they roughly say i think about 10 meters i mean i'm sorry about 50 meters is um approximately roughly where infinity would be i mean it's when you're even visual effects you can you can start moving into 2d planes at about 50 meters so that's what we're going to do so about 50 meters at the edge of the sphere let's increase the thing this divisions something like that okay um and now what we'll do is we'll make the sphere so i don't know try it again 50 then the next thing i'll do immediately is let the camera and put it into the origin okay this is important because this is where all the projections happening from so if you the further away from the origin you get the more distortion there will be um from the camera's point of view so that's important to to make clear okay so there we got the camera there so the next thing i'll do is i'll lock its transformers just so we don't accidentally knock it now i'm going to assume roughly that the um the the pano head is about two meters off the ground so what we're going to do is go to side view and if we go to the wireframe [Music] and i'm going to go what is our units here let's get a cube cube and let's grab it stick it there so okay so we need to what i'm going to do is i'm going to grab these uh points so box select those and point uh in edit mode and put the vertices so let's let those lot or deselect and then we'll box selector and then we'll scale s and then in the in the z-axis uh zero so they're all on the same plane and then what we'll do is we'll transform that so it's about two meters beneath the um [Music] the origin or the i mean i like to keep the origin um from where the pano or um hdr was originally taken so i'm i'm estimating it's about two meters okay so let's go um into the camera and what i tend to do so we don't move the camera around is i immediately will go to the um view mode and lock camera and then when you move the middle mouse button you can look around without um uh from the you know from the projection point um without transforming the cameras that's quite useful was extremely useful in fact and then if you want to zoom annoyingly you have to i did set up a shortcut for this but you have to disable the um this is a little kind of basic uh blended stuff disable the camera to view thing and press is it control a middle mouse and then you can zoom the thing and that will zoom without changing the focal length if you want to change the focal length because there's another way of sort of zooming into the wider field of views just let the camera go to the camera why is that not coming up oh you know that's why object mode select the camera then you can go let's say 15 or 18 millimeters and that's relative to a standard 35 millimeter film back just to make sure that we're not talking about crop sensors here um so so yeah so just again then i'll switch back to the thing and we can look around like this great so that's all that's initial setup so let's look at the texture stuff um so we want to do once for the world what we'll do is use the image environment texture sorry open and then what we'll do is we'll go i've done already a 1k that i've blurred open image so i'll show you that and i think you'll see what i mean i should i might as well share the other one as well um so it takes a little bit time to load onto your graphics card so you have to be aware about once when you when you use high-res you know 16k textures it can suddenly lock up blender it would lock up most 3d programs is it shifting the um the texture off disk into graphics card memory so that's worth mentioning um okay so we've got a shader and then we go rather let's rather use that too uh just i just want to show you the so you know what we're looking at i'm a bit uh new to blenders you have to bear with me right so there we go this is all blurred i just took that photoshop blurred it saved it out exactly as a hdr so that's going to light our environment for us so that shouldn't do anything more there i don't think i seem to remember next thing we do is we'll select the sphere and we'll create a texture for that and we'll go into our shaders um i did initially do two versions but i'll do the simple one first um just to keep the video it's easy i guess so if we go add and go again textures and then environment texture stick that in there and then we'll plug that into the base color and then what we'll do because i did two versions one where because because in the end you have well if you don't want to mess with the um the exposure or lighting of the hdr image you really need to have uh an emissive surface as opposed to a principal um bsdf um so and then you need to have a another and another ground plane which is effectively effectively this which is bsdf with the hdr projected in equi triangular equip i can't pronounce that a triangular all the map you know like a map view um onto the image plane um so let's just have a look see if that's so i'm going to switch on to this now this again will it should we'll lock up the machine and it well it would if i had a texture attached to it so let's get into my textures and we'll go this is 16k um i mean i thought well let's go 16k i mean as you'll see there are implications whenever you're you know changing shading modes and stuff it'll suddenly lock up blender as it is doing at the moment which is perfectly normal just have to be patient um i mean maybe the thing to do would be work in a using a lower res and then switch it out for the final at the end um so and that's that's right and we want some first thing we need to do we need to get rid of the specular we don't want that um so just a quick demo of the the uh rotating the camera with the middle mouse button you see that all works great and also something else um when you're um when the camera is on the same uh projection point as the hdri then you get no issues with um curved space that the curved horizon lines the more you wonder more the camera wonders from the projection point um if we go to yeah yeah that's right 3d view um and then we'll select the camera um and we'll just zoom out a bit and if i transform this you'll see we'll we'll see the horizon slowly bend so yeah there's only so far you can really move um don't get too carried away otherwise it just looks like you know crazy 360 footage or whatever but you can do you can do you can move quite a lot and get away with quite a lot so um and the next thing i found was that it's important to um to go to the object and under visibility oh we're an eevee at the moment i think that would help we need this only really works in cycles by the way um okay um [Music] so if we go to the object properties when it's in cycles i always forget about that um oh it seems quite dark you'll see all those specs right now what we need to do is we need to tell we just we're just interested in this the reflection aspects of it and we'll switch those off um and the actual you know rendering the image so i think that's um i might have cranked it up in my vert i can't remember um okay so let's just have a look see how that we can look around all right something else we need to do is smooth the geometry there we go and you'll see um well okay so this is the this is the basic version but there are issues with it in terms of the actual lighting you can see it's actually affecting the sphere there um so now let's move on to the slightly more advanced setup which is using the um putting in another plane um which is two meters so let's go mesh plane and we'll scale that um scale nice and big out there and then we want to make sure that it's about two meters just above the like so well before i do that let's let's just chuck a chrome sphere in there and a cube um so you can see it all working so mesh cube stick that over here somewhere you see it's all working and we get a nice soft shadow from the blurred um hdr that's doing the lighting um so okay but you can see it looks slightly weird and that's as i said because it's uh let's let's actually when we're here let's do the sphere mesh oh god um let's do 50 25 okay stick that over there and we'll give that its own material as well um shape oops shader um and we'll go material new and we'll do the quick quick shade look at smoother smooth we'll make it very metallic and we'll take it very smooth and also make it very shiny uh is that right i think that is right so you can see now as we get close to the you know it's it's correct uh let me just um move it around to check that it is you see it's reflecting the environment correctly because it's it's reflecting uh the shadow lighting is coming from the the blurred hdr and the reflections are coming from the the sphere with the hdr image on it which is a high 16k one okay so now let's try and improve it a bit because you see it's a bit it's a little bit weird so um if i go and select my plane um and i go and give it a material what we'll do um is if i go to shader and we'll apply we'll apply it the original this material and we'll sort out the background because that's not really correct um so if we go to sphere okay again with the texture shoot 16k like presumably a 24 was it um 30 90 or whatever it is would do that a lot faster right so let's let the um so we've got the sphere selected and we're going to give it a new material and that's going to be an emissive one uh emission and let's apply it okay apply it and then we want to chuck in the um environment uh now like this tricked me so many times initially i thought why can't i just use a spherical map is there not a spherical map thing but that's effectively what the environment map is is a spherical map um but it took me ages to try and think why can't i just do a spherical map and it's it's because it calls it an environment map i think um if i've understood it correctly um so environment texture plug that in um and then select the 16k and now it might suddenly lock up as it as it loads in so it's useful to know you know obviously if you are using large textures where that where the bottlenecks are so you don't suddenly get surprised or if you've got a lot of lot of textures and stuff then you know um say before and all that sort of thing right okay so let's tap out of that and now we've got a lovely background um and let's just do that thing so we can look around now there's a slight mismatch between the obviously the emissive surface of the sphere and the the diffuse surface of the road um so what the way i fixed that uh or where you could fix it um if we just go disable that for now and zoom in a bit so we've got that nice and big so we can see this join i mean you could um presumably put like a feathered mat or something if i mean if you wanted to blend it that way but another way um just to make sure that the uh you know there's no sharp line like there is at the moment um you could do is you could add a curves um so is it curve rgb curve and do a slight um levels call on it you can even do a basic color corrector but you see that all works brilliantly and you can you can you can move the camera around a bit as you can see here you can you can move it as far as the image as the as soon as it intersects the sphere which has to say at about um at about 50 meters um is usually in in uh visual effects is is where you can start using cards i mean it depends a bit on on your lens but that you know that's sort of whether you can get away with stuff then um and um just you could switch over to ev or to to more real time see so you can see what's going on there um and you know you could go and paint the texture you could do a bake um i i better stop the video because it's getting a bit long now but i hope that's some help um and as you can see i just wanted to to touch on the fact that the further the way the camera drifts from the projection point the more distortion is apparent and more curvature and stuff you get so it looks fine low down because we're really close and even but as soon as you start drifting as soon as you start moving the camera up um more than a you can start seeing the curvature so just be aware of that um uh but yeah that's how you that's how a setup that you can do and this works most 3d programs in a similar way um it's not you know so what you know here you could use in maya or or whatever okay so i hope that some help uh i shall stop the video
Info
Channel: fx node
Views: 1,427
Rating: 4.8297873 out of 5
Keywords:
Id: WbxAmG0r-38
Channel Id: undefined
Length: 20min 19sec (1219 seconds)
Published: Wed Dec 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.