Blend Material to Nanite Mesh - Unreal Engine tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone today I'll show you a technique that you can apply to your wall resolution meshes to generate high resolution nanite mesh so you can take advantage of the new rendering workflowing Unreal Engine 5 where you can have millions and millions of polygons and it will render in one draw call everything that you have in your nanite layer so you can see the base mesh here for this right uh ramp was basically the same as the left one so you can clearly see if I go to the wireframe that this is a wall poly mesh and this is highly detailed nanite mesh you can see it also in the nanite visual visualization where this is the nanite mesh and the other mesh is just a regular static mesh so the other thing about this technique uh is that it's using a blend material to combine uh three other materials in here so you can see I have the rocky ground I have some sand layer here and one with the tire tracks that I'm using to convey the illusion that this is a ram that you have written with your bike like you can see here this is the same ramp I also have it down here so basically oops sorry you can see that it looks like it has tire marks on it so let's start with the process first you'll need to import to build and Import in your uh this see the the wall resolution mesh like I have here for example we'll apply the process to this one and you can see that currently it's very low resolution mesh I will apply the blend material you can use any blend material this is my custom one but you can use the one that comes with mega scans change the mode to mesh painting then select your object and then paint I'll fill all the layers with the black cover so mark all the layers here choose the Black cover and click fill and this will show my first material I'm only using the red channel to blend between these three materials in my custom material it will vary for other materials the the one from Mega scans uses uh the red and the green I believe but it doesn't matter the technique is the same let me show you my second material if I feel the red layer with the value of 0.5 this is my second material it's a sand ground with some grass patches and if I fill it with white you'll see my turn material it's this uh sand with some tire tracks on it to use for the for the illusion of the ramp being created let me start with filling with 0.5 this is I believe the easiest method for my particular material I fill it with 0.5 and then using the the black and the white color I paint whenever I want the the other two materials I want the rocks on the bottom like this let me paint all the sides okay let me just move this so I can see the phone the full model now go back to mesh painting select and paint okay so now in the bottom I have my rocks do some variation don't have it as a just a line on the bottom on some places go a little bit higher so place is a little bit lower extent the material on the ground some random places Okay so let's say that it looks okay on the sides I'm just doing this to to demonstrate don't pay too much attention of them material so let me add the third layer you can swap the course here with the white and with the currently black and eraser core being white with pressing the X key so now I'm painting with the with the white one and by holding shift you can use the other core without swapping them so let's do it like this on top you will have the landing marks and they will fate going down here you can also add a bit of the tire tracks oh let's say you're happy with this result it's just demonstration purpose now doesn't really matter too much but let's say this is your final desert result you'll need a little bit more geometry to have this detail mapped to your model let's go to the modeling menu and remesh this uh this item you can go to the mesh operations and hit the remesh let's say we need 20 000 triangles I think this is going to be fine we'll apply additional detail with the displacement later but let's say this fine for now you see that some some of our work the vertex paint is uh getting some errors after the remesh so that's why we are rematching and not just displacing because adding more verticals will change the mesh paint and we don't want that so go to the mesh paint and fix some of these errors basically repainting some places where you can see that now you have more detailed mesh you can see that there are a lot of polygons too to paint here you can do a little bit more detailed paint now on more dense geometry we are ready and now what we need is a the displacement after this material has been applied so for the three materials used I have displacement maps and I need to mix them to have one single displacement that I can apply to this uh to this mesh the modeling menu let's apply this paint to the base model it's currently only for this instance you can see that by adding another of the same mesh so this is the jump M mesh so add this here and apply the same material you see that none of the painting is saved but if I go here on the mesh pad and hit this apply button it will apply to to the base model and every instance you create will have this vertex paint applied to it so now if I go to the modeling menu I can use this bake texture to export the vertex core resolution 512 by 5 12 is fine because you can see that we don't have really detailed map anyway if you have painted a very detailed map of course you can use a bigger resolution but for what I'm doing here blending these assets it doesn't really matter I'll wear it anyway now I can accept this bake and it will create this file where your model is now I will export this image I'll go to photoshop I'll import it here I'm doing a 2000 by 2048 by 2048 for the displacement map I rescaled this uh this vertex map to be the full image size and now you need to import the displacement textures for your three textures this is my first one this is the second one this is the third one you can see that I'm arranging them the same way that they are in my material the bottom one is the the one that I'm having on the on the base of the model then this is covering it and this is on top of everything so hide all all those and let's rasterize this layer so we can pour it this board will depend on your resolution I'll use 15 I don't have really detailed maps so it doesn't really matter I wore it to avoid having this harsh lines if you painted your vertex map with more details and you don't want to board the details it's fine the idea is that you use the the channel that you want for for the displacement map that you're using if you're using a material where the materials are painted with more more on one channels than the red for example you have the red for one of the materials the green for the other blend material and the blue for the third blend material you used all the three masks but my particular material uses only the red channel in the vertex pencil I'll select this by clicking by going to the channels menu and holding Ctrl and clicking on the layer and then I'll go to the of my three layers and add this as a mask if it deselects it you can just control click on the mask and then go to the other letter layer again I don't need any more this mask the first layer The Mask should be inverted because in my Unreal Engine material I have the the topmost layer shows where the the most red is painted on the vertex core bottom one is where no red is painted at all so I'll invert that mask by selecting this mask Swatch here and clicking Ctrl I to invert the two top players are a point in the middle of this bottom one for the second one out and click on the mask will show you the the mask of the layer and with the Ctrl M you can apply the curves adjustment I want the mask to extend a bit out from the for from the top one so I'll just brighten it a bit by dragging this Middle Point a little bit up and then for the the top one I'll do the same but I'll drag it a little bit down this way you can see that this mask is extending a little bit out of the the top one now I have this problem that if I hide my two layers this mask is cutting a hole in my layer on the bottom where the background is shown and the background is black you need your background to be a 50 Gray and now it should look much better one other thing you can do depending on your materials you can add some curves to each of these layers to apply some adjustments so I'll add one to the bottom one and one to the top one but adjustment layer by clicking here and to draw the curves layer and then out click between the two layers to apply it only to the to the bottom layer so for the bottom one I'll brighten it a bit and for the most top one I'll darken it a bit in that way this texture on the bottom it will be displaced more and this on the top it will be displaced less I'll have bigger rocks on the sides and it will be flatter in this middle area so let's say I'm happy with this displacement texture I'll export it PNG and let's call it displacement M model and after it's done I'll go to Unreal Engine and now I'll import the texture here one important setting for displacement texture is here after you import it to open the texture and to remove this srgb checkbox because it's only for cover textures if you have utility texture like a displacement you need to remove this then save the texture and now with the model selected I'll go to the modeling mod again and into the deform section the last button is displaced you will use this displace button by default the the display is using this Berlin noise displacement type you can change it to texture to the map and here into the displacement map option choose the the in the map that you just created and imported so this is the one and with in the displacement intensity you can adjust the amount to to be a number that produces the results that that you want I'll just crank it to 100 to show you the that our displacement is matching our material here so you can see where we have a big rocks we have a bigger displacement and that's the point of exporting the vertex map and combining the three displacement Maps into the into Photoshop so I believe that 30 will be okay or even we can go to 25 Maybe let's let's stay at 30. after you're happy with the displacement options you can hit here accept and this will apply the displacement to your model and you see that this is now displaced by this map and the texture is matching the geometry very nicely I'll change the the mode here the display mode here to detail lighting so you can see that the model is is following the blending of the textures very well so the last step now let's say you're happy with this result if not you can go to any of the previous steps and and change something and reapply all the next steps to go here when you're ready just go inside the the model and click enable nanite support and click here apply changes so this will generate the the nanite mesh you can see that 200 000 polygons same material and now if I go to the nanite visualization you'll see that I have the phone now light support for this mesh and I have a very detailed model inside the scene if for some reason you don't like your mesh paint uh you'll see that you can no longer paint on nanite meshes it's not supported currently in what you need to do if you if you really want to change the vertex band is Select this mesh again disable nanite support now after we have completed our model you can delete the vertex paint and the displacement images you don't need them for anything they were just for the model and that's basically it everything is done you have your highly detailed model you have the nanite support which will help with the rendering and you have the Blended material effect with the custom painted three different materials on this object I have created these parts the same way and I just didn't cut the non-night support because I want to use it with the with the spline mesh and nanite doesn't really support spline meshes currently you can see that this technique is technique is useful for a lot of different type of objects hope you like it if you have any requests for for more tutorials please write in the comments I'll try to make the next tutorial sooner and by that time please like And subscribe and comment on every other request that you may have bye for now and see you in the next one foreign
Info
Channel: DK 3D
Views: 8,846
Rating: undefined out of 5
Keywords:
Id: iwiyRRu_PhI
Channel Id: undefined
Length: 26min 18sec (1578 seconds)
Published: Tue Nov 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.