Procedural Lava Rock Material (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial we're going to be creating this procedural lava rock material in blender now if you'd like to help support me and this channel and also get the project files for this tutorial then you can purchase the project files over on my gumroad store a link will be in the description and also my patreons over on my patreon page will be getting the procedural material as well links will be in the description and also real quick before we start i want to give a huge thanks to sketchfab for sponsoring this video on sketchfab's 3d model store you can purchase models and assets my favorite feature of sketchfab is that you can upload and preview your own 3d models in your browser you can even view your 3d models on a phone or tablet you can also apply to become a seller on the platform check out sketchfab with the link in the description alright so this is the procedural material that we're going to be creating as you can see it's actually not that complicated but i will be walking you through the entire process in real time and also you don't have to do this if you don't want to but i'm going to be using the displacement in the node editor to actually displace the rocks so the rocks are actually going to pop out of the mesh you can see here's without the displacement it still looks like a pretty cool material but if you add the displacement it really pops out those lava rocks it pops them out of the lava and i think it gives a really cool result all right so let me just show you the setup that i have in the 3d viewport so what i did is i pressed shift a and i added an icosphere and then when you add the ecosphere right down here on the icosphere settings you can turn these subdivisions up and that way the sphere is going to be very subdivided and detailed and then i also shaded it smooth and then i also added a camera and i pointed the camera right at the sphere now also to get a very nice bright light on the side here i added in this plane light so i just pressed shift and added a plane and then i subdivided it so it's kind of round and then right over here on the materials i added an emission material to it and then i set the color to a yellowish reddish color and i turn the strength up to 60. and you can see that now we have that nice bright light on the side of the object and then also to get even more realistic lighting what i did is i added in this abandoned workshop 1k hdr and this is from polyhaven.com so i'll leave a link in the description if you'd like to download this same hdri so right over here on the world settings i just changed this to environment texture and then i opened up the hdri and then also because the lava is going to be glowing i turned the strength down to 0.5 and that way the world lighting is a bit darker so the light from the lava can really pop out and then also before we start i am going to be using the node wrangler add-on so if you don't have that add-on enabled you can just click right here on edit and then click on the preferences and then right over here on the add-ons tab you can just start to search for node right on the search here and you can see it there's this node wrangler add-on so you can just check mark it and then we'll be using it later in the video alright so let's get started so i'm just going to click on new right here and then i can just call this material lava rock or whatever you want to call it now before i continue setting up more of the nodes i want to set up the displacement now you don't need to use the displacement if you don't want to but if you want to use the displacement let me just show you what you need to do to set it up so the render engine needs to be cycled so make sure it's set to cycles and then the feature set here needs to be set to experimental and then make sure you've already added in a new material so once you've added in that material we're going to click right over here on the material properties and i'm going to scroll down now right over here on the settings tab right here you can see that there is this surface tab in the settings tab and then there is the displacement so the displacement is set to bump only right now i want to set it to displacement and bump and that way it's going to use the bump now also i want to use the adaptive subdivision and that way it's going to add more detail where we need it so i'm going to click right over here on the modifiers and i'm going to click on add modifier and i'm going to add the subdivision surface modifier and we'll just wait for that to load up all right so i added it in so now just make sure that the adaptive subdivision is turned on and then that way when we go into rendered mode wherever we render the image it's going to make sure that there is more detail where we can see it closer up and then the dicing scale i'm just going to leave that at five for now that works pretty well all right so let's go into rendered mode and then i'll just make this a little bit smaller and we can set up the procedural material so we need to make two different materials we need to make a lava rock material and a lava material and then we're going to use a mix shader to combine them together so i'm first going to start by making the lava rock material so i'm going to press shift a and i'm going to search for a noise texture we'll just drop that right there and then also because we turned on the node wrangler add-on i can select this node and i can press ctrl t and that is going to add the texture coordinate and mapping now i don't really need the mapping so i'm just going to select it and then press x to delete it and then i want to plug the object up to the vector and then i can just control shift and click on the noise texture so on default the textures use the generated coordinates but if you change it to object then that way the texture is going to be placed around the object more evenly and then i'm going to leave the scale at 5. i think that looks pretty good but i'm going to turn the detail all the way up to 16 so it's nice and detailed alright so now i can take the factor and plug that into the base color of the principle and then i can hold down the control and shift key and click on the principle bsdf and that is going to preview different nodes so that's using the node wrangler add-on so if you hold down the control and shift key and click on nodes and that will preview them now this doesn't really look like rock right now so to change the colors i'm going to press shift a and i'm going to search for a color ramp node and we'll just drop it right in here so now we can change the tabs and that's going to change the color of the rocks so this first black tab i'm going to drag it way out so there's a lot more black and then this white tab here i'm going to click on it and i'm going to change it to a reddish brownish color so i'm going to make it a bit darker and kind of a reddish brownish and if you'd like to use the same exact color that i'm using you can click right over here on the hex value and you can type in 6d 392c alright so you can see that's looking a little bit more like rock but it is a bit shiny so what i want to do is i want to take the factor of the noise texture and plug that into the roughness and then i want to control how rough it is so to do that i'm going to press shift a and i'm going to search for another color ramp node and we can just drop it right in here between the noise texture and the roughness so if you take the black tab and turn it up it's going to make it more and more rough so you can see if i turn it way up it's going to be super chalky and rough but then if i turn it down it'll be more shiny so you can see now it is a little bit shiny but it still is pretty rough because it is rock and of course you can change this later if you'd like to and then also i want this to be contributing to the normal because rocks are very bumpy so i'll take the factor and plug that into the normal and then we need to convert this to normal data because this is black and white data you can see that it's the gray but then this needs to be normal data because it's purple so i need to convert it so to convert it i'm going to press shift a and i'm going to search for a bump node and we'll drop the bump node right in here and then what we want to do is we want to take the factor and put that through the height it'll convert it to normal data and now you can see that it's actually bumping that out and that looks a lot more like rock and then of course you can change the strength if you'd like to i want it to be very bumpy so i'm going to keep the strength at 1. alright so that is looking pretty cool but lava rocks usually have some little holes in the rock so to add those i'm gonna press shift a and i'm gonna search for a voronoi texture i'll just drop the voronoi right down here and then i want to plug the object up to the vector on the voronoi and then i can also control shift and click on it to preview it so the scale right here i'm going to turn this up to 60 and now you can see that there's a bunch of little dots so now i want this voronoi texture to be contributing to the bump so to do that i'm going to press shift d and i'm going to drop this right down here and then actually i want the normal to be going into the normal and then i want to unplug this and then i want the noise texture to be going back up to the height so this way the normal is going through the normal so we can add multiple bum maps together and then this noise texture is going to the height so i can now take this distance value and plug it into our new bump now if i control shift and click on this you can see what it's doing so it's very bumpy but the problem with this is that it's super super bumpy all over the place and i just want there to be some little bumps here and there some little holes so to do that i'm going to press shift a and i'm going to search for a color ramp let's just drop the color amp right here and then if i take this white tab and start to drag it out you can see that now it's making those bumps smaller so if i control shift and click on this you can see that it's making the bump smaller and more contrasty so now if i control shift and click on both of these bumps you can see this just adding in little bumps right in there and if i control shift and click on it you can see now that has a lot more detail all right so that is it for the finished lava rock material so i want to just join these together into a frame so that it's just organized a little bit better so i'm going to press shift a and i'm going to search for a frame this is totally optional but i like to do it to organize my nodes so now that i've added the frame i'm going to box select all these nodes so press b and then drag around but i don't want to box select the material output now i'm going to drag and drop all of these into the frame and now if i drag the frame around it's going to move all the nodes around now you can actually rename this frame if you want so to rename it i'm going to press n and that's going to open up the side panel now the label right here you can just change this to rock or lava rock or whatever you want and then if i press n to close this you can now see that it says rock all right so that is the first material let's now make the lava material so i'm going to press shift a and i'm going to search for another principled bsdf drop it down here and then i can control shift and click on this and we can preview it you can also move the material output kind of right down here in the center so now i'm going to press shift a and i'm going to search for a another noise texture let's just drop it down there and then again i want to use the object coordinates so if you just select the noise texture you can press ctrl t and that's going to add the texture coordinate and mapping now i don't want the mapping so i'm just going to select it and press x to delete and then i can plug the object up to the vector and then i can control shift and click on this to preview it now i want to turn the scale down to 4 and then i also want to turn the detail all the way up to 16 so it's very detailed and then the roughness here i'm going to turn this up a little bit to like a 0.6 so there's a little bit more roughness and then i'm also going to turn the distortion up to 7 and when i turn the distortion up to 7 you can see that's looking a lot more like lava or some sort of liquid now i want to play around with the colors let's first plug the factor in to the base color but then if i control shape and click on this you can see that doesn't look at all like lava so let's press shift a and i'm going to add a color ramp let's just drop the color ramp right in here and now we can make all the different colors that we want for the lava so i'm going to drag this black tab out to about here and then this one i'm going to make a orange color so i'm going to turn it all the way up to white and then i'll make it a very strong orange color and if you'd like to use the same exact color that i'm using you can click over on the hex value and you can type in ff8000 and then this one this white tab i'm going to drag it out as well to make it very contrasty and then i'm going to make this one a very bright red color and again if you'd like to use the same exact color that i'm using you can click on the hex and type in ff000f so that is sort of looking like lava but it isn't emitting light and i want it to emit light so as well as this being plugged into the base color i also want to plug it up to the emission value and then the emission strength let's turn that up higher to something like a 20 so it's a lot brighter now i also want to plug this into the normal to give it some bump so i'm going to plug the color into the normal and then again i need to convert it so i'm going to press shift a and i'm going to search for a bump node and we'll drop the bump node right here and then we can plug the color up to the height and then also i want to turn the roughness down to like a 0.1 just that the lava is a lot more shiny and that is it for the lava material so it's actually pretty simple now i want to add this into a frame as well just to organize it really well so i'm going to press shift a and i'm going to search for a frame and then again just box select all of these and i'm going to drop them into the frame just like that just drop them into the frame and then you can click on the frame and you can press n to open up the side panel and on the label here i'm just going to call it lava and then press n to close that and now you can see it says lava alright so if i control shift and click on both of these you can see we have both of our two materials and now i want to combine them together so to do that i'm going to press shift a and i'm going to search for a mix shader i'll just drop the mix shader right here and then i actually want to plug the rock up to the bottom one and then i want to plug the lava up to the top ones and then once i have these plugged up i can just control shift and click on the mix shader so right now we have this factor so if i drag the factor you can see it's just going to evenly blend it in between the lava and the rock what i want to do though is i want to tell it that some parts are going to be the rock and some parts are going to be lava so to do that we're going to need to make a mask or a factor and then we can plug that into the factor value so i'm going to press shift a and i'm going to search for a noise texture we'll just drop that right down there and then again i want to press ctrl t to add the texture coordinate and mapping and then i don't need the mapping node so i'll press x to delete it and then i can plug the object up to the vector so let's control shift and click on the noise texture now to preview it now the scale i'm going to turn that down to like a 4 and then i'll turn the detail all the way up to 16 so it's very detailed and then also i'll turn this roughness value up to like a 0.7 so there's a bit more roughness so we can now take this factor and we can plug the factor into the factor on the mix shader so i can now control shift and click on this and you can see that right now it's not really doing anything and that's because i need to make it more contrasty so it's very clear where it's going to be the rock and where it's going to be the lava so to do that i'm going to press shift a and i'm going to search for a color ramp node let's just drop that right there and then i actually want to switch these values so i'm going to drag this black one all the way over here and the white one over here so now that i've switched these you can see that when i drag the white closer to the black it's going to be only the rock and then when i drag it all the way over here it's going to be only the lava so now i just need to find somewhere in between that looks nice now if you zoom in really close you can see that it's very very sharp where it's lava and where it's rock and i want to make that a little bit more smooth so this black tab right here i'm going to change this color to a very light color and you can see that as i turn it up if it's fully white it's going to be all the rock but then as i turn the color down you can see that slowly the lava is starting to kind of seep through so if you want to be very very contrasty you could just turn it down but i want to turn it up so that the edges are a little bit more smooth and kind of blending together and then you can also drag this light brown tab out a bit and you can see that when i drag it closer and closer it's going to make the lava even more contrasty so you can see when i drag it really really close the yellow is really bright so i don't want it to be super super bright but i do want to drag it out a bit so that is looking really cool but you can see that there's kind of too much red and also the lava isn't glowing very much so what i want to do is right over here on the lava material i want to turn the emission strength up to like 100 and now that i've turned it up to 100 you can see that the lava is very very bright so if that's too bright for you you could turn it down but i want it to be very very bright especially because in the compositor i want to add a glare node to make the lava glowing alright so there's just one last thing that we need to do to make this material look really nice we need to add the displacement so to add the displacement i'm going to drag the lava down a bit so there's a bit more space and then what i want to do is actually shift select the texture coordinate and this noise texture then i'm going to press shifty to duplicate it and just drop it right down here now for this one i want to turn the roughness down to like a 0.5 back to the default because i don't want quite that much roughness because that's going to be too noisy and it's not going to look very good for our displacement so now what i can do is i can press shift a and i can search for the displacement node and i'm just going to drop it right down here underneath the mix shader then i can plug the displacement up to the displacement and then i want to plug this noise texture up to the height value on the displacement now the mid level i'm going to turn that to zero because i don't want any mid-level and then the scale here it's way too strong you can see that's really really strong so i'm gonna turn the scale down to a point zero two i find that that is the best value you could of course turn it up more if you want now it's not really doing too much right now and that is because i want to make the noise texture more contrasty because right now you can see it's not very contrasty so i'm going to press shift a and i'm going to search again for another color ramp node to make it more contrasty now again i want to flip these values and now that i've flipped these values you can see that the lava is kind of just flat but then the lava rock is actually popping out of the mesh so i can control shift and click on this and let's just change this value so you can see that where it's white that's going to be coming more up so where it's fully bright that's going to be popping out the most and then where it's black it's not going to be bumping out at all so you're really just going to have to play around with this and get it to how you like um so where it's going to be white that's going to be more of the rock popping out all right and then you can control shift and click on the mix shader to preview the final material now there is just one thing that i want to change um i want there to be a little bit less lava because there's a little bit too much lava right now so to make there be less lava right here on this color ramp i'm going to take the white tab and drag it more towards the gray tab and when i do that you can see that now there's less lava all right there we go and then of course if you want to change this scale right here on the displacement if you want to make the rock popping out even more you could turn it up to like a point zero three or maybe even like a point zero five if you want the rocks to really be popping out that's too strong for me i'm gonna turn it down to a point zero two i think that looks pretty good all right so we will render this out and then we'll just do a little bit of compositing to make the lava glowing so you can set up any render settings that you want i'm just going to click on render and then click on render image or you can press f12 all right and it just finished rendering so now let's set up that compositing so i'm going to click right over here on the compositing tab and then i'm going to click on the use nodes so now what i want to do is i want to press shift a and i'm going to search for the denoise node just to denoise the image to kind of smooth it out so i'm just going to drop the denoise right there and then i can control shift and click on it and that's going to add the viewer node and then also make sure the backdrop is enabled and that's going to preview it now also i want there to be like a dark black background so i'm going to press shift a and i'm going to search for an alpha over node and i'll just drop the alpha over node right here now this image i want to plug it into the bottom one and then this image right here i'm going to make it fully dark or you can just make it a dark blue color or whatever you want all right that is looking really good now there's just one more thing that i want to do to make the image look really nice i'm going to press shift a and i'm going to search for a glare we're going to drop the glare right down here after the denoise and then just make sure the compositing and viewer is plugged up to that so then right here on streaks i'm going to change this to fog glow and then right here on the low medium or high if you change it to high then the glow is going to be a little bit smaller you can see if i change it to low and then let that load up you can see now the glow is a lot bigger so you can really change this to whichever one you want i think i'm going to change it to medium and that way it's going to be kind of in the middle all right there we go so if we just press f11 that's going to go back to the render result and then i can just click on this and change it to the viewer node and that's going to preview the final image now to save this image you can just click on image and then you can just click on save as so that's it for this tutorial i hope this was helpful and i hope you enjoyed it and thank you so much for watching and also if you'd like to help support this channel and also get the project files then you can get that over on my gumroad store and my patreon page the links are in the description and also if you'd like to help support this channel here on youtube then i have the youtube memberships so if you click on that join button right down there next to the subscribe button then you can check out my memberships and if you join one of my memberships then you'll be helping to support the channel monthly and you'll also get some cool perks here on youtube but thanks for watching i hope this was helpful and i hope to see you in a future video
Info
Channel: Ryan King Art
Views: 4,081
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, lava, rock, lava rock, procedural, procedural material, material, blender procedural material
Id: aY-Bqfshfv8
Channel Id: undefined
Length: 20min 40sec (1240 seconds)
Published: Tue Sep 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.