Working with displacement and Compare Mask

Author:

Substance

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

Subtitles:
In this video, we are gonna take a look at how displacement and tesselation works here in Substance Painter 2019.1. Alright, so what I have here is just the sample scene which is the tiling material, and you can get that by just going to File => Open Sample and just choose Tiling Material and we've updated this scene so it would work with the tesselation and displacement. So the first thing I wan to bring to your attention to here is well, we can see some displacement here in our 3D view. So to enable the displacement and tesselation we just need to come over here to our shader, and you'll notice that we have a new displacement and tesselation tab. So here you can see that all you need to do is just to simply enable the feature, and then here under Displacement you're able to set a Source Channel. And here we have an option of using Height or Displacement. With displacement you could add a Displacement channel to your texture set list. However by default you can just go with the Height, and the Height will be used for the displacement. Here we have scale, and you can just set this to establish the overall global scale for the displacement here in the shader, and then below this we have our tesselation settings. We have two options, which are Uniform and Edge link. So with Uniform you have a subdivision count that you can set, if you switch this to here to edge link you can choose a Max link. So for this we're just gonna set it to the default Uniform, and that's all that we really need to do to enable tesselation within the shader. We'll just close this out. You'll notice here the displacement is driven by this bumps layer, and all this is just simply a fill layer, and you can see that I have the height channel enabled, and we've set the height value to a negative height. So if I come over here to the mask, this is just a layer mask, and then here we have just a fill, which is just using this Perlin noise. So if I Alt-click here on the mask, you can see that this noise, Perlin noise become the height map that is used to drive the displacement. So you can hit M on the keyboard to go back to my material mode, and like I said theis is all there is to it, we now have displacement here in the 3D view. Now I'm gonna come over here to my Displace settings, and let's just scroll down here towards the bottom in our view settings and we have the mesh wireframe, and I'm going to enable to show the mesh wireframe. Now you'll notice in this release, the wireframe is not following the actual displacement, so this is a limitation we have in today's release, so I just wanted to let you see that indeed the wireframe is not falling along with the displacement, so we'll just disable this for now, and we'll close this out. Alright, so another thing that you'll notice about this project is that here at the top we have a layer that is called Height To Normal, and it's using a new filter that ships into 2019.1 which is this Height To Normal. And so if I disable this layer, you can see this is the result that I'm getting here in the viewport. And so it makes it really difficult to kind of see exactly what is happening here with my displacement so we enable it, this is what we have with it on, and again here is what we have with it off. Now we can also work with our shadows, so again coming back to my Display setting, I'm gonna come back here towards the top, enable my shadows, I'll just let the shadows here render here and you can see that the shadows are woking with the tesselated mesh. But we're still missing some key shading here from our viewport. So to further illustrate what's happening here, I'm just gonna disable all of my layer at this day, and actually let me come over here to my shadows, and let me turn that off, and before I do that you can see that I disabled my layer but I still can see my shadow, at the recording of this video the shadows do not update interactively with displacement painting, so all you need to do is just either move your camera or update your lighting you can see that it will do a quick update. But for now we're just gonna leave the shadows off. And What I wanna do is I actually want to paint some displacement, so I'm gonna come over here and I 'm gonna create a layer, and I'm just gonna create, it's just on my height channel again, I'm gonna set just a height value, let's try something around .5 or so, and for my brush, I'm just gonna use this basic soft brush and then within here I'm just gonna paint a stroke, and since I'm using the tiling plane, the stroke is now tiling. Now, when we take a look at this, you can see that well we do have quite a lot of displacement here. And this is driven by the actual height value that I used when I originally painted the stroke. Now we could adjust this various ways, like for example I could target my height channel, and I could simply lower the opacity, or we could add a levels effect to this, we couls target the height information, and then again we could just lower this value. So I'm just gonna disable that for now, and you can see here we have a specific strengh that was set. Now when you're painting height into Substance Painter, that height is converted to a normal that we can view here, in our 3D view. Let's take a look at what's actually being computed for us. So I'm gonna come over to my viewport dropdown, and I'm gonna choose my Normal+height+mesh. And so when I do that You can see this is the normal information that is being generated or converted from our height information that we painted. And you can see there's actually a pretty large discrepency in the overall scale. Our hight information, we painted a pretty intese stroke, but again if we take a look at that converted normal map it's actually pretty low in terms of intensity. Again, I'm on my layer, I'm still painting height informaiton, and you can see as I paint this at this specific value, this is the intensity that I'm getting from the normal map. So let's say that I make this or I drive this height value even further, so this time we're going all the way to 1, and I'm gonna paint my normal map again, you can see there's very little difference between this .5 value stroke and this 1.0 stroke. Just a slight bit of intensity. And once we're viewing this in our viewport we can see that this lack of intensity in that normal is not giving us the overal result that we'd really like to see. So that's why we created this "Height to normal". So I'm just gonna remove the layer, and I'm gonna show you how to add this by default. It's actually really simple. So we're just gonna come over to the shelf, and "my filters", and here is the new filter that is called "Height to normal". No since it's a filter, I can simply left-click and I can drag and drop this to the top of my layer stack, and when I do that you can see that it gives me the option for this Height to Normal to choose my surface size and my height depth, so you can adjust the sliders to lessen or intensify this normal effect. So now that we have this filter, let's go and take a look at what the normal map looks like. So now when we go into that Normal+height+mesh we can see that the normal map actually intensified and is giving us this correct scale from height to normal intensity that we need to properly view the displacement in the 3d view. So here if we disable this layer, this is what we had before, and with the height to normal enabled this is what we get. So now again going back to my material mode, this is gonna be the way that you want to work. Now this is important when it comes to painting values like you see here if you're ever using a laver, and you're painting height information, and you find that the normal map that is being generated and the height just doesn't have enough of intensity or scale, now you now that you can use the Height to Normal. But for doing smaller effect, maybe like using a procedural noise with a low scale, the Height to Normal probably won't be needed. So now we're gonna take a look at a new method for blending materials here inside of Substance Painter. So to demonstrate this I have this material, this is the "Iceland Grassy Cliff". This is a material I downloaded from Substance Source, it was created by Daniel Thiger as part of his signature series dorp, and I'm also going to grab another material that was created by Daniel, this is the Mossy Medow. Again these are all available on Substance Source. So I'm gonna left click and drag and drop and place it here into my layer stack. Now for this mossy medow let's come over here to the material. I want to enable my height information and I'm just gonna make a change here to the snow amount, I'm just gonna drop it to 0 so we'll just remove that snow from the material. So now I have that mossy medow and it's on top of the cliff material. So what I'd like to be able to do is set a blend between these two materials based on the height information. So I can do that by using this new "compare mask" option. So if I right-click on this layer you see that I have this nw option for masking, which is "Add mask with height combinaison". And I'm going to use this. So I'm going to left click to choose this option, and you can see that a layer mask is generated for me automatically, and then we have this new "Compare mask" effect which has been added to my layer mask. You can also find this "compare mask" in the effect dropdown under the "add compare mask". So using the right-click option just set this up automatically. Another thing that this right-click option will do for me is you'll notice that right now I have the height channel selected here in the channel selector, and if you notice that the blending mode has been changed from "linear dodge", or the Add mode, which is here, to "Normal". And this is going to give me the desired effect because what I want to do is I don't want the height from the two materials to combien together, I want the mossy medow to overight or be on top of the grassy cliff. And by using this right click option here, this will set that up for me automatically. So now I have this "Compare mask", and let's take a look, so we'll select this, what this effect is going to do, is this is going to make a comparison on a specific channel, in our case it's gonna be the Height, however we could use this we any channel we have in our document. So in this case we're just using height. No what's gonna happen is it's going to create a comparison, and you can see that we have an option for this layer, meaning the layer that the Compare mask was added to, and then we're gonna do a comparison with the layer below it, so that means all of the layers below it. And if we click this dropdown, and you can see that I have additional options like this mask or a constant value. But in this demonstration we're gonna keep to layers below. Now, for the comparison we're gonna have an operation, we can choose greater than, with intolerance, or lesser than. So the way this is set up right now is we're taking a look at our height channel, we're doing a comparison between the height information and this layer, we're gonna see if it's greater than the layers below it, meaning the values are greater than the layers below it. An here we have this histogram, which gives us a visual representation of the height information, and it's color coded to represent this layer and the layers below. And here in the histogram you can also visualize where these values are going to overlap. The mask will be created where the height values of the layers intersect. And this depends on the operator used for the Compare, which in our case we're using Greater Than. This is shown with the dotted white line. The red outline indicates the height values from this layer that are being obstructed by the layers below. So now if I Alt-Left click on the mask, I can view this mask here in my 3D view, and you can see this is the mask created with the default values of the Compare mask. And now that all of this is set up, I can start to interactivelly work with my height. So for example let's come over here to this medow, and I"m going to add a layer effect here to this layer, and I'm going to set the affected channel to Height. Now I can interactively start to work with the Height to produce this overall blending. And you can see the Compare mask is doing all the work for me, all I'm doing is just making an adjustment to the Height information that's in this mossy medow layer. So I'm gonna turn off this levels adjustment, I could also use a paint effect as well. So here, let me come over to my brushes, in this case I'll just use a basic soft brush, and for the material here I'm just going to set a value for my height, and now I can come in and I can start to just paint in some of this information here. Here let's just increase that height value a little bit more, and then we can start to just paint in our height, and again the Compare mask, because of the way it's set up, to compare the height channel between the mossy medow and all the layers below it, it's automatically generating this mask for me as I work here and adjust my height information. Now we could jump back over here to the compare mask, and I have this hardness value, and I could decrease this if I wanted to soften the edge a bit, and I think I'll do that, we'll leave it around .7. So to have just a little bit more fun with this, I am going to, let's see, disable this paint effect, and I'm gonna add a new paint effect here. And this time I'm gonna come over to my particle brushes, I'm gonna grab a rain particle brush, come over here to my material and I think I'll just keep this around the same height value, and I'm just going to produce this rain simulation accross the surface, and as I do this you can see our moss just starts to grow and blend with the cliff material. Again, all driven by the options we have here for our Compare mask, so here Alt-left click, this is th mask which is being generated, and here you can see the blend between the two layers. So that's how you can use the Compare mask to blend Height information. Again, the easiest way to work with this is simply to right-click on the layer, and then choose "Add mask with height combination, this is going to create the layer mask fo you, it's gonna add the Compare mask effect, and, very important to know, it's also going to take the height channel information blending mode and set it to Normal, which is going to allow the height infomation in the layer with the compare mask to basically overright the layers below it. So that's gonna conclude this video on working with displacement as well as blending materials using Compare masks here in Substance Painter. Thanks a lot for watching and I'll see you next time.

Loading