Blender Wood Material... (oh, and it's procedural)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you know i wish i had this tutorial back in the day when i was a beginner back when i had that gleam in my eye because i remember i would go to youtube and type something in like wooden procedural material tutorial or maybe like wooden plank tutorial and everything that would show up literally every result was garbage it was just telling you to take a wave texture and distort it and it did not look like wood and especially if you looked for these plank tutorials they would also be garbage so this video is going to be a homage or really just kind of like the tutorial i wish i had back in the day um to appease like past version of myself if i got in the time machine and went back to when i didn't know what i was doing i'm sure that this would be useful so consider this the best wooden plank procedural tutorial on youtube we'll see if that pans out so what i'm going to be teaching you how to make of course is a procedural wooden plank material you could also get rid of the planks and just make this raw wood and some of the sliders that i'm going to you know show you how to make you know all the mathematics behind it and all this is the amount of tiling so again all procedural no matter what tiling size you have um it'll work so again number of tiles we're going to talk about darkening so you could have all them be the same or some of them be darkened or whatever it turns out i typed in smoothness twice for this i think this smoothness should actually be offset um so you can see here we have a consistent pattern we're going to talk about how to randomly offset each of these rows by a different amount so it's kind of like you're randomly placing down tiles then we have smoothness so as we crank this up it kind of becomes like a slippery floor or we could do um or i guess yeah or we could do kind of like a rough wooden thing so that controls that and then finally we're also going to talk about bump in other words how much the light catches the wood and all of that so again uh this smoothness just talks about the design so here we have kind of like very straight lines uh whereas the bump is just talking about like lighting properties and all that so um overall not too many nodes we'll try to do our best to uh show you what's going on here hopefully this turns out to be the best wooden plank tutorial on the internet okay uh to get started what i'm gonna do is i'm gonna add in a plane the reason i do this is because normally you kind of apply this material to a floor so it's nice to visualize it you know on a plane instead of a sphere the sphere is usually the last part because it works with any object with a uv map what i'm doing right here is i'm just setting up the scene before we do any like node material stuff i just like to switch to cycles to get you know more realistic lighting results hdri or really the background set you're transparent so that uh when we incorporate our hdri lighting we don't want the light but hdri lighting we don't actually see it in the background now if you don't really know what i'm doing right here not a big deal none of this is actually important to making the wooden plank material all this is just for the lighting setup and making it look good don't worry about it this is where the actual tutorial begins so step one of this of course is make a material i'm going to call this wooden planks and i guess we should save this as untitled already tried doing a take of this but i ran into a technical difficulty don't worry this is a true one-take tutorial i wouldn't lie to you um what we want to do is turn this into wooden planks which you know we might have to do a lot of math to make those like little planks that are offsetted and all this but if you think about it we know that blender and this is just a nice little trick to get us going uh remember that blender has a brick texture and bricks are pretty much the same thing as wooden planks except they're a bit like thinner point is start with a brick texture and what we're going to do is kind of manipulate this until it's looking more like a our plank design uh first thing we can do turn down the scale just so that we have less of these at once and again this thing's already procedural so anything we do to it should keep that proceduralism and seamlessness and all that so just to start off with what we want to do is decrease i can't remember i think it's this frequency point is we want to stretch it and if we have this set to 2 we get some like very strange results so make sure the bottom frequency is set to one these are all just parameters of the brick texture and then slide this up until you have kind of like the length or the dimensions aspect ratio that you want your planks to be next thing is we're going to take our mortar size that's going to be this black separator um in other words what's separating our planks uh take this and let's like divide it by two so it's half as thin and that is looking good so already you know without too much work um if we wanted something with kind of constant offsets which you know we could change the number this is but it's just going to be um constant regardless if that's what we want this is a perfectly fine start now of course you know this isn't what we want we want random offset and all that so let's take this brick texture and make some of these rows dispersed or i guess shift it down to do this what we need to do is uh first of all add in a texture coordinate system so for example we're going to be using uv coordinates because that works with any object with a uv map best not to use something like generated or object coordinates in a scenario like this what we're going to do is we're going to take this and separate it by x y z components and what we want to do is take this y component going vertically in other words defining like which row we're going to be on we want to take this and for each row we want to generate in some sense a random number that tells us how much to offset it by pretty simple stuff so first of all one thing you're going to notice is when the scale is set to two we have one two three four five six seven eight rows right uh when we have three we should have uh 12 rows et cetera point is whatever number we have here we have four times as many rows and you could look into the brick texture to see why that is but quite frankly don't care that that's just the case so when we have one we have four when we have two we have eight et cetera uh the reason that's important is what we wanna do is separate this y value into eight uh discrete and distinct values so what i'm going to do is i'm going to take this y gradient going from 0 to 1 bottom to top 0 to 1. we're going to take this and multiply it by 8 or i guess 8 if this is 2 but to make it kind of more procedural and a less defined or less restricted is probably a better way to put it is we're going to use a parameter a value note to pick a scale and then also what we could do is add in another math node set this one to multiply by four because again that's the rule of taking scale multiplied by four to get the number of rows meaning that if we have three uh we're going to have 12 which is gonna work here et cetera okay so now we have a gradient going from zero to whatever number this is times 4. we take this and then we want to generate a couple numbers so quick way to do this take this and kind of round up to each value this isn't a great way to see what's going on here but let me just explain here we have the number one two three four etcetera etcetera uh because we have the zero to get eight uh gradient and it's rounding up to the nearest integer uh so we have eight values if this was set to one uh we'd only have four bands etc okay take this we can use these discrete values that are now distinct for each row and use a white noise texture which will kind of what it does is for every input it generates a random zero to one output in other words um now we have a nice map where every one of these bars has some kind of offset value between zero and one uh which is cool because if we whoops if we take our brick texture which again has constant offset uh use this vector texture coordinate input and mess with it then we have the result that we want okay so in theory non-theory in practice what should we be doing here well we're going to make a combine x y z in other words a coordinate system for this right now it's going to mess everything up because now we've plugged in a single vector for this what we want to do for this is for y axis we're going to keep this constant so again we're using the y axis from the uv coordinates and for the x-axis i guess we can use this manipulated one over here uh which right now is going to make you know not the result we want and that's because we kind of not kind of we exactly set the x values to be discrete right so there's no gradient or variation so final thing you need to do add this to the original x so again what's happening here is we're taking our y components from uv coordinates bringing it over nothing changes with x we take it and then just add these random numbers which now gives us random offset right um and the way this works is if we add a multiply right here so this is kind of like the component of the white noise before it gets added when this is set to zero in other words it has a um voice cracks off it's always best to acknowledge these things when this thing has a strength of zero has constant offset but then as we increase it it randomizes it quite a bit so for now we can just kind of get rid of this and assume that we're multiplying it by one okay cool again nice thing about this is that we we now have this nice system um that we can increase this number to whatever we want uh because we have this multiplied by four equation and then we have this um procedural kind of offset situation and this is kind of like how i made the tile slider from before okay so this is a good start by the way if you don't like the randomness that it generated you could make this four-dimensional white noise and then pick seeds for different kinds of offsets but whatever i'm gonna keep the seed at zero but that's another slider i guess i should have added in okay cool uh so now we have kind of like the base pattern for our tiles or i guess our planks um but currently these could just be rectangles they could be bricks they could be whatever so let's make these specific we would and this is kind of like the part of the tutorial that matches a couple of the other ones but hopefully we kind of make it look a bit more real than those other guys so currently we have these planks going along the x-axis so in some sense along the y-axis but going from left to right is the way you want to think about it if we look at this wave texture we want to set it to y again you you'd probably think it's x but don't worry about it it's kind of like perpendicular to what you think it'd be you take a wave texture and again what we want to make is the wooden grain here and the trick that everybody seems to know for this is you take distortion bring it up just to add a bit of distortion we then crank the detail to make it like you know look a bit more i guess detailed it's a good way a word for it uh crank up the detail crank up the roughness as well and this is a good way to you know kind of start off your wood texture right now it's looking more like you know tree bark um but we are going to manipulate the initial coordinates coming in also we can make it um more dense by adding in a more scale or more lines is another way to think about it a way to make this look more like wood that some tutorials talk about some of them don't i wouldn't recommend listening to the ones that don't to make it look better take another wave texture and we're going to manipulate this to use it as the texture coordinates and i guess it's probably better to use one with default settings for now now what we're going to do is first of all we're going to use the uv coordinates for the texture coordinates for this because again ideally at the end of this we just have one coordinate system so they're all branching off uv coordinates for example it could be generated whatever we take this we're going to plug it in right here uh which is heavily going to mess up our thing first of all make sure it's going the right direction we kind of want this but not to this extreme amount this is kind of like perfectly smooth sanded um perfectly elongated wood it's not what we want what we want to do is we want to take this and we want to mix it together with our initial coordinates not by much by just by a little so we're going to mix this with our uv coordinates so again the way you want to think about it is we we have uv coordinates that are being used for the wave texture and then we're mixing it with the original coordinate system meaning uh if we set this to 1 it's going to give us wave texture and otherwise it's just going to give us some uv coordinates okay so what we want to do is just kind of crank this down a little and you're going to notice that you know the more we do this the more it's going to distort so i'm going to crank this down a little like i just said and then to make this look more like wood we need to mess with the um second wave texture here um so i think we want this to be a big number so you can see this gives us our nice banding also you can add in a second wave of distortion although this tends to get a bit chaotic if you go too high so just a tiny tiny bit you could also crank up the detail stuff like that and you can see this is what we had before and then just with a bit of distortion we get something that looks a lot better and you you can also play with this value and make it its own slider but um this is a good way to get kind of like a handmade probably isn't the right word for this but what i'm trying to say is the floor that's under you right now it kind of has this uniformity to it that doesn't feel quite natural so this kind of gives it that uniformity where again before or before after okay cool so we want to take this and use this as our base wood and then we incorporate the planks and all this how do we do it uh well since we've started creating all these masks etc it's just about time that we used a bsdf in this case a principled bsdf um so we get lighting reactions and all that interactivity what we want to do here is first of all mess with the color so i'm taking this modified wave texture and i'm going to plug it into base color and then just to make it you know wooden colors use a color ramp wherever we have black we're going to make it some kind of like reddish some kind of wooden color and then for the white you pick a different type of wood and this is all dependent on the thing it is that you want to make right some wood looks very black some of it doesn't uh whatever you just play with it until it looks right and uh speaking of playing with it until it looks right i'm just going to be messing with these values a bit more until i get more of the look i want because right now it's looking a bit cardboardy i'm thinking we increase this a bit just we have a bit more distortion and we also make this a bit more detailed that's looking a lot better okay so this is kind of like a perfectly you know flat uh wooden floor and all this um okay so we've picked two colors and now we want to incorporate our wooden planks there's a couple ways you can do this but probably the fastest way is we're going to throw in a mix rgb so we've already done our color ramping and now we're going to send this to another you know color operation or color process the way you want to do this is multiply it by well i guess we could either mix or multiply i'm going to take the factor because the factor is the one that has you know black and black where there's the tiles or i guess i should start saying planks and then white everywhere else whereas the color kind of has this variation we are going to take this and connect it whoops take this and connect it as our factor which is going to give us this and i guess we want this bottom one to be black there we go in other words we're multiplying the initial color with black only wherever there is mortar which is white in this original mask otherwise it's going to multiply by zero in the middle okay so now we have our wooden plank separation another thing that makes this look super uh realistic is having a bit of variation even if you think your wooden floor has perfectly identical planks it's probably um not the case right so what we're gonna do is we're going to do another multiplication but this time but this time i think we can use just this output right here i'm going to bring this down to black just so we have a bit more variation and let's see if this works if not we can add in another brick texture so i want to use this as the factor and you can see that this does exactly what it's supposed to and we can also control the intensity of this so math multiply when it's zero it's multiplying by zero so nothing happens let me also clamp and then as we go up to one uh we get a lot more variation right the reason this works again is because we have variation built into the brick texture they've already coded this in and um yeah you could do do it uh you know your yourself with math nodes wouldn't recommend it just use the uh pre-built and thing you know why not okay so now we have a good amount of variation um one more thing that will make this look super real is right now we kind of have a bsdf um where with a bunch of settings but really all this is color information right there's not too much difference between this and this uh what we want to do to make this look more realistic is add some kind of depth not in the sense of displacement but in the sense of bump mapping just to give it that light interactivity and we could mess with all these nodes and get a new kind of mask for this or or and this is what i would recommend we could be super lazy so everything that we've done to get to the base color we're just going to take this use it as a height map and connect that to our normal again what the bump node does is it converts height information whatever map we input it converts it into normal information which you can see kind of looks like wooden normals oh the burps are coming but you can see very quickly this gives us the correct result uh one thing you might need to play with if you do something a bit differently over here is you might need to invert it depending on whether these um things are going inwards or outwards and sometimes it's kind of hard to tell um but now we have kind of a floor that reacts to lighting conditions the lower this is the smoother the floor is going to be but you definitely want some kind of number larger than zero okay and of course it's possible to overdo it but for now this is going to be fine okay next thing i want to talk about is roughness we're not going to do too much with this but again roughness is how shiny the surface is going to be this is perfectly rough so it's not going to be reflecting much light whereas when we bring this down it's going to get closer and closer to a mirror from the right angle i guess this would be a good angle to show what's going on what we want to do is just pick the keep this at a um you know certain value but have the mortar the you know the black in between the planks have a roughness of one so it's not reflecting anything and that would just make it look a lot more real you know ideally the burp came out thank god um ideally we have the roughness also kind of mapped to this thing the same way we did it to the bump but of course i'm lazy and it doesn't look too bad if you just set it to a constant values okay to do this what we're going to do is we are again going to extract the mortar we are going to use a color ramp so again black is going to be the interior it's going to to be the planks and white is going to be everything else for the planks we want a roughness that's pretty close to 1 but still somewhat reflective so let's do 0.7 so now we've modified the planks and then for the whites which is going to be the mortar we want a roughness that is perfectly one so that's already good in fact we could probably lower the planck part to something like .65 just so it's a bit shiny and you could use this as your own um parameter as well in your node group take this connect it to roughness see what that gives us you can see now this is shiny except you know in fact too shiny we'll fix it um but you can see it's shiny except for the lines in between which is exactly what we want um so again if you want to affect the initial shininess or not the initial the plank shininess you can take this and bring it up or if you don't want to do it in the color ramp a nice trick is after you do this and this is good if you want to make it a parameter math edition set it's a clamp so it doesn't go above one and uh the more we add here uh the rougher or really the higher the slider is going to be brought up this one's gonna be held constant uh since we're clamping but this one's gonna be brought up so point two should make it like super rough and then like point five should be basically no reflection et cetera but this is before and after maybe even point three should be fine okay cool so now we have the base setup over here let's see what controls we have so far so far we have kind of like the master slider over here for tile size and it works because it's all based off this brick texture which is controlled by this value node so it's going to work with the offset and everything because the white noise will keep working etc and the darkening values are going to be uh controlled again by the brick texture um another parameter that you might want to be able to control is the reason we had this multiply i believe was for the darkness variation so let's just add a slider for that set it to one bring it over here and it's always good to give these things names will be a bit lazy at this time so this is dark this is tiles and again you could really get in here and control like detail and stuff like that which is the quality of the wood inside here and maybe it's a good idea to make it a bit smaller just so it looks like there's more grain going on in here you could control these things but generally i don't like messing with too many of these maybe we'd want to control for this one because it really changes the look of stuff i could get a super i didn't want to keyframe that you could get a super smooth looking wood or you could get one with a quite a bit of coarseness i'm gonna bring this down a bit um all that's up to you but for now i'm thinking the main three important parameters are the texture coordinate setups in this case uv coordinates the number of tiles and the um wow the the voice cracks are coming in they're coming in hot today whatever can't be embarrassed by it i'm making the best tutorial ever for wooden planks um some other stuff we can control again is the offsets and how powerful that's gonna be et cetera but for now these three sliders are going to be enough so once you're happy with that ctrl g for the rest of this move that over move these over and then of course we could always modify these but i wanted to show you how i got that initial sphere in the beginning i just added in a sphere subdivided control 2 to do that you know quickly we take this we apply the same material and the reason this is going to work at least kind of work we'll talk about why it isn't working exactly but the reason this pretty much works is again it's going to be using the uv map which every object the least primitive comes with inherently so ah always scares me i wonder if you could hear that miss thing i always comment on it every object comes with a uv map you can see this actually alters it because again it's based on that the reason there's this seam down the middle is because there's a seam from here to here so even though the pattern goes across maybe the darkening doesn't because the brick texture i guess isn't inherently compatible with seams so make sure your object has a seamless uv map or otherwise i just look at the other side of this the reason this looks weird other than the scene is because it's going horizontally instead of vertically but we have a quick solution for that either vector rotator i guess mapping node would probably be queener we're going to use a mapping node we're going to rotate this by 90 like that and again you probably saw we could do any value in between and get this nice wrapping that's the nice thing about proceduralism uh so we're gonna rotate it and then we are going to i guess you could either scale it like this or again we have this nice tile slider so let's set it to like four or no that's not enough let's set it to eight um that helps and then also let's stretch the uv map on the y-axis um not by that much but just by bit i just so looks a bit uh better so again this is the initial setup you might want to mess with lighting and stuff like that um with your bump with your uh darkening etc but you can see this is kind of like the essence of how you make the uh this is the essence of how you make the wooden materials i think i've done a good job pretty much the rest of this is um connecting more uh parameters as you can see over here i'm nothing special i made the lighting setup look a lot better which is why you know this looks better you can see we have these area lights etc but um what what did we not have we didn't have the initial or we didn't have the offset which the way we do that is i just controlled the um multiplication of the white noise before it reaches the combined texture coordinates um smoothness was just the mixing factor between the first uh wave texture and the um the uv coordinates here remember we did that trick and then the bump is just the control on the um the bump node if i can find it right here um so essentially it's the same thing um anyways if you want to get this original one file with all the settings and it's also like packaged nicely and everything i'm gonna rename this but um that is going to be available on patreon patrons get access to all blend files that i make so this and all the others are going to be on there exclusive tutorials that i'm going to start you know ramping up again i was busy with november but i got sidetracked um so now i need to start making more exclusive tutorials you also get discord access behind the scenes and um sometimes i make patreon newsletters which are pretty cool but really i want to thank all the 550 some patrons which is quite a few that that's actually a lot um who are supporting the default cube and cg matter channels you are keeping this thing afloat and hopefully this this wooden plank tutorial makes up for it all i really think it's a useful material and hopefully you can get a lot of use out of it nice thing about this is not only can we rotate but vector math you can just slide this and get a infinite amount of tiles i think that's all i have to say about wooden planks hopefully you learned something hopefully you now understand how to do this and the blender noobs and especially me from the beginning who is looking for this tutorial can finally be at rest
Info
Channel: Default Cube
Views: 256,411
Rating: undefined out of 5
Keywords: blender, tutorial, procedural, wood, material, wooden planks, nodes, shader, texture, beginner, 2.92, 2.91, 2.8, cycles, eevee, cg, cgi, vfx, animated, animation, 3d, b3d
Id: EoQgq7n9Rwk
Channel Id: undefined
Length: 25min 50sec (1550 seconds)
Published: Mon Nov 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.