Procedural Scratched Plastic (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial i will show you how to create this procedural scratched plastic material in blender now there are a few really cool things you can do with this scratch plastic so in the tutorial i'll show you how to set this up so that you can change this value node right here and it's actually going to change the size of the scratches and then also you can change the color of the plastic so i think red looks pretty nice but you could also change it to blue so i'll show you how to set this up as well and of course you could create any plastic color that you wanted and as you can see this plastic material also looks kind of worn out on the edges so i'll be using the pointiness value on the geometry node to make the edges look like they're more worn out now one thing to note here the pointiness value doesn't actually work in eevee so if you want to do this tutorial in eva you can but you won't be able to use the pointing as value so instead what you could do is use the ambient occlusion node that works in ev it doesn't look exactly the same though but if you really want to do this tutorial in eevee then you could switch this out for the ambient occlusion node but i would recommend using cycles render for this tutorial this procedural material is available for purchase on my gumroad store so if you'd like to check that out i'll have the link in the description and also you get access to the project files if you join my patreon and if you'd like to purchase more of my procedural materials then you can also check out my blender procedural material packs or if you'd like to learn how to create more of my procedural materials then you can also check out my procedural material tutorial playlist on youtube and also before we start i want to thank this video's sponsor blender grid blender grid is an easy to use render firm specifically designed for blender i've used the service and i highly recommend it upload your blender file or a zip file with the blend file and textures you can change the render settings on the website before rendering blender grid will let you know the cost before you start the render you can even choose when you want the render to finish if you're on a tight deadline while it renders you can check the rendered frames to make sure everything is rendering properly once it finishes just download the files and compile the frames in a video editor use the link in the description to get 20 of render credit on your first render so let me just show you what i have set up in the 3d space if you want to set yours up like mine so i added an icosphere a subdivided ico sphere and i shaded it smooth and then i also added a suzanne monkey head and i gave it a subdivision surface modifier so it's nice and smooth and then i shaded the object smooth as well and then also to get some nice bright lighting right over here i added in this plane light so this is just a plane with a subsurf modifier so that it is round and then i gave it a bright emission material and then to get some nice realistic lighting and reflections i added in this machine shop zero two 1k hdr and this is from polyhaven.com so i'll have a link in the description if you'd like to download that from polyhaven.com and then i will also be using the node wrangler add-on in this tutorial so to enable that add-on you can just click on edit and open up blender's user preferences and then over there on the add-ons just search for the node wrangler add-on and you can just turn on the node wrangler add-on all right so let's get started so i'm going to select this object i'm going to click on new and i can just rename this to scratched plastic and then i can click right here and i can drag and drop this material onto this object as well so they have the same material alright so we're going to be creating four different types of scratches and then we'll combine them all together so to start off i'm going to press shift a and i'm going to add a noise texture so just search for the noise texture and drop it down here and then using the feature from the node wrangler you can hold down the control and shift key and then select nodes and that is going to preview the node so i'm going to turn the scale up to a 15 so it's a bit smaller and then with the noise texture selected i'm going to press ctrl t that's using the other feature from the node wrangler and that's going to add the texture coordinate mapping now i want to use the object coordinates so we're going to put the object into the mapping now this isn't really looking like scratches right now so on this scale here on the mapping i can change this x scale and that is going to stretch the noise texture and it's going to make it look more like scratches so on the x scale right here i'm going to change this to 30. so now those look much more like scratches now as i said at the beginning of the tutorial i want to create a value and then i can just change that value and it'll change the size of all the scratches so i'm going to press shift a and i'm going to search for a value node let's drop it here and then i can take this value and i can put that into the scale that way we can just change this single value and it'll change the scale for all of the scratches so on the value node right here i'm just going to set this to a value of 8. all right now those scratches are not very contrasty they're kind of just gray so i want to make this much more contrasty so to do that i'm going to press shift a and i'm going to search for a color ramp and let's just drop the color ramp right in here so i can now start to drag these out and that's going to make it more contrasty now i actually want to switch these values so i'm going to put the black over here and the white over here so i'm just going to bring the black to about there and then i'll bring the white over and you can now see that we have all those little scratches in there so that is it for our first layer of scratches so i'm going to be creating four different layers of scratches and then we'll combine them all together so to organize this better i'm going to press shift a and i'm going to go to the search here and i'm going to search for a frame and let's drop the frame in here so i'm going to deselect everything and then pressing b for the box select i'm going to click and drag and i'm just going to select these three nodes and then i can just drag and i can drop them into this frame now the texture coordinate and value nodes are going to be plugged into the other scratches so i'm not going to put them into this frame i'll just leave them out here i'm also going to click on this frame and then i can press the n key and that is going to open up this side panel right here and if you go to node you can go to this label here and i can just rename this to scratches1 and you can see now that i've renamed that this says scratches1 right here so i can now press n to close that now scratches2 is going to be very very similar to this so what i'm going to do is press b for the box select i'm just going to box select all of these nodes and then i'll press shift d to duplicate and we're going to drop it right up here so i now want to take this value node and i'm going to put it into the scale because i want to change the scale for these nodes as well i want this value node to control the scale for all the scratches and then also i'm going to ctrl shift and select this color amp to preview it and then also i want to take the object coordinates and i want to put that into the vector of this mapping here and then this scratches right here it says scratches 1 so let's press n to open up the side panel and i can just rename this label to scratches 2 and then i can press n to close that all right so now this is looking exactly the same if we control shift and select these nodes you can see they're exactly the same so these scratches scratches 1 they are going up and down but i want scratches 2 to be going side to side so right here on the mapping node i'm going to take the x scale and i'm going to turn that back to 1 which is the default and then i'm going to take the z value and i'm going to turn that to 30 instead so now if i control shift select this you can see that's going up and down and ctrl shift to select scratches too and that is going side to side so that's looking really good so we now have two layers of scratches so let's create a third and a fourth layer of scratches so to create the third layer of scratches i'm going to press shift a and let's search for a voronoi texture and i'm going to just drop it right up here let's also select the scratches um this frame right here and i'll press shift d to duplicate it and i'm just going to drop it right up here and then i can click on the voronoi texture and drop it in there and then again i also want to take this value and i want to put that into the scale so that we can control all of the scale of the scratches with just this value and then i also want to take this object and put that into the vector so that we're using the object coordinates and then i'm going to control shift and select the voronoi to preview it now if i click right here on this frame right here i want to press n to open up the side panel and this one i want to rename to scratches three and then i can press n to close that now on this voronoi texture i'm going to click on the f1 and i want to instead change that to distance to edge and you can see we have that cool texture there and so we're going to use these lines right here to create the scratches now these are way too thick right now and they're not very contrasty so i'm going to press shift a and i'm going to search for a color ramp and we're going to drop the color map right in here and then click and drag and drop it into this frame right here so i can now take this white value and i can drag it really really close so i'm just going to drag it very close just like that and then i'm going to click on the black tab and i'm also going to drag it out just a little and then i will drag the white tab even closer so that is the result that we're getting now i don't want them to look like chunks that are kind of connected together i want them to just look like scratches so to create this i'm going to click on this noise texture and i'm going to press ctrl shift d that will duplicate the voronoi texture but keep everything plugged up to it and then on the distance to edge i'm just going to change this back to f1 and then i'm going to take this color ramp and i'll press shift d to duplicate this as well and bring this down so i want to take the distance and i want to plug that into the factor and then i can control shift and select the color ramp so i'm going to drag this way back so that we can start to see this better and you can see that it's creating all these circles here so i want to make those circles way more contrasty so i'm going to drag this to about there and then i'll also drag the white tab out as well so those circles are much more contrasty so now i can use these circles here to get rid of parts of these scratches so that there won't be as many of them and they won't be connecting so to do that i'll press shift a and i'm going to search for a math node let's drop the math node right here and then click and drag and drop it inside the frame so i'm going to plug this color amp into the top value and then i'm going to take this one and plug that into the bottom value and then it's really important to make sure you clamp the values and what clamping the value does is it restricts the colors to just 0 and 1. so if you clamp that you can now see it there is dark right here there's black and then this is fully white whereas if you were to not clamp this you can see there's different shades of white so just clamp that and then it will clamp the values from zero to one and there we go so you can now see that we're just having some little scratches here and there and then if you want to play around with those scratches um you can change this right here so you can pull this color ramp out if you want to make those scratches a bit bigger or a bit smaller and you can also play around with this if you want to be able to see more of those scratches or less of those scratches so that is the third layer of scratches so i want to create one more very similar to this so i'm going to deselect everything and then press b for the box select i'm going to select all of these nodes right here i'm now going to press ctrl shift d ctrl shift d will duplicate everything but it'll keep everything here plugged up so we'll just bring this over so i know this might be looking a bit complicated but really it's pretty much the same thing this value is just going into the scale value and that way we can play around with this scale and it's going to change the scale for all the textures and then this texture coordinate is just telling all the textures to use the object coordinates so we're using the object coordinates there from the texture coordinate all right so right up here we're going to click on this frame and we're going to open up the side panel and i'm going to rename this one to scratches 4 and then i can control shift and select it to preview it now it's looking exactly the same right now and that's because we haven't really changed anything so scratches 3 and 4 look the same so i want to use a mapping node to change where it's mapped so i'm going to press shift a and i'm going to search for a mapping node and let's drop the mapping node right up here so now what i'm going to do is i'm going to take this object right here the object coordinates and i'm going to put that way up here on the vector of the mapping and then we can replace this so i'm going to take the vector and put that into the vector of the voronoi and also this one as well so put that vector into the vector the voronoi and then you can also click and drag and you can drop this mapping node inside this right here inside the scratches frame so now that we have that plugged up we can just change the mapping values and that's going to change where the scratches are so right here on the y rotation i'm just going to change this to 90. that way it's just going to rotate the scratches over by 90 degrees and now if you control shift and select this and this you can see that they are now located in different spots alright so we now have all of these scratches we have four layers of scratches so scratches one two three and four so we can now combine them all together into one group of scratches so to do that i'll press shift a and i'm going to search for a mix rgb and let's just drop the mix rgb right up here so i'm now going to take this ad this top one here i'm going to put the value into color 1 and then on the scratches 3 this value is going to go into color 2. and then i can control shift and select this to preview it now i just want to add the dark values so on the mix here i'm going to change this to darken and then on the factor you can just turn that all the way up to one and so what this is doing is it's adding both of these textures together and so we now just have one group of scratches so i'm gonna do the same thing down here so i'm gonna take this mix rgb and i'll press shift d to duplicate it and let's just drop it down here so we're gonna combine scratches two and one now so let's take the color we're gonna put that into color one and then we're going to take the scratches one we're going to take the color ramp and put that into color two and then just make sure this is set to darken with the factored one so again we're taking these two different scratches and we're combining them together and you can see now we have lots of scratches so now we have these two and we just want to combine these two together so to do that we'll do the exact same thing so i'm just going to select this and press shift d to duplicate it and let's take the color and we're going to put that into color 1 and then this one here we're going to put that into color 2 and then ctrl shift and select this and now you can see that all of those scratches have been combined and we now have this really detailed map with lots of random scratches so let's just select these nodes we're gonna just kind of bring them up here and so i now want to put these scratches into the normal to give it some bumps so the scratches are going to look like they're going into the mesh so i'll take the color here and i'm going to put that into the normal and then i'll press shift a and i'm going to search for a bump node because we need to convert this to normal data so just add the bump node right in here so the color is going to go into the height and then the normal can go into the normal so i can now control shift and select the principle and just see how that's looking and you can see we have all those nice scratches in there now i do think that looks a bit too strong so i'm going to turn the bump strength to a 0.1 just to a 0.1 so it's much less strong and you can't really see those too well now but once we make the object darker and more shiny you'll be able to see those scratches better and if you want to make the scratches deeper you can just turn the strength value up alright so now let's make the colors so i'm going to press shift a and i'm going to search for the geometry node and let's just drop the geometry node right here and then i'm going to plug the pointiness value up to the base color now as i talked about at the beginning of the tutorial the pointing as value doesn't work in blender ev so if you want to do this in eevee you could press shift a and you could search for the ambient occlusion node now if i control shift and select this you can see the ambient occlusion node sort of looks similar so you could play around with the options here and you could also add a color ramp in here to kind of play around with the colors um but i'm going to be using the geometry node because it works better all right now i want to be able to control those colors a lot better so i'm going to press shift a and i'm going to search for a color ramp and let's just drop the color ramp right in here so the color ramp is going to be in between the pointiness and the base color so i can now start to drag these out and we're going to make it more contrasty let's also ctrl shift and select the color wrap to preview it and you can see this is what the pointiness is doing so what it's doing is it's making the outer parts of the mesh lighter but then the crevices it's making that darker so i'm going to drag these pretty close so something like that and then i'm going to click on this one here and i want to make this a red plastic so i'm going to make this kind of a dark red kind of like that and if you'd like to use the same exact red color that i'm using that you can click over on the hex value and you can type in a hex value of eight one two seven two five so that is the exact red color that i'll be using and then this white tab here that is going to be the color of the plastic that's kind of been rubbed away and kind of worn so i'm going to change this to kind of a peachy tannish color and the hex value for this one is a hex value of 8c five seven all right so i can now ctrl shift and select this to preview that and you can see now it's just looking like the edges are a little bit worn now i also wanna make this more shiny because plastic is pretty shiny so i'm gonna take the pointiness value and put that into the roughness and then we need to control that better so i'm going to press shift a and i'm going to search for a color ramp and i'm going to put the color amp right in here between the pointedness and the roughness so we can now change these values and that's going to change the roughness so specifically what i want to do is i want to make the edges the worn edges look like they've been scuffed up a little bit and so they're going to be less shiny but then the rest of the plastic is going to be more shiny so i can just control shift and select the color ramp to preview it and i want to bring this black tab to about here and then i'll bring the white tab over to about here so i can control shift and select this and you can now see that right over here that is going to be less rough but then right down here that's going to be more shiny and you're not really able to see that very well so i'm going to take the black tab and i'm going to make that more gray and now you can see that's becoming more and more rough so i'm just going to turn this down so it's a bit more black something like that so you can see that is definitely more shiny but then kind of there along the edges that is more rough and you could make that stronger if you wanted to by pushing these values together so i'll just control shift and select the principle to preview that alright so that's looking pretty good you can see it's shiny and we have a bunch of different scratches in there so that is looking pretty cool but there is just one more thing that i want to do to this material i do want to add just a tiny little bit of noise all over the plastic so i'm going to press shift a and i'm going to search for a noise texture and let's just drop the noise texture down here and then i'm going to take this texture coordinate and i'm going to press shift d to duplicate it and drop it here you could also just take the object and plug that into the noise texture but it's easier just to add another noise texture over here and then you can plug the object into the vector and then i can control shift and select it to preview it so i'm going to turn the scale on this noise texture to 1 so that those colors are much bigger and then i do want to have a little bit of detail but not too much so i'm going to turn the detail here to a value of 8. all right so i can now plug this into the bump just to give it a little bit of bump so i'm going to take the bump node right here and i'm going to press shift d to duplicate it and let's drop it right down here so the normal can go through the normal so we can now take the factor of the noise texture and we can put that into the height and that way we can combine multiple maps together to make more bump so i can now control shift and select this bump and you can see what it's doing and that is a bit strong so on the strength here i'm gonna change this to a point zero four and that way it is much less strong so i can now control shift and select the principal bsdf and kind of zoom in here and you can see now there's just a tiny little bit of noise and that just makes the plastic look a bit more rough and then just one other thing that i forgot to do if you'd like to create a blue plastic let me just show you how to do that so i'm going to take this color ramp and i'll press shift d to duplicate it we're going to drop it right up here and then again i want to take the pointiness and put that into the factor and then i can control shift and select this color ramp to preview it so i can now just change these colors to whatever color i want the plastic to be so in this case i want to do a blue plastic so i'm just going to make this a blue color and the hex value that i'll be using for this plastic is two three three four eight one and then also this right here i don't want this to be this peachy color so i'm gonna make this a little bit more blue and a bit darker and the hex value that i'll be using for this one is 6 9 6 c 7 f so i can now take the color and put that into the base color just ctrl shift and click on that to preview how that's looking so i do think a blue plastic looks nice of course you could change this to whatever color of plastic that you want i'm just going to take this color and put it back into the base color because i prefer the red plastic all right and there we have it so there is the finished procedural scratched plastic material and here is the final render thank you so much for watching and i hope you enjoyed the tutorial and if you'd like to help support me and my youtube channel then you can purchase this procedural material on my gumroad store and you also get it if you join my patreon and you can also check out my blender procedural material packs if you'd like to purchase more of my procedural materials and you can also check out my procedural material tutorial playlist on youtube if you'd like to watch more procedural material tutorials so i hope this tutorial was helpful and thank you for watching
Info
Channel: Ryan King Art
Views: 122,965
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, procedural, scratched, plastic, blender, tutorial, shader, material, scratched plastic, procedural material
Id: l0whu3494_c
Channel Id: undefined
Length: 19min 52sec (1192 seconds)
Published: Thu Feb 03 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.