Using Poliigon displacement textures in Unreal Engine 4

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
honeybell barber from polygon here in this video we're going to be taking one of our materials into unreal again but this time using one of the displacement textures with unreal tessellation feature first though let's take a quick look at the file that we'll be using during this video and it's ground asphalt broken 0 0 1 I already have that saved to my hard drive and I'll include a link to it below the video you've probably heard of a bump map before which is used to artificially give the impression of height in a material well a displacement map is different it is used to literally deform the object based on the values of the texture with the black areas being the deep crevices and the white areas being the peaks now in unreal this is done by utilizing a feature called tessellation so let's jump over and take a look at how we do it so this is the scene that we'll be using today again it's a simple plane and a HDR lighting setup and that's pretty much it one difference from last time though this plane is not the one of the auto-generated planes from unreal it's one I brought in and that I made quickly in a external application reason being for tessellation to work the mesh already needs to have quite a bit of geometry as you'll see here this mesh is made up of lots of little triangles and whereas the default mesh is just one there's just two triangles basically which it isn't enough tessellation will subdivide your mesh to a certain degree and to give you more geometry but it does have a limit so you need to start with a mesh that already has quite a bit so that's what I've done there that's worth definitely worth noting other than that though it's a yeah pretty much the same as what we had last time now I've already done some of the material work for us because there's no point going over what we've already covered and I brought in the textures that will be using already they're sitting here in the in the textures folder and like before all of the cut all of the textures that don't contribute towards color have been set to linear mode I have um takes the srgb including like the displacement texture here see srgb is onion checked and like before the normal map has has the green Channel flipped okay what I've also done is give us a basic place to start from in terms of our material but before I go into it I'm actually gonna drag it to the floor blank this is a good example of over why we need to do some work now this floor while it's quite clearly a nice PPR material is not looking very realistic at all if I go down to the ground level you see it's completely enough to be flat it's I mean if you are looking at it from a distance aside from the earth the tiling you might be able to get away with it but certainly up close it just it looks like a boring flat texture on a on a plane which isn't quite what we want today anyway let's go into our material and let's get to work so I've only sorted out the basic setup for the material here and like we did last time and all I we did in the first video should say so we've got our colour reflection gloss and normal maps in the reflection and gloss maps have been averted like they were last night and I've also put in some texture kernel texture coordinate controls and again this is all stuff that we've already done so what I'm going to do now is start showing you how to use the tessellation feature with one of our displacement textures so let's right mouse button here type in texture and grab a texture sample parameter 2d node and call this discipline basement should have really named the other ones but hey hope and this is going to follow the exact same UV mapping as all of our other textures so I'll feed that in and then we just need to change the texture that it's using to the displacement texture which is okay so let's start by bringing in a vertex normal ws node okay and then what we're gonna do I mean this is basically like the best way of explaining it the the default state of the Vitesse up tessellation I eat I know it's likely the position of the vertex is it's probably the best way to to try to visualize it and what we're gonna do is multiply that by our displacement texture so let's do that like so and then what we'll do is feed that into the tessellation sorry the world displacement like so now I'm going to click on material and we have to scroll down here and actually turn on displacement or so a tessellation you've got a couple of modes flat tessellation and PN triangles the one we want this flat pn triangles is used on soar there if you're doing tessellations on quite a dense complicated mesh let say a character or whatnot it helps move off the edges but for a ground surface like this you want flat tessellation we're gonna turn off adaptive tessellation for now that better as a sort of a performance feature and the way the wind not going to touch and the max displacement is the amount the max amount that this will displace our mesh so I'll set our design ridiculously high in for now because we want to control it via the notes now you'll notice so far not a lot of effect as there has gone on I think you can see some slight changes to our material but it's a it's something not um not quite what we were hoping for now you've got a tessellation multiplier here and but we'll so what gonna do is feed our feed something into that to see if we can give ourselves some more control over the amount of tessellation so call this [Music] tessellation and out and feed that into their multiplier and then set that default value to one and we'll set the Easter points five and three so let's take a look at three and see if that does anything for us no it still doesn't now the reason for this is all to do with the strength of the displacement at the moment okay so we're going to feed in a another parameter and multiply this texture okay so we're getting more strength from it so let's type in multiply add that up here and then feed that into there and then another parameter because we like our parameters like so and we'll call this and I'm going to call it tessellations misspelling tessellation behavior we'll just ignore that and let's set this to a value of I don't know something like 5 6 if I hit the wrong key Amos starting to get a little bit of a bump coming out of it ok maybe something like I know 50 yeah now again some somewhere a bit too far bet so now I turn down to 25 and now you can really see the effect starting to come into place the basic sphere is being modified quite considerably and by the displacement texture and it's starting to look pretty good however because of the way that the [Music] tessellation works in unreal and this would have to be adjusted for every single object depending on the size of the object because it's the size of the object that dictates the amount of displacement if that makes any sense so what we're going to do instead is adding another multiply note like so and feed that up into well displacement instead and then we're gonna bring in an object scale note no that's not right object radius that's one there we go now what this will do is it will multiply it for us so we can lower the strength you'll see now this has gone into like insane mode because it's taking the scale of the object into account so we can now lower this strength and if that's the default one might be fine now that we've got that of a load in place effect that might even be too much but we'll see that when we know the scale a little bit here try and gauge if God yeah actually might work pretty well on a value of one so for the min and Max on this parameter I'm gonna set it to about point two and about five very much doubt you'd ever need to go that high but may as well put the control in there and yeah that's that's pretty much all the controls will meet now Baron might ask you up this tessellation amount you will be increasing the amount of system resources used to whatnot and now that we've put in these other controls and we've realized that that probably isn't that wasn't the problem we can now lower that so I'm gonna say that to one and I think that'll still give us plenty of geometry it certainly seems too good okay so that's our material pretty much set up so at this point let's jump out of here I'm gonna make an instance of it like so and they an oh god that's all you got all material only has me because I'm going to click on our divided plain and clear that material and instead put on our instance and yeah still way too strong so so let's go about fixing that so now what we've got our instance material here we can go in and set up these settings a little bit so we've got the ground scale tessellation amount and tessellations strength so what we'll do is lower the that we'll keep the amount but low the strength to say point three okay and that is starting ignore those kind of like that kind of bounds finish I just hit play it's a bit easier to see them you know there we go we can start to see our ground working now if you compare this some kind of other the for imagery that we had before that is quite an improvement definitely some tweaking to be done though so let's jump back into their turn down the strength a little more maybe 0.15 or 7 maybe and I'm also gonna try lowering the tessellation amounts I think it was using more geometry than it needed to so let's try that at about 0.5 let it update yeah and be a little bit stronger but this is the this is why you create these parameters and whatnot so you can quickly tweak and fiddle with it as you're going and but yeah for the purposes of a tutorial I would say that we've done a good job so in summary we've taken a material from polygon comm brought it into unreal like we've done before though this time we use the displacement texture along with Unreal tessellation feature to physically change the geometry of a ground plane and with summer with some interesting results
Info
Channel: Poliigon Documentation
Views: 330,620
Rating: undefined out of 5
Keywords: tutorial, poliigon, textures, pbr, material, shader, unreal, ue4, tessellation, displacement
Id: 1GkS9-94k80
Channel Id: undefined
Length: 11min 57sec (717 seconds)
Published: Tue Oct 16 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.