3D Basics - What are Normals?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Oh [Music] hey this is Chris plush from CG masters and this is another lecture from our course the blender encyclopedia which has over 52 hours of content and over 430 tutorials normals are something that were a little tricky for me at first when learning blender so I thought this might be a good video to share on our YouTube channel as well for anyone that wants to learn more about them so I hope you like in this lecture I'll be explaining what normals are and what their primary purposes are then later in this section and in other sections of the course we'll get into editing normals you honestly don't need to watch this lecture in order to watch the rest of the course but it's pretty important to at least be somewhat familiar with the concept of normals so at the very least I would skim through this lecture I'm going to keep things simple here too so in short normals are simply the direction of a face or vertex and we'll start with face normals so let me tab into edit mode of the shape right here and then in the viewport overlays menu here I'll turn on face normals all the way down here by clicking on that icon so these blue lines here represent the normals which basically just show us the direction of faces pointing and that seriously all a normal is now every face has two sides as you can see it has an outside and an inside the side with the blue line is considered the outside of the face and the inside has its own normal to pointing in the opposite direction but this one is obviously not displayed knowing which side of a face is outside is actually important for various reasons one of those reasons is that the outside normals are used to calculate vertex normals but now what our vertex normals well the vertex has Direction - just like a face and vertices point in the direction that's an average of the surrounding outside face normals for example check out this 90 degree angle right here in fact let me go in the front view by pressing down pad 1 we can see that a little bit more clearly right here we have the outside face normals displaying right now and you can see the top faces normal is pointing straight up and the side faces normal is pointing straight to the right so the vertex normals here should be pointing 45 degrees which would be a perfect average of this direction in this direction so let me go up into the viewport overlays menu here and I'll turn on vertex normals by clicking on that icon there and there you can see our vertex normals are pointing exactly like I said they would 45 degrees which is a perfect average of the surrounding outside face normals in fact better illustrate this I can select these two vertices and back in front view I'll move them up to change the angle of that top face and you can see as the angle of this face changes the angle of the vertex normal changes and that's basically all there is to it so the basic definition of a normal is pretty simple it's just the direction an element is pointing but now what our normal is used for while their main purpose is for lighting the surface of a model so let me tap out of edit mode of that shape and I'll enable example to collection over here which has a different example for us to use now we're gonna start things off simple by first describing how flat shading is calculated and then we'll get into smooth shading flat shading essentially uses face normals to determine how bright a face should be so let me select this cylinder and I'll tap into edit mode and let me go up into the viewport overlays and for right now I'll turn off vertex normals since right now we're just dealing with face normals so the general concept of using face normals for flat shading is actually pretty simple the more the face is normal is pointing toward a light source the brighter that faces which seems pretty obvious so let me turn on material preview mode so we can actually use the real scene lights so I'll press the Z key and choose material preview so you can see we have a Sun light over here pointing at the one side of the cylinder and you can see that if a face as normal is pointing more toward the light the face is going to be brighter and if a face as normal is pointing away from the light like the face is back here those faces are going to be darker so that's pretty simple stuff and don't forget the faces have two sides to each with their own normals so that's why the outside of these faces here are darker since their normals are pointing away from the light but the insides of those faces are actually brighter because the normals for that side of the face are pointing toward the light and that is flat shading in a nutshell every side of every face is illuminated individually based on how much their normals are pointing toward the light well how then does smooth shading work well let me go back into solid shaded view and let me hide the lamp for right now we don't need that anymore and to start things off we'll actually smooth shave the cylinder so let me right click and I'll choose shade smooth now we have a nicely smooth shaded cylinder now smooth shading is where vertex normals come into play so let me show you now let me go into top view and we can see the outline of our cylinder right here now let me also enable this collection right here called vertex normals and here I've drawn the direction of all the vertex normals for the cylinder now when we flat shade faces a face has one normal so this face right here for example would simply point in this one direction and the entire face is brightness depends on that one too but when we smooth shade faces this face will become a blend of this vertex normal and this one here so for this face right here here's what that blend would look like now you can see what I mean about the face becoming a blend of the vertex normals now there's probably more to it mathematically but this is just a way to visualize what's going on so the normals for this face right here they start from this vertex normal pointing straight up rotating downward to this vertex normal on the other side of it so instead of a face having one direction giving it one brightness value like in flat shading each part of the face is going to be brighter or darker depending on the direction of these normals and when we do that blend for every face on the cylinder the normals look like this so all the normals pointing outward in a radial way like this is what gives a cylinder a smooth rounded look when we smooth shading and that's basically all there is to it so with all the basics out of the way there are a few important things I want to go over the first is something called flip to normals and it's an issue that you'll encounter a lot now let me enable the next collection here and this has a cylinder in it with more faces which is just gonna help me explain the issue better so sometimes the outside of a face can be pointed inside of a model and this can have a bad impact on your shading for example right now the cylinder is perfectly smooth shaded let me tab into edit mode and we have face normals displaying already and you can see they're all pointing outside of the cylinder right now now let me go in the front view and I'll press Alt + a to deselect everything and let's enable face select mode here and let me select these four faces right there in the front now let me press numpad 7 for top view and you can see the faces I have selected right there are pointing outward but let's make them point inward and we'll see what kind of problems that causes so I'll press Alt + end for the normals menu and I'll choose to flip the normals and now you can see that this flips the direction on the outside faces so now the outside faces are pointing inward and are no longer in line with the other outside faces now let me tap out of edit mode let's rotate the view and check out the smooth shading you can see it's going crazy so why did this happen well we know that vertex normals are an average of the outside face normals so let me go back in the top view and tap back into edit mode so check out these face normals down here we have one face normal going down and one face normal going up so the average between these face normals is going to give us a vertex normal here that's going sideways let's see if we're right let's go up into the viewport overlays and I'll enable vertex normal display there and we were correct we ended up with a couple of vertex normals going sideways as you can see there and like we learned about smooth shading it's a blend between vertex normals so if the vertex normals are screwed up like this then the smooth shading is going to be messed up too that's why we ended up with those weird lines right there that's exactly right where those vertex normals are going sideways now let me tap back in and we got a lot of normals displaying right now let me switch off vertex normal display and we'll just deal with the face normals right now since that's what we need to fix now flip normals are actually a pretty common occurrence - they happen for various reasons including mirroring faces which always results in flipped normals or it can happen when making new faces when new faces are created blender assigns one side of that face to be the outside of the face and this sometimes is not in line with the rest of the faces on the model so you end up with inconsistent normals which can create shading issues like the one we see here and the solution for this is really simple we can simply press a to select all the faces and then press shift and end to do something called recalculating normals and that's it you can see those faces are now pointing outside along with the with the rest of the faces of the model and now because all of the normals are pointing in the same direction and are in line with each other that fixes up the shading issue as well now what's happening when you recalculate normals is blender tries to figure out which side of your model is considered the outside of a model and it'll point all of the outside normals in that direction and it made all the normals consistent with each other and it fixes up the shading issues now let's move on to another important note about normals in blender the rule is to keep your outside normals pointing in the direction that's rendered meaning if the outside of the cylinder is what's going to be visible in the render make sure your normals are pointing in that direction like they are right now however if we were to rotate this cylinder and make it more like a tunnel that will be inside of we'll need to flip the normals so that they're on the inside since that's what's going to be rendered so we're gonna want to flip these normals now to get them pointing in the direction that's rendered so I'll press Alt + n for the normals menu and choose flip and now all the normals are pointing inside now the direction of the outside normals is important for various reasons like for things such as normal maps and we'll get into them later in the course but they're basically a clever way of defining how light bounces off the surface and allows us to fake high poly details on low poly surfaces now let me enable the light I have in this collection you can see I have it there at the top of the tunnel and then I'll press the z key and we'll go into material preview so we can actually use that light and let me tab out of edit mode for a second as well and you can see I have a brick normal map already on the surface of the tunnel here as well so we have the light at the top of the tunnel here shining down and if we zoom in to the bricks you can see the tops of the bricks are illuminated by that light just like you'd expect them to however if I tab into edit mode and with all the faces selected if I press Alt + N and flip the normal so they're pointing outside you can see the lighting on the bricks change the tops of the bricks are now dark and the bottoms of the bricks are now light so it sort of makes the bricks look like they're inset instead of popping out which is how we'd want them to be so the direction of the outside face normals actually affects the way normal maps are calculated and that's one good reason it's important to make sure your normals are facing the direction that's rendered because they can affect things like normal maps above although it's most important to make sure your face normals are just consistent in their direction because like we saw earlier we had some faces pointing inward and some facing outward and we ended up with some serious shading issues so keep that Shift + n hotkey in mind to recalculate normals if you have any shading issues this is usually a good first step to troubleshooting now let me tap out of edit mode and I'll enable the next collection here and let me go back into solid shaded view now to end the lecture I just want to mention that normals are also used for some other purposes like transformations like in the transformation orientation lecture in the last section we learned that we can move faces along their normals meaning we can move this face for example along its normal in that direction if we want to to do that I'll just select the face go up into the transformation orientations and enable normal now to move it along the vertical axis of that normal right there I'll press G and then Z and you can see instead of moving along the global z axis it's moving along that normals direction and it also works sideways as well for example G and then X and G and then Y so it'll make all the movements based on the normal of that face normals are also used for particle systems the outside normals define which direction particles will be emitted from for example I've already added a particle system to this plane if I press spacebar to play the simulation you can see that the particles are being emitted at least initially in the direction of that normal and then gravity is taking over and pulling them down and normals are often used in various ways and modifiers too and we'll go over that in the lecture of any modifier that uses normals and later in this section we'll go over how to edit normals and why this can be useful but I'll end this lecture here because I just wanted to focus on the concept of normals and what they're used for so I'll see you in the next lecture
Info
Channel: CG Masters
Views: 14,940
Rating: undefined out of 5
Keywords: 3d, 3d art, blender, modeling, 3d modeling, texturing, texture, animating, animation, rendering, compositing, cycles, pbr, raytracing, cg, cg masters, tutorial, tutorials, training, learn, how to, normals, flipped normals, 3d basics, 3d for beginners, blender encyclopedia, normal maps
Id: hkTjreiookM
Channel Id: undefined
Length: 12min 14sec (734 seconds)
Published: Wed Jul 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.