Procedural Ore Material (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome to another blender tutorial in this tutorial we're going to be creating this procedural ore material in blender and there's two really cool features about this procedural ore the first thing is that we're actually going to be displacing the mesh so you can see right here there's like these gold chunks coming out of the rock in the ore and you can see that we're going to be using the displacement modifier to actually displace the mesh so that those chunks of gold or the chunks of ore actually come out of the mesh so you can see in solid view this is just a simple sphere and then these are just some basic rocks and i will show you how i made these rocks if you'd like to create your own ore chunks but you can see they're actually kind of smooth they don't have that much detail but then when you go into a rendered mode you can see that they actually pop out of the mesh the other really cool thing about this procedural ore is that you can actually change the type of ore so you can see right here i created my own custom node and you can see it says ore type you can see here's gold you can also do a diamond i'll show you how to make all these so there's diamond there's emerald that's pretty cool and there's also ruby there we go nice and bright red and then there's also iron ore so i think the iron one actually looks really cool like these big chunks of iron coming out of the rock and you can create any color of ore that you want um i just created these ones here so gold diamond emerald ruby and iron and this is really cool as well especially for all the minecraft fans out there you know diamond ore and iron ore things like that so i really like how this looks this is almost like one of those super realistic minecraft texture packs you know and if you'd like to purchase these project files you can purchase them on my gumroad store the link will be in the description and also if you join my patreon then you can get the project files as well and by purchasing the project files either on my gumroad store and my patreon page you'll be helping to support the channel and then one last thing before we get started i want to thank this video's sponsor sketchfab on sketchfab you can upload your own 3d models and preview them in your browser you can even view them in ar vr or on a phone or tablet you can also purchase 3d models and assets from sketchfab's model store you can even apply to sell your own models on the platform check out sketchfab with the link in the description all right now before we get started with the procedural setup i want to show you the setup that i have here in the 3d space so what i did is i just pressed shift a and i added an ico sphere and then right down here on the icosphere settings i just clicked on the subdivisions and i turned that up to like a six and then i scaled it up and then i also shaded the object smooth and then i just added a camera and i just pointed the camera right at the sphere then to get some very realistic lighting over here in the world i added in the machine shop zero two 1k hdri and this is on polyhaven.com so i'll leave the link in the description if you'd like to download the same hdri that i'm using so right over here on the world i just clicked on this and then chose an environment texture and then i just opened up the hdri and then i also set the strength to 0.8 and then i also added this plain light right here and i just set it to an emission material with a white color and then the strength to 30. and that way we just have some nice lighting for our procedural material and then i'm going to go right over here to edit and then open up the preferences and then just click over here on the add-ons and there's two add-ons that i want to turn on i want to turn on the node wrangler add-on because the node wrangler add-on is very useful for working with our procedural nodes so if you don't have that enabled already you can just click right over here on the search and then start to type in node and then you can add the node wrangler addons just check mark it right there and then also if you want to create some rock shaped ore like i showed you at the beginning of the video you can just click right here and i'm gonna start to type in mesh and you can see right here there is this add mesh extra objects i'm just going to turn this on and within this add mesh extra objects there is a rock generator and we're going to use it to generate some rocks for our ore so that's totally optional if you want to turn that on you can do that so we can just close the user preferences now all right so over here on the camera settings i'm just going to bring this down kind of make it smaller here on the resolution just so that we have a little bit more space and then i'm just going to use blender's rock generator which we just turned on to add a rock shaped ore of course this is totally optional you don't need to use it you can use whatever object you want so i'm just going to press shift a and then right down here on mesh you can see that there are these extra objects and i'm going to click right over here on the rock generator now right here behind me there's the add rocks there's a lot of different settings here you can also choose like the number of rocks what i'm gonna do is just turn it up to three so that i have three random rocks and then i'm just going to close this and i'll just leave everything else at the default so i can just drag these over and then i can just kind of move them over and kind of scale them up so this is really great uh blender just automatically adds some rocks for us and then we can also tab into edit mode and we can like select some faces and kind of scale them around if we don't quite like the shape so these do seem to a little bit stretched so i might want to like push some of these down a little bit but really you can just make whatever rock you want and then if you click right over here on the modifiers on these rocks we want to apply all the modifiers so i'm just going to select this and then press ctrl a and then control a and control a and just keep on pressing ctrl a until all of the modifiers have been applied so i'm just going to click on this one here and then click on this uh modifier and then we'll just press ctrl a a bunch of times to apply it and then this one here just uh press ctrl a until they are all applied all right so now that i have these rocks i'm just going to like scale them up and rotate them so for the final result of the tutorial i just had like three of them kind of like a bigger chunk maybe just rotate this around so i just had like two smaller chunks and then one bigger chunk again you can do whatever you like but i'm gonna do something like this all right so i'm gonna click on the sphere right here and then i'm gonna click on new and then right here i can just call this procedural or i'm just gonna call it procedural or and then i want these objects to all have the same material so what i can do is i can just drop the material on by just clicking and dragging and just dropping it onto these objects so they all have the same material all right so now let's set up the displacement before we really get into this material setup so to set up the displacement we need to do a few things first of all right here on the feature set um we need to change this to experimental and this is right over here on the render properties so set it to experimental then what we need to do is we need to click down here on the material and because these are all the same material it'll work for all of them so let's just scroll down here and then right here on the surface right now the displacement it says bump only we want to change this to displacement and bump and then the last thing that we need to do is just add the subdivision surface modifier and then use the displacement so just click right over here on the modifiers and i'm going to click on add modifier and we can just add the subdivision surface modifier and then make sure this adaptive subdivision is turned on because that is really important what that's going to do is it's going to add more geometry and it's going to add more detail where you're looking at the object so if i zoom in here it's going to add a lot more geometry here and a lot more detail with the subdivision but then kind of over here where you can't really see it it'll be less topology it'll be less detailed and then there also is this dicing scale now you can play around with the dicing scale later if you want but basically if you make this number smaller there's going to be more detail and more subdivision at the same time though it will be harder to process the more detail that there is so if you change it up to like a 10 then it's going to be easier for a computer to process but it also won't be quite as detailed but if you turn this down to like a 0.1 it's going to be super super detailed that's probably going to be way too high detail so for this scene i'm just going to start with like a five i think five is pretty good so now i want this subdivision surface modifier to be on the other objects as well so i'm just going to shift select all of the objects and then lastly shift select this object which has the subdivision then i can press ctrl l and what we want to do is we want to copy the modifier so click on that and now if you click on these you can see that they all have the same modifier now for some reason it didn't actually add the adaptive subdivision so just click on it to turn it on and then just click on it and click on it and again for some reason the dicing scale you need to change that so i'm just going to click on this big one here change it to like a five now these two smaller ones we're not actually going to need that much detail because if you tap in edit mode they are actually pretty high detail already so for the dicing scale on these ones i'm just gonna maybe make them like an eight all right let's finally get started with the procedural material so the first thing that i'm going to do is just make a basic rock material so we'll press shift a and i'm going to start by adding a noise texture and then let's also press ctrl t that's using a feature from the node wrangler and that's going to add the texture coordinate and mapping now i don't actually need the mapping so i'm going to press ctrl x and that'll get rid of the mapping but keep it plugged up and then i actually just want to plug the object up to the vector alright so using another feature from the node wrangler i can hold down the control and shift key and click on the node and that is going to preview it so i'm going to turn this detail right here all the way up to 16 so it's very detailed and then you could also turn the scale up if you want to i'm actually just going to leave it five i think that looks pretty good so those aren't really rock colors so i want to make some rock colors so to do that i'm going to press shift a i'm going to click on the search and i'm going to add a color ramp node we're just going to drop it right here and now we can make different rock colors in between here so this white one right here i'm actually going to pull this one out a little bit and then i'm going to make it a light gray and i also will just make it slightly brown very subtle but slightly brown then i'm also going to pull the black one out and then i'll click on the plus here to add another one and this one i'm going to make a little bit darker and it also will be a slight gray so now let's take the color we'll plug that into the base color and then ctrl shift and click on the principle and you can see that's starting to look more like a rock now the rocks are really smooth and so i want to add some normal to make them look more like rocks so i'm going to plug this factor up to the normal now there's some shading issues and that's because you can't plug the gray one into the normal one which is purple so we need to convert it to normal data so the principled shader can use it so to convert it i'm going to press shift a and i'm going to search for a bump node we're just going to drop the bump node right here and then we want to plug the factor up to the height and then the normal from the bump can go into the normal so now that looks a lot more like rock you can also play around with the strength so if that's maybe too strong you could just turn it down i think i'll just turn it to like a 0.5 so it's not quite as strong but there we go there's just a basic rock material so now we can go ahead and make the ore so to make the ore i'm going to press shift a we're going to start by searching for a veroni texture let's just drop this down here and then i can control shift and click on it to preview it now right here click on the f1 i want to change this to the distance to edge and you can see now we have that crackly look and that is really cool and then also the object right here i want to plug this up to the vector and then this is actually a little bit too much or i don't really want this much um so the scale here i'm gonna actually change this to like a three so that it's a bit bigger of pieces now you can also see that these are a little bit different like these pieces are a bit bigger than these pieces and this is because we need to apply the scale for all the objects that they all use about the same size of the ore so i'm going to click and then shift click on all the different objects that they're all selected and then i'm going to press ctrl a and we just want to apply the scale so now they're all the same size and you can see now it's actually quite small so the scale i think i will make that even smaller i think a 2 looks pretty good yeah 2 is pretty good but of course you can change it to whatever looks good and then if you need to change the scale the noise texture you can do that as well i might just like change that to a 4. let's just look at our final material that looks pretty good so i can just control shift and click back on the veroni texture so now what i want to do is i kind of want to make a mask to tell it that we're only going to have some pieces white and then those white pieces are going to be popping out and those are going to be the pieces of ore so i'm going to press shift a we're going to search for another color ramp and we're going to drop the color ramp right down here and then what i want to do is take the white value and pull it way up and then the block value also pull that up so we're basically just making a mask and so where the white bits are that is where the ore is going to be popping out so i do want this to go into the displacement so it'll actually displace the mesh but i also just want to put it through the normal so to do this i'm going to take the bump and i'll press shift d and just drop it right behind it and then this noise texture the factor i actually want to put it into the height of the first one and then the normal i want that to go into the normal of the second one and then the color ramp here from the veroni texture i want to put the color into the height and then i'll just ctrl shift and click on it so you can see what it's doing it's basically popping that out and then i'll turn the strength all the way up to one and then this factor here on the noise texture i don't want that to go into the normal so i need to unplug that and there we go that is what we're looking for so now we're using the mask that we made to just bump that out and that's not going to bump it out a ton but it'll bump it out a little bit and then this normal is going through here so then this noise texture is plugging into the second one so if i control shift and click on it you can see there's the second one and now we have those little pieces that are bumping out so then we also want these pieces to be going through the displacement so that it really pops out the geometry but i also want some of the rock texture to do that as well because i do like this noise here i want some of it to be contributing to the displacement but mostly i just want the veroni texture to be bumping it out so to do this i'm going to press shift a and i'm going to search for a mix rgb i'm just going to drop the mix rgb right down here and then we're just going to take the color from the color ramp and we're going to put that into color 1. then right up here on the noise texture i'm going to take the factor and we're going to plug that into color 2 of this mix so now i can control shift and click on it and you can see we're mixing them both together so now we can take this color here and put that into the displacement on the material output and then i'll just ctrl shift and click on the principle so you can see it's doing something but that doesn't look very good and that's because we didn't convert this to the displacement data so to convert it we're going to press shift a and i'm going to search for the displacement node and we can just drop it in here and then i'm just going to drag it right down here so we have this yellow color and that color data is going to go into here and it's actually going to go into the height value so the mix shader is going to go into the height and then the displacement is going to go into the displacement on the material output now right here this mid level i'm going to turn this to zero on the displacement because i don't want that and then this scale is way too strong so i'm going to turn it down to like a point one let's see how that looks that is better and now you can see that it's actually displacing it so if you kind of zoom in here you can see that those chunks there they're kind of popping out and that looks really really cool if you want to turn the scale up maybe like a 0.3 you could um that's maybe a little bit strong maybe a 0.2 you can do whatever looks good i like a 0.1 i think that's pretty good so i'm just going to leave it at 0.1 0.2 looks pretty good as well alright so that is looking really good but now we need to tell it that those chunks that are popping out need to be a gold material or some kind of ore material so we need to make the ore material and then we're going to need to use a mask to tell it where it's going to be that separate material so i'm going to press shift a and we're going to search for another principle bsdf and i'll just drop it right up here so this is going to be the or material so the metallic i'm going to turn that all the way up to one so it's metal and then i can also control shift and click on it just so we can preview it and then this base color right here i'm gonna make this like a yellowy color although i don't want it to be that saturated and i do want it to be a little bit more orange so something like that maybe something like that and then i also do want it to be fully bright and then the roughness here i'm gonna turn this down to maybe like a .35 so that is more shiny so that is starting to look like a gold material all right now we also want to take the bump right here and we want to use this bump in the principal bsdf right here of the gold so this normal right here from the bump we want to plug this into the normal and then if i ctrl shift and click on it you can see it just gives it a bit more bump all right so now let's combine these both together because we have the rock and we have the gold but we need to combine them together so i'm going to press shift a i'm going to search for a mix shader we're just going to drop this down here kind of move this out of the way and then we want to plug these both up so both of these principled we want to plug them both into the mix shader and then as i said earlier we need some sort of mask to tell it where it's going to be one shader and where it's going to be the other so i'm going to press shift a to do this we're going to add another color ramp very useful node i'm going to bring this up and then the color ramp i'm just going to put that into the middle and then we're going to take the color and plug that up to the factor and then we've already created our mask if you control shift and click on this you can see we already have a mask to tell it where it's going to be rock and where it's going to be gold so we'll take the color and plug that into the factor here on this color ramp and then we can control shift and click on this now you might think that maybe we could just take the color ramp and plug the color up to the factory right here and you could certainly do that but the problem with this is is that it's kind of subtle because you can see that some of the gold and some of the rock is kind of blending together so i'm going to use this color amp to make it very very contrasty although what we need to do first is we need to switch these two because the gold is on the wrong one so we'll just click drop this down here and then bring that up there all right that is really starting to look pretty cool but as you can see this is kind of blending together so to make it more contrasty we can take the white tab and just drag this way over and then if i control shift and click on it you can see what it's doing so it's taking these kind of gray areas and it's just removing them and making it super super white so that's very contrasty and now we can control shift and click on it and there we go you can see it's very defined where it's going to be gold and where it's going to be the rock um now i think there's actually too many chunks of ore so right here on the scale on the veroni texture i can just change that down to maybe like a one maybe like a 1.5 you're really going to have to play around with this it really depends that looks a lot better and then of course right here you can play around with this color amp so if you want to have less or you can just pull the black value more towards the white and you can see now that's going to be smaller so they're going to be less ore or you could do it the opposite if you want there to be bigger pieces you can pull the white over towards the black and then you may have also noticed that some of these pieces of gold they have like these little flat pieces right here and i do like that that is pretty cool um for some of them but if that's happening too much what you can do right here you can change this white value so if you turn like the white tab farther away you can see now it's much more sharp right there but then if you turn it closer you can see now it's going to have like a flat bit really just get it to your own personal preference i do like it being pretty sharp but then i also like having a little bit of those pieces so really you can just do whatever you want all right and then we just have one last really cool thing to make this material look really nice we can actually change this color here so if you have a specific color in mind you can of course just change it but i want to give myself a lot of options that i can change the different colors whenever i want really easily so i'm going to press shift a and i'm going to search for the rgb just add the rgb and i'm just going to drop it right here and then i actually want to add five of them so i'm going to press shift d click and drop it shift d shift d and shift d all right and then i'll bring these up so we now have five of them and then i'll just change all the different colors so the first one i want to be the gold color so i can actually drag and drop the color and drop color that over and then the second one i want that to be a diamond color so i'm gonna bring it way up so it's really bright and then make it kind of a bright blue color we can just plug this in and see how it looks and then you could also make it just like slightly on the yellowish side or the greenish side if you want to you could also make it a darker blue and then we can also make emerald ore so i'll plug this one in here and then this one we're gonna make green so i'm gonna make it a green color pretty bright but not super saturated so there we go for emerald or and then let's also make ruby ore so i'm gonna plug this into here and then let's just make this like a red color really bright but not super saturated i find that if it's like super saturated it looks a little bit weird you can see that almost looks like velvet or something so i'm just going to make it a little bit less saturated that looks a lot better and there's a lot more reflections as well so there we go and then the last one i'm going to make it fully white and this one is going to be iron ore so i actually really like the iron ore i think it might be my favorite um i do really like the diamond or in the gold ore too of course so now we can actually put these together into one node so to put them together i'm going to box select all of them just make sure they're all selected and then i'm going to press ctrl g and that's going to create our own custom node so i can unplug this from the node group and then i'm going to plug them from top to bottom so here's the gold so just plug them from top to bottom plug it into the extra slot and then if you select this node group and press n for the side panel here you can click right over here on group and you can actually rename these so i'm going to name this one gold ore diamond ore emerald ore and ruby ore and then the last one is iron ore all right there we go so we named all of these now let's press the tab key and that's going to go out of this custom node that we made so you can see this custom node also has a name so we can name it so we can call it or type so there we go or type and then we also need to put that on the label so i'm just going to select this and press ctrl c to copy on the label control v and now it says or type and then also on this node group right here we can click on this and also add the ore type so now this is just super easy to use we can just drag and drop these so we have gold ore dimedor emerald ore and ruby ore and then iron ore very cool so right here this dicing scale make sure you don't turn this down too low and too detailed because if it's too high detail then when you render it it might crash blender so just don't go crazy with the detail for me if i just turn these to five and then turn these ones to eight that works just fine so i'm gonna render this out and we'll check out the final thing all right there we go so there is the procedural ore material definitely let me know in the comments what your favorite type of ore is the gold ore is really cool i also really like the diamond ore and the iron ore i think is really cool as well so that's gonna be it for this tutorial and thank you so much for watching and i hope you enjoyed the tutorial and if you'd like to purchase the project files you can do that over on my gumroad store or you can join my patreon page and get the project files as well and that'll also help to support me so thanks for watching i hope you have a great day and i hope to see you in a future video
Info
Channel: Ryan King Art
Views: 3,030
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, Ore, Iron Ore, Gold Ore, Ruby Ore, Emerald Ore, Diamond Ore, Procedural, Material, shader, 3d, Procedural Material, procedural nodes
Id: P4zValFjW_Q
Channel Id: undefined
Length: 22min 38sec (1358 seconds)
Published: Sun Aug 08 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.