How to Make Seamless Textures with AI & Blender (Free and Easy) - Stable Diffusion Tutorial 2022

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to my newest video i'm albert and in just a couple short steps i'm going to show you how to get a result like this a completely seamless material even with an accurate normal map and all kinds of nifty features from a sentence like this all right let's get started now the first step you're going to need to do is make sure you have the right version of stable diffusion installed or rather the right ui meaning you need to make sure your version has tiling built in now the way i would recommend doing it is following this guide it's the first link in the description i won't go into detail because it explains it much better than i ever could and the way to install this changes practically every day so i don't want my video to get old i do promise despite it looking a little complicated you will be done in just a few steps and don't need to be a total pro in git or python to understand what's happening just read it carefully do it and you'll be done within 20 minutes and have this running now next obviously is starting stable diffusion and ending up with a ui that looks something like this we're going to work with text to image and i'm going to tell you what the prompt needs to be for you to get a seamless texture or rather a texture that works well for textures and the secret is it needs to start with top down photo of top down makes it flat and makes it usable as a texture right because if you want to have a texture of a wall you take a flat front on photo of the wall if you want the floor you take a top down picture of the floor so the same is true of prompts which is why we're going with the top down photo of now let's do something classic let's do cobblestone road with dirt to have some dirt in between right and finally we're going to pray to the ai gods with the classics 8k detailed intricate i always love doing that and we can turn the sample steps up to 50 sampling method is good now the most important part check tiling because that's what's gonna make it seamless then turn the batch count up to four to six depending on how many options you want and you can start generating great and here we go we have six different options generated for us this one's pretty neat it looks very natural looks like it's part of a european town or something i could imagine it tiling quite nicely with all those different circles there's this one interesting okay now if you like one of these but want more detail or want to change up something slightly you can do so you can copy the seed from down here paste it in here and turn up the sampling steps obviously and then adjust something slightly and it will come out quite similar just with minor adjustments so i want this to look less sandy right i want to make it medieval gray cobblestone road with dirt intricate maybe add some moss and otherwise leave it the same and just generate again neat so some of these look pretty cool i like that first one even though it's rotated it has some nice little moss growing and these different like plates kind of that one's nice i like the moss the color is much better than it was this is kind of weird that one looks amazing but if you imagine it as a seamless texture that piece of moss is just gonna tile endlessly and be so obviously tiled so that's no good this one could be cool could be cool looks a little too dry you know the moss is kind of weird and this one's a little too standard so actually let us go with this one that looks kind of cool i want the moss to pop out so if we like this one we can send it to extras to enlarge it sent to extras so here we are resize it two or four times depending on what we want to do and make sure that our upscaler does real esrg 4x plus we don't have any anime so we can just generate that and get a bigger image out of it good okay it lost some of the detail i don't love that so just play around with these settings until you get the result you want now these are decent settings we're going to want to save this and call it diffuse because that's what it is this is our diffuse texture and next we're going to go into blender step one is deleting the default cube and shift a another cube into it it is the blender god's will and next we can go into the shading tab and make a new material now i'm going to assume you know some basics of working with textures so i'm just going to skip through some of them but what we want to do now is put in our diffuse texture so shift a image texture select our image open it connect it with your base color and now i have a good trick obviously this texture is much too big so i have the so called node wrangler enabled it's already installed in your blender so you can go into edit preferences add-ons search node wrangler here and just set that check mark right there and that way when you select a texture you can press ctrl t and already have a mapping node and a texture coordinate node automatically attached that's already connected to your uv socket so that saves a lot of time and another trick i like doing is shift a value set this value to 1 and connect it to my scale vector that way i can scale my texture without having to edit all three values in the scale vector at once and now one final thing i see that the texture is a little rotated here so let's just rotate the z-axis by 90 degrees and that way it looks like this so i can tell that our texture is pretty good as a seamless texture it's going to look pretty slick but obviously all we have now is a diffuse color and that's not nearly enough it's not three-dimensional the roughness is all wrong the specular is wrong and you know a normal map is missing so next we're going to generate a normal map with a free online tool called smart map too now the link is in the description here you can see the url smart minus page dot net slash smart normal and we're going to load in our diffuse texture here and it immediately generates our normal map you can tell it's already pretty going pretty well and i've already tested this for you this is the right kind of normal map for blender so you don't need to change any of your settings or invert anything this will work straight in blender it's a so-called opengl normal map now you can turn up the bias a little bit this basically does what the strength will do in blender later and since they're bricks we can turn this up rather high but otherwise it's perfect so just click save name it normal and bring it into blender just like you did with the other so shift a image texture normal and now make sure in your color space you have non-color selected that's important for normal maps and plug it into your mapping vector so it does the same thing that you've changed here as your diffuse map now one final thing make sure out of the color socket it goes into a normal map socket into the color information and there you go you now have a normal map installed and you can tell it is working it does give that little bit of extra info that it needs you can turn up the strength if you want to but generally it's doing its job good that's it for the diffuse and the normal maps but what else is there there's obviously specular there's roughness and in the end there's displacement to make these bricks really pop how do we do those well for specular and roughness we could make individual maps if we wanted to in photoshop or or whatever but i have a good shortcut i find that using color ramps here in blender gets the job done almost as good so the way we do that is we're going to shift a color ramp and plug in the diffuse there now another reason i like nodewrangler you can preview individual nodes by holding ctrl shift and then clicking the node and it will give you a nice preview so what's coming out of this color ramp you can see black and white if we plug that into roughness all the dark spots will have zero roughness so they'll be super shiny and all the white spots will be completely rough how does that look we go back to our bsdf weird because obviously it's wrong total black doesn't happen with roughness with these bricks so we can adjust the black here just bring it up a little you know make it a little damp i guess it could be dirt or something but not too damp and the white we leave because there can absolutely be absolute there can totally be absolute roughness now we can do the same with specular we can duplicate this color ramp and plug it into specular and what i like to do with specular maps we do them somewhat inverted from roughness right because some spot that's not rough has a little more specular and the inverse so we can just click here flip color ramp and maybe tone down the ultra white a little bit so it's not totally specular and bring this back down a little bit have it be slightly less specular from the rough parts and go back to bsdf and here you can see that it's working pretty well it's still a little too wet for me so we can bring back up the roughness a little bit here and bring this white back down a little but in general we now have a roughness and specular map without very much effort so that's pretty cool now what's remaining displacement of course we see all these cool textured demos and everything and they always pop a little and ours isn't so what i'd like to do is actually change the shape of this i don't want a cube so go in there delete your cube put in a uv sphere and now we're going to switch render engines let's go into cycles and change the feature set to experimental look at it in cycles you can denoise a little bit and make sure your object is shaded smooth go into the light a little bit and now give the whole thing a subdivision surface modifier good you'll see why in just a minute make sure you click adaptive subdivision that's the special feature we wanted and now we're going to use our normal map as a displacement map as well so we put in a displacement node plug that in here and plug in our normal and now we got to make sure that our material is set up right so nothing really happened and that's because down here in settings of our material in our material tab we have displacement set to bump only and what we want is displacement only it's going to be a total mess obviously that's because it's being quite extreme you see the scale is at 1. let's turn that down to 0.01 it's already better we can't really see what's happening now though so let's just slowly step by step go upwards it's already too much just give it a tiny little bit of detail that we love and we can turn up the resolution a little bit in levels viewport it's already a little three-dimensional you can see the moss is sticking out a little bit so that's pretty neat now if this isn't working too well for you there's another way to go about it so unplug the normal and we're gonna work with color ramps again so make a new color ramp make sure it's nice and black and white get your diffuse plug that in there and now plug the color from that new color ramp into height in your displacement node and now you're going to see it did something it's already become a little more three-dimensional let's um actually scale down this texture so you can see it better you can really tell now that it's 3d and here we go with basically just a sentence put into the text to image algorithm of stable diffusion then using a free online normal map tool and blender we were able to make a completely seamless cobblestone with moss material now obviously you can edit this a little bit if you don't like individual parts you can photoshop it adjust your prompt or make something completely different using this workflow this video was just supposed to give you some tips and a couple concrete steps you could do to reach your goal my name is albert bosuzan and i make videos like this all the time so if you liked it please subscribe for more and leave a like and comment if you have any questions or future video suggestions have fun with stable diffusion and blender and see you soon you
Info
Channel: Albert Bozesan
Views: 38,150
Rating: undefined out of 5
Keywords: ai, ai art, concept art, stable diffusion, midjourney, dalle, open source, artifical intelligence
Id: P4EXq2qpCE0
Channel Id: undefined
Length: 13min 55sec (835 seconds)
Published: Wed Sep 14 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.