Procedural Rock Material (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this blender tutorial i'm going to be showing you how to make this procedural rock shader in blender now if you want to download the project files they're going to be available on my patreon and gumroad the links will be in the video description so we're not going to be using any textures all we're going to be doing is using blender shader nodes to create this procedurally now with that said though i am going to be using this blue grotto hdr on hdri haven and i'm just using the 1k version so if you want to download this hdr uh the link will be in the video description for that and i'm just using this because it gives some really nice realistic lighting and i think it makes the scene look nicer but this is totally optional you definitely don't have to use this you can light your scene however you'd like now i am going to be using a couple lights here i'm going to have this back light right here for a rim light and then also this main light just pointed at the scene and then i also have the camera right here and it's just pointed at the center of the scene so what i'm going to do is press shift a and i'm going to add an ico icosphere now on the icosphere settings i'm going to add eight subdivisions now this is pretty high and depending on what computer you have you may not be able to handle eight subdivisions it might get kind of laggy or might crash because if i tab in edit mode here you can see that this is a pretty high dense mesh so definitely be careful with this if your computer can't quite handle this and it's a little bit laggy then you may need to go with something like six or seven subdivisions or something like that now if you have a 3d model of rock or maybe you've sculpted a rock and you want to just add the material onto that 3d model then you can definitely just add that in and throw the material on it but for this demonstration i'm going to be using this ecosphere and just make a really high dense mesh now why i'm making this really high dense mesh is because i'm going to be adding a displacement modifier to give the rock kind of bumps and stuff so if you want to add that displacement modifier i definitely suggest making whatever mesh you're going to use a really high topology like this but if you already have a rock 3d model created and you don't want to add a displacement modifier then that's totally fine and you don't need to make it super high dense here is the finished result right here and there's one thing that i wanted to mention if you're doing this tutorial in ev i'm going to be using this geometry with this pointiness value and what this does is it makes the parts that are going in darker and then the other parts that are coming out lighter and this feature this pointiness value doesn't work in eevee so if you're doing this in ev then this isn't going to work you can definitely do this tutorial in eevee but it may not look quite as good let me just hop over to evie just to show you what it's going to look like and you can see i just added a few lights in here just so that you can see what it's looking like so this is what it looks like an eevee it does look pretty cool but i think it definitely looks better in cycles all right so once you've added this material i'm just going to call it rock so the first thing that we're going to be doing is adding a noise texture and we're going to be putting that into the normal to add some bump so i'm going to press shift a and search for a noise texture just add it in right here and then i'm going to be using the node wrangler add-on if you don't have that enabled you can go edit go to preferences and then on the add-ons tab right here you can just search for node wrangler so this is a really great add-on i use it all the time so i just check box that and then you can just close this now if you control shift and click on the noise texture then you can see you can preview what the node is showing and that's the feature of the node wrangler so you can see there's the noise texture now it's placed on the sphere i'm going to with this selected press ctrl t and that's going to add this texture coordinate and mapping nodes and then this object here i'm going to plug this into the vector and what that's going to do is it's going to place the noise texture on the sphere a little bit better because instead of using generated we're going to be using object mapping now if we control shift and click back on the principle you can see what it's looking like and let's just plug the factor into the normal now you can see that it's looking really weird and that's because we need to convert this to normal data so that the principled can use it so let's press shift a we're going to search for a bump and now we can just place this right in between here and then plug the factor up to the height and that way it's going to convert it to normal data and then also this base color i'm just going to make this a lot darker uh so that we can see it a little bit better okay now you can see that it doesn't really look like rock it's pretty boring right here so what i'm going to do to make it look a lot like rock is this detail here we can turn this way up i'm going to turn it all the way to 16 and suddenly this looks a lot more like rock we still need to do some things to make it look better but it's already looking a lot like rock so now let's go ahead and add that displacement so again if you don't want to add this displacement you definitely don't have to but i think it adds a lot and makes it look a lot better so over here on this wrench here this is the modifiers tab i'm going to click on add modifier and then let's add the displace modifier now you can see that it just makes it really big we want to add a texture so i'm going to click on new here and then we can go over to the texture settings by clicking on this button or by going over here to the texture panel so let's just hop over there now right now it's set to image or movie that's something that you would like add into blender i want to click on this and change it to clouds and you can see that when you add those clouds it looks really weird it definitely looks like a cloud but it's way too strong right now and another thing that i'm going to do is this noise basis instead of the blender original i'm going to change this to veroni crackle and you can see what it does it makes this really cool look right here i'm going to change the size to like one so that it's a lot bigger and you can see it's starting to look a lot more like rock now if you want to leave it this strong you could it does kind of look cool so i don't want this to be that strong because it's way too strong for me so i'm going to click back over here onto the modifiers and then this strength here i can just turn this down so i'm going to change this value to like a .05 and you can see now it's way less strong but you can still see it if you want to turn it up a little bit more you could maybe a .06 maybe even a .07 if you want to you could turn it up a little bit more and now you can see that after adding that displacement it looks a lot more like rock now if i press z and move my mouse over to go back into solid mode you can see this is why i wanted to add so much detail because you can see that it's using that geometry to bump this out so if you have a low resolution mesh it's not going to look as high quality now i'm also going to click on this mesh and shade smooth so you can just click on object and click on shade smooth right here to smooth that out and then let's hop back into rendered mode so it's looking pretty good um but we don't really have any interesting colors right now it's just the base color which is just a plain kind of dark gray color so we're going to be making the colors now and then plugging that into the base color to make it look more interesting so i'm actually going to be using this noise texture mapping and texture coordinates so i'm going to press a to deselect everything and then b and just box select these and then i'll press shift d duplicate these and just move them up here and then i can control shift and click on the noise texture now i want to make the scale of this a lot bigger so like 80 or i guess a lot smaller you can see that now it has a lot more detail there and then that really doesn't look like rock it's just like a black and white so i want to add different colors into this so i'll press shift a and i'm going to search for a color ramp node so i'll drop this color amp node right in here so that we can preview it and then i'm going to pull this out a bit and then i'm going to make this black color kind of a dark gray maybe make it a little bit brighter so you can see it's a nice gray color now this one i'm going to pull this out here and then this one i'm going to make a slightly brown kind of dark color kind of a dark gray slightly brown color and then i want to make one more in the middle here so i'm going to click on the plus button you can see i added it in the middle you can just put it in the middle there and then this one i want to make just a slight blue because i it seems like some rock has just a tiny tiny tad bit of blue and of course you can change these colors up and make them how you like all right and that's looking pretty good now so i'm going to plug this color here into the base color and then control shift and click on this just to preview it also rocks aren't very shiny so real quick this roughness here i think i might turn this up to like a 0.6 or 0.7 maybe a 0.65 now this is starting to look good but there's a few things that i want to add to it one thing that i want to add is i want to make the parts that are coming out lighter and then the crevices and creases i want to make those darker so i'm going to press shift a and i'm going to search for a geometry node i'm just going to add this in here and then as i said at the beginning i'm going to be using the pointiness value and this doesn't seem to work in eevee so if you're doing this in ev then you're not really going to see anything with this node okay so now if we control shift and click on this pointingness you're going to need to hold down control and shift and keep on clicking until it goes to the pointiness oh let me just keep on clicking there we go now if you zoom in here you can see that it's starting to add that you can see there's lighter and darker areas but i want to make that a lot more contrasty so i'm going to press shift a and i'm going to search for a color ramp so just drop this in here and then we can preview what it's looking like now i'm going to pull these together and that way it's going to give more contrast so i'll drag these together you can see the darker areas are dipping in and then the kind of corners and lighter areas are coming out okay and now i want to mix this together with our other color so what i'm going to do is press shift a search for a mix rgb just drop that in here and then what i want to do is plug this into the bottom one make the top one black and then actually this right here this isn't going to go into the color this is going to go into the factor so what this factor does is it tells it what's going to be color 2 and what's going to be color 1. so color 2 is this if i control shift and click on it you can see what it's looking like and then color 1 is going to be the black and then the color ramp is telling it where there's going to be this color and where there's going to be black so now if we control shift and click on it you can see that the dark areas are black and then the lighter areas are this color right here now right now it's way too black so i'm going to actually pull this out a bit to make it a little bit brighter make it a little bit more contrasty because we definitely want it to be brighter and that looks pretty good that looks pretty good okay so now if i ctrl shift and click back on the principle you can see that now the darker areas are kind of more defined and it just looks a little bit nicer all right now there's one more thing that i want to add to this material if i control shift and click on this you can see that it's kind of all the same and there's just a bunch of random noise but what i want to do is i want to add some areas that are darker and some areas that are lighter so what i'm going to do is click on this shift click on this so that they're both selected i'll press shift d to duplicate them just move them up here and then i'll plug this up to here so that the mapping is the same and then i just want this if i ctrl shift and click on it so i can see it actually i'll click on this one this here i want this to be way smaller so something like a four or five and now you can see that there's some big parts that are lighter and darker now this one i'm going to delete it so i'll select it and then press the minus and that'll delete it and then this one here i want to make it darker so there's more contrast so i'll bring this down so that it's darker and then this i'll make it a little bit lighter and then i want to mix that together so that some of the parts are a bit lighter and some of the parts are a bit darker so what i'm going to do actually is press a to deselect everything i'll press b box select this area and just kind of bring it out so that we have a little bit more room here and then this mix here i can select it and i'll press shift d to duplicate it and bring it up here and just drop it right in between these two so that we can mix these two together so now what i'm going to do is this color here i'm going to plug this into the bottom one and then if i ctrl shift and click on this you can see what it's doing um this mix here i'm actually going to change this to darken and that looks a bit better and you can see now some parts are lighter and some parts are darker but it's still using that very fine detail and then if you want to play around with this factor here i find that if you turn it up it's a little bit better so there's some parts that are darker some parts that are lighter also if you want to play around with the scale here that'll change how much is lighter and darker i think i'll actually make it a little bit smaller and then if we ctrl shift and click back on the principle here you can see that now it just looks a little bit nicer now you may feel like it's a little bit hard to see it you can see the texture if you zoom in but it might be a little bit hard to see if you want to make it even more defined what you can do is press shift a search for a brightness and contrast and then just plug it right in here so right before it goes into the principle and then if i ctrl shift and click on it you can see this is what it looks like if i turn up the brightness it's going to make everything brighter of course but then if i turn up the contrast it'll make everything darker so i can just turn that way up and then turn the contrast way up as well and just make it more and more contrasty and then you can see if i have this selected and i press m to mute it you can see this is what it looks like before and then if i press m this is what it looks like after so it's just a little bit brighter and a little bit nicer so now i can control shift and click on this and then one more thing that i want to do is i want to add this color here into the bump so i'll click on this press shift d to duplicate it and just drop it right here and then this color here i can add it into the height and then if i control shift and click on it you can see that it's way too strong right now because that's going to make it look i think too strong so if i just click on this i can just make it way less so i'm just going to make it something around point one or point two maybe and then if i click back on this it just adds a little more detail and it kind of bumps out where the different areas are here on the color all right so that's pretty much it for the material i'm gonna go here and go render render image or you can press f12 to render out the image and then once this is done rendering i'm going to throw it into the compositor and add a denoise node to denoise the image okay so it's done now let's go over to the compositor and then i'll click on use nodes right here now you can see here's the render layers and composite what i'm going to do is press shift a i'm going to search for a denoise node just drop the denoise node right in there and then i can press ctrl shift and click on the denoise node and that'll denoise the image now if i go back to the rendering tab or press f11 you can see here's the image right now up here it's set to render result i want to change this to viewer nodes that it's going to show the denoised image so to save this image you can go image and click on save as and save it right there and then two things i wanted to mention really quick if you want to make this look a little bit better the strength here i think this might look a little bit better if it's only at like point one and then over here on the texture panel i think this might look better if it's a little bit uh less detail so i'm gonna make the number bigger and that way there will just be a little bit less of that veroni cracking right there i'll just render that again and there we go so there's the finished material so i hope this tutorial was helpful and i hope you enjoyed it again if you want to get the finished project files they're going to be available on my patreon and that'll also help to support me so again thanks for watching and i'll see you in a future video
Info
Channel: Ryan King Art
Views: 37,545
Rating: undefined out of 5
Keywords: Ryan King Art, rock, blender, tutorial, procedural, 3d, art, ryan king
Id: aq25CWtsLBY
Channel Id: undefined
Length: 15min 45sec (945 seconds)
Published: Wed Nov 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.