How To: Use Displacement Map in UNREAL Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

This method is only good for a small portion of displacement. Either instance 20-30 Objects and reuse them like crazy, or just model it out yourself.

The reason it sucks is because if you displace something with a megascan Texture and bring it to lets say 1x1m height, the 512x512 texture is too small and looks blurry. So you choose to use 1024 or 2K.

Do that more than 30 times and your game increases 40% in Size and the biggest problem : your Vram runs out without even any real static meshes in your scene added.

I tried it myself. Its nice if you want to create a path, some walls or instanced houses. But you NEED to instance everything. Look up the UE5 Valley demo and you will see this was only possible by instancing 30 meshes and layering them one over another and then rotating and scaling it.

👍︎︎ 2 👤︎︎ u/DarkSession_Media 📅︎︎ Mar 21 2023 🗫︎ replies
Captions
hello everyone Reza here with another tutorial welcome to my channel we haven't done a how-to video uh in a while so I thought it's about time to make a quick tutorial and to show you how to apply displacement to your material using the modeling editor tool inside Unreal Engine 5. let's get started [Music] foreign [Music] first things first I'm just going to launch on drill engine we really don't need any scenes we just need a few textures and Maps which I will provide to you all right we have the unreal project browser open I'm just going to go with just a blank scene all right first things first I'm just going to look at here we don't have the modeling plugin available and shifter F5 takes us to fracture which is not quite the same thing so first things first I'm just going to go to plugin and load in the modeling tool editor click we are going to use that we don't want to update and we restart the engine now with that out of the way if I check we have access to modeling editor tool shift F5 uh probably don't need the floor what I can do is to go to modeling and place in a simple 2D rectangle I can just increase its size a little bit and I'm gonna press f on it we don't need this play start you can just hide it or delete it we don't need that all right next is to look after our hierarchy so I'm going to right click create a brand new folder called Reza and within that we only need two folders one is holding materials and within that material I'm going to create a brand new material and I'm going to call it disp underscore Master material and probably drag and drop that into my model we're not going to use an instance for time being but feel free to create one for yourself and the other folder is going to hold our textures now that's probably the important folder that we need to be mindful of your texture should have displacement now I'm going to show you what I'm going to use so this is the Albedo map that I'm going to use I have ambient occlusion I have a gloss which I'm not going to use roughness I'm going to use specular I'm not going to use because I'm actually using roughness workflow so glossiness and specularity are the two maps that I won't be using and of course I have a displacement map so I'm just going to bring all of them these Maps so let's review them together that's Albedo basically for Albedo we want in srgb to be on it's a bit washed out so I'm gonna give that a 2.2 of RGB curve and in case if you're wondering what RGB curve is it actually raises linear space RGB color using this value so that should work just fine I'm going to close that probably going to sort of dock that to the side for time being I'm gonna go use ambient occlusion for ambient occlusion I am going to do the same thing I'm going to increase the ambient occlusion RGB curve to get a slightly better result and with normal well it doesn't actually recognize this as normal so I'm just going to go to world normal map and compression to normal map so now it recognizes the map as normal I'm going to save and close and for roughness again I'm going to increase RGB curve to 2.2 yep that gives me a slightly better result and again these are completely optional you really don't need to do that why you need to be mindful of is actually this map here right here displacement now you can use height Maps as displacement that's fine you can see this one is a bit blurry and it's an exr image now remember we inside unreal if you want to use displacement using this method try not to have packed Maps what do I mean by that packed maps are type of maps where displacement is in one channel then ambient occlusion is another Channel then roughness probably is another Channel maybe metallic is in one channel so for those it becomes a bit difficult to extract a channel using modeling editor tools so preferably have the displacement as an individual file either get it from Mori or export it from substance painter or use qixel bridge in my case that's what I did and just download the displacement there you can just log into a mega scan download the map that comes with the Albedo file and just have it as a separate file and the reason it's red is because I don't have anything on the other channel so if I go to Red and turn off blue and green that's displacement that's basically what I see all right that's the only thing you needed to know let's uh go to the next chapter and see how we can use displacement to our advantage ment is under deform which is in charge of deforming your object so you can see under the form we have sculpting smoothing offsetting warping doing lattice which we practice in previous videos and of course displacement before I apply displacement I would like to actually put something as a material on this model so I'm just going to go to my material tab double click on it and dock it right next to my main window and let's bring those maps that we've had before so I'm just going to select all of these guys move them to textures so everything is nice and organized and then I'm gonna go here select all five drag and drop in here now we all know how it works with this one srgb goes to basic I'm going to move that to a side next one is our and if you get confused look at the left hand side in the material expression texture base it actually says what pass you're using ambient occlusion and it's set to linear color because srgb was off we're using a single Channel red to ambient occlusion next one is roughness so I'm just going to pick the red Channel or I even better I can put get the green Channel and set that to roughness green Channel usually holds better information for roughness and I'm gonna go to normal it's an RGB map and we know what to do this directly goes into normal fantastic I'm just going to save and apply and gonna go in here and there we have our map all good to go but you can see although I've applied normal we really don't see any displacement the object itself is not really moving not to mention the resolution is just not enough to give us what we want as a matter of fact you can actually give this model a little bit of a resolution to begin with so we get a slightly better result so with that I'm just going to give that 10 10 division you really don't need to go too high because you will see in a second how this gets controlled through the displacement node itself is just going to give us a little bit of buffer so we don't have just a few lines now we have a little bit more resolution better triangles a better subdivision to hold the displacement map I'm going to go to material drag and drop drop it in there [Music] now the time has come to use displacement node with that selected I'm just going to click on displacement and instantly you can see uh quite interestingly we are getting something now it's not quite the displacement that we are hoping for simply because the displacement type is set to noise so what we're seeing is just random noise on the model and we can see that through displacement type here which is set perlin and then another type of noise is just random noise and we have constant and we have sine wave which is like a drop up and down type of wave pattern and of course we have texture to the map and that is what we want and look what we have in the option we have displacement map which now we can navigate to textures drag and drop and that gives us displacement now we're talking we're getting actually re really close to what we want now before I hit accept because it's one of those things that if you do that it's going to be really difficult to undo and I'm going to just change the light ever so slightly to see if I can get a slightly better angle those shadows will just give us more information like so now before I do that let's have a look at the wireframe if I go to wireframe you can see clearly the silhouette is changing but look what we have subdivision so I can actually go in here and give myself more information and even reduce the subdivision if I feel like the subdivision is too much so you can clearly see now how this is taking place looks a lot better I can actually go in here and change the field of view to something like 45 so it's not giving us weird result but now you can see clearly that the subdivision Works beautifully I can intensifier to seven to eight to nine and beautiful Ctrl L to change the light and you can see definitely the silhouette of my model is changing if you look at the edges it's no longer flat and usually that's what makes Maps like bump or normal a bit boring because they don't really change the silhouette of our model there we have it I mean that was really easy um one note to do it all for you there's another method to create the illusion of displacement through Parallax occlusion mapping which is a completely different story I will put together a tutorial on that now if at any point of time you feel like the scene is starting slowing down because you need to sort of duplicate this all across because of the number of triangles that you're dealing with well I've got a really simple solution to you for you you go to generate and navigate to this model right here of course another way of doing that is just to click on this folder with magnifier right next to it so it pops up right click go to nanite and enable nanite with that you can just duplicate it across and just get hundreds of them without experiencing slow down in the scene obviously before you do that you need to accept otherwise Unreal Engine is going to crash there's really not much to it if your displacement is on a different Channel you specify that channel and if you wish to UV scale it in different Axis or offset it you can definitely do that so it lines up with your material let's say your material is actually having some texture coordinates and you're tiling your material in that case you apply the same number in here so your displacement is in line with your UV coordinates inside the material editor there is really not much to it to be honest with you and that is pretty much it again I love this really quick and easy method instead of The Parallax the occlusion mapping which again still fakes the result this one doesn't I'm really really pleased with the new edition um of this node inside the modeling editor node hope you found this video useful until another how-to video stay safe love you all see you next time
Info
Channel: SARKAMARI
Views: 7,297
Rating: undefined out of 5
Keywords: unreal engine 5, unreal engine 5 tutorial, unreal engine tutorial, unreal engine 5 beginner tutorial, unreal engine material graph, unreal engine material attributes, unreal engine 5 displacement material, unreal engine 5 quixel displacement, unreal engine 5 world displacement, unreal engine megascans displacement, unreal engine displacement map, unreal engine displacement material, unreal engine displacement texture, unreal 5.1 demo, unreal 5.1 new features, ue5 displacement
Id: hvj1lp_yfp8
Channel Id: undefined
Length: 14min 19sec (859 seconds)
Published: Sat Mar 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.