Nanite Tessellation + Vertex Painting with Height Lerp | Unreal Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
nanite tessellation and vertex painting with height lerp in this video I'll create a material that utilizes these to add great looking details to our environments so let's do it the project file for this video is available on my patreon the link is in the description also you can find the video for all the notes I used to create the material on my channel so if you're not familiar with any of them make sure to check out the material notes playlist right click in the content browser and create a new [Applause] material on the left search for nanite check the enable tessellation and used with nanite options if you don't know how to enable nanite tessellation watch this video I've already downloaded some materials from quicksell bridge M rocket ground melting snow and Cobblestone these are the ones I'll use in my material let's organize them like this we're going to have multiple materials in one material so we should use the material attribute nodes add a set material attributes node here we need four array elements base color roughness normal and displacement connect them like this in The Mask texture the green channel is the roughness and the blue channel is the displacement let's actually multiply the displacement by parameter before connecting it convert the textures to parameters and name [Music] them set their group to mat one base this is going to be the base material and set the sort priority to zero let's add my function to control the size of the textures watch this video to learn how to download and use it select the parameters and set their group and sort [Music] priority now I need two named re Roots here one I'll connect to the set material attributes node I'll name it mat one and one I'll use for the height texture we're going to need it when setting up the height blending name this one mat one height select all the notes and press C to add a comment now that's better organized let's do the same thing with the other two materials now we have three materials and the parameters are organized in three groups I want to control Mat 2 with the r Channel and mat 3 with the green Channel when vertex painting that's why I added R and G to the name of their groups select the main material node and enable the use material attributes option to blend the material attributes we've created we should use the blend material attributes node first we should blend mat one and Mat 2 then we should blend the result with mat three next I'll create the [Music] alphas I have a video about the height LP nodes and how to use them with vertex painting So if you're not familiar with them I recommend you watch that first add the height LP with two height Maps function here I'll use this function to create the Alpha for the transition phase I'll add a Vertex color node and use its red Channel add a parameter run it through an absolute node and connect it to the contrast input I'll name this one height contrast Mat 2 it controls how material 2 blends with material one negative contrast values don't look good that's why I use the absolute node to make sure it's always positive let's bring mat one one height and mat two height multiply both of them by a parameter matte 1 is connected to the a input of the blend and matte 2 is connected to the B input so we should connect mat one height to height texture 2 and Mat 2 height to height texture 1 I've explained why we do this in the height LP video connect the alpha output to a named re root and name it alpha 1 this is the alpha we should connect to the first blend now let's create the second one duplicate the height function connect the green channel of the vertex color to its transition phase input duplicate the contrast parameter and the ab solute node rename it to mat 3 and connect it to the contrast input on the blend node the resulting blend is connected to the a input and mat 3 is connected to the B input so I'll use the resulting height map from here for height texture 2 and I'll use mat 3 height for height texture one before connecting it let's multiply it by a parameter connect the alpha output to a named reot this is Alpha 2 now put all these parameters in the height group and press C to add a comment to all of them up here connect alpha 1 to the first blend and Alpha 2 to the second blend blend connect the blend node to the main node and it should work just fine save the material create a material instance and assign it to your mesh make sure nanet is enabled for the mesh open the material instance let's first make the textures a smaller I'll set the size for all of them to 0.1 right now the displacement is not that visible from here I'll set the magnitude to 30 to better see it keep in mind that the scale of the mesh directly affects the displacement magnitude for example these planes are the same size but this one has a scale of one and this one has a scale of 30 if I assign the same material to both of them displacement will appear 30 times stronger on this one so if you want them to look the same this one should have a magnitude of one and this one should have a magnitude of 30 duplicate the material set this magnitude to one and assign it now they look the same the height multiplier default values should be one I forgot to do that so let's do it and save the material in the height section of the material instance we have these five parameters by this default we see mat 1 it is the base material we can increase the height of matte 2 and mat 3 to control which one is showing for example as I increase the height of Mat 2 the Pebbles slowly start to emerge and after a while we only see the Pebbles by default the transition is smooth we can change that with the contrast parameters for example when the height of Mat 2 is four if I increase its contrast to three it looks much better and the height blending is much more visible now the same is true for mat 3 if I increase its height to around four and increase its contrast to one we can see it being added from the bottom of the pebbl stones if I set the height of mat one to 1.1 we see a little more of the rocky ground let's reset all the parameters to their default value so this was the height blending next I'll go over how to wear Tex paint and anite mesh but before getting to that make sure to like this video And subscribe to the channel also join our communities on telegram Discord and Facebook if you're interested in supporting the channel and downloading the project file for this video check out my patreon the links are in the description normally when we want to use vertex painting we should select the Mish and from up here go to the Mish paint mode but with Nan mishes it doesn't work like that we should go to the modeling mode on the left select the attributes section and while the mes is selected in the viewport click on paint vertex Colors by default all the vertices are white that's why the object is white in the visualization section set the material mode to original material check the r g and B Channel filters then down here click on fill white nothing changes because as I said the vertex color are white by default but if we click on F black we can see that the snow covers everything let's click on F white again in order to paint the other layers we should change the paint color to Black and the Eraser color to white now if I only enable the r Channel I can paint this Stone and if I only enable the G Channel I can paint this now one thing to consider is that because we're painting from the modeling tools the vertex paint will be saved on the source of the Mes in the content browser right now we can't paint each instance individually like what we can do with non nano8 measures so keep this in mind when we're in the paint mode we can't see the displacement but as soon as I click on accept we can see it again now let's TW the material parameters and this is what I came up with I don't like the way a snow is being added we can use use a noise texture to make it look better let's go back to the material down here in the alpha section add the noise texture from the starter content drag out of one of its channels and connect it to a named reroot duplicate this and connect it to the uv's input name the parameter size noise texture set this group to height and and reset the sord priority here disconnect M three height from the multiply node add a LARP node and the name reot for the noise texture connect them like this for the alpha I'll add a parameter run it through a saturate node and connect it name the parameter use no noise as height texture matte 3 now when it's zero matte 3 height texture will be used and when it's one the noise texture will be used set the group to height and save the material to see how it looks here are the new parameters let's TW them increase the used noise texture value and looks way better I mean way better just look at it 0 1 01 let's decrease it to 0.8 we can also change the noise size something like 0.7 looks good and just like that the look of the scene has drastically enhanced just look at the small snow details and how it blends with the PB Stone and the ground it's puffiness it looks really good in the next video I'll add puddles and weathering effects to the material so click here to learn how to do that and thank you so much for watching like this video subscribe and join our communities on telegram Discord and Facebook if you have any questions leave them in the comment section below so see you in the next one
Info
Channel: Hoj Dee
Views: 23,034
Rating: undefined out of 5
Keywords: 3d, cgi, unrealengine, unrealengine5, ue5
Id: X5LsyzjKFGI
Channel Id: undefined
Length: 14min 57sec (897 seconds)
Published: Fri May 17 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.