Procedural Tree Bark (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 tree bark material in blender so about a year ago i made another tutorial on how to make procedural tree bark but i really wasn't too happy with the result and ever since then i've been wanting to create a really nice tree bark material but it's been a year of creating procedural materials and i really think i've improved my skills over the year and so just recently i created this really cool procedural tree bark and i really like this result so that's what i'm going to show you how to create in this video if you'd like to purchase this procedural material and help to support this channel then you can do that over on my gumroad store and my patreon page i'll have the links in the description and you can also check out my blender procedural material packs if you'd like to purchase more of my materials and if you'd like to learn how to create all of my procedural materials you can also check out my blender procedural material tutorial playlist on youtube all the links are in the description so real quick i'm just going to show you what i have set up in the 3d space so i like to preview my procedural materials on spheres so i just added this icosphere and i subdivided the icosphere so it's nice and round but then i also wanted to preview this material on a cylinder because it is a tree bark material so it's going to be added on a tree stump or a tree trunk so i just added this cylinder here and then i just kind of extruded and inserted the faces here and i also gave it a lot of loop cuts and that is because we are going to be using the displacements in the node editor to actually displace the mesh so i do want it to be somewhat subdivided so that's what i did in the 3d scene with these two objects just to preview the materials and then i also added a camera and pointed the camera at the objects now for the lighting i added in these two plane lights so i added a big plane light right here on the side and this object has an emission material with a strength of 30 and also it just has a very light blue color just to give some natural light blue lighting and then also i added in this plane right here and this plane just has a subsurf modifier so that it is round and then i also gave this an emission material with a strength of 30 and it's shining down on the objects to just get some nice bright lighting and then also to get some really nice realistic lighting and reflections i added in an hdri so this is the loppenheim04 1k hdri this is a free hdri from polyhaven.com link is in the description if you'd like to download it so i downloaded the 1k version and the hdr version and then right here in the world settings you can click on the new button to add a new world and then right here on the color you can click on the yellow dot and you can choose environment texture and then just click on the open button and you can just add in the downloaded hdri and then to make it a little bit brighter i just turned the strength up to like a 1.5 so this will give some nice realistic lighting and reflections on the object now i am going to be using the displacements in the node editor to actually make the bark bump out and i would highly recommend that because it is really going to make the tree bark look much more realistic so right up here on the render properties you need to make sure this is set to cycles because the displacements in the node editor only work in the cycles rendering engine so make sure you're using cycles and then i am also going to be using the adaptive displacements so if you want to use the adaptive displacements you're going to need to change the feature set here to experimental and this is again right over here on the render properties so i'm going to change that to experimental so then right over here on the modifier properties i just added the subdivision surface modifier so you can click on add modifier and just add the subdivision surface and i added the subdivision surface modifier onto both of these objects and then because we set the feature set to experimental now that it's set to experimental right back here on the modifier properties we have the adaptive subdivision setting so i just turned that on and this way where you're closer up it's going to add more detail but then if you're farther away it'll add less detail so on this tree trunk object right here on the cylinder i turned on the adaptive subdivision and i just set the dicing scale to one i think that's pretty good and then on this object right here i turned on the adaptive subdivision and i just turned the dicing scale to five and that's just because this object is already pretty detailed that already has a lot of geometry so i didn't need to turn the detail up too high alright so now i'm gonna click on this object and then right over here i have the shader editor so i'm going to click on new to add a new material and i can just rename this material to procedural tree bark and then i want this object to be on the other object so i can just click and drag and drag this material and drop it onto this object as well alright and then there is one more thing that we're going to need to do to get the displacements to work you need to go right over here to the material properties and then in the material properties you need to open up the settings tab so you can see right here on the displacement it just says bump only but i want to click on this and i want to change it to displacement and bump so this is going to tell the material that it can use the displacements so i can just make this smaller and we can start making the procedural material just one more thing though before we start i am going to be using the node wrangler add-on to preview the different nodes so if you don't have the node wrangler enabled you can just click right here on edit and then you can open up the preferences and then right over there on the add-ons tab you can go over to the search and you can search for nodewrangler and just checkmark the nodewrangler add-on and i'll show you how to use it in the video so let's start by creating the base texture for the tree bark so i'm going to press shift a and i'm going to go here to the search and i'm going to add a voronoi texture so you can just search for the voronoi and i'm going to add the voronoi texture and drop it here and then i want to preview it so i'm going to hold down the ctrl and shift key and select the voronoi texture that's using the feature from the node wrangler and it's going to preview that texture now i don't want this material to look like a bunch of little circles here or a bunch of little dots so i'm going to click on this drop down and i'm going to change this to the chebyshev and now by changing it to the chebyshev you can see that we have a bunch of squares and that is kind of what i want because if you've looked at bark materials it kind of looks like there's a bunch of squares or a bunch of rectangles but the rectangles are kind of scaled upwards or stretched upwards but then of course they're very natural and organic and random and they have a bunch of noise and they're kind of bumpy so this is what i'm going to use for the base of the texture and then also on the scale here i'm just going to turn the scale to like an 8 so it is smaller now also with the voronoi texture selected i'm going to press ctrl t and that is going to add the texture coordinate and mapping now i want to use the object coordinates so i'm going to take the object and we're going to plug that up to the vector now as i said earlier the main texture of tree bark seems to be stretched up so i want to use this mapping node to actually stretch the texture up so right here on the mapping node on the very bottom one right here on the scale i'm going to turn the z scale to just like a 0.2 and now you can see that all those squares are actually going up and down and that is starting to look a bit like tree bark of course it isn't very natural or organic it is very straight and so i want to add much more randomness and add more noise so what i can do is i can add another texture here in between the texture coordinate and the mapping to actually distort the voronoi texture so i'm going to press shift a let's go to the search and i'm going to search for a noise texture and i'm just going to drop the noise texture right here between the texture chord and the mapping so it's going through the vector and so now the noise texture is actually distorting the displacement of the voronoi now i want to turn the detail all the way up to the max which is 15 so there's lots of detail and then i also want to turn the scale up to like eight now there is a problem with this and that is that it's distorting it way too much so you can't even see those square shapes at all so what i want to do is make the effect less strong so i'm going to press shift a let's go to the search and i'm going to search for the mix rgb and i'm just going to drop the mix rgb right here after the noise texture so i can now bring the noise texture down and then i want to take the object from the texture coordinate and i want to put that into color 1 so then this noise texture is going to go into color 2. and make sure you put the color into color 2 not the factor so now if i change the factor you can see it's going to change how much is being affected now i actually want to click on the mix here and i want to change the mix to the linear light so change it to linear light and now when i drag the factor you can see that the texture isn't being moved around as much and so we can actually kind of preview what it's doing better so if i turn this factor value all the way to zero it's just using the object coordinates but if i turn the factor all the way up to one it's just using the noise texture so i mostly wanted to just use the object coordinates and i just wanted to use the noise texture a little bit so i'm going to drag the factor way down and make it very small and i'm going to be using a value of 0.08 so in the factor right there you can type in .08 and now if you look at that texture you can see that it is mostly keeping the shape it is keeping the shape of those squares or those rectangles but there's a little bit of noise here and there which is kind of distorting it so now it looks much more random and organic and we have a really cool texture here now right here on this noise texture we also have a roughness value and i do want to turn the roughness value up because if i turn it up it's going to add even more detail and roughness and i think it just makes it look more like bark but i don't want to just turn the roughness up evenly so that there's more roughness all over the place i want some parts to have more roughness and then other parts to have less roughness so i'm going to take the texture coordinate and bring it over and then i'm going to select this noise texture here and i'm going to press shift d to duplicate it and we're going to stick it down here so i can now take the object from the texture coordinate and i'm going to put that into the vector so i can now take the color from this noise texture and i'm going to put that into the roughness so this way instead of just evenly changing this with this factor value by using the color from this noise texture some parts are going to have more roughness and then other parts are going to have less roughness now on the scale here on this noise texture i'm just going to turn the scale to like a 3 and then i will leave the detail at the max which is 15 so it's very detailed now i want to have more control over this so to have more control over the colors i'm going to press shift a let's go to the search and i'm going to search for the color ramp and we're going to stick the color ramp right here in between both of these noise textures so i now want to take the black tab and i'm going to drag the black tab out and i'm going to bring it out to about here and then i can take the white tab and i'm going to drag that over as well so now if i zoom in here you can see most of this doesn't have any roughness but then some parts here and there have lots of roughness now i don't want it to be that contrasty because that's very contrasty i do want to have some amount of roughness all over the texture so to do this i can click on the black tab and i can make the black tab lighter so i'm going to click on the color and i'm going to make this lighter and as i make it lighter you can see there's more and more roughness and if you want to use the exact same color that i'm using you can click on this tab and you can go here to the color and if you click over on the hex value you can type in b1 b1 b1 so that is the exact color that i'll be using and then i do want to take the white tab right here and i just want to make this white tab a little bit darker and again if you want to use the exact same color that i'm using right over here on the hex value you can type in c e c e c so now if you zoom out here you can see some parts definitely have more roughness but then other parts have less roughness so it just makes the texture a bit more random and organic now i want to organize my nodes very well just so that they're very easy to understand so i'm going to be putting these nodes in a frame so i'm going to press b for the box select and i'm just going to box select all these nodes here but not the texture coordinate and not be principled so just all these nodes here in the middle i can now press ctrl j so ctrl j is going to join them together into a frame and then i can just kind of push them together just so that they're compacted a bit more so something like that maybe even bring these down a little bit so they're a bit more compacted all right so i can now click on the frame and i want to rename the frame i want to add a label so i'm going to press the f2 button and that is going to change the node label and i'm just going to rename this to like bark texture all right bark texture so that is the base of our bark texture so what i'm going to do now is take the distance from the voronoi and i'm going to plug this up to the base color of the principled and then i can also control shift and select the principled bsdf and that is going to preview the shader now of course that doesn't look very much like bark because it is just black and white so i want to add a color ramp in here to change the different colors and make it look like bark so i'm going to press shift a and let's go to the search and i'm going to search for the color ramp node and i'm going to stick the color amp right here between the voronoi and the principle so i can now change the colors in here and that'll change the bark color so i'm going to click on this black tab right here and then i'm going to click on the color and for this first color i'm going to make this a very light color and then kind of a brown color so a very light brown and if you'd like to use the same exact color that i'm using you can go over to the hex value and you can punch in seven 96775 nine so that is the exact color that i'll be using and then i wanna add a color in the middle so i'm gonna hold down the ctrl key and click right in here and that is gonna add another tab and then i wanna bring this tab over a little bit so it's over here and then this one i'm going to click on the color and i'm going to make this a brown color as well so something like this and it's going to be a bit darker and again if you want to use the exact same color that i'm using over here on the hex you can punch in five nine three f two nine so that is the exact color that i'll be using and then for this last one here i want this to be brown as well so let's make this a brown color but this one is going to be very very dark and right over here on the hex value if you want to use the same color i'm going to be using a hex value of 0d0905 so just a very nice dark brown color and i'm also going to just drag the black tab over a little bit so that it's just a little bit more contrasty so now we have some really nice colors there for the bark now if you zoom in here you can see the bark is kind of shiny and i do want it to be pretty rough because bark is very rough so i'm going to take the distance from this voronoi texture and i'm going to plug a wire into the roughness and that way this texture here is going to control how rough it is now i want more control over this because i really don't have much control so i'm going to press shift a let's go to the search and i'm going to search for another color ramp and let's just stick the color amp right in here between the voronoi and the roughness so just stick it right there so i can now change the colors of the color ramp and that's going to change how rough or shiny the actual bark is so if i make the colors lighter then it's going to be more rough so i can click on the black tab right here and i can make this brighter and brighter and you can see that now it is much more rough and if you want to use the exact same color that i'm using you can click on this tab right here and go to the color and i'm going to be using a hex value of b3 b3 b3 and then also right over here on this white tab over on the other side if you want to use the same color that i'm using you can go to the hex and you can punch in e d e d e d so this is basically just a white color but it's very very slightly gray so now you can see that tree bark is very rough and that looks much more realistic so the next thing that i want to create is the moss so i'm going to be creating the moss right up here so i'm going to press shift a let's go to the search and i'm going to search for a noise texture and let's stick the noise texture right up here and then i want to use the object coordinate so on the texture coordinate i'm going to take the object and let's put that into the vector and then i can control shift and select the noise texture to preview it now on the scale i just want to turn this up to like a 7 and then i do also want to have lots of detail so let's turn the detail all the way to the max which is 15. and then i do want to add quite a bit of roughness so i'm going to turn the roughness up to like 8.65 so 8.65 and now that has a lot more detail and then i do think the moss looks pretty cool if it has a bit of distortion so on the distortion value i'm just going to turn this up to like a 0.3 so there's a little bit of distortion now what i want to do is create a mask to tell the texture where the moss is going to be so i need to make this more contrasty so to do this i can just press shift a let's go to the search and i can search for a color ramp and let's click on the color ramp and i'm just going to drop it right in here in this wire and just make sure you ctrl shift and select the color ramp to preview it so i can now bring these two tabs together and that is going to make it more contrasty so i'm going to drag this black tab to about here and then i'm going to drag the white tab out so that the actual white parts are brighter so just bring it to about there so wherever the white parts are that is where there's going to be moss so you can play around with this if you want very little moss you could just bring these over here and now there's not going to be very much moss or if you want a lot of moss you can drag this over so this way there would be a lot of moss i don't really want that much moss so i'm going to drag this over to about there so let's zoom out here and i want to join these together into a frame just to organize them very well so i'll press b for the box select i'm just going to box select these two nodes and then i can press ctrl j and ctrl j is going to join them together into a frame and then with this frame selected i can press f2 and that's going to bring up the node label and i'm just going to rename this to moss so just rename that to moss all right so i now want to add the moss into the base color so i can actually see it so to do this i want to mix this color ramp in with the color of the texture so i'm going to select this color amp hold down the shift key and select this color ramp and then i can press ctrl 0 and that is using a feature from the node wrangler add-on and it's going to add a mix rgb so i'm just going to open up the mix rgb just click on the arrow to open it up and then i'm going to just box select these nodes right here and i'm just going to bring these nodes over so we have a bit more space so i actually want to take the color from the mix and i'm going to put that into the base color all right so then i want to control shift and select this mix to preview it so right now you can see that it is adding the moss but the moss is all white so what i want to do instead is take the color ramp here from the moss and i want to put this into the factor and the factor is going to tell it what parts are going to be color one and then what parts are going to be color two so then we can take this color ramp here with the brown colors and i'm gonna put that into color one so now color two is going to be the moss color because this color ramp right here is telling it where it's going to be moss and where it's going to be the bark so right back over here on color 2 i can just click on this color and i'm going to make this kind of a greenish brownish mossy color and if you want to use the same exact color that i'm using on color 2 you can go to the hex value and you can punch in 4 3 6 c 2 8. so that is the exact color that i'll be using so i can now control shift and select the principled shader alright so this is definitely looking more like a bark material but it doesn't really have any bump it's very very smooth so i want to add some bump into the normal to make it look like it's bumpy so i want to add three layers of bump so the first layer of bump that i want to add is the voronoi texture because this is the actual bark texture so i'm going to take the distance from the voronoi and i'm going to pull out a wire and i'm going to stick that into the normal now there's some weird shading issues and that is because we need to convert this data into normal data because this is just black and white data but this actually needs to be normal data you can see that as a purple dot there so to convert this to normal data i can press shift a let's go to the search and i can search for the bump node and we're going to stick the bump node right here so then the distance can actually go into the height value of the bump and then the bump normal can go into the normal of the principal shader and this way it's going to convert it to normal data so now you can see that looks very bumpy and that looks really nice and also i can rename the bump node so if i click on the bump node to select it i can press f2 and i want to rename this to bark bump so just rename that to bark bun now this is a bit too strong and i want to make it a bit more subtle so let's turn the strength value on this bump node to just like a 0.35 i think at 0.35 is pretty good so now that's not quite as strong alright now i also just want to add some noise all over the texture just to make it look more organic and natural so i'm going to press shift a let's go to the search here and i'm going to search for a noise texture and we're just going to stick the noise texture right down here now i want to use the object coordinates so we're going to take the texture coordinate we're going to take the object let's pull out a wire and i'm going to drag this all the way over and we're going to plug this into the vector of the noise texture and then i can ctrl shift and select the noise texture to preview it so let's take the scale here on the noise texture and i'm just going to turn that to like 4 and then i'm going to turn the detail here all the way up to the max which is 15 so it is very detailed and then i do want a little bit more roughness so let's turn the roughness up to like a 0.6 so it has even more detail all right so i now want to take this noise texture and i want to plug it into the bump just to give the entire texture a little bit of bump so i'm going to take this bark bump i'm going to take this node and i'm going to press shift d to duplicate it and i'm going to drop it right here so the normal can just go through the normal because it's already been converted to normal data from this one so we now have this extra height value that we can add data into so i'm going to take the factor from the noise texture and i'm going to plug that into the height and then i can control shift and select the principled shader to preview it so now it's just adding some procedural noise all over the texture now if i click on this bump node i can also press f2 to rename this and instead of it being bark bump i just want to rename it to a noise bump so now it says noise bump and then i do want to make it a bit more strong so on the strength value let's just turn this up to like 8.4 so it's a bit more strong and actually if you ctrl shift and select the different bump nodes you can actually preview what they're doing so that's what the first one is doing and then control shift and select this bump node and that's what the second one is doing now i want to add one more layer of bump and that's going to be the moss because if i control shift and select the principled shader if i zoom into the moss you can see the moss isn't really popping out but i do want the moss to look like it's bumping out so i'm going to take the color ramp here from the moss and i'm going to put that into the normal as well so let's take this bump node and i'm going to press shift d to duplicate it and i'm just going to drop it right here so again the normal can just go through the normal so we now have this extra height value that we can plug data into so i'm going to take the color from the color ramp and i'm going to bring this way down and i'm going to stick it right there into the height value and then if i click on this last bump right here i can press f2 to rename this and i don't want to rename it to noise bump i want to rename it to moss bump because it is the bump for the moss and then i do want it to be popping out quite a bit so i'm going to turn the strength value all the way up to 1. so now if you zoom in there the moss is popping out and that is looking very good so this is definitely looking like tree bark but there is one really important thing that i want to do here at the end and that is to add the displacements and this is really going to make it look like actual tree bark because it's actually going to be displacing the mesh so what i want to do is i want to take the bark texture and i want to put that into the displacement to actually displace the mesh so i can take the distance from the voronoi texture and i'm going to pull out a wire and i'm going to plug this into the displacement here on the material output now it's going to do something but you can see that that's really weird and that's all messed up it's like shooting out in a random direction and so that is because this is just black and white data but this needs to be displacement data so just like we did with the bump nodes i need a node in here to actually convert it to displacement data so to do this i'm going to press shift a let's go to the search and i'm going to search for the displacement node and i want to drop the displacement node right here in this wire and then i can just drag this down and i'm going to stick this right down here underneath the principle and then also you can see that this wire is kind of overlapping so to make it not overlapping i can hold down the shift key and i can right click and drag and i'm going to drag a line over the wire and then let go and what that's going to do is going to add this little reroute and then i can just drag the reroute over this is optional you don't need to do it if you don't want to but i just want to organize my nodes very well so i'm going to bring that over and that way it's not overlapping all right now if i zoom in here you can see it's not really doing anything and that is because i actually need to take this wire and i want to put it into the height value instead so the voronoi texture from the bark texture needs to be going into the height value of the displacement and now you can see that is actually working so that is looking pretty cool but it is way too strong so i'm going to take the scale value and i'm going to turn this way down to like 8.14 so just change it to like a 0.14 i think that is a good size we'll just wait for that to load up and there we have it so i'm just going to zoom into this object here make this a little bit bigger so you can see it's actually displacing the mesh and so that looks very cool and it really does look like procedural bark you can see those little bits there are kind of popping out here and there and it looks good from all sides so even if you look at this on the side of the cylinder or the back of the cylinder it has a really nice texture there and i really like how that is actually popping out of the mesh and that is it so that is the procedural tree bark material so i'll just give this a final render so i hope you found this tutorial helpful and thank you for watching and if you'd like to help support me and this channel then you can purchase this procedural material on my gumroad store and my patreon page i'll have the links in the description and you can also check out my blender procedural material packs if you'd like to purchase more of my materials and if you'd like to watch more procedural tutorials then you can check out my blender procedural material tutorial playlist on youtube all the links are in the description so i hope you enjoyed this tutorial and thank you for watching
Info
Channel: Ryan King Art
Views: 79,273
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, tree, bark, procedural, material, shader, blender, procedural tree bark, tree bark, blender tree
Id: 6ECeHoATa74
Channel Id: undefined
Length: 26min 54sec (1614 seconds)
Published: Mon Jul 04 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.