Nanite Tessellation & Displacement: UE 5.4 Step by Step Tutorial (any asset, not just landscapes)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome so on real engine 5.4 preview is out and naturally epic games developers shake the world again by enabling the realtime n tessellation and displacement that is enabled by that technology and as you can see we can now tesselate and displace any arbitrary geometry in any asset that we want and as a bonus it doesn't only displace the geometry that we see it gets the benefit of self shadowing as you can see this kind of like uh indentations in our cube is being self shadowed and on top of that even the Shadows themselves as you can see they respect the geometry that's being displaced and desolated and it's pretty amazing of course we can use it on any arbitrary geometer that we want as you can see um I just exported 5.4 release and you see that it gets this virtually infinite geometric detail using the n and as we can see if we go to n visualization and we can see the overview you will see in the top left corner that indeed these are the triangles that are being generated on the Fly however the geometry itself is relatively simple now if I get to the Desolation and disable it you will see immediate result that we do have this kind of um the shadowing lightning that is driven by normals well as you might expect so it looks kind of like okay it's not terrible but if we need aable the test solation you will see the immediate difference and result and how much of a dramatic effect it makes so let's actually see how we enable it in the new project and I will create a new project so that we can go through the motions and see how it's done okay so we go to the launcher launch the 540 preview the underrated are loads and we go to games let's say third person and let's say YouTube distillation tutorial 54 and click create and see what we get so after it loads uh for whatever reason the preview are usually get my layout really wonky but it's cool I can load the layout which is called hexa a game development because um Ubisoft introduced the quadruple a game development I'm introducing the hexa game develop because AA a a a AA Game Dev is just better anyway so I go to the project settings go to the frame rate uh enable fix frame rate make it 60 so it doesn't lag on YouTube when you watch it on 30 FPS recording so this is highly optional now next part what we're going to do is we go to the plugins start typing nit and we see the Nite displaced mesh 0 point uh 0.1 so that's cool and we restart the editor to enable that plugin now what will now what we're going to do actually uh is close the editor again because we need to edit the UN file so what we're going to do is go to our config go to where is it go to the YouTube test tutorial go to config go to default engine in here it is now we go to the render settings here they are and we add the r. n.l tation equals 1 and r. Nite do desolation equals 1 if you do not add these things um I test it it doesn't really work for whatever reason also we will have to rewrite this command in the editor as well but you'll see what I mean in a second so let's get back to our YouTube test tutorial 54 and let me load my layouts Okay cool so press contrl + B we get to the SM Cher Cube and let's actually say that we can create the Desolation material here right click material amazing stuff okay so we double click here okay pay attention this is going to be a little bit more confusing if you're not particularly are good at materials but worry not I will record fully featured the tutorial later on about how to use material in Unreal Engine when 5.4 drops but for now just follow what you see if you're confused if it's too fast it's fine no need to sweat anything again let's go to our plugins let's see if we n if we if the Nite displayed enabled it is enabled okay so now we go to r. Nite tessellation if I press enter and see the output lock you'll see that for whatever reason it's actually zero however we wrote that it should be one but you know like I said it's a little bit wonky might be fixed later on so what we're going to do in this material is create a world align texture using the material attributes so first things first let's say attributes use material attributes and you'll see that everything collapses and looks kind of a little bit lonely here so what we're going to do is start typing attributes make material attributes connect this to here and now we can start building our material right so here is some roughness and let's say something like this so we we just can create a material instance drag and drop it on our box here and we will see that yep our material inst Works everything looks fine now what I want to do is I'm going to go quickel Bridge right so here it is and I already have downloaded this layer rock cliff material and I downloaded it in high quality I press add here it is cool now we can start drag and dropping our Textures in our material editor now before we begin I want to say that we will be working with World align texture so it's a little bit different from UV texturing if you're accustomed to working with assets that have UVS and you apply materials to UVS it will be a little bit different working with normals and all that kind of stuff again when the 5.4 actually releases I will record a very detailed tutorial on that topic so for now again just follow along right so what we're going to do is we are going to World align texture right and so if we just drag and drop texture here you will see that it doesn't work so what we want to do is we need the texture object 2D so let's start texture object here it is here is the texture object here's the texture object parameter so I will do the parameter because we will then use that in the material instance so it's just saves us a couple of clicks so what we're going to do is base color Tri planner connect it to texture object 2D get the XY Z texture in the base color press save you'll immediately see that well if I disable this you'll see that we do have the typical setup for World align textur so in fact if your geometry doesn't have UVS it will work just fine you will see that the textures are a little bit of a swimming through our geometry but again that's fine this is almost what we want so um this covers the color next up we will import the normals and again we need the world aligned normals this function is different from the texture because texture is just it doesn't gets the direction of the normal so we should use this if we want to use the tripler normals again texture object parameter here it is um here I will just replace it with that our normals break it here XYZ texture and it goes to our normal now if I press save right now you will see that our normals will look look kind of fine but if we want to use the displacement and all this kind of stuff I suggest we create a Boolean again static bu parameter call it World space connect it to our world space and by default we will enable this and immediately you will see that our geometry will now look kind of weird but again to fix that we go to normals here again if you don't see this just click here or select this node right or click here on any other space and start typing normals you'll see that the tangent space normal is enabled but we're using World space so enable it here but disable it on the left side press save and finally we get the result we want so what's next let's increase the roughness by the way I am using roughness like this because I do not have the separated texture here because as you can see this RGB and it says layer rock cliff and here it says 4K o r d so it means occlusion roughness displacement now we'll be using occlusion for our displacement for because it's not a separated texture it's a combined one but for this demonstration doesn't really matter so what we're going to do I press I click here press contrl G here rename it into displacement drag and drop it here and we'll be using the red channel to drive our displacement and of course we need World align Tech World align texture connected Here and Now XYZ texture to displacement however if I just move it here will not be able to control the amount of displacement in the material parameters so what we're going to do is we will multiply it by our arbitrary multiplier and let's say displacements multiplier the fault value will be let's say 0.1 slider minimum .5 slider maximum 1.5 and we will actually add a parameter that will I will call displacement bias and again slider minimum 0 0.5 slider maximum let's say 1.5 default value will be 0.1 so you will see in a second why we are doing this like that if I go back to our material instance you will see that we now can twick the displacement bias multiplier okay let's let's call it roughness multiplier and bias and it will be well pretty dramat it will have a pretty dramatic effect on our geometry we've done all this and uh you might be thinking well where where is the effect right so the effect is here we need to actually our n desolation equals 1 and nothing happens you'll be like okay where is the effect okay so we uh press select our geometry Press contrl B then right click on this temper Cube thenit enable go nothing happens again because we actually forgot to get to the Nite here and of course enable desolation and press save all right so now as we enable the Desolation here right nothing again happens um probably I made a mistake of writing it like that if we press it here equals 1 nothing happens but if we say um and desolation space bar equals space bar one it will now work I know it's weird but you know whatever it takes right so finally we have our geometry uh working perfectly and you'll see that our box is finally getting displaced now the box is fine let's actually import some fbx that I have pre-made let's go document work in progress desolation GE omry now important parts here is disable remove the generates or basically disable all of this and import normals and tangents the important part about arbitrary geometry that you import from elsewhere is the same as you are working with any displacement at branded time in any other engine for example like Cycles or Karma or Mantra or arold or whatever um it means that you have to have geometry that is continuous so basically the best part to ensure continuity of geometry is to have a subd modifier somewhere down the line and of course and we have to have smooth normals well basically that's what you want with subd geometry anyway we import normal in tangents everything seems fine again don't forget to disable this stuff and do not press build Nite here because for whatever reason it doesn't work so we press import ignore this stuff it doesn't matter and we finally have our arbitrary geometry which says 5.4 release okay so I'll make it a little bit bigger make it movable focus on this move it around a little bit now so what we're going to do is go and apply our amazing stuff instance you will see that again nothing really happens the reason is is because we need to have nanites enabled and when we enable the nites it will rebuild and everything will look just fine just for our conscious we can enable the explicit tangents because maybe we want it shaded a little bit different you can read about explicit tangents in 5.3 release so that if you're not exactly sure what's going on so anyway what we have now is our letters that we can twick at our Leisure again this is displacement multiplier is how much displacement is being applied and this is the bias so it's the offset um in other words as you can see it how fat the geometry becomes uh because if you increase the amount of displacement you'll have to offset the points at which displacement is being calculated otherwise you will uh end up with some weird geometry that will not be displaced because it will be not affecting because you will just so to speak over displacing your geometry so basically it will have no visual effect everything will be just a little bit too fat so this is why we have the displacement bias you will actually see by the way when we decrease the bias here um the left part of our number five is shaded very very differently however this is just the bug of the calculating of the virtual shadows and it's fixed super easy all we're going to do is hold down control crl L and just move around our sun and as you can see everything goes back to normal and looking pretty good and again if we go well basically you can already see the displacement here this is a Jagged Edge on our DOT and we can go back to our n visualization press the overview you will see that these are the triangles that we have again the geometry itself as you have seen is super absolutely basic however using the NIT we can create the real time displacement and it will look super cool also we can go back into the and make it something like dramatic like this the question is how cool is that and uh I personally think it's really cool it's super useful I think this will revolutionize a lot of geometric and asset creation because we don't need we have super heavy geometry now we can do it random time using Nite it works it's amazing I love it if you want to learn more about doing really cool stuff inside the fun engine don't forget to subscribe I'll be recording many more videos going forward and when 5.4 drops uh we will be really heavy into well basically asset creation working with the game engine doing some environments all sorts of great things so anyway thanks for watching I hope you learn something I hope you're having a a nice day and see you in the next videos bye-bye
Info
Channel: O. Song 💾
Views: 11,036
Rating: undefined out of 5
Keywords: ue5, unreal engine, nanite, displacement, geometry, subd
Id: ofJcgNzi9IQ
Channel Id: undefined
Length: 17min 34sec (1054 seconds)
Published: Mon Mar 25 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.