Procedural Fabric Material (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial I will show you how to create this procedural fabric material in blender if you'd like to purchase this procedural material and help support the channel then you can do that on my gumroad store and my patreon page links are 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 that's also a great way to help support this Channel and if you'd like to learn how to create any of my procedural materials and you can check out my blender procedural material tutorial playlist here on YouTube so before we create the procedural material I did want to show you how I set up the fabric object if you want to create it the same way that I have or you can add it to whatever fabric object that you're using so I'm going to press shift a let's go here to mesh and I'm going to add a UV sphere and then I'm going to press Ctrl 2 control 2 is the shortcut key to add a subdivision surface modifier and then using the object context menu I can shade this smooth so we're going to now create a fabric object and we're going to drop the fabric object on this sphere using the cloth physics so I can now press shift a let's go here to mesh and I'm going to add a plane and I can press the Tab Key to go into edit mode and I can scale this entire thing up and I'll make it about that big and then I can press tab to go back to object mode then I can press G to grab and let's hit Z bring this up on the z-axis and just stick it right there and then I can press the Tab Key again to go back into edit mode and then using the object context menu you can hit the subdivide button and then after hitting the subdivide right behind me there's that little subdivide and the arrow right there if you click on that that'll open up the subdivide settings and there is a number of cuts here so I'm going to use 50 Cuts so I'm going to type in 50 and then I can click on this to close that so this object now has a lot of geometry and so it'll work well with the cloth physics because the cloth physics will look higher quality if there's more geometry that it can actually use to do the simulation and then I can press the Tab Key to go back to object mode now it's also very very important that your object has a decent UV map so if you click right over here on the UV editing you can see this plane already has a UV map because when you add primitive objects they automatically have a UV map and it is very important that your object has a decent UV and wrap because we are going to use the uvn wrapping to tell the textures how they're going to be placed on the object and I'll show you why we need this when we create the procedural material and if you'd like to learn the basics of UV unwrapping in blender then definitely check out my UV unwrapping for beginners tutorial with the link in the description so once you view V unwrap the object you can go back here to the layout and I'm now going to add the cloth physics so let's click right over here on the physics properties and for this object here we want to add the cloth so just click on cloth and I'm going to leave all these settings at the default except I'm going to scroll way down here and I'm going to open up this Collision Tab and then I'm going to turn on the self collision and this way the cloth will collide with itself and it won't go through itself and that'll make it look better and then I'm going to click on this sphere here and for this one I need to turn on the Collision so you can give it Collision physics and that way the cloth will actually collide with the object instead of going through it and then you can press the space bar and the space bar is going to play the simulation and if it's acting really laggy when you hit the spacebar to play the animation instead of just playing it what you can do is you can bake the simulation so if I scroll right down here you can see that there's cache and I could set a simulation start and a simulation end so for instance you could just change this to like 100 and then you could click on the bake button and it'll bake the simulation and then when you play the timeline by hitting the space bar it's going to be much more smooth and I actually closed my timeline so I'm going to click right up here when the Crosshair appears and I can click and drag down and then this will split the window and then right here on the editor type I can just change this to the timeline and you can see this is actually a little bit small so I want to make the cloth bigger so I'm going to drag this back to the starting I can press the Tab Key to go into edit mode I can scale the whole thing up in edit mode and then go back to object mode and then I can hit the spacebar again and it will re-simulate or you can just click on the delete bake and then hit the bake button again to bake the simulation so then once it's at a frame that you like you can pause the animation and you can click right over here to the modifier properties and you can see it's actually given it a cloth modifier and we want to apply this modifier so you can just click on the drop down and then click on apply so now if I tap into edit mode you can see the geometry is actually set in that position and then also using the object context menu I can shade this object smooth now I want to give this some thickness because right now it actually doesn't have any thickness so let's click on ADD modifier and under generate I'm going to add the solidify modifier and I can just turn it up just a little bit so it has a tiny bit of thickness so something like that and then also to give it more geometry and smooth it out I can press Ctrl 2 Ctrl 2 is the shortcut key to add a subdivision surface modifier and you can see now it's smoothing that allow and it looks much more like Fabric or cloth and that is really it for the cloth object and then also I added in a camera and some lights so I just added this camera here and I pointed the camera at the object and I can actually bring the camera down bring it out a bit so it's pointed at the object and then I'm going to click right over here to go to the shading workspace so in the shading workspace I have the 3D space here and the Shader editor here and I'm going to hold down the Z button and go into the rendered view now for the lighting I added in a few area lights here so if you press shift a you can go down here to light and you can add the area lights and I just position the area lights around and I made some of them longer by changing the shape here to rectangle and then you can drag up the size X and Y and I turned up the power so that the lights are much more strong and I also gave the lights a very slight blue color so I have a light over here then I have another light over here and then I have this main light right here and then also to get some nice Reflections and more realistic lighting if you click right over here here to the World Properties I added in this skylit garage 1K hdri so this is a free hdri from polyhaven.com link will be in the description if you'd like to download it so if you add a new world you can click here on the color click on the yellow Dot and you can choose environment texture and then you can click on open and open up the downloaded hdri and again on polyhaven.com I downloaded the 1K HDR version and then if you don't want to be able to see the hdri in the background you can click right up here to go to the render properties and you can open up the film tab right here and then if you open up the film tab you can check mark the transparent and that way you can't see the hdri in the background and then also to make the colors look a bit nicer if you scroll down to the bottom and open up the color management The View transform should be set to filmic and then on the look here I'm going to change this to high contrast and this will pop out the colors and make it more contrasty and saturated and then I'm also 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 click on edit and you can go to the preferences and then over there on the add-ons tab just search for node Wrangler and you can check mark the node Wrangler add-on so it's built in a blender and I'll show you how to use it in the video so we can now just select the object here you can click on new to add a new material and I can rename the material so to start off I want to make a very detailed texture for the weaves of fabric so I'm going to press shift a let's go here to the search and I'm going to search for a wave texture let's drop the wave texture right here and then we turned on the Node Wrangler add-on so I can hold down the control and shift key and then select different nodes and that is going to preview the texture on the object and then also with the wave texture selected I'm going to press Ctrl T and that is going to add the texture coordinate and mapping and then I don't need the mapping so I can actually click on it and press X to delete it and then right here on the wave texture I want to click on the X here and I want to change this instead to Y so that if is going back and forth now normally when I'm creating procedural materials I like to use the object coordinates so we can take the object and we can put that into the vector and the object coordinates helps to place the texture on the object more evenly and so it works really well for procedural materials and it's also really good when you want some material that you can add to many different objects there is a problem though with using the object coordinates for this cloth material the cloth has a consistent pattern and so you can see right over here on the top it looks pretty good but then right over here kind of when there's a warp in the fabric it looks really weird and it's all stretching and also right over here you can see it looks really weird and it's all stretching and we're also going to need to turn the scale up because we want the cloth to be very detailed so I'm going to turn the scale up to like a 250 and you can see we're still having a lot of problems even though the scale is turned up so because we're using the object coordinates it's like making this weird Circle here it looks good from the top you can see that the lines of the wave texture are going back and forth but it looks really weird over here where there is some warping in the texture and so this is why I'm going to be using the UV coordinates instead so I'm going to take the UV and put that into the vector and now you can see that it's all straight and it's very consistent so you can see now the wave texture moves along consistently with the shape of the fabric and so that's why we need to use the UV coordinates and we need to have a decent uvn wrap for our object so now let's continue to change some of the wave texture settings so I'm going to turn the scale to 250 but you can change that to whatever scale you want for the size of your object and then on the Distortion here I'm going to turn this up to like a seven so if I zoom way in to see this closer you can see that's what the Distortion is doing so it's kind of adding those little wobbles there and then on the detail I'm going to turn this all the way to the max of 15 and then all the other settings I'll leave at the default so this is looking pretty cool but I want to make it a bit more contrasty so I'm going to press shift a let's go here to the search and I'm going to search for a color ramp and let's put the color ramp here after the wave texture and then I'm going to click on this black tab here and I'm going to drag this out and you can see when I drag it out it's going to make it more contrasty and so those little black lines there are a bit stronger and they're a bit bigger so I'll just place that color ramp tab to about there so we now have some fabric weaves which are going back and forth but I also want some weaves of fabric which are going up and down so I'm going to click and drag to box select the color ramp and the wave texture and I'm going to press Ctrl shift d so Ctrl shift d will duplicate the nodes but it'll keep the wires plugged up so then to preview this one I can control shift and select this color ramp to preview it and I'm going to click on this y here and I'm going to change it to X and so this way it's going to be going up and down so I now want to join these two textures together so to do that I can select this color ramp and then I can hold down the shift key and select this other color ramp I can now press Ctrl 0 and control 0 is going to add this mix RGB we can click on the Arrow to open it up so the mix RGB is going to mix these two colors together so the top one can go into color one and then the bottom color ramp can go into color two and the mix here is going to blend between them so we can blend between the first one and the second one but I want to leave the factor at 0.5 so it's evenly blending between them and so now we have the weaves mixed together now if you want to ever change the size of the weaves you'd want to change the scale together so that the size is consistent so to do this I can press shift a I can go here to the search and I'm going to search for a value node and let's put the value node right here before both of the wave textures so I can plug this value up to both of the scale values so this one here and also this one here so now we have this single value and the single value is going to change the size of both of the wave textures so if I change this it'll change the size together so it'll stay consistent so I can now just change this to a 250 but you can of course change this to whatever size you want or whatever size works best for your object so you might want to go with like a 300 maybe a 400 or or 500 or maybe you want to make the weaves bigger you could just change this down to 100. I'm gonna go with 250. all right so we now have our weave texture so I'm going to take the mix here and I'm going to put the color into the base color of the principled Shader and then to preview the principled Shader I can control shift and select it to preview it now I want to change the colors because right now this is very bright so I'm going to just select one of these color ramps and I can press shift d to duplicate and let's put it right here between the mix and the principled Shader so now we can change the colors here and that'll actually change the color of the fabric so with the color ramp selected you can hit the backspace and that's just going to reset the color ramp so I want to leave this tab here as black but then this tab right here I want to make this the color of the fabric so I'm going to make my fabric a very dark blue so I can click on the color here and I'm going to make it a strong blue color and then I can make it very dark but of course you can change this to whatever color you want so if you want a green Fab fabric you can change it to Green you can also change the brightness really just change this to whatever color you want but I'm going to make this a dark blue and if you want to use the exact same color that I'm using for this dark blue you can click over on the hex value and you can punch in 0 0 1 3 3 3. so this fabric is very reflective it almost looks like plastic because it is so shiny so what I want to do is take this mix here and I want to put it into the roughness so that it'll control the amount of roughness now that's just making it look more shiny and so I need to change the colors to change how rough and shiny I want the texture to be so what I can do is just click on any of these color ramps and I can press shift d to duplicate it and I'm going to put it here in between the mix and the roughness and then to clear or reset the color ramp I can hit the backspace and that'll reset the color ramp so I can now change these colors and that'll change how shiny the cloth is so if you make the colors more white they're going to be more rough so I can click on the black tab here and click on this color and I'm going to turn this up and I'm going to make it much more rough because cloth isn't very reflective it isn't very shiny it is pretty rough and if you want to use the same exact color that I'm using over here on the hex value you can punch in a d a d a d now you can see that this cloth is still pretty reflective and it is very white even though this color ramp is super dark it's still pretty reflective so I'm going to turn this specular down so I'm going to turn the specular down to just like a 0.1 and that way it is much darker and it will be less reflective now I want to make this look a bit more soft and make it look a bit more like fabric so to do that I'm going to turn up this Sheen value so I'm going to turn the sheen value all the way to 1 and also on the sheen tint here I'm going to turn that all the way up to one as well so if you kind of look here on the sides of the fabric if I click and then drag down I can drag this back and forth and this way I can change the Sheen and the sheen tint at once so if I turn up the sheen tin you can see it looks more like fabric and it looks a bit more soft so that is looking nice so this is definitely starting to look like fabric but it is very smooth and so I want to add some values into the normal to give it some bump so I'm first going to take this mix here and I'm going to take the color and I'm going to put that into the normal now we need to convert this to normal data because if you zoom in here you can actually see there's some weird shading issues and that's because this is color data but this needs to be normal data so to convert this to normal data I can press shift a let's go here to the search and I'm going to search for the bump node and we want to put the bump node in between the mix and the normal and then we actually want to put the color into the height value and that way it'll convert The Weave texture into normal data so now the weaves look like they're actually bumpy but that is a bit too strong so I can take the strength and I'm just going to turn that down to like a 0.4 so it's a bit less strong but now the weaves of fabric look like they're actually bumping out and so that is looking much more realistic now now I also want to add two more layers of bump I want to add a little bit of noise all over the fabric just to make it look more noisy and then I also want to add another layer of bump which is going to make it look a bit more like Fabric and make it look a bit fuzzy and soft so I'm going to press shift a let's go here to the search and I'm going to search for a noise texture and let's put the noise texture underneath the wave texture and then you could use the object coordinates if you wanted to but I'm just going to use the UV so I can take the UV and I can put that into the vector so now let's control shift and select the noise texture and I want to play around with some of the settings so I'm going to turn the scale up to like a 50 so that you can see much more of it and then I also want to turn the detail up to the max of 15 so it's very detailed so I now want to take this noise texture and I want to put it into the bump just to give a little bit of noise all over the material so I can click on this bump here and I'm going to press shift d to duplicate it and let's stick it here after this first bump so the normal can go through the normal and so we now have this extra height value that we can use to add data into so let's take the factor from this noise texture and we're going to put that into the height of this second bump and then I can actually control shift and select this bump to preview it now that is way too strong so I'm going to take the strength and I'm just going to turn this way down to a 0.15 and that way it is much more subtle and if you want to preview what this is doing you can select the bump and you can press the m key and that'll mute the node and then you can press the m key again to unmute it so if I mute it you can see there is the first bump so that's just using the weave texture and then I can hit the m key again and it's just going to add a little bit of noise all over the fabric and then I also want to add one more layer of bump to make it look a bit fuzzy so I can click on this noise texture and I'm going to press Ctrl shift d so Ctrl shift d will duplicate the node but it'll keep the wire plugged up and then I can control shift and select the noise texture to preview it now for this one I want this to be much more detailed so let's turn the scale up to 500 so that it is very small and then 10 make it look kind of fuzzy I want to turn the Distortion up so I'm going to turn the Distortion up to one and now if you zoom in here you can see it looks all wobbly and distorted so I now want to put this into the bump as well so I can click on this bump node and I can press shift d to duplicate it and I can just drop it here so the normal can go through the normal so we now have another height value so I can take the factor of this noise texture I'm going to bring out the wire and I'm going to stick it in to the height value of this third bone and then I can control shift and select this bump to preview it so you can kind of zoom in here and see what it's doing and I do want to make it a bit more strong because it is pretty subtle so let's turn the strength to like a 0.3 so now if I zoom in there if I zoom up pretty closely you can see there's all that Distortion and that's going to make it look a bit more fuzzy and so by adding these three layers of bump together it looks a lot like fabric so I can now control shift and select the principal Shader to preview the final material and I can bring the material output back so there we go we now have a nice very detailed procedural fabric material 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 and purchase the tutorial files then you can get this material on my gumroad store and my patreon page I'll have the links in the description and if you'd like to purchase more of my procedural materials then you can check out my blender procedural material packs or if you'd like to learn how to create any of my 100 plus procedural materials then you can check out my blender procedural material tutorial playlist with the link in the description and if you'd like to help support this channel here on YouTube then you can also check out the YouTube memberships by clicking down there on the join button next to the Subscribe button and if you enjoyed this video and you'd like to send me a little tip you can also use the super thanks feature here on YouTube and I really do appreciate all of your support but I hope you found this video helpful and thank you for watching
Info
Channel: Ryan King Art
Views: 113,920
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, cloth, fabric, procedural, material, shader, procedural fabric, fabric material, blender cloth, blender fabric
Id: umrARvXC_MI
Channel Id: undefined
Length: 19min 51sec (1191 seconds)
Published: Tue Nov 01 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.