Blender | Normals, Normal Maps, and Bump Maps Explained

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello i'm grey goo and this is a hopefully brief little video to explain normals normal maps and bump maps what they are how and where to use them and why everything you'll see is coming out of blender 3.0 and that's where i'll show you how to use this stuff but the general concepts are pretty universal and should apply to different versions and other 3d packages without any further ado let's get into it in blender and most 3d software pretty much every object we see and deal with is a mesh that means that it's defined as a set of vertices each in a specific position alongside edges that indicate how those vertices are connected and faces to indicate how the edges are connected now when it comes to actually rendering these meshes you'd assume the faces are all you need if there's a face here render it otherwise don't however when lighting gets involved things get a little more complicated let's say we have a really simple lighting system and what it does is says hey when a face is facing towards the light it gets brighter when it's facing away from the light it gets darker now this works pretty well if you ignore the lack of shadows or reflectiveness but there's an issue take a look at this face is it facing towards or away from the light it could be facing up towards the light which means it should be bright but it could also be facing the exact opposite direction away from the light which means it should be dark notice that in both of these scenarios the geometry the vertices edges faces are perfectly identical so we need some other kind of data baked into our mesh to solve this ambiguity enter normals normals are little xyz vectors think arrows that show what direction each face is pointing in and they are baked into the mesh just like vertices edges and faces in blender you can see them by going into edit mode then overlays then at the bottom here normals there are different ways to show them which you can pick between but i'll show face normals technically normals are stored in vertices because faces are spooked but don't worry about it that's very technical and face normals are easier to understand turning the overlay on you can see all the little lines coming out of my faces those are the normals and now looking at this face we can see that it's facing away from the light and should be dark and hey so it is all right so let me have normals i guess and that's like cool or whatever but why should i actually care well now that we have a value in our meshes that tells the rendering engine what direction everything is facing we can mess with it to get cool results take this icosphere for instance it's pretty low poly so you can see every individual face really easily if i wanted to make it look like a smooth sphere my only option would be to add more geometry and that kind of works but it's still pretty obviously just a bunch of flat edges and i need a lot of geometry to make that unnoticeable at reasonable distances now getting rid of the subdivisions we can look at the normals and think about how we might be able to smooth out the lighting without adding any more vertices you can see that you get these hard edges in between faces because every face is pointing in a different direction when you move from one face to another the normal just instantly switches from pointing one direction to another but what if instead of just instantly switching we smoothed out the transition so instead of the normals being uniform on a single face they smoothly transition or interpolate from one phase to the next in blender there is a way to do this and it's called smooth shading so if i just head out of edit mode right click and click on shade smooth boom now instead of easily visible individual faces i just get a smooth line from light to shadow of course this isn't perfect like grazing angles i get weird lighting on the faces and you can clearly see that the outline has a circular but this is a really low poly ball and if i zoom out a little all the problems become basically unnoticeable it's night and day between the smooth and flat shading and suddenly a little bit of subdivision will go a much longer way of course this is just built into the way we display most meshes but normals don't just work for smooth shading we can also use them to create the appearance of extra small details in our mesh without adding any extra geometry now use how we manipulate normals inside of the mesh itself that's more of a programmatic approach just taking the data we already have messing with it but what if i could add extra data use that to create the illusion of 3d details on a flat plane well we already have textures for colors or roughness or whatever in our materials so if we could find a way to encode normals into a texture we could slap whatever normals we wanted onto any object regardless of the geometry what does this look like well take a look at this plane if i wanted to add a ridge in the middle of it it would look something like this and you can see in rendered view if this works great as a ridge you can see a clear light and dark side it just works but the problem is that in order to get this ridge i need to add a lot of geometry and if i wanted this to be some small detail on a larger object like some armor or something adding all these loops and geometry density is a bit much for something so simple if i wanted a lot of detail like this my mesh could get out of hand very quickly looking at the normals we can see how around the ridge its flat is pointing straight up and on the ridge we have normals pointing every which way if we could bring those normals down onto the flat surface and get rid of the extra faces we could mimic this ridge and lo and behold that's what i've done now it's pretty obviously not the same the shadow on this side and the bounce lighting on this side are totally gone and that's a trade-off you have to make with this kind of normal manipulation it's not like it's terrible though it still has light and dark sides that react to the light and if we zoom out and look from a distance the effect becomes a lot more convincing in general anytime you're doing normal manipulation you will lose some quality in the effect but the quality drops are more noticeable the bigger the detail and the closer you are so usually this kind of stuff is only reserved for really small details or when you're working under really tight polygon counts we usually see normal maps in two places one is like the example i showed earlier where details are projected or baked down into a texture and the other is when we download materials from the internet and they come with a normal map you can use to add depth and fine detail i'm not going to touch baking here because that's a whole can of worms that can be its own entire video so let's say i've downloaded this metal plate material off the internet and i want to use it in blender here we can see the various textures associated with material it's got albedo or color roughness height which we won't use right now but i'll get into later and here we go normals now you might look at this crazy multi-colored texture and go how is that encoding direction and if you'll excuse a brief tangent let me explain so here's an example normal map where you can see the details pretty clearly now the way normal maps are set up is that the directions a face could point in x y and z are attached to the three color channels in an image red green and blue so the more it's facing towards positive y the more green it is the more it's facing towards positive x the more red it is and the more it's facing towards positive z the more blue it is important to note is that normal maps are usually in what's called tangent space that means that these colors are relative to the face they're on not the world in general and that the channels go from zero to one so facing in the negative x direction means no red and facing up is 50 red this is a different object space where the channels actually go between negative one and one object space tangent space object space tangent space okay tangent over i've got this plane i want to be sheet metal so let's make a new material for it and open up the shader editor then i need to add some image texture notes for each of the images i want to pull in so one for color one for roughness and one for my normals [Music] now for my roughness and normal maps i need to change the color space of these textures to non-color that's because i don't intend to display these as colors and therefore don't want blender to mess with them in any way if you forget to do this with textures like the roughness it won't quite look right but might be fine if you forget to do this with a normal map it'll be a lot more noticeable and definitely give weird results so next up i'll change the metallic slider on my shader to one because this is a middle sheet and hook up my textures so albedo goes into the base color roughness goes into the roughness and normal up almost tricked you there your normal map doesn't just go right into the normal slot we can try that but it uh definitely does not look right what we need is a normal map node so i can just hit shift a to add a new node go to vector then normal map now i just hook up my mineral map to the normal map node and hook that into the normal slot on my material well hey that's all you need to do to hook up a normal map if the place you got the material from set it up correctly you shouldn't need to touch anything on the normal map node except for maybe the strength in case you really want to over or under emphasize the height of the details that usually isn't necessary okay that's normal maps down but what about bum maps well bump maps also known as height maps are often used in a similar way to normal maps but instead of encoding direction they encode height and then the shader uses that height to figure out the normals instead of giving you the normals directly what do i mean by they encode height exactly well let's see i've got this plane it's flat and it's sitting at zero so let's color it black now i want to add some bumps to it so i'll turn on proportional edging grab some random points and lift them up you can see now that the higher the points are the brighter they get and this is literally all a height map is the brighter the point the higher it is the lower the darker simple okay so now we know what a bum bump is how do we use one well let's go back to that metal plate material you might remember that as well as normals they also provided a high texture so let's test it out make another image texture note bring in the height make sure it's not color and add a bump node by hitting shift a vector bump now we plug our texture into the height not the normal and plug the node into the normal input on our shader and whoa this is way too strong and steep let's fix that your first instinct might be to reach for the strength slider but no bad if there's one thing you should remember from this video make it this the strength slider on the bump node should only be used for mixing different bump maps or if you need to animate the height for some reason if you want to change the overall steepness of the bump map use the distance but we need a little bit of explanation on what the distance actually does basically as i said earlier the plot map is a black and white image so every point has some brightness value between zero and one but what do zero and one actually mean in terms of height well that's what the distance is asking for what is the height difference or distance between zero the darkest value and one the lightest value for the bump node it's asking for this value in blender units which is equivalent to meters back to our material i can't imagine the major bumps on this plate be more than like a couple centimeters tall so i just put 0.02 into the distance and now that looks a lot more reasonable if we compare it to the normal map yeah it looks about right now to be honest this isn't exactly close to a real world example of where you'd want to use a bump map if you're downloading material or asset off the internet and it comes with a normal map nine times out of ten you should just use the normal map it's easier to set up and more exact the reason this material even came with a height map is for displacement which is a whole thing and deserves a video all on its own so where or why would you want to use a bump map over a normal map well the simple reason is that bump maps are more well simple at least when it comes to making if i want to make a normal map i have to deal with baking and tangent space and object space and math and but literally any black and white texture can be a bump map if i'm making this procedural rock material here i wouldn't even know how to start making normal map to use with it but i can just take one of these noise textures slam it into a bump node pick a reasonable distance and boom my rock is suddenly looking a lot more rocky plus if i want to add multiple layers of bump maps it's really easy because the bump node has a normal input so i can take this lower detail noise texture get a bump node 4 and then just plug its output into the other bump node and the two just work together perfectly additionally and i'm not going to get into this right now because it also could be its own separate video but maps are a lot easier to manipulate and mess with using node math which is all but necessary in complex procedural materials so basically if you already have a normal map you should use it over a bum map and if you're trying to share your work with others you should probably be making and giving them normal maps too but if you're working with procedural materials or generally just building stuff up from scratch but maps are simpler faster and more versatile okay so recap normals are extra vectors stored inside of a mesh to tell the rendering android where any given face is pointing we can interpolate between the normals on different faces in order to smooth them out visually this is called smooth shading and it's just an option in blender it's not perfect though so make sure you have enough geometry or the object is far away enough to not notice the artifacts as well as messing with existing normals we can add detail using a normal map which changes the direction parts of faces are pointing the same way a color texture changes the color of different parts of faces normal maps won't be as nice as having the detail actually there because they don't cast shadows but that's fine so long as you keep it to small and short details to use a normal map you've downloaded just load it into an image texture node set the color space to non-color plug that into a normal map node and plug that into your bsdf you use a bump map similarly to a normal map but instead of being an rgb texture it's just black and white and it encodes height instead of direction to use a bump map you've downloaded load it into an image texture node set the color space to non-color plug it into the height input of a bump node and plug the output into your bsdf control the steepness of the effect using distance not strength the way the distance works is that it sets the difference in height between the tallest brightest parts of the bump map and the darkest slowest parts set in blender units which is equivalent to meters generally you'd want to use normal maps when you have them i.e if you've downloaded material or asset off the internet but if you're getting procedural and making your materials from scratch you're going to want to use bump maps because they're easier to make easier layer easier to mess with through node math okay so that's it that's all you reasonably need to know and more about normals normal maps and bump maps i've linked to the example material i used in the description in case you really want to use it yourself and if you like this video consider subbing to the channel i'll probably post more videos like this on other topics i think i can teach people about alongside any more music i release so make sure to look out for that in the meantime i'll see you next time
Info
Channel: grey_goo
Views: 2,744
Rating: undefined out of 5
Keywords:
Id: l5PYyzsZED8
Channel Id: undefined
Length: 12min 28sec (748 seconds)
Published: Sat Dec 11 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.