Blender Tutorial - Creating a Combat Knife Game Asset - Part 3 - Baking Normal Maps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey this is Chris plush from CG masters and in this part of this tutorial series we're gonna be baking normal maps for our low poly knife here now some of the things I'll be going over is how to make sure your normal maps and your meshes look completely consistent no matter what software you want to use them in because some different software like unity or the Unreal Engine or substance painter might interpret triangulation a little bit differently and also might deal with normal Maps a little bit differently so I'm gonna show you how to bake normal maps for whatever software you want to use it in and I'm gonna show you how to make sure your meshes look totally consistent among or throughout all the different software's alright well let's just get to work and I'll explain things along the way so let's press numpad 1 for from view and the first thing we'll do now is just triangulate all of our meshes using a modifier because some programs triangulate faces differently to ensure that our mesh and it's normal map look the same and all software we're simply going to triangulate it in blender before exporting this is important because normal maps are calculated based on the object's geometry so blender will actually triangulate this knife when it bakes the normal map and if we export the knife without triangulating at first to other software like substance painter for example substance painter will then triangulate the faces differently than blender and then it won't display our normal map the way we intended so to avoid problems like that will just triangulate it in blender so I'll right-click on the knife blade to select it go over to the modifiers click add modifier and add in triangulate then if you press the z key for wireframe you can see the triangulate modifier in action and now let's copy that mount of fire to the other objects so select the handle first hold shift select the handguard and then select the blade and now we can press ctrl + L for the make links menu and select modifiers and now I'll copy our blades triangle modifier to our other two objects as well so now everything is triangulated and the next step is to make sure that everything is set to smooth that's important for the normal the normal baking process so I'll press the T key select all of our objects and click on smooth shading alright now we can go ahead and start the baking process and there is actually a cool add-on called text tools which has a lot of really useful baking tools in it and I'll link to that in the description if you want to play around with it but for this tutorial we're just gonna go ahead and do things manually alright now we need to create an image to bake the normal maps too so let me drag this window over and over here in our image window click on the new button at the bottom and now we can create a new image and let's rename this to knife underscore normal and let's change the width and height by clicking on the width field and dragging it down to the height field that way we can change both at the same time and by default blender doesn't bake normal maps with anti-aliasing so we'll have some jagged lines so the way to smooth out those lines is just to make it rather large and then shrink it down afterward so we're gonna bake this at 4096 by 4096 and we don't need an alpha channel for this and let's make sure to enable 32-bit float now that part is very important by default blender would bake this at 8 bit and that's not enough color information to give us a high quality normal map 8-bit normal map baking would result in things like color banding instead of smooth gradients and that would be really really bad for really reflective surfaces and I'll demonstrate that in a couple minutes as well but I just want to get this baked process rolling so just for now just click on 32-bit float to enable it and then click on OK to create our new image so here's our really large image we're going to be baking to now the next step is to make sure our normal Maps are baked with the right color information because things get a little different when you're baking at 32 bits so let's press the end key for the right side toolbar and let's switch color space up here from linear to non-color that's going to make sure we get the correct information baked into our normal Maps and keep in mind you only have to change that value if you're baking at 32 bits if we leave that at default and bake at 32 bits it results in this and these colors aren't correct for a normal map so things aren't going to look right in the end it should look more like this so let's make sure we set color space to non color and we're good to go so let's press the end key now to get rid of the toolbar and now I think we're ready to bake so first let's make sure our vendor is set to cycles render that's what we'll be using to create these normal Maps and in order to make a normal map on this particular image right here we first have to load this image into an image node so to do that we'll first have to create a material so I'll select the knife blade go over to the materials and click on new now to edit the nodes for this let's click on the diagonal lines up there and drag it to the left to split the window and let's change the right side over to the node editor now we have the notes for that newly created material press the end key to get rid of the right side toolbar so let me zoom in and I'll press shift and a for the add menu and from the texture submenu I'll add in an image texture and I'll drag it right over there now from this menu right here let's load in the image we just created called knife underscore normal and as long as this image node is selected then this is the image that will be baked to when we actually go to bake things alright so let's go over to our render buttons now and scroll down to the bottom and expand the bake panel this is where the magic happens so let's first change the bake type over to normals so we can bake normal Maps and the Swizzle options right here actually very important and the middle one in particular which is basically the green channel keeping it at plus y is for applications that use opengl which includes blender and unity and if we switch that to negative Y it'll bake normal Maps for DirectX applications including the Unreal Engine so this is what you want to change if you want to create normal maps for different software we're going to keep it at plus y so we can create a normal map to be used in blender and unity and now let's go down here and enable selected to active since when we baking our high poly object on top of our low poly object and let's also increase ray distance to 0.1 now basically what Ray distance means is how far away other faces can be from our low poly object and still get picked up in the baking process if we left this at zero then our high poly object and our low poly objects faces basically need to be perfectly overlapping in order to get baked so setting this value a little bit higher it just gives it some breathing room alright now let's hold shift and click on the first layer there so both of our layers are enabled and in order to bake selected to active first we select our high poly object then we hold shift and select our low poly object since that's what we're going to be baking to and now let me drag this over so we can see the image window more let's make sure our image node texture here is selected since this is the image that's going to be baked too and now we just click on bake alright so here the results of our first bake and everything's looking great now basically what we're going to do is just repeat that process for the other objects and have them all bake onto this one image here but first we're going to make sure that we save this so let's go to the image menu click on save as image and I'm going to keep all these options over here is default we're gonna save it as a PNG we is a lossless format and allows us to save at a higher bit than eight but you'll notice that we can't save it as a 32-bit which is what we rendered it at and that's okay because 32-bit contains a massive amount of information and we really don't need that much for a normal map saving it at 16-bit still saves enough information that we get an extremely high quality normal map so I'm gonna save this as a PNG at 16-bit and I'll press ENTER alright let's continue on down the line to the handguard now now the first thing I'll do is select the low poly handguard I'll go over to the materials and I'll give it the same material as our knife blade and I'm giving it the same material because we need the selected image node right here in order to bake to this image so now we can go over to the bake buttons and let's select our high poly handguard first then hold shift and select the low poly one and before we hit bake let's make sure to disable the clear option if we leave that enabled it's going to clear this entire image before baking and we'll lose our knife blade normal map data all right so I think we're all set and now let's click on bake and it should show up right up there alright so that worked out perfectly our image is almost complete we just need to bake the handle now and we'll do this the same exact way let's select the low poly handle go over to materials give it the same material make sure the image texture node is selected then we'll go over to the bake buttons select high poly hold shift select low poly and then click bake alright so that's all there is to it there's our complete normal map and let's make sure that we save this now so I'll just go to image save image alright so now that we're actually done baking the normal map let's set up a proper material so we can actually visualize it in cycles and we're done with the image window right here so let me click on those diagonal lines drag it to the right in order to join those windows together now let's press 2 on the number row just to show our low poly objects because that's all we need now now I know I said I'd go over things like why we were baking in 32-bit instead of 8-bit and I still will after the heat tutorial so stick around if you're interested in that information but first we're gonna just work on that material to visualize things so let me drag the node editor over and right now all of these objects have the same material which we have open over here and the first thing we'll do is switch our diffuse node to a principal node so I'll select the diffuse node and then press shift + S for the switch type menu and switch it over to a principled node now if that hockey doesn't work for you that's because it's specific to the node Wrangler add-on and to enable that add-on go to file user preferences and then the add-ons tab type in node and make sure node Wrangler is enabled it's just going to give you a bunch of really useful hotkeys to use in the node editor so now in order to get this image texture to be interpreted as a normal map we first have to switch color to non color data and now we have to run this through a normal map node so let me drag that down here and I'll press shift and a and from the vector menu we'll add in a normal map node drag right in the middle there now we simply connect the color socket to the color socket then the normal socket to the normal socket and we are good to go so let's go over to the 3d view hover over that with the mouse and press shift + Z to get a preview render going in cycles and right now I just have a gray world and now how many lights so nothing's really being lit very well but you can tell the normal map is working but what I'm going to do now is just set up an HDR world environment in order to light this knife properly now if you don't have any HDR images to use you can download some amazing ones for free over at HDR I haven comm link is in the description and once you find a good HDR image to use let's go over to the world buttons click on use nodes and click on the button next to color and switch this over to an environment texture now click on open and load in whatever HDR image you downloaded I'm going to load in simon's town rocks and now we have a real life environment or a real world environment lighting our scene let me press numpad 5 for perspective view so you can see my environment the problem is our knife is still just a diffuse texture so it's not really reflecting anything so it's hard to gauge that normal map so what I'm going to do is turn metallic up to 1 and I'll turn roughness down to 0 basically makes a mirror for us and now we can properly see our normal map in action and make sure everything looks good it looks perfect now my knife is not going to be this reflective it's gonna be more matte in fact so what I'll do is I'll keep roughness at 0.5 and I'll turn the base color to a very dark gray and take a look at it like this and that is looking pretty sweet all right so that's actually going to do it for the baking part of this tutorial series now don't forget we baked our normal map at a very large size so now you can go ahead and scale it down and some image editing software to whatever size you want it to be I'm going to leave mine as is for now though until I'm finished all the texturing and now I'm going to go over why exactly we baked a 32 bit instead of 8 bit so baking normal maps that blenders default 8 bit produces this image it looks fine to the naked eye but when I increase levels in Photoshop you can clearly see the color banding instead of smooth gradients and this is what that color banding looks like when I apply it to a reflective surface and blender not smooth at all this is actually acceptable for grungy materials or matte materials since roughness can hide all that banding so you can actually get away with a default 8 bit bake sometimes but in contrast this is our final 16 bit normal map much better and after we bake you can even reduce the bit depth to 8 bit in software like Photoshop in order to reduce the file size if you need to reducing the bit depth down to 8 in Photoshop will have dithering applied to it which is basically noise that helps hide the color banding so after reducing the depth in Photoshop to 8 bit this is what the final normal map looks like in blender not too bad certainly better than the default 8 bit baked with all that severe color banding so that's actually going to do it for this video in the next part of this series we'll be doing the texturing probably in substance painter we'll see if you like this video give it a thumbs up and don't forget to subscribe for new videos every weekend and if you have any useful information on normalmap baking please let me know in the comments and until the next video I'll see you around [Music]
Info
Channel: CG Masters
Views: 28,168
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, unity, unrealengine, ue4, game, gamedev, gamedevelopment, normal, normal map baking, normal baking
Id: Zohoy5ifr2I
Channel Id: undefined
Length: 12min 52sec (772 seconds)
Published: Sun Jun 10 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.