How to Make Seamless Textures with AI (Free and Easy PBR Materials) - Stable Diffusion Tutorial 2023

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey I'm Albert and today I'm going to show you how to make PBR materials using AI including a color map normal map height map ambient occlusion map and roughness map I have two methods that I'll show you today both are fundamentally free one is a little more complicated than manual and the second is provided by today's sponsor Polly from withpoly.com who have a reliable online service that lets you make PBR materials and check out an existing library of community assets but first let's get going with the first and local method you will need three things first of all the auto 1111 stable diffusion UI which looks like this or actually any way to use stable diffusion that you want because we don't need any special features or extensions this is all easily done with most installations of stable diffusion now you will need some basic knowledge of how to use this stuff so make sure you're comfortable using stable diffusion but it's really not hard so I'm sure you can follow along even with little experience then next you you will need the model texture diffusion which is most easily downloaded on civit AI this is a model trained on Creative Commons zero textures which means it's nice and flat like a good diffused texture should be you can tell here in this example with the stones there is not a lot of shading or anything because in a good texture that's all added later through the height Maps the ambient occlusion and so forth so this is a great model that you can download for free it doesn't need any vaes or any of that complicated stuff you just click here and put it in your models folder like you would with any other stable diffusion model and then last but not least you need the materialize tool which is available also via the link in the description it's a free tool built in unity that allows you to create all sorts of maps based on a diffuse texture so you can just download that for Windows and put it in a folder where you don't need any special permissions to run it more on that later but first let's get prompting because it's quite simple to create a diffuse texture using the texture diffusion model in stable diffusion so a great way to start your prompt using this model is by entering PBR which kind of activates the model that's a good trigger word and then you just describe what you want so I want let's say dirt and Moss with Pebbles and let's add some more descriptors so what I found is close up is usually pretty good it gives nice detail um detailed I want it realistic so I'm going to add photo um real high detail you know basically like you're prompting anything else and now the negative prompt um as you would I don't want it to be cartoon or illustration you know 3D render sketch black and white BMW that sort of thing of course if you do want a black and white texture um you shouldn't prompt against it obviously and now my favorite sampler has become DPM plus plus 2m Keras it's nice and fast it's really detailed I um want enough sampling steps to really get some details I'm going to put that up to 50. I want four options for for different options to pick from and width and height is 512 by 512 that's perfect see if G scale seven is great and of course very important we do want a seamless texture so we can tile it so we have to hit this tiling option which is also available in other interfaces I'm sure and that's it we can already hit generate and see what we get all right here we go we have four different options um that's a little too Lush for for my taste but the rest looks pretty cool so this one's mostly grass and Moss there's dirt there's pebbles in it it did what we wanted this has a little more Pebbles and this one is the most realistic I'd say of the four so I do kind of like that let's let's try to get some more out of there if you want there's also kind of a hidden feature in this UI in that you can right click on the generate button and click generate forever and then it'll just continue until you stop which can be helpful if you just want to watch and see if any results catch your eye one disadvantage is that the previous generations will no longer appear in here so you have to go into your outputs folder but I do see some that I like this one's my favorite so far let's work with this one okay so our next step is we go to the image to image tab with the same exact settings so I'm just going to send this to image to image to copy all the settings even though it's not the image I want and then I can remove it and drag in the one I do like and what I'm going to do now is actually upscale this with not an upscaler but an image to image method that one of you taught me namely I can just increase the width and height to 1024 by 1024 set the batch account to one I only need one same sampling method to mkaris and actually turn down the denoising strength to point two which makes it easier on my GPU and doesn't change the results too much but adds detail and scales it up so that's really cool um of course you have to remember to hit tiling so it continues to be seamless and now we generate again and here it is so you can see it's pretty big it's bigger than the 512 by 512 result for sure it can be blurry in Parts but it's definitely a usable texture we could edit this in more detail if we wanted to within painting and so forth but I'm going to save this so right click save image as make a new folder here and I'm going to call it dirt and Moss SD underscore original so here we go I'm saving it as a PNG and hit save and now we're going to go enter materialize after downloading materialize I just uncompressed the folder into my local disk C which doesn't require any special permissions to put anything in and now I can just open it like any other app it opens and funnily enough this is actually running in unity so this is basically a game that's running here and it's all kind of small so I'm sorry about that I can't really zoom in at all on these but I'll read them out to you and there's this object here that we can use to preview our existing material so the first thing we're going to do of course is import our diffuse map just by clicking this button here navigate to the folder you saved it in and if I want I can select this folder and click add to favorites so it adds it in here and we don't have to navigate there every time and here it is select it and it opens and you can already preview the color but of course it's completely two-dimensional so what do we do we make a height map first and to do that we go to the far left here where it says height map and hit create and now you can see with this slider you can adjust where the preview is and you have some presets set here and what I like doing for the height map is actually hitting details first so we get a nice crispy map here and we can increase the contrast if we want you know if we want it to be really juicy here and you can see that it's um kind of increasing the height and depth so just remember dark goes in white goes up like any depth map or similar and so that looks kind of accurate and I can click set as height map if I'm happy with it of course you also have all these detail sliders that I'm not going to get into now we have that and now next we want to make a normal map so same we click create and here we go it made a normal map pretty much instantly from our height map and again we can kind of change the contrast here if we don't want such an extreme thing but I actually kind of like it we do have a very crispy um end result that we're going for so I can set that as my normal map and now we're already getting somewhere so with these three we can actually preview our nice material by hitting the show Full material button and it'll make a preview so we can see kind of How It's displaced we also have different objects we can map it onto so here's a little sphere where we see our map we can put it on a cube Etc and here we can kind of tell something's not quite right so I would say the height map is a little extreme so we can go back into create and if we want you know now that we've generated a normal map from the detailed one we can also hit the displacement preset so the displacement isn't quite as extreme it's a little more blurry so if we set that as a height map and preview again you can see it's a little a little better it's not quite as crispy now of course what I'm sure you're noticing as well is that it is a little shiny and that's because we don't have a good roughness map yet or rather a smoothness map making it think that we want a very glossy texture we can fix that by going to smoothness map create and this is the exact inverse of a roughness map so if you work in Blender at all for example the roughness value increases how little something reflects right so if you turn up roughness to one it doesn't shine at all there's no glossiness and if it's at zero it's fully glossy smoothness is the opposite if smoothness is fully white I can show you by turning up the base smoothness to White it will be super super shiny it looks wet right and if we turn it to fully black it's the same as if we set the roughness to full making it completely matte of course in real life we want something in the middle there so I'm going to adjust the bass smoothness to something like that I mean we don't want a wet texture but we do want a little bit so I can increase the contrast a little bit make some spots a little brighter than others you know the Moss maybe is a little dewy something like that and once we're happy with that I set it as a smoothness show the full material again and you can see it's a little shiny and we have a nice Mossy dirt texture here on a sphere it looks like this so you can adjust any of these at any point and now the final thing that we also get from poly is an ambient occlusion map which makes this whole thing really pop so if we hit create it'll simulate how the light falls onto it and you can see that it attempted to guess where the shading would be just a little bit we can increase the power if we want it to be really extreme and three-dimensional set that as the ambient occlusion map and now you can see it just added a little bit more detail and shading to our final material preview so I think that's pretty neat we can now save our project let's do file format PNG save project and name it dirt and Moss select and now in our PBR materials folder you can see we now have all those maps saved so here's our ambient occlusion map here's the original diffuse map here's the height map our normal map and our smoothness map which is practically black and last but not least we have this little materialize file in here so that we can always go back into materialize and edit our project but like I said in the beginning there's a much easier way to make PBR materials using Ai and that's with poly poly can be found at withpoly.com and it's a 3D material Creator using AI but not only that not only can we create our own PBR materials by entering prompts in here it's also a giant Community Library of existing textures so as you can see you can browse all of these Community created textures down here and see if maybe someone already made the material you're looking for you can click on any of these and check it out it's really high quality it has all the necessary maps from the color map also nice and flat with normal Maps height Maps ambient occlusion and roughness so all the ones that we created with a little more effort earlier and it's free for personal and educational use already and has a commercial license possible with poly Infiniti but let's create our own with the prompt we had earlier let's enter that dirt and Moss you can see it's already searching the library as well in case someone's already made it with Pebbles close up detailed photo real eye detail and here are some decent results you can see there's something Mossy likely planty there's dirt with pebbles but not exactly what we want so nothing easier than that we just hit generate and it's going to make what we want you can see up here is a loading bar here you can edit your prompt you can pick your resolution up to 2K is included and with poly Infiniti you can go up to 8K down here if you know more specifically what material you want you can select from General organic if it's you know it's fleshy or wet you know you want something like that matte and shiny and in just a moment we will see what it's generated for us with these default settings once it hits the end of the loading bar I assume it's generated the base color and is now making all the maps like you see so here you go you can see we got the Pebbles we got dirt we got a little bit of moss there and a nice 3D preview here if you want you can change the background and the environment set it to let's do sunset and you see how it looks in a different light so that's pretty cool and as you can see down here not only did it create the color or Albedo map the diffuse texture but it also made your normal map the height map the ambient occlusion map and the roughness that you can all use to bring this into any 3D program of your choice but let's say you want to see something else you want to see what else is generated well it actually made four different options of our prompt you can see down here maybe it's a little closer to what we made earlier so we want this one or this one and you can easily just select one of these and it'll set that as the color map now we do have to create the rest of the maps manually now because of course it would have taken forever to make all of those just in case we want a different one but for that we have these other features so we can click on make seamless and hit that button and it'll generate a seamless texture from this image as well very quickly and here it is and now we want all the others right so for that we have this button to make PBR Maps we can select General hit what we want so those three we want all three and now generate the PBR Maps and that's how quickly we have a new material so you can adjust anything you want let's go Urban here and check out our texture and we can also adjust all of our render options so we can say let's make it smaller we can check the tiling we can adjust the height of the displacement and also remove visibility of several Maps right if we don't want the displacement right now in our preview or the normals we can check all of that out here if you want to use anything you find in the poly library or one of your own Generations commercially and want access to features like 8K resolution and much faster speeds be sure to check out poly Infiniti with the coupon code Albert you will get one month free and can use anything you create forever with no extra commitments so make sure you visit withpali.com and sign up here's a comparison again of our two materials this is the one we made using local stable diffusion and materialize we have everything we prompted right some dirt some Moss some Pebbles I guess and here's the result on poly after some more editing of the prompt it's really nice and detailed you can tell all the individual Pebbles the Moss the dirt it's definitely more realistic than what I was able to achieve locally here's the full prompt for those interested and I did set the material type to organic and the resolution to 2K still we're fully remaining in the free tier I hope this video was helpful to you in any way if it was hit that subscribe button and like to enable me to make more videos for you like this one as always I'm Albert posan thank you for watching and have fun with stable diffusion
Info
Channel: Albert Bozesan
Views: 16,205
Rating: undefined out of 5
Keywords: ai art, stable diffusion, open source, artifical intelligence, textures, 3d modelling, blender, 3d, ai, generative ai, pbr, materials, 3d modeling, cg, vfx, cgi
Id: TbsseP7Kc4k
Channel Id: undefined
Length: 16min 36sec (996 seconds)
Published: Sun Apr 09 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.