How to use Displacement in Unreal Engine 5.2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody how's it going and welcome back to the channel in this video we are going to talk about something that uh is a Channel's favorite it's actually what got me a bunch of subscribers back in the day is displacement displacement is back in a good way in Unreal Engine 5.2 now you can see here there these are two planes this one is completely flat it has zero displacement this one has a little bit more displacement than uh I would usually add but I just wanted it to be very apparent so I exaggerated a little bit so this is what we're gonna do today it's pretty easy is actually free not everything is done on the real don't worry you won't have to go to blender now without further Ado let's get started now for that you're gonna need a plane and instead of going out in blender and getting a plane exporting it but we can actually use plainness right here in the place actors now the one that you you have here it's not the one that you're going to be editing because you usually edit the one that's in the content browser so this one is in the engine folder the way you get to this plane is by just hitting this little uh folder with a magnifying glass and it should take you to where this is located however I would recommend that you duplicate one and I'm gonna call this one template and you can always move it to wherever you want so I'm just going to move it to the mega scans folder over here and that way you always have one that you can use and you're not just using the one in the project because if you modify that one that one will stay modified always duplicate your stuff now once we have this one over here you're gonna see that it's just a world grid because we haven't assigned any type of map what I want to show you here is the displacement partner you can see here that we have nanite settings as we used to but now we have a couple of extra settings including this one right here just a displacement map that we're going to be using now when you first load it up it comes this way so it says displacement map and it says zero array elements you need to add one once you add one it's going to give you this thing right here where you're supposed to add your texture map and you have the magnitude which if you watch my really old videos about Unreal Engine 4 there was uh an intensity value that you needed to apply to displacement in order to tell the engine how much displacement You're Gonna Want on this so this is where you apply that now the other thing that we need to change here is the trim relative error this is what's going to give you the actual displacement and it should be less than one now you can see if I hover over this it says trim all detail with less dense relative error is calculated relative to the mesh size so if you have a higher number you're going to be get an optimized mesh but the more optimized the less Fidelity it's going to have so that's why I'm just going to go with the value that they had on the stream which was 0.05 and now all we need is a mega scan so for that I'm going to go to quick so bridge now one of the ways you can search things a lot faster is just by typing it in so I know that mine it's called Break wall damage brick wall plaster is this one right here and what I want to just download and usually the surfaces download pretty quick compared to the 3D assets so I'm just going to wait for that to finish up and then I'm just going to add it alright so if we're going to our surfaces here it is one of the issues is then when we import Mega scans and surfaces into Unreal Engine this way you're going to get this map right here that's ORD now the ORD is a compressed map that contains occlusion roughness and displacement so occlusions in the red map um roughness is in the green map and displacement is in the blue map however this is this being a packed map we cannot use this so the way to go around this unfortunately we're gonna have to go outside of unreal however this is still a free process and it's very easy to follow all you have to do is download the bridge application these things that we used to use in ancient times where you just load the pixel Bridge application and bring it into unreal we're not going to do that because it doesn't allow us to do that in Unreal Engine 5 but we are going to do this to get the actual displacement map now all you have to do is download so just click here and just get the highest quality possible and just hit download you're not going to be exporting anything we're actually going to go into the folder so if you click the three dots you're going to be able to go into the files and over here we have the displacement map however I have it to download the exr you may may not do this uh on your application um just make sure that you have the jpeg if you don't know how to do that let me show you real quick just go into these uh whatever these are sliders and you go into the download settings and you can see here what you have now mine is set up to JPEG and exr to get them into unreal but you can just choose JPEG and that is totally fine now going back to our files we're going to be using the jpeg we're not going to be using the uh exr because that has a special treatment we're not going to deal with that right now I'm just going to get this into unreal just gonna throw it in here just like drag and drop just like you would drag and drop anything after that let's just put the material on this so you can see and like Ali I had this new camera I don't know what they had to change this this didn't need any changes but whatever you can see that um this is just paranormal map this is completely flat it's pure normal map there is no displacement and if I go into wireframe this thing only has two triangles or just one polygon now we're going to turn that into several triangles and we're going to get this placement now we have this map here you don't have to have the material in there I just like to have it for visual cues but we're gonna go into our displacement map and we're going to throw the displacement JPEG that we got into the engine and it has a magnitude of five that's too much I'm just going to give it a magnitude of three uh relative error 0.05 and I'm just going to use the values that they use on stream I'm just going to bring this back to zero okay now once that is done I'm just going to apply changes this is going to take a little bit and this one actually took a lot less than I imagined and you can see that our mesh is displaced and if I go into wireframe you can see that we have several triangles where we didn't have any let me change that to a magnitude of five so because it's a little bit too subtle apply changes it's going to think for a minute and there it is so you can see that this is a mesh that now has geometry so if we go ahead you can see that our mesh has geometry let me put it this way so it's better appreciated because this is supposed to be a wall and this way there you go so we have a nice displays brake wall that we can have and that took almost no time whatsoever all you have to do is uh import the displacement map just give it the magnitude that you want and the other good thing about this is because the textures from Mega scans are usually tileable you can actually tile this up even though there has there are some differences here because this is no longer planar we can actually if you have a snap to grid we can actually duplicate and I'm going to move this all the way down to here and let's select these two let's move it all the way up and you can see that this is pretty seamless and you can make this however big you want and you can use it for grounds you can use it for several things and you can even make your own displacement Maps if you wanted to there are other places where you can download displacement maps from and you can display this even more if you want to however you have to be careful of certain artifacts if you displace this too much you're pulling the geometry much more than it was meant to by the UV map so you're going to see a little bit of distortion so just be careful with certain details but uh yeah now you can have displacement map almost the old-fashioned way that we used to have it however we don't have to deal with the camera thing that we used to deal with like if you if you go far away the camera will reduce displacement now displacement is there all the time and it's nanite it performs real well and uh you can use it however many times you want to all right everybody that is it for this video thank you everybody for watching as always all my patrons are on the screen thank you so much to all my patrons I'd love to patreon socially get these videos earlier than everyone else if you can't give to the patreon then a like and a comment downstairs really goes a long way it helps the algorithm notice me uh you can also sign up for a Discord I'm usually there too there's a Twitter if you want to follow me for uh more updates on things that I do there's also the Instagram thanks everybody for watching and I'll see in the next video
Info
Channel: MR3D-Dev
Views: 26,738
Rating: undefined out of 5
Keywords: unreal engine 5, unreal engine, game development, ue 5.2 tutorial, Displacement tutorial, unreal engine 5.2 displacement, create assets in Unreal Engine, nanite, lumen, megascans
Id: ik6s8xRceqE
Channel Id: undefined
Length: 10min 13sec (613 seconds)
Published: Mon May 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.