Procedural Scratched Metal Material (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this blender tutorial I'll show you how to create this procedural scratched metal material so after we create the procedural material I'll show you how to join the material together into this custom node group so that you can control the look of the material so we first have the overall scale that changed the size of the entire material and then we have this metallic value if you want it to look less metallic or more metallic and then we have two different colors for the metal so we have metal color one and then we also have this other color for the metal metal color too then we have the noise scale so if you just want to change the size of the noise maybe make the noise really small you could change that and then we have the scratches scale so if I zoom way into this object here kind of to the reflections you can see there's these little scratches you can especially see right there so this scratches scale is going to make the scratches much smaller or much bigger and then we also have the scratches color so if you want to make the scratches really dark you can see that's where the scratches are you can see them really well if I make them really light colored but I'm just going to have them like a mid- gray color and then we have the roughness of the metal so if you want really shiny metal or really rough metal you can change that and then we have the metal bump strength so this is just the overall bump of the material and then we have the scratches bump strength so if you want the scratches to be much more bumpy you can turn that up there and if you'd like to purchase this procedural material and help support the channel you can get this material on my gum store and my patreon page the links are in the description and to purchase all of my materials definitely check out my ultimate blender procedural material pack which comes with all my procedural materials preset up for blenders asset browser with custom thumbnails sorted catalogs and customizable node groups and you can also purchase all of my materials individually on my gumed store and if you'd like to learn how to create any of my procedural materials then definitely check out my blender procedural material tutorial playlist here on YouTube all the links are in the description so real quick I'll show you what I have set up in the 3D view Port if you want to set up the blend file the same way that I have so I went to the ad menu and I added an icosphere just cuz I want to preview this material on a sphere and then right after you add the icosphere if you click right behind me on that little add icosphere settings just open this up I'm going to turn the subdivisions up to six so it is nice and smooth and round and I'll close the ad icosphere settings and I can use the object context menu and shade the object smooth then I also thought it would be cool to add this object to a cylinder so I'm going to add this to a cylinder but of course you can add it to whatever object you want and I'm going to move the cylinder over and then I'm going to go into edit mode and I'm going to add some Loop cuts to the cylinder so you can press crlr to add Loop cuts and I'm going to add some Loop Cuts there and then also if I go to the face select I'll select this face and I'll press I to inser that face so there's another loop there and then select the bottom face and inser that as well so if you go back to object mode now you can press control 2 control 2 is going to give it a subdivision surface modifier and so you can see by adding the loop Cuts there it is just nice and smooth there on the edges and then we can shade that object smooth as well and then both of these objects I scaled them down to like a point two so hit enter and then also this object I might scale it down just a little bit more and why I'm scaling them down is because the default objects in blender are kind of large they're a bit larger than an average human so I'm just scaling this down to a much better size for the material and let's just bring this over here and then I need to press CR a and just apply the scale so these are the object's new default size and then I also added a camera and I just pointed the camera at the objects now for the lighting if you go right over here to the World Properties I added in this Dam bridge 1K HD this is a free HD from poly haven.com the link will be in the description if you'd like to download the same HD that I'm using so once you download the HD you can click on the yellow dot here next to color and you can choose environment texture and then just open up the HD and this will give some nice realistic lighting and Reflections in the 3D scene so if I go into the camera view you can kind of see that lighting now also I added these different area lights right here to get some nice lighting so I added this bright area light here and this is just shining kind of on the front and I set the power to 40 and just have it as a white color kind of for a main light and then all of these lights back here these ones I set the power to 10 and they made them kind of like a yellowish color so they kind of add a yellow Rim light to the edges so you can see by adding the lights there they're kind of is like a yellow tint there on the metal so I added one there I also added another one here and also one here and then also one here on the bottom kind of adding a nice yellow light there to that cylinder object now if you want to make the world background transparent that you can't see the world in the background you can go here to the render properties and you can open up the film Tab and you can just check mark the transparent button so that way you can't see the world in the background but it will still light the 3D scene and then also if you want to make the colors look nicer I am using the view transform of filmic here on the color management and then also the look here I set this to very high contrast to pop out the colors and make everything more contrasty and saturated and then I also am using the Cycles rendering engine because I am going forward realism so I'm now in the shading workspace so I have the 3D viewport right over here and I'm in the rendered mode and then I have the Shader editor right over here so I'll select the object and I can click on new and I can just call this scratched metal and then I want to add this material to the other object so what I can do is just click and drag on this material and I can actually drop the material onto that other object as well so you can see they both have the same material and then I also am going to be using the node Wrangler add-on in the tutorial to preview the different nodes so if you don't have the node Wrangler enabled you can click on edit and you can go to the preferences and then here in the user preferences if you go to add-ons you can go to the search and you can type in node Wrangler and just enable the node Wrangler add-on so it's built into blender and I'll show you how to use the add-on in the video so let's close the user preferences so I'm going to start by making the textures for the scratches so to do this I'll go to the ad menu and I'm going to search for a voro texture let's drop the voronoi up here and then with the voro texture selected I'm going to press contrl T and that is going to add the texture coordinate in mapping nodes and then also to use the node Wrangler let's control shift and select the voro texture to preview the voro texture on the object now I want to use the object coordinates because the object coordinates is going to place the text dra on the object more evenly so let's put the object into the vector so now let's change the voro settings so right here on the F1 I'm going to change this to distance to Edge and you can see it's going to give us these little lines here and that is going to be the scratches and then I want to turn the scale up to like a 50 so you can see more of it and then I'll also turn the detail to like the max of 15 so you can see if I zoom in there there's going to be much more small scratches and then this roughness here I'll turn to like a75 and I'll leave the other settings how they are now this 4no texture is really hard to see it's really dark so let's go to the ad menu and we're going to search for a color amp we'll put the color amp after the voro so we can now use these two tabs here on the color ramp and we can make it more contrasty so I'm I'm going to drag this white tab way over and so you can see if there is more white on the color ramp it's going to be lighter so now you can actually see those cracks better so now what I want to do is keep my nodes nicely organized so I'm going to click and drag to box select both of these nodes and I'm going to join them together into a frame by pressing contrl J so this is just a nice way to organize the nodes and then if I select the frame and press f2 to add a label I'm going to call this mapping all right so we now have this vorno and this color amp but I want to add another vorno and another color ramp to make some more scratches and then we're going to mix both of the scratch textures together so with these two nodes selected I'm going to press control shift d so control shift d will duplicate the NES but it's going to keep the wires plugged up and then let me control shift and select this color up here to preview it so let's change some of this Forno texture settings so for this one I'm going to turn the scale to like 114 so that they are much smaller but then all the other settings I will leave how they are so if I contrl shift and select both of these you can see see that now we have two different amounts of scratches some bigger ones and some smaller ones so I now want to mix the bigger ones and the smaller ones together so to do that I'll go to the ad menu and we're going to search for the mix color node because the mix color can mix two different colors together so we're going to take this top one and we're going to put that into color a and then this bottom one that is going to go into color B and then I can control shift and select this mix to preview it so what I want to do is just add the dark values because if I preview this texture here you can see the black values are darker and so that's where the cracks are so I just want to add the dark values so let's contrl shift and select this mix again so on the mix type here I can change this to darken and then if I turn the factor to one it's just going to add the dark values so now you can see we have the bigger and smaller cracks mixed together so let's box select all of these nodes and we'll join them together into a frame by pressing contrl J and I can select the frame and add a label by pressing F2 and I can call these scratches now I don't want these scratches to be all over the place I just want them to be in some patchy areas here and there so we're going to create another texture and use that texture as a mask to just make the cracks in some spots so to do that I'll go to the ad menu and I'm going to search for a noise texture we're going to stick the noise texture here so just drag it like somewhere in here into the frame and I can pull it up here so now I also want to use the object coordinates so let's take the mapping vector and I can put that into the vector of the noise texture and let's just control shift and select the noise texture to preview it now on the settings here I want to turn the scale up to like a 35 and let's also turn the detail up to the max of 15 so it is very detailed in the roughness here I'll turn this up to like a 73 now I want to make this more contrasty cuz it's pretty gray right now so I can select one of the color ramps and I can press shift d to duplicate it and I can drop it here next to the noise texture so after the noise and then if I change these values so drag the white and black tabs that'll change the contrast so I'm going to drag the black tab to about here and and the white tab Tu out there so now we have a really good mask for just where the cracks are going to be or where the scratches are going to be so I want to now mix them together so I'll just select this mix color node and I'll press Shifty to duplicate it and drop it here and let's just drag it up here above this one so because this color amp is a mask telling where it's going to be let's put the color into the factor and then I can control shift and select the dark in so now I can take this dark in here and this is going to be the combined scratches and we're going to put that into color a so then we can control shift and select the darken so then here on the darken result I'm going to change this to the light tin and why I'm using the light tin is because if I control shift and select the top color ramp just the dark parts are where those scratches are going to be but then the white Parts aren't going to have any scratches so let's control shift and select the lighton and then on this color here color B I just need to make this fully white so now if I zoom out here you can see there are a lot of scratches but they're just in some spots here and there but then I do want to make the entire thing a bit more contrasty so I'm going to select one more of the color amps and I'll duplicate it with shift d and let's just drop it here and we can use this color to make it more contrasty so I'm going to drag the black tab over here and then the white tab I'll drag to kind of about here so it's even more contrasty all right let's box select these nodes and just bring them out of the way so that is going to be it for the scratches now as well as creating the scratches I also just want to create a base texture so to do that we'll go to the ad menu and we're just going to search for a noise texture we'll just add some overall noise to the metal let's drop the noise texture down here and I want to use the same mapping cuz I want to use the object coordinates so we'll take the mapping Vector put that into the vector and I can control shift and select the noise texture to preview it let's change some of the settings so I'm going to turn the scale to like a 15 and then I'll also turn the detail to 15 so now it is more detailed however I want to have there be some roughness but I want to add a little bit of variation just to make it more interesting so that some parts have more roughness and other parts have less roughness so I'm going to be adding another noise texture and that noise texture is going to go into the roughness so I'll select the noise texture I'll press Shifty to duplicate it and let's drop it here and then again we want to use the vector so we'll plug the vector into the vector here the noise texture so it's using the object coordinates and I can control shift and select this noise texture to preview Edge so for this one I'm actually going to leave all the settings how they are but I do want to make them more contrasty by adding a color ramp so I'll go to the add menu and I'm going to search for a color ramp so let's drop the color ramp here after the noise texture and then this color ramp can go into the roughness value of this noise texture and then I can control shift and select the noise texture to preview it so now if I drag the black and white values that is going to control the roughness so let me just zoom in here if I make it more black there isn't going to be quite as much roughness cuz black is going to equal zero however if I drag the white tab over instead white is equal to one so if I drag the white tab over more and more there's going to be much more roughness so I'm going to drag the white tab to about here and then also the black tab I'll drag it to about there now I want everything to be a bit more rough so I can click on this black Tab and I can actually make this a pretty light color so I'm going to make it kind of like a light gray something like that so now if I zoom in here you can see that part is like less rough but then over here there is more roughness so now I want to make the entire thing a bit more contrasty so I'll go to the add menu and again we're going to search for another color ramp and we can put the color ramp after this noise texture here and then I can just kind of drag these values together a bit more to make them a bit more contrasty so something like that is a bit better so let's zoom out here and I want to keep the nodes nicely organized so we'll box select all these nodes here and I'll join them together into a frame and then I want to select the frame and let's add a label and I can just call this like base texture all right so we now have the scratches in the base texture so I want to join both of them together and then we'll add that to the base color so to mix colors together we can again go to the ad menu here and search for a mix color let's drop this here and then this base texture we are going to first put that into the factor and and that'll determine what parts are going to be color a and then what parts are going to be color B so I'm going to use color a and color B to make the actual colors for the metal so for color a I'm just going to make this kind of like a gray color so maybe something like that maybe a little bit darker and then color B this is going to be a very dark gray so something like that and if you want to use the exact same colors that I'm using then you can go to color a you can go to the hex value and you can punch in 73 73 73 and then here on the bottom one color B the hex value will be 32 32 32 all right so that's going to be the main colors of the texture but then I also want to mix in the cracks so we'll take this mix node we'll press shift d to duplicate it drop it here and we can take the result and we can put that into color B now color a this is going to be the colors of the scratches but if I control shift and select the mix we need to put something into the factor to actually tell this mix color where the scratches are going to be and it'll put color a where the scratches are so that is where the scratch scratches come in so this color can go into the factor and now color a if I drag this up and down change the color that is actually going to be the color of the scratches and if you want to use the same scratches color that I'm using the hex value will be 59 59 59 and that's here on color a so we can box select these nodes we can join them together into a frame we can add a label and we're going to call this like base color so because this is the base color we can take this mixed result here and we can put that into the base color the Shader and I can control shift and select the principled Shader to preview it you can see that material is starting to look cool however I want to make it look like metal so we need to make it more shiny and give it metallic value so we'll turn the metallic up to one so it is looking more like metal and then just for now I can just turn the roughness down a bit however I do want the roughness to have a bit of variation so that some parts are more rough and other parts are less rough so I can take this mixed result here and we're going to put that into the roughness now I want to be able to control the roughness values better so we can just change the colors by adding a color ramp so we'll go to the add menu We'll add a color ramp just drop this here and then we can change the colors so let's click on the black Tab and if we make the black colors lighter so if more of the color is light it's going to be more rough however if it is more black it's going to be more shiny so here in this black color let's just make this kind of like a darker gray and then this one here let's turn this down a bit so everything is a bit more shiny so it's kind of like a light gray and if you want to use the same exact colors that I'm using then here on this first one it'll be 93 93 93 on the hex value and then this second one here this one is going to be CB CB CB so now this is really starting to look like a cool metal material and then also later on in the tutorial when we create the custom node group I want to be able to control the roughness values so we can just add a node which will make the colors lighter or darker and then that'll control the roughness so if we go to the ad menu we can search for the Hue saturation value and let's stick it here after the color ramp so the Hue saturation value has this value so we can change the value to make it more rough or more shiny so let's box select these nodes and I'll join them together into a frame and I'll add a label and we can just call this roughness and then I also want to add some bump because right now the material doesn't really have any surface bump so let's add the bump so the first thing that I want to add is just add some overall bump to the entire material so let's go to the base color noise texture we can take the factor and we can drag this all the way over here here and stick it into the normal now there's some weird shading issues and that is because we need to convert the black and white data from the noise texture into normal data that the Shader can use so I'll go to the ad menu we're going to search for a bump node and we'll stick the bump node here in the wire and then to actually convert it to normal data we want the normal here to actually be going into the height value instead so the noise texture needs to be going into the height value and now you can see the metal looks super super bumpy but that is way too strong and I want this material to be pretty shiny and smooth smooth so I'll turn the strength to just like a 05 so it is much more subtle and then I do want to add one more layer of bump and that is going to be the scratches so here on the bump node I'll press shift d to duplicate it and let's drop it here after the first one so the normal can go through the normal and so we now have this extra height value that we can add data into so let's go up here to the scratches and what we can do is just take this color ramp color here and we can put this into the height value of the second bump and so that is going to again convert it to bump d dat so if I zoom in here it's kind of hard to see the scratches let's just go over here to kind of the reflections and I want to make these a bit stronger so they're easier to see so I'll turn the strength up to just like a 0.1 and now you can definitely see those scratches better if you want to make them more and more bumpy you can turn the scratches up so now it's like super scratchy but I just want to make the scratches a bit subtle but you can definitely see those scratches just kind of around the material so let's box select these nodes and join them together into a frame and I can add a label and let's just call this bum and that is it for for the procedural scratched metal so I'm now going to show you how to join this together into a custom node group so it's easier to control the values so what you can do is click and drag to box selct all the nodes except the material output and then to join it together into a node group you can press contrl G you can press the Tab Key to go in and out of the node group with the node group selected so let's drag the group input over here and I can just drag it out to make it bigger and then I can give it a name so I'm going to call this scratched metal so then let's go back into the node group and if we press the N key to open up the side panel we have this interface here if you go to this group Tab and I want to rename this so instead of calling it bsdf I'll just rename it to Shader so if I go outside of the node group you can see that is now called Shader so if we go back into the node group with the Tab Key I can go here to the group input and we can add values up to the group input and then that way we'll be able to control those values outside of the node group so the first value that I want to control is the overall scale of the material so this mapping node is plugged up to all the the textures so this scale will control the size of the entire material so let's put the scale into the group input and then if I click on the scale here you can see that it's three values but I just want to make it one value so let's click on the vector and I can change it to float instead that'll make it one value and then here on the default value we need to turn this back to one and you can see the texture is still gone that's because we need to go out of the node group and we need to turn this scale to one so now that'll change the overall size of the material so let's go back into the node group now the other value that I want to control is the metallic so let's drag the group input way over here drag it over to the principal Shader and we can take the metallic and put that into the extra socket so now it says metallic so that way we can control the metallic values and then I also want to be able to control the colors so if I drag the group input back here this first mix is going to have the colors of the metal so let's put color a into the extra socket and then color B into the extra socket and then if I double click on these to rename them I'm going to rename this one to metal color one and then this one I'll rename to metal color 2 now as well as controlling the overall scale of the material I also just want to be able to control the scratches scale and the base texture scale so let's drag the RO input back here let's actually drag it down a bit so what I can do is add another mapping node after these ones and after these ones and then we can use the scale values of those mappings to control just those textures so what I first need to do is hold down the shift key and right click and drag over both of these wires and then let go and that's going to add a reroute so I'm rerouting both of these together so I can now drag this here into the base texture so they're both going through the reroute and then I want to do the same thing up here so I'm going to hold down the shift key and I'm going to right click and drag over these wires and let go so that's added these two a reroute so now we just have two single wires so I can now go to the add menu and we're going to search for a mapping node and we'll stick the mapping node here between these wires and then I'll press shift to duplicate and we can drop another mapping no in between these wires so now this mapping is just controlling these textures and then this mapping is just controlling these textures so we can now take this scale and let's put that into the extra socket and this one I want to rename this to just noise scale and then this one up here this one is just controlling the scratches so I'll put the scale into the extra socket and this one I can double click on this and I can rename this to scratches scale now both of these are going to have three values if I go outside of the node group you can see they have three values but I just want one value so we're going to go back into the node group and we'll click on the noise scale and we can change the type to float instead and then the default value we can turn to one and then we'll do the same thing on the scratches scale so click on the scratches scale and we can change the type to float and then the default value we can turn to one and then we need to go outside of the node group and we need to turn the noise scale to one and the scratches scale back to one so now you can actually see the texture so let's go back into the node group now I also want to be able to control the scratches is color so if I drag the group input way up here we have this color here on the second mix and that is going to control the color the scratches so we'll put a into the extra socket and then I can rename this to scratches color and then I also want to be able to control the roughness of the material so we have this Hue saturation value here which the value will control the roughness so put the value into the extra socket here and then I can double click on this and just rename it to roughness and then finally I want to be able to control the bump strengths so this first bump strength here is changing the noise so let's put the strength into that extra socket I can double click on this and rename it to noise strength actually I'm going to call this noise bump strength and then this bump here this one is going to control the bump of those scratches so we'll put the strength into the extra socket here and this one I can rename to scratches bump strength so scratches bump strength so let's just drag the group input way over here underneath the mapping we'll hit the Tab Key to go out of the node group and we'll hit the key to close the side panel and that is it for the finished material so real quick I'll just review the material so we have the overall scale of the material we also can control that metallic value and then we also have the different colors for the metal and then we also have the noise scale just to change the size of the noise so I can make the noise like really small or really big and then we also have the scratches scale so I could make the scratches quite big or really small and then we also have these scratches color so I could make them kind of like a dark color or maybe if I wanted to make them look kind of rusty or something I could maybe turn that to like a slightly red color then we have the roughness of the material and actually if you make it really rough that looks pretty cool it's like it makes the metal look more worn and old and then we have the noise bump strength and then finally the scratches bump strength so that's going to be it for this tutorial so I hope you enjoyed this and thank you for watching and if you'd like to purchase this material and help support the channel you can get that on my gum Ro store and my patreon page and to purchase all of my materials definitely check out my ultimate blender procceed procedural material pack which comes with all of my procedural materials preset up for blender's asset browser with custom thumbnails sorted catalogs and customizable node groupes and you can also check out my proced Dr material packs which are just packs of 10 materials and you can also get all of my materials individually on my gumd store and to learn how to create many more procedural materials definitely check out my blender procedural material tutorial playlist here on YouTube the links are all in the description but I hope you enjoyed this and thank you for watching watching
Info
Channel: Ryan King Art
Views: 13,233
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, metal, scratched, scratched metal, procedural metal, procedural, material, shader, tutorial, metal shader
Id: ewq69iNRdmQ
Channel Id: undefined
Length: 25min 31sec (1531 seconds)
Published: Thu Jan 25 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.