Procedural Rocky Lava Material (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this blender tutorial I will show you how to create this procedural Rocky lava material in blender if you'd like to help support the channel and purchase this material then you can get that on my gumroad store and my patreon page with the links in the description and as you may know I do create a lot of procedural materials and so every time I create another 10 procedural materials I can pile them together into a procedural material pack and so I've just recently released blender procedural material pack number 12. so if you'd like to purchase any of my procedural material packs I'll have a link in the description where you can purchase on my gumroad store and I'm also selling all of my procedural material packs on the blender Market as well as some other online marketplaces and you can also get access to all of my procedural materials if you join my patreon page or if you'd like to learn how to create any of my procedural materials you can also check out my blender procedural material tutorial playlist here on YouTube so let me just show you what I have set up in the 3D space if you want to set it up the same way that I have so I want to preview the material on a sphere so I'm going to press shift a and I'm going to go here to mesh and I'm just going to add an icosphere and then right after you add the icosphere right behind me if you click on the add icosphere settings just open that up I turn the subdivisions to 6 because I want a very nice smooth sphere and I also want lots of topology because we are going to be using the displacements in the node Editor to actually displace The Rock so I'm going to set the subdivisions to 6 and then I can close this and then using the object context menu I can shade the object smooth now I want this to be much closer to the real life scale and blender and the default primitive objects are about an average human height so I'm going to hit s to scale then I'm going to type 0.5 and then enter and that way the sphere is about half the size of a human and then with this object selected I can press Ctrl a and I can apply the scale so this is now the object's new default size and then using the object context menu you can also shade the object smooth then I also added a camera and I just pointed the camera at the sphere now for the lighting I added in this skylit garage hdri and this is a free hdri from polyhaven.com I'll have a link in the description if you'd like to download it and I just downloaded the 1K HDR version from polyhaven so once you've downloaded the hdri you can go to the world properties and you can click here on color click on the yellow Dot and you can choose environment texture and then you can click on the open button and open up the downloaded hdri and this is going to give us some nice realistic lighting and Reflections on the object and then also if you want to make the background transparent like I have if you go up here to the render properties and open up the film tab you can check mark the transparent button and that way you can't see the hdri in the background and then also to make the colors a little bit nicer if you open up the color management here you can set the view transform to filmic and on the look here I'm going to set this to high contrast and this will pop out the colors and make everything more contrasty and saturated now as I mentioned I am going to be using the displacements in the node editor so if you want to use the node editor displacements then you will need to be using the Cycles rendering engine because the node editor displacements aren't supported in blender EV so make sure you're using Cycles if you want to use the displacements now this sphere is already pretty high detail but I want to give it even more geometry so that it has more detail for the displacements so if you click right over here on the modifier properties I'm going to click on ADD modifier and I'm going to add the subdivision surface modifier and so this will subdivide the mesh and give it even more geometry and then right here on the levels viewport and render I'm going to turn these both up to two and then I am in the shading workspace and I have the 3D viewport right here and I'm in the rendered mode so I can preview the material and then I also have the Shader editor right here so I'm just going to click on new to add a new material and I can just rename the material and then I will also be using the node Wrangler add-on in this tutorial to preview the different nodes so if you don't have the node Wrangler enabled you can click on edit and then you can go to the preferences and then over there in the add-ons tab just search for node Wrangler and you can check mark the node Wrangler add-on and I'll show you how to use it in the video so we're going to be creating two different shaders we're going to be creating a lava Shader and a rock Shader and then we're going to join the two shaders together and add the displacement so first let's create the lava so I want to create a texture for the lava so I'm going to press shift a let's go to the search and I'm going to search for the noise texture and let's drop the noise texture down here and then I can control shift and select the noise texture to preview it and that is using the feature of the node Wrangler so if you hold down the control and shift key and select different nodes it's going to preview the node on the object and then also with the noise texture selected I'm going to press Ctrl T and that's going to add the texture coordinate and mapping now we don't actually need the mapping node so I can just select the mapping node and then press X to delete it and then I want to use the object coordinates so let's take the object and put that into the vector and the object coordinates is going to place the texture on the object more evenly so now let's change some of the noise texture settings so on the scale here I'm going to turn this up to like 10 so you can see more of the texture and then I'm also going to turn the detail all the way to the max of 15 so there's more detail and then I also want to give it a bit more roughness so there's even more detail so I'm going to turn the roughness to like a 0.8 now this is a hot liquid lava and so I want to make it a bit more like liquid and make it look like it's moving around so to do that I'm going to turn up the Distortion so I'm going to turn the Distortion to just like a 0.5 and now it looks a bit more like a liquid which is moving around so I can now take the noise texture factor and I want to put that into the emission so it is actually going to be emitting light like hot lava and then I can control shift and select the principled Shader now I want to make the base color so that it's not interfering with the emission color so I can take the base color and I can turn that to fully black and then right here on the emission strength I want to make this brighter so I'm going to turn the emission strength to my like a five so it's much brighter now that doesn't look like lava and that's because it's very white so I want to change the colors in the noise texture before putting it into the emission so to do that I'm going to press shift a let's go to the search and I'm going to search for the color ramp and let's put the color ramp in between the noise texture and the emission so we can now change the colors of the color ramp to change the colors of the lava so I first want to make it more contrasty because I can't really see the texture so I'm going to click on the black tab here and I'm going to drag this out and if I drag it over now it's much more contrasty and then I'm going to click on this color and I'm going to make it fully white and then I'm going to make it a very bright red color for the lava and then also right here if you click on the white tab this color I want to click on the color and I'm going to make this kind of a yellowish orangish color something like that now I also want the lava to be pretty shiny so let's take the roughness right here and I'm just going to turn the roughness to a 0.2 so now if you look right up here you can see there's that reflect action and it is much more shiny now this lava is very smooth and so I want to put some data into the normal to give it some bump so let's take the factor and I'm going to put that into the normal of the principal Shader now we need to convert this to normal data because this is black and white data it is a gray dot but then this is normal data is a purple dot so to convert it to normal data I'm going to press shift a let's go to the search and I'm going to search for the bump node and I'm going to put the bump node in between the noise texture and the normal and let's take the factor and I'm going to put that into the height value of the bump and then it is pretty hard to see because it's in a mission but let's just Ctrl shift and select the bump to preview it and I want to take the strength here and I just want to turn it to like a 0.5 so that it is not quite as bumpy so now I can control shift and select the principal Shader to preview it and that is it for the lava Shader so what I'm going to do is just click and drag to box select all these nodes here and then I can press Ctrl J and that is going to join them together into a frame and then if you click on the frame you can press f2 to add a node label and I'm just going to rename this to Lava it is totally optional you don't need to add a frame but I do just want to add a frame to keep my nodes nicely organized and then I can also drag these together to kind of compress them a bit so that's the lava Shader so I now want to make the rock Shader down here so I'm going to press shift a let's go to the search and I'm going to search for another printable Shader and let's drop it down here and then I can control shift and select the principled Shader to preview it now I want to make this Shader look like bumpy Rock so to do that I'm going to add another noise texture so let's press shift a I can go to the search and I'm going to search for the noise texture and let's drop the noise texture down here and then I can control shift and select the noise texture to preview it and just like we did for the other noise texture I want to use the object coordinates so let's drag the texture coordinate down and then I can put the object into the vector and the object coordinates will place the texture on the object more evenly so now let's change some of the noise texture settings so I want to turn the scale to like 10 so that it is smaller and then let's also turn the detail all the way to the max of 15. and then I do just want to add a little bit more roughness so it adds a bit more detail so I will turn the roughness to just like a 0.6 and then I do want to add some Distortion but not very much so I'm just going to turn the Distortion to like a 0.2 and that way there's just a tiny bit of distortion so I can now take the noise texture factor and I want to put that into the base color of the printable Shader and then I can control shift and select the principled Shader and that doesn't look like rock because it is just black and white so I want to add a color ramp in between the noise texture and the principle to change the colors so I can press shift a let's go to the search and I can search for the color ramp and I want to put the color ramp in between the noise texture and the principle and we can now change the colors here to make it look more like rock so I'm going to click on the white tab here and for this white color I'm going to just make it like a gray color kind of a mid gray so it looks more like raw and then I also want to make this rock look slightly Brown so I'm going to hold down the Ctrl key and then click right here in the center and that's going to add another tab in the center and then if I click on this color right here I want to make this just very slightly Brown so I'm going to bring it over just a little bit towards the orange and then if we turn this down it's going to be kind of like a grayish Brown now this still doesn't look very much like rock and that is because it is very smooth so I want to take the factor here I'm going to bring out a wire and put that into the normal of the principled Shader to give it some bump now we have some weird shading issues and it's very dark right there and that is because we need to convert the black and white data into normal data that the Shader can use so I'm going to press shift a let's go to the search and I'm going to search for the bump node and let's put the bum node in between the noise texture and the normal and then it actually can convert to normal data we want the factor to be going into the height value so now it actually looks much more like rock now it is a bit strong so I'm just going to take the strength here and I'm going to turn it down to like a 0.3 so it's not quite as strong so there we go there is the procedural Rock so I'm just going to click and drag to box select all these nodes here and then I can press Ctrl J and Ctrl J is going to join them together into a frame and I'm just going to kind of bring these in to compress them a little bit make them a little bit more Compact and then if you click on the frame you can press f2 to add a label and I'm just going to rename this to rock just to keep my nodes nicely organized so I can now Ctrl shift and select the two different shaders and we have the lava Shader and The Rock Shader so I now want to join them together so I'm going to select the printable Shader then I'm going to hold down the shift key and select the other Shader I can now press Ctrl 0 and control 0 is going to add this mix Shader and it's going to join both of them together and I can just box select these nodes and kind of bring it into the center now the factor is going to control how much of each Shader it's using so if I turn the factor all the way up to one it's just using the rock or if I bring the factor all the way to zero it's just using the lava but I don't want to evenly blend between the two shaders I want there to be some chunky Parts which are the rock but then I want the rest to be the lava so to do this we're going to be creating another node set up here in the center and we're going to be putting the node setup into the factor to control where it's going to be Rock and lava so I'm going to drag these two frames out of the way a little bit so there's some more space here in the center so the first thing I'm going to do is press shift a I'm going to go to the search and I'm going to search for the vorno texture and let's drop the vorno texture right down here and then I can control shift and select the vorno texture to preview it now to make the voronoi texture look like chunks of rock I'm going to click on the F1 here and I'm going to change it to distance to Edge so you can see these y white Parts here that is where the chunks of rock are going to be popping out of the lava but then these black lines here that is where the love is going to be now I also want to use the object coordinates just like with these other textures so I'm going to take the object and let's put that into the vector of the vorn oil and then I also want to scale the voronoi texture so I'm going to turn the voronoi scale to like a 2.25 I just find that a 2.25 looks pretty good now right now those chunks of rock are pretty large but what we're going to be doing is adding a noise texture in the vector to distort the placement of the voronoi and then they will look smaller and I also want to add a noise texture in here to distort it because right now these black lines are very smooth and they don't look very organic or natural so I'm going to press shift a let's go to the search and I'm going to search for the noise texture and let's put the noise texture in between the object coordinate and the voronoi and so if I put this in here it's going to distort the placement of the voronoi and now it looks much more random so let's also so change some of the noise texture settings so I'm going to turn the scale to like a 6 so that it is a bit smaller and then I want to give it lots of detail so let's turn the detail all the way to the max of 15 and that is looking a lot better now it's distorting it way too much and I can't really see what the original vorno texture looked like it's just distorting it a lot and so I want to make the noise texture have less control over the vector of the voronoi so what I'm going to do is press shift a let's go to the search and I'm going to search for the mix node and let's just drop the mix node right up here and I actually need to take the lava Shader and bring it up so there's a bit more space and then I can bring the mix right over here now if you're using an older version of blender this is the mix RGB node instead so if you're using an older version of blender you can follow along and just use the mix RGB or if you're using blender 3.4 or a later version you can add just the mix node now we want to use color values because right here this noise texture it is using a color value so let's click on the float here and I'm going to change this instead to color and then I can drop the mix note in between the noise texture and the voronoi so now what I can do is I can mix the noise texture with the original object coordinates so I'm going to take the noise texture and I'm going to put that into B and let's take the object and I'm going to put that into a and again if you're using the mix RGB node A and B is just going to be renamed to color one and color two but it'll still work exactly the same so now this factor is going to control how much of a it's using and how much of B it's using so as I turn up the factor it's going to be distorting it more and more now you can see when I drag the factor it's moving the texture around a lot so to make it so it's not being moved around quite as much I'm going to click on this mix here and I'm going to change the mix instead to the linear light so this way I can drag the factor and it's still going to distort the vornoy but it's not going to move the texture around quite as much and then I have found that a factor of 0.7 looks pretty good so it is still distorting it a lot but it's not distorting it quite as much so where the white parts are that's where the rock is going to be popping out of the lava and then where the black parts are that's where the lava is going to be so I can now take the distance and I can put the distance into the factor of the mix Shader and then I can control shift and select the mix Shader to preview it now right now it's just the lava and that is because this vorno texture isn't very contrasty so to make it more contrasty I can press shift a let's go to the search and I can search for the color ramp and I want to put the color ramp in between the voronoi and the factor and so I can now click on the white Tab and I can drag the white tab over and as I drag it over it's going to make the light Parts brighter and so where the white parts are that is where the rock is going to be so if you want lots of rock you can drag this way over and you can see now it's mostly rock or if you want to be mostly lava you can drag this way back and just have a few bits of rock here and there I want to bring this over so that it is about here so there are some big chunks of rock but then there's lava all around it now the rock isn't actually being popped out of the mesh if you look here on the side you can see it's very smooth and so I want to put a value into the displacement of the material output so the rocks are actually being displaced and they're popping out of the mesh so I'm going to take the vorno texture distance and I'm going to put that into the displacement of the material output so now you can see it is doing something and The Rock looks like it's kind of popping back in but it's not actually working correctly and it's not actually displacing the mesh because on the edge here you can see it still is smooth and that's because we need to convert this black and white distance value into displacement data so to do that I can press shift a let's go to the search and I'm going to search for the displacement node and I want to put the displacement in between the voronoi and the distance and I can just drag it right down here underneath the mix Shader and then you can see it's still not doing anything but that's because I want the distance value to be going into the height value of the displacement and as I mentioned at the beginning of this tutorial if you're using blender EV then the node editor displacements won't work the node editor displacements only work in the Cycles rendering engine so make sure you're using Cycles if you want to use the displacements now you can see it is doing something The Rock does appear as though it's popping out but again if you look here on the edges you can see it's not actually displacing the mesh and that is because we need to tell the material that it can use the displacements so if you bring out the side panel and click right over here to the material properties I want to open up the settings tab here in the material settings so in the displacement settings under surface the displacement right now is set to bump only and so it does make it look like it's bumping out of the mesh but it's not actually using the displacement so let's take this setting and we're going to turn it to displacement and bump and this is telling the material that it can use the displacements so now you can see that it is actually displacing the mesh and it looks very spiky now that is way too strong so I'm just going to hold down the shift key and then drag the scale value and that's going to make my movements more sensitive and I can just make it much more subtle and so now you can see that it is actually displacing the mesh and I found that a scale value of .04 looks pretty good so you can change that to .04 if you want to use the same value now if you look here on the edges of the displacement you can see it's not very clear where the rock is and where the lava is because I want the rock to be popping out a lot but then I don't want the lava to be popping out at all so to fix this we need to make it more contrasty but I don't want to use this color amp because if I put the color into the height value of the displacement you can see that doesn't look very good at all the rock is very flat and it's also popping out way too much and also some parts of the lava are popping out so I'm going to take the distance from the vorno and put that back into the height so I'm now going to click on this color ramp right here and I'm going to press shift d to duplicate it and let's stick it in between the voronoi and the displacement and then with this color ramp selected I can hit the backspace and that is going to reset the color ramp and then to preview it a little bit better and to actually see what it's doing I'm going to control shift and select the color ramp so if we bring the white Tab out it's going to make the light Parts brighter and where the light parts are the mesh is going to be popping out but then the black parts are going to be going back in So if I drag the block tab over the mesh will be going back in but then if I bring the white tab Over The Rock will be popping out so we can use this to control the strength of the displacement so I just want to bring the white tab back a little bit because I don't want the rock to be popping out quite that much so I'll bring the white tab to about here and then I can also bring the black tab to somewhere about there so I can now Ctrl shift and select the mix Shader to preview the final material and that is looking really nice so I'll just give this a final render and there is the final render now you can see that my final render has a little bit of glow so to add that glow to the lava I went over to the compositing tab and in the compositor I added these two glare nodes and the glare nodes will give that little glow to the final render so that's it for this tutorial so I hope you found this helpful and thank you for watching and if you'd like to help support this Channel and purchase the material you can get that on my gumroad store and my patreon page with the links in the description if you'd like to purchase more of my procedural materials you can also check out my blender procedural material packs and I've also just released blender procedural material pack number 12. and if you'd like to learn how to create any of my procedural materials you can check out my blender procedural material tutorial playlist here on YouTube but I hope you enjoyed this and thank you for watching
Info
Channel: Ryan King Art
Views: 21,797
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, rocky lava, rocky, lava, procedural material, shader, blender procedural, procedural lava, procedural rocky lava, lava shader
Id: yg5RCNgV57M
Channel Id: undefined
Length: 21min 49sec (1309 seconds)
Published: Sat Jan 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.