Substance Designer 2017.2: Using the Flood Fill Nodes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] in this video we're gonna take a look at the flood fill node so the flood fill node takes a mask as input and it's going to take this binary mask and it's going to create data that can be used by a subset of nodes that are designed to work with the flood fill so here if I just do a search for flood fill you can see that here is the node then we have these filters that are like I said are designed to work with flood fill so we have B box size flood filter gradient flood fill to position flood fill to random color as well as random grayscale so there's many uses for this node and here I'm going to show you how to create some Rock patterns so here we're gonna do this from scratch so like I said we want to start with a binary mask and this is the mass that I have here now there are a couple caveats that you need to know number one the binary mask needs to have a border so notice here I have these shapes that have this black border around them this is part of the criteria that you need in your mask in order for flood fill to work correctly alright so now let's just create a flood fill node so we'll just create the node let's just group these guys move them over this way here and let's take our mask and plug it here into the flood fill so here you can see that this is the data that we have now we're not actually going to do anything with this flood fill node itself we need to use one of the flood fill nodes to produce the effect that we need so in our case what we're going to do I'm going to hit the space bar here and we're going to use this flood fill to gradient so I'm just going to left-click to create the node I can take the result of the fill and I'm just going to plug it into the flood filter gradient and here you can see that it produces a gradient in each one of the compartments of my binary mask that I have and I have several parameters so for example I can change the angle I can adjust my angle variation here and then I also have this control here to multiply by bounding box size the bounding box is determined for each shape at a value of zero the small shapes have a much steeper slope value than the larger shapes since all using the same gradient value so here we have this small shape and you can see that this is going from a dark to light very quickly if we look at this large shape we can see it's much more of a gradual fall off now we can multiply by the bounding box to get the same slope value for all of these random shaped sizes so here you'll notice that as I start to increase this bounding box size the values are getting redistributed so here if I set this all the way to 1 and here I'll just zoom in a bit here in the 2d view you can see this smaller shape it goes from dark and you can see or actually here let's look at this shape that's right next to a large shape you can see that we have a very dark value and then as it moves up here towards the light you can see this lighter value is still much darker than what the brightest point here for this large shape is so again it's just redistributing this gradient value based on the bounding box size of each of these shapes so for now I'm just gonna set this back to 0 as we start to kind of build up this effect that we're working on so let's come all the way back over here in our graph to where I have this flood-fill gradient so like I said we have one of these flood-fill gradients in place so what we can do to kind of build up this rock shape and actually just so we can really see what we're doing at this point let's create a base material here so we're gonna create a base material and I'm just gonna set this to a dielectric and give myself a pretty large roughness value here and then I'm going to just create a normal input and let's create a normal node and we'll plug in the result of this gradient into here and maybe give this a value of say like 12 or so and we'll plug this guy in and then finally just to quickly view this in my 3d view I'll just do a right click and drag and drop the base material here so here we're starting to see kind of the basic rock pattern that we're trying to create and like I said again we have our angle variation that we can change here at any time so this is a pretty flat result so far so we want to start kind of building up these shape mounds and we can do that by just creating another flood filter gradient so let's create create another instance of this node plug in our flood fill now we're going to have two instances and we can vary this so what I can do just take the angle variation set it to one and let's go back to the original node set the angle variation here to one just change the random seed for each node so here let's go to the second node that we have and let's just set the random seed to one so here you can see the first result of this gradient and here's the second result with just the random seed changed and so we get a different pattern now what we can do with this is blend the result of these two gradients together so I'm gonna create a blend node here and then I'll just put one in the foreground one in the background and for the blending mode here I'm going to set this to men and so here we zoom in we can start to see some of these 3d shapes being created we start to get some slopes here so now let's take the result of this blend and plug that into our normal and we start to build up a bit of this rock shape all right so let's create another instance of this gradient in this case I'll select this node just simply copy and paste it I'm gonna switch the random seed value to to create another blend let's take the result of the blend in the foreground this new gradient here in the background and again we'll switch this to men for the blending mode and now we start to get another plane that's added here to our rocks let's just move these nodes here out of the way and let's feed this into our normal and now you can see we're starting to get more shapes let's come over here to our normal I'm gonna set this to like maybe of values like 35 just so we can really start to see the shape of what's taking place here all right let's do this one more time so here once again I'm just gonna copy this node we'll bring it down switch the random seed value here to 3 and then let's create a blend same steps we're just going to set we're gonna blend the result here with the blending mode set to min and then we're gonna plug this here into our normal map and so now again we start to just create another plane here let's take a look at our actual shape that we have so far so here's our men darken so now we have our flood fill and we're producing these gradients with a random angle variation based on the random seed now what we can do is we can go back each one of these nodes and start to change this bounding box size so here I'm gonna make sure that I'm viewing here in my 2d view the result of this final blend and now I might go back to let's just say this third option and let's just start to change this bounding box size and so as I do that you can see that it gives me the result of being able to shift these slope values here let's go to another one this is the second one and we'll change this here and now you can see the result I'm actually able to kind of trim some of these planes here to create additional variation and help build up kind of the 3d shape of these rocks here we'll go to this fourth node and again start to just play around with this bounding box size so here just making a few adjustments and so here you can see the kind of rock shapes that I'm starting to form just by using these flood-fill gradients again just switching around changing here on this bounding box size now we could also for any one of these nodes come back over to our angle parameter and just change this to get even more variation and so on and here you can see in my 3d view how this is starting to update so this is just one practical way of how you can use the flood-fill to create some data based on a binary mask and then take that data and extrapolate from that these gradients that can then be used to build up three-dimensional shapes so here just to kind of see what I kind of came up with here let's take these two nodes here I'm just gonna copy them and let's see where do I have that I'm just gonna paste these guys down into here just so I can have them kind of close to this range now you can see this is the result I did the same thing here I ran it through just a levels node and then did a slight slope blur on this here so now let's output this here to my normal and I'm gonna take this base material right click drag and drop that into my 3d view and so here's some of these rock shapes that I'm getting from here once again I could always go back to any of my nodes and just start to play around with this bounding box size this is almost like using like a trim dynamic brush in ZBrush where I'm just changing that size that I'm just carved in and creating planes here within these 3d shapes as you can see here so here's like a plane and here's a plane and here's the rock formation that I'm starting to build based on these gradients so I had mentioned before that there are a few caveats to using the flood-fill and so number one I said you can't have any holes so if we take a look at this shape now again this is a binary mask just black and white and it's a circle but we do have a hole here in the middle and so if we use or try to use the flood-fill with this type of shape this is kind of the result that we're gonna get so again doesn't work with shapes that have a hole another example is a shape that doesn't have a black border so here we have just this rectangle if I hit the spacebar you can see that this just becomes a continuous shape via tiling so if we try to take a shape like this and feed this into the flood-fill here you can see the error that is produced now if I wanted to fix this I could just grab this shape node and then here I'm just going to adjust the X so that I do have this black border here so here we'll just you know increase the value point nine seven or so and you can see here with the flood fill now I do get the correct data now there's one more caveat that's very important to understand here with the flood fill and that is the flood fill requires the GPU engine so if you're going to be using an integration such as unity that does not support the GPU engine you should not use the flood fill node so here I have another example of using the flood fill node I have a binary mask pattern and I also have this cracks pattern here for creating a wood material and so if I just blend these two patterns together you can see the result of well we do have some wood planks but these cracks are obviously just aligning perfectly with each one of these wood planks and this is not a very realistic result so you can use a directional warp so if we create a directional warp we can offset these cracks here this wood this crack wood pattern we can offset that on the planks based on some type of intensity input and we can use the flood fill to help us create this intensity input based on our plank pattern so let's do that we're going to first create a flood fill because we need to be able to create the data from the binary mask so I'll plug this in and here's the data that we get and now we're going to use a different flood fill node so here again I'll do a search for flood fill and you can see that we have two options one is the random color and one here is the grayscale let's start with the grayscale so I'll create this node simply plug this in and then now I have this intensity input that I can use with my directional warp so let's plug the output of this random grayscale into the intensity input of the directional warp and then we're going to take this cracks pattern and plug this into the input so now we get some type of result just so we can visualize this I'm going to place this here into the background here of my blend and we start to get an offset now you'll notice that if I come back here to my directional warp and as I start to increase my intensity I can offset this crack pattern based on this intensity map that I've created using flood fill to random greyscale so again we'll go back and we'll just make a change here let's let's just set this to something high like 45 and again you can see the offset that I get so another option of this just to get a little bit more variation would be to use the flood fill to random color so let's take a look at this node so now I'll just plug the flood fill in it needs that's the driver and now you can see that we start to get this random color and this could be used in other instances as well however from here what I'm gonna do is just create an RGBA splint node so we'll plug this in and now I have my red green blue Channel so if we look at red I get this is the variation I have if I look at green I get a completely different variation and then finally if I look at the blue channel I get another variation so this is another technique for allowing me to kind of vary this intensity pattern that I could use in a multitude of ways in my graph so for example it's just for the intensity amp let's just change this to the blue channel and we'll go back here to our blend and again now we've get just a different result on our offset depending on which kind of I feed into this so this has been a quick look at the flood fill note thanks a lot for watching
Info
Channel: Adobe Substance 3D
Views: 60,581
Rating: undefined out of 5
Keywords: Substance, Substance Painter, Substance Live, Substance Designer, Sustance Source, texturing, texture, textures, ndo, ddo, quixel suite, megascans, painting, unreal engine, unity, pbr, physically based rendering, mapping, 3d art, materials, procedural, blender, generation, mari, the foundry, autodesk, maya, Allegorithmic
Id: arGXAOk4Tr8
Channel Id: undefined
Length: 13min 34sec (814 seconds)
Published: Thu Oct 19 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.