# The Ultimate All-in-One Material for Unreal

## Метаданные

- **Канал:** Unreal Sensei
- **YouTube:** https://www.youtube.com/watch?v=WUtl1K9Pn7k
- **Дата:** 22.04.2026
- **Длительность:** 1:05:04
- **Просмотры:** 18,394

## Описание

The ultimate free master material for UE5! Features include Nanite displacement, world aligned texturing (triplanar projection), layer mesh painting, puddles and much more! Create the majority of materials easily without touching the material graph.

Link to The Unreal Masterclass:
https://www.unrealsenseinewsletter.com

Get It Here:
https://www.unrealsensei.com/senseimastermaterial

Signup for the Unreal Sensei Newsletter:
https://www.unrealsensei.com/newsletter

Follow on Twitter: x.com/@unrealsensei

Chapters:
0:00 - Intro
1:17 - Basic Features
18:01 - Triplanar Projection
25:43 - Nanite Displacement
36:24 - Mesh Painting Layers
54:52 - Practical Examples
59:07 - Unreal Masterclass
1:00:05 - Puddles!

## Содержание

### [0:00](https://www.youtube.com/watch?v=WUtl1K9Pn7k) Intro

Hi everyone, if you have ever struggled to create realistic and customizable materials in Unreal Engine 5, then this tutorial was made for you. In this video, we will cover how to use the Sensei Master Material, which I built, that has all the features you need to create the majority of your world's materials, including Nanite displacement for real geometric depth on your surfaces, mesh painting so you can paint up to three different material layers, giving you full control over exactly where your materials are placed, and world aligned triplanar texturing. So, you can just throw this material onto any object and it just works. No need to worry about UV maps or texture stretching. Normally, a material like this would take hours to build, but the heavy lifting has already been done for you. You do not need any prior knowledge of Unreal's material editor. All of these features are laid out in an easy-to-understand and intuitive interface. So, you can just jump in and start creating materials immediately. This is the ultimate master material for UE5, and you can download it right now for free. It's the first link in the description below. Now, for the rest of this tutorial, I will show you how to use each feature in depth, so that you know exactly how to make the most out of this material when you are creating your worlds and environments. So, let's get

### [1:17](https://www.youtube.com/watch?v=WUtl1K9Pn7k&t=77s) Basic Features

started. Once you are done downloading the material, make sure you unzip the file, otherwise you cannot open up the Unreal Engine project it comes with. So, go ahead, double click on this, and then double click on the U project. Do keep in mind that you need to use Unreal Engine 5. 7 or newer. Older versions of Unreal will not work with this material. By default, this should open up into the documentation map. In case this map isn't open for some reason, then you can find it under examples, maps, and the documentation map right here, which is a neat little room to remind you what all the different features are for this material. And we will cover what each of these features are and practical examples in just a moment. Please note that this tutorial does assume you know the basics of Unreal. In case you do not, then you can watch the UE5 beginner tutorial. There I cover the absolute basics of the engine. Go ahead and watch that and then come back to this video to know how to use advanced material features. This project is made up of two folders. We have the Sensei material folder, which contains the core assets that make up the Sensei material here. It is this folder that you are going to migrate into your own project. And then we have the example folder, which contains all the examples that make up this level. There are two main materials. If we go back into Sensei materials and materials, we have M underscore blend master and Nanite. Blend master Nanite is the same as blend master, except this one has Nanite tessellation and the first one doesn't. We also have virtual texture variations, which we will cover later. And it is more of an advanced feature. So, if we open up our material, here is the material graph. Now, obviously, we don't want to mess with this. This is all the logic that makes up our material and this isn't very user-friendly. Now, I do cover how to create a similar material from scratch in the graph within the Unreal master class, but for this tutorial, I'm showing you how to use the material instance, which will create an easy-to-understand user interface. So, just right click on M underscore blend master and create a material instance. Double click on this and then now this will be the core of what we're editing. We have all these different options and this is what it looks like by default. We have the essential options for any master material. You would find similar options to this within the fab master material that comes with any Quixel asset. As a reminder, Unreal Engine and most 3D programs use physically based rendering or PBR for short. The core idea behind PBR is that a material's appearance is defined by a small set of key properties, typically controlled by textures. The most important texture is color, which defines what color the material should be, roughness, which is how or shiny the material is, metallic, which defines what parts of the object are metallic and what are not, and a normal map, which artificially adds fake shadows to give the appearance that the material has more depth than it actually does. With just these four textures, you can recreate the majority of real-world materials, from rocks to traffic cones, and it's what we will use for this master material. To create PBR textures, the most popular programs are Substance Painter and Substance Designer. If you are interested in learning the process of creating custom textures, there is a Substance Painter tutorial on this channel, which will teach you how to create textures from scratch for Unreal. But creating custom textures can be time-consuming, and we don't need to create textures for everything. Luckily for you, we already have access to a large library of high-quality PBR textures through Fab, specifically Quixel Megascans, which are textures scanned directly from real-world environments. The majority of textures used in this tutorial will come from Megascans. Jumping back into the project, for example, let's use textures on this material that are from Megascans on Fab. Because we already have access to Fab, click on the plus button selecting Fab there. Let's go to Quixel by typing in Quixel, going to publishers, and selecting Quixel Megascans. Now, if we go to material and textures, here we have all the different materials, and while most of them are paid for, there are a bunch of free materials to follow along by going to price and selecting only show free products. Do not follow along exactly with me. This is just a very quick demonstration. So, here you have the military trenches, and if I like this material, I'll go ahead and select high quality 4K texture and click add to project. After it is done downloading, it will create a new folder called Fab, and in Fab there's Megascans surfaces, and then the name of the material we just downloaded. So, it is right here, and we have to go into a couple more folders. Then we get to textures and it is these textures that we will use on our material instance. Now, this also comes with a material that Fab automatically made. The Sensei material has significantly more features than this one. So, go ahead and we want to plug these textures into my material instance. So, coming back into the material instance we just made, we have the texture options to fill in. So, I will turn on albedo color and then drag that into right here. And then turn on roughness, but oh, it looks like we don't have a roughness map. That's because the way Quixel materials work is that the ambient occlusion, roughness, and metallic maps are all combined into one texture and it is the texture that's called ORM. So, if I double click this, we'll see that we have a very funky looking texture. Don't worry, if I uncheck green and blue, so we're only seeing the red channel of this texture, you notice that wait, this is an individual texture mask. And then unchecking red and then checking green, so we're only looking at the green channel, this is a roughness map that we want to use. And the blue channel is metallic. Now, in this case there is nothing metallic on a natural ground material, so this will be black, which is expected, but we want to grab from the green channel here. And this material instance automatically does that by coming into a material options and checking on use mask. Turn this on and now we have an ORM option, which we'll go ahead and drag the ORM texture onto it like this to then use that roughness. So, this material works perfectly with your Fab textures. And finally, normal map to get that fake bump right there. Okay, nice. Now, going back it into our world, let's jump to where the material instance was created, which was right here, and then drag the material instance onto it like this. Also, to get a better look at the basic options that we have, I will drag in a plane and then place it next to the sphere. Also, something you will see me do throughout this tutorial to make it easier to visually represent what's happening is I'll open up the material instance and then I'll undock this and then I will undock the details panel. So, place it right there. That's how I get access to my details panel on the same screen right in top of my viewports so everyone can see what is happening. And for the most part for this tutorial, I do not need the outliner or details panel. So, I'll press F and 10 to dock them to the side. If I ever do need them, I can always click to bring them up or I can press F10 again to undock them. So, that's how you, the viewer, have a lot of real estate to look at exactly what's happening. Now, we have our very basic options. For example, albedo tint, I'll turn this on and then this will allow me to tint the entire thing. So, I can make this blue, which is pretty crazy, or you just want a subtle change like let's make this more brown. And then we have albedo adjustments. Now, we can't just play with the color right there. Instead, you want to click on the arrow for the drop-down and then this gives us additional settings. And it is these settings that we want to change. So, saturation, bring this up will boost the saturation. If you ever use Photoshop or any other creative program, you're going to be familiar with these. Or if I bring it down, we decrease the saturation. And something like zero will make a black and white texture because then there's no saturation. And then brightness will increase the brightness and decrease it. Oftentimes, especially when grabbing random textures off the internet, you'll see that you do have to adjust the brightness to make it fit in with the rest of your world. And then contrast will of course increase that contrast or decrease it to make it less contrasty and more whitish. Now, with normal strength, this will increase the strength of the normal map. I will hold down L and left click to temporarily bring in a spotlight. To move this up, so we're actually getting just a little bit of fake shadows right here for the normal map. Increasing normal strength will increase the perceived depth of the texture, and then decreasing it will decrease that fake depth, and zero This is what the texture would look like with no normal map. See how flat it is? A normal of one, which is default, that gives us our fake shadows, which is pretty cool. And roughness, contrast, and strength. The strength slider, if we bring this down, then we're going to make it less and less rough. So, we'll see that it is getting more and more shiny. And then increasing the contrast here. And if we increase them both, this will basically make the whites of my roughness texture more whites, and then the blacks more black, instead of how uniform this current texture is. Now, for something like this, lowering the roughness doesn't make sense because this is ground, unless maybe there was rain. But, we do have a puddle feature that we'll cover at the very end of this tutorial, so we don't have to worry about wetness just yet. And then the size option, obviously, increase the tile size or decrease the tile size to make it bigger. There are additional options coming up here. By default, most materials don't have a metallic texture, so I have that disabled by default. If you do want to use metallic, then turn this on, and then turn on metallic right there, and then it will use the metallic mask. Remember, at least for this texture, there is no metallic mask, so nothing will change. There is the extra size and offset options. This is how if you want to edit just one axis of the texture. So, turn this on will give us an additional option for tiling down there, and then now I can scale this in a certain direction, or even move it in the U and V axis like this for more control. And of course, we also have rotation. And by turning this on, it gives us the rotation option, and then we can rotate the entire texture. So, you have complete control over the mapping of your texture. The use AO option, which stands for ambient occlusion, can be a little bit confusing, so it's best to show with an example. Ambient occlusion is a tendency for light to not reach crevices or harder reach locations. Jumping into our mask, we'll see it is ORM. The O stands for ambient occlusion. So, if we go to red channel, we'll see that we have an ambient occlusion mask. And this basically just adds darkening to the crevices of my texture. So, here where the pebbles are blocking light, it will be darker. And what this AO option will do is that it will overlay this mask texture onto my material, specifically when the material is in shadow. So, by turning on use AO, we will see that there wasn't that big of a change, but now if I move this block, we will see that it does darken it up when the material is in shadow. This will be easier to see if I temporarily decrease the normal strength to zero. And now moving this block around in the shadow areas, we will see that ambient occlusion overlaid onto our material. And if I go into the detail lighting mode, it is more noticeable the effect. So, this is before, and then this is after. So, it does help to add in more depth. Although this is an advanced feature, so it's optional whether or not you want to use it. And then we have specular. I'll press Alt and 4 to go back into my normal view mode. And at this angle, let me bring back my normal strength to one, which is its default, we'll see that even though we do have a high roughness value, at specifically an angle, there is still a little bit of shine to my ground. So, by turning on specular, that will get rid of that shine. So, here is before without specular, and then here is after. So, specular is specifically good for natural assets. For example, with rock. Rock, specifically in maybe a desert, is so rough, you wouldn't really see any specular on it. So, you would want to turn on specular. This option is taking detail from the color texture, and then applying it to the specular. And you can control the strength. Down here, we have a new option for specular. Bringing this up will bring back the specular value. So, here it is with no specular, then bring it up, we'll see that we start to get back a little bit of the shine. Now, for the majority of your materials, you should not have specular turned on, so you could generally turn this off. If you do have a rock or maybe a cliff, then you might want to turn it on and see if it does give a better look to it. Let's end this section with a practical example. So, to begin, let's move our master material into a project by just right-clicking on Sensei Materials, selecting migrate, and clicking okay, and then navigate to the content folder of the project you're migrating the material into. For this example, I migrated the materials into this old western saloon. So, this actually a free pack you can download on Fab. It's called Saloon Interior by Quixel Megascans. Again, you don't have to follow along. This is just an example I'm showing. You can migrate this into your own project and start using it right now. I've also gone ahead and then edited this environment just a little bit. That's how there is no material on the floor here, so we can show how to create that material. Now, we have Sensei Materials, and then let's create a floor material by right-clicking and creating material instance. I will call this MI_ Saloon Floor, and then drag it on like this. And also, I'll drag it here, too. Now, obviously, this needs textures. So, I've already gone ahead on Fab and then downloaded some Megascan assets, surfaces. I've downloaded the worn wooden floor textures. Now, I could go to each of these folders, go into a bunch of them, select textures to see them, or what I could do as a shortcut, if I know I want all the textures that are contained within this folder, then I could go to filters and select texture right there. So, now this will show me all my textures contained within surfaces. Now, I'll just go ahead and select the worn wooden floor, and here are the textures I want. Instead of having to open up five different folders just to grab a couple of textures. Now, let's open up the material instance we just made. And then for color, roughness, and normal, we'll go in here and then we'll drag color to color. Remember, this is now a mask, so go to use mask to turn this on. And then for mask ORM, we'll drag this in to get a roughness value. And then normal, drag that in right there. So, right off the bat, we can see that it's already working. This does look nice, but we need to edit the scale because these wood floor panels are just way too big. It looks kind of off. So, I'll go ahead and let's undock this details panel to see exactly what we're doing live. And for the size, I will increase this to make it smaller. Something around 1. 8 looks pretty good. And then I also want the wood panels to face the other direction. So, enable rotation. And then I'll go ahead and rotate this just 90° like that. Now, for color adjustments, let's go to a bit of tints and let's make this just a little bit blue. For adjustments, increase that saturation. Maybe decrease the brightness cuz right now this is too bright. It kind of stands out compared to the rest of the environment, so to blend it in more, I'll decrease this a little bit. And I could play with the contrast, which will make the areas that are built into the texture that look worn out like right here stand out a little bit more. Also, maybe I want to add just a little bit more shine to the floor. So, for roughness contrast and strength, I'll bring down the strength to make it less rough. Maybe increase the contrast to make the differences in the roughness texture stand out more like right here to help the wood grain be more noticeable. Okay, and just like that, our saloon has a nice floor material. And for another demonstration, here I have a cute little robot and look, he even dances. So, all the materials on this robot except for the face are using the Sensei master material. So, if we look at the material instance for his body, we will see that it is an instance of the Sensei master material, and the only change was that I added textures that I made in Substance Painter. So, these textures were created in Substance Painter and then imported into Unreal. If you want to learn this exact workflow and how to use Substance Painter, then you can check out the free Substance Painter tutorial on the channel. So, check that out in case you do want to know how to actually make the textures. Do keep in mind that if you are importing textures, that for all of your mask textures, including your black and white mask, and also your packed mask, that the SRGB is turned off. So, if you import a mask, turn off SRGB in the texture settings, and turn them off for the black and white textures.

### [18:01](https://www.youtube.com/watch?v=WUtl1K9Pn7k&t=1081s) Triplanar Projection

Now, those are all the basic features you should find in any master material. Now, it's time to cover one of the more unique features, and that is triplanar projection, often times called world aligned textures in the Unreal community. Now, instead of relying on UV maps, triplanar projection will project the texture based off the world's axes. So, you can just throw your material onto any object, even if it doesn't have any UVs, and it will work. The textures will line up with each other, and they will keep their tiling. Now, I know that is kind of hard to explain, so best to be shown visually. Here are two objects that are using the same material instance of the Sensei material. Here are the settings, and are using textures from the stones wall material on Quixel Megascans. And from this angle, it looks pretty good, but then if I go above, specifically for the sphere, we'll see that there is texture stretching. Also, behind the sphere, then you'll notice the UV seam at the back, and that the textures aren't tiling. The illusion that this material is on the sphere completely breaks down, and this is just a problem with UV maps, because every object in Unreal, they need a way to know how to map the textures onto the 3D object, and that is through UV maps. But off the time UV maps aren't perfect, especially for something like a sphere, if you're trying to UV a texture onto it, there will always be some sort of texture stretching or misaligned textures. If you just want a way for your texture to uniformly be applied to a material regardless of the UVs, then this is where triplanar projection comes in really handy. And off the times in the Unreal community, we also call this world aligned textures, which do not require a UV. In fact, we will now ignore the UVs. So, to enable triplanar projection, it's a default option under the material options triplanar. You just want to turn this on, and then boom, instantly we won't notice any more texture stretching on the sphere, and a noticeable seam isn't there anymore. So, this will just uniformly apply the texture evenly across any static mesh. So, I'll scroll down here. We still have the size option, and I can increase this to tile it more, or decrease it to then tile it less. We also get a new option called triplanar sharpness. And to demonstrate this, let's bring this out so we can better see what is happening. Now, the way triplanar works is that it will project the texture in three different axes. There'll be a texture in the Z axis being projected from the top down, another texture side for the X axis, and then finally a texture being projected from the front for the Y axis. And we can better see this within if we're looking at this corner right here. So, at the top is the Z axis projection, so that's one texture, and the X axis is a separate texture projection, and then on the Y axis is a third texture projection. So, this is an alternative to UV maps. Even if you have a mesh with no UV maps, you can use triplanar projection. And then this is where triplanar sharpness comes in really handy, because this controls the sharpness of the transition between the three textures. So, if I decrease this, we will get a smoother and smoother transition between the three textures. The default is at 60. The way triplanar projection works right out of the box is that it's using world space. So, that means if I just move this around, we will see that the texture isn't moving. It's remaining the same within the world space. Instead, the mesh is essentially revealing different parts of the texture projection. So, that's how we get a very interesting look like right here. Or if we bring it this out, we can see that as I move this, the textures aren't moving or even when I scale it. The textures aren't stretching. This is pretty handy, especially when we want the texture tiling to be the same between meshes. So, this essentially is almost like a helping with a transition between two meshes. So, they're using the same projection. As such, it looks like the materials are blending with each other. World space works good for static objects, but what if you're in a game or a cinematic and your object is moving, then if you're using triplanar this can look really freaky. So, I also included the ability to project it on the object's local axis. So, if I select triplanar local space, now if I move this around, we will see that it is still using triplanar projection, but it's translation, rotation, and even scaling will remain stagnant. So, this is good, especially if you have a moving object. For example, here we have a ball with triplanar mapping, and then by default, when the ball is moving, that looks very weird. We can't even tell that the ball is then rotating. So, for instances like this, make sure you have triplanar local space turned on. So, it's projected in its local space. Now, during gameplay, we can actually tell that the ball is rotating while still using triplanar mapping. This is another saloon from the same Quixel pack, and I removed all the wall, roof, and floor materials because what if I now want to replace them all with a new material? Specifically, I already have a Sensei material instance that contains a log material. And these are using Quixel textures from the material old log wall. Now, let's just apply this to my environment. I can drag it onto my ground, and then we'll notice that the ground is made up of several different static meshes, each with different UVs and different placements. So, then right off the bat, we'll notice that the seams are very noticeable, especially over here, and the texture sizings are completely different. So, to better emphasize this, I'll go ahead and place the same material on the rest of the walls and roof. Now, the issues are very noticeable, especially on a wall right here where the scaling is completely off. So, there's no consistency to the scale or the tiling of my log material, which throws this entire environment off. But, no worries. This is one simple fix by just selecting triplanar, and boom, instantly all of the walls, the floors, the ceiling will have the same tiling at the same scale for our material. And when there's two different static meshes, for example, with this static mesh and with that static mesh, they will blend seamlessly into each other because they're using the same projection, which is absolutely amazing. Now, you want to make sure you don't have triplanar local turned on because we need to project this for this environment in world space. Now, we also have additional options for triplanar. Now, if you enable extra size and offset options, we get new settings down here for size triplanar A and offset triplanar A in the different axes. So, for example, for size, if I only want to scale it on the X projection, I can change it right here, Y, change it, and also Z, we can stretch that out to something like here. I'll go ahead and click on this arrow again to reset them all back to one. And also for offset, if I just want to move the individual texture projections, I can do that right here also. Now, if we turn on rotation, we'll get a new rotation setting called rotate individual axes. Turning this on will allow me to rotate the individual projections. So, we have a rotation axis. If I turn this on, we can do X, Y, and Z. For example, what if I want the logs down here to actually point in this direction and not point straight? Then, just for the Z axis, change this to 90 like that. So, now they are rotating the other way. So, this material gives you complete control over your triplanar and world-aligned textures. Don't feel like you're creatively limited if you use them. You can always change each texture projection individually. The next major

### [25:43](https://www.youtube.com/watch?v=WUtl1K9Pn7k&t=1543s) Nanite Displacement

feature, and probably the most important one, is Nanite displacement, also called tessellation. This takes a flat surface and adds a geometric detail, displacing it based off of a height map. So, instead of faking our depth, like how we normally do with a normal map, we are literally physically displacing it. So, we are adding real 3D geometry back into the mesh, which can add a whole bunch of detail. So, let's go ahead and enable tessellation. For this example, we can see how powerful Nanite tessellation is. Just by adding it to a mesh like this, we immediately get rugged outlines that follow the shape of the material. Or, if we go behind it, with tessellation, we get real shadows. The majority of the shadows are no longer faked by normal maps. So, if I move this light around, we'll see that those shadows are updating in real time, which is just so cool. Now, the difference is, if I disable tessellation temporarily, now this is without tessellation. Notice how we no longer get real shadows, and the entire material is flat, specifically the outline. And enabling it. Boom, instantly we get back that detail. It's one of the most important factors into creating realistic materials. We can see what is happening on a technical level by going into our Nanite view mode by selecting Let's go out of Nanites and selecting triangles. So, all these triangles are being generated by Nanites according to the height map. So, even at this angle, we can see that it's adding more triangles as I get closer to it and less further away. If I disable tessellation, then this is what the original mesh is. So, tessellation is adding a bunch of triangles to my original mesh so that we have enough geometry to conform to the height map. Now, let's cover how to use tessellation with the master materials. And so far, every time we've used the Sensei master material, we've been creating a material instance from M_BlendMaster. Now, this master material doesn't include tessellation functionality. The master material that does is M_Blend_Nanites. So, if we create a material instance from here and then open it up, we will see that all the settings are exactly the same except now we have additional settings for heights and displacement. So, we could create a material with displacement from scratch here. Or, if you already have a material, for example, this material right here that is using the original M_BlendMaster and you want to convert this into a Nanite one, then what you can do is go into its material instance and then scrolling down below the parameter groups, we have the general options, and then we have an option to change its parents. So, remember we created an instance from M_BlendMaster. Now, instead of using BlendMaster as the master material, we could switch this to use M_BlendMaster_Nanites. So, go ahead and select that, which will now convert the material and give us the tessellation options. And all the settings that we changed will remain the same. So, now for heights, let's add in a displacement for this material and we have to go to where it is and we have this height texture. All we have to do is just drag it on, let go, and then go back to our map and right now that there is height, but it is not that noticeable but we can see that it's now being displaced. Now, if your mesh isn't being displaced, that's because it's not Nanite. So in order to use Nanite displacement, of course the object that is using the material has to be Nanite itself. Now, if this wasn't Nanite, then press control and B to find where it is, right click, go to Nanite, and enable Nanite right there. Or you can see if an object is Nanite by going to lit, Nanite visualization, and selecting mask. So, if this object is red, then it's not Nanite. If it is green, then it is Nanite. Now press alt and four to go back into our normal view mode. Now it's time to cover the different options for our tessellation and I've added a plane with the same material to help demonstrate this. Now first off, in order to get Nanite tessellation, you need a height texture because of course without a height texture, then the material doesn't know what areas to raise and what areas to lower. Now, it is important to know that for Quixel Megascans, in order to get a height texture, you have to select high quality when you're downloading. Medium and low quality will not come with a height texture. Also, some Quixel Megascans don't even have a height texture. You can tell if a height texture is included within your Quixel Megascans because within the description it will say displacement right here under maps. So go ahead and see if your Quixel material has displacement and then also select high quality in order to get that height displacement map. The first option we have is displacement amount, which will lower our displacement from one, which is full displacement, all the way to zero, which is no displacement. What you might notice is that the shadows look kind of wonky right now and we can better see this by going into alt and five for detail lighting and you'll notice that the shadows haven't updated and they're kind of glitching out. This is because whenever we make a change to the material instance that affects our displacement, Unreal by default doesn't know to update the shadows of the mesh. So, to manually force Unreal to update the shadows, go ahead and give this a little jiggle. And now this is working. But if we do increase displacement again, then we have to move it to update the shadows and doing that each time is a huge hassle. So, to save myself for this tutorial from doing that each time, what you can do is that you can select the static mesh and then in details type in shadow and set shadow cache invalidation behavior to always. So, now whenever I change it in the material then the shadows will automatically update for me. Now, I'm going to keep this on for all my static meshes in this tutorial, but if you are going to ship a game, then you need to make sure that you switch this back to auto because otherwise if we set it to always then a lot of these static meshes will be updating their shadows during gameplay when they don't need to, which can be bad for performance. So, this is displacement amount one and then going to zero is no displacement, which is a nice little slider. Now, if you do want to increase the strength, this is where displacement strength and displacement contrast come in handy. These are the most important ones to exaggerating the strength and making it more apparent that there's actually a displacement map on this mesh. So, if I increase the strength we can see that it raises and then also now increasing the contrast and if we open up my texture to see what's happening, by increasing the contracts it'll make the blacks blacker and the whites whiter. So, there's more range in the displacement. And you want to pair that with the strength. So, increasing strength and contrast and now we get an even more apparent displacement map. But when you are changing these values, you'll see that eventually we hit a wall. And it's better to see it right here that as I keep on increasing it, then eventually this all just gets flattened out and we can't increase it anymore. It's almost like if this is a landscape, this would be the top of the terrace. And that's because we have to increase the tessellation bounds. So, I'll go ahead and set these back to one because scrolling down under general again, we have settings that every single material instance has. So, this material already has tessellation enabled. If you want to disable it, then you could check it right there to disable it. But under this, we have displacement scaling. So, this magnitude right now is the distance from the lowest possible point of the tessellation to the highest. And right now it's set to four. That means the range of the displacement from the lowest point to the highest point is 4 cm. If I want to double this, then I can make this 8 cm. And now we see we get more of a range to play with. So, if you ever want to increase your tessellation, then the first thing you may want to do is come down to magnitude and just increase that value. So, coming back up, now when I play with the strength and the contrast, there is a lot more room for us to do stuff before we hit the limits. So, now we have a very, very exaggerated displacement on my flagstone. Something we obviously don't want. So, I'll go ahead and reset that. And then we have displacement offset, which will move the entire displacement up or down. And then you can see that as I do move it, we do hit the limit. So, this is the bottom limit and then this is the max extent of its height up here when we reach it right there. So again, to change the max bounds, you would have to go into the material settings of magnitude right there. Now, you don't want to do like a crazy magnitude like something like 20 and then manually just lower the displacement amount to something like here because if you're not going to use the full magnitude, Unreal is doing extra calculations because now the bounds for this entire static mesh is longer than it should be. So, that can hurt performance. So, you want to keep this basically as low as possible. Normally, a magnitude of four or eight is fine for most materials. Do keep in mind another thing that can affect the magnitude of your displacement is scale. So, if I scale up this mesh, then the magnitude will also scale up with it to compensate for its size. Or, if I scale an individual axis, for example, just the Z axis for this plane, then we will see that we are increasing that magnitude manually just by scaling it instead of changing it right here. So, do keep that in mind that if your displacement does look different when it comes to different objects, you may want to check how it is scaled within the details panel. Here is another example. I'm back in my old-time Western saloon, and let's say I want to change the wall. Well, I've already downloaded some textures from Quixel, specifically an ornate wall, and I've set it up on the Sensei Master Material. So, I can just drag it onto my wall like right here. And this does look good, but if the player is up to here, it does feel kind of flat. There isn't that geometric depth that you would expect from a wall like this. So, now let's go ahead and enable it by opening up the details panel. And this is using the original blend master, so go ahead and change the parent to Nanite, and now it's asking for height. Luckily for me, when I downloaded this texture, we selected high quality, which is 4K, which also means it downloaded the height texture that I can just drag onto height and let go. And boom, instantly, we can see that there is real depth to this wall. And let's go ahead and exaggerate this by bringing up the displacement contrast, and also increasing the strength. And if this wall is now interfering with pre-existing meshes in the environments, then I may have to go into the displacement offset, and increase it or decrease it to change the positioning of the wall as a whole.

### [36:24](https://www.youtube.com/watch?v=WUtl1K9Pn7k&t=2184s) Mesh Painting Layers

Time to cover my favorite feature, and that's the ability to paint different materials. And in Unreal, we call this mesh painting. Very rarely in real life, we see an object that just one continuous material. If you look at a slab of pavement, then you might see dirt on top of it. Or look at an old wall, and you'll see the paint slowly starting to chip away, revealing the wood underneath. For a truly believable environment, we need the ability to control where our materials are and the transitions between each other. So, we can do that with mesh painting. Before we jump into how to enable mesh painting on our master material, let's quickly cover what it is. And I'm right now over here within this section of the example room. Now, you will see on this object, there are actually two materials. We have the flagstone texture we were just playing with in the last section, and we also have this dirt material. And they're blending together. You can see that where the dirt is blending into the flagstone material, it first blends into the crevices. So, we can see the dirt going into the crevices. And then when we get to a more dirt location, then the dirt fully engulfs and goes on top of the flagstone rock material. And this creates for a really realistic blend. Because you would expect a dirt material to first go into the crevices, so the low points of the high texture. And then when more dirt builds up, it's going up the crevices until eventually it completely engulfs that area of the object. And what is amazing is that by going into mesh paint, then texture color paint, we have this ability, which I will show how to use in just a moment. But now I can just go ahead and start painting in like this. Or even do like a subtle brush, and start subtly painting it in. So, let's cover how to set this up. To begin, I will use a brand new mesh. So, I'll press control and B. Let's find where this is. So, this is SM_Plane. And if we want tessellation, then the static mesh has to be Nanite. Although, you can still use this mesh painting feature on the non-Anite material, it's just you won't have that nice tessellation. Now, in order to use mesh painting, you need to make sure that virtual textures are enabled in your project. To do so, come up to edit, project settings, click on all settings, so we're searching everything, and type in virtual textures. So, make sure enable virtual texture support is turned on, and also enable virtual texture mesh painting is turned on. As of Unreal Engine 5. 7, both of these should be turned on by default. If they're not, make sure they're turned on. So, since they are, now I'm going to go back into sensing materials, and I can either use M_BlendMaster_Anite if I want tessellation, or I could still use M_BlendMaster with this mesh painting feature. In my case, I do want tessellation, so I'll create a material instance of this, and double-click to go inside of it. So, the way mesh painting works is that there are now three different materials that we can edit. Right now, we only have one material enabled, and that is A material. That's why throughout this entire tutorial, every time we're making a change to these settings, we have A right next to it, because that's telling us that we're adjusting the A material. Now, if I want a second material to paint down, then under extra layer options, go ahead and enable second material layer. And then now we get even more options down here for a B material. So, all of these options are exactly the same as the A material. It's just now we have a B material that we can adjust and paint on top of A. On a similar note, now if I want a third material, then I can enable third material layer there. And then now we have material C, which again, all of them use exactly the same properties, so we already know how to use them. Now, in my case, let's just focus on a second material layer, so I'll uncheck third material, and then just focus on material A and material B. So, the way it works is that A material is our default base material. So, this will be the bottom of our material stack and then the B material will be the material that's on top of it. Now, let's actually turn these material layers into actual materials. So, for the base material, I want this to be a dirt texture. Now, do keep in mind that you can use any dirt texture from Quixel Megascans and your dirt texture is probably going to be different in your project than my one. That's because I have to use a lower quality dirt texture so that the size is small enough for everyone to download. Now, let's just drag this onto there, height there. Now, this is a Quixel asset. So, we will use a mask. And then for the B material, this is the flagstone. So, the flagstone material will be on top of our dirt material. Back inside our map, let's apply that material and we will cover the different settings that are inside of the material instance that will handle blending in just a moment. But, first we actually need to know how to use the mesh paint mode. So, the shortcut for this is also shift and four. And if you don't already have your object selected with a select tool, we go ahead and select it right there. And now we have the add button. This add button will create the texture that we're actually painting on. So, clicking on this button, boom, we just made a texture and we can see what this texture is by going to details. And then if you scroll all the way down, we'll have this category called mesh painting. And it is this texture right here that we just created. I can actually hold on alt and then select this pencil icon and this will bring up that texture. I'll uncheck alpha so we can actually see what this texture is and I will undock it. That's how this is up here. So, you'll see what is happening when we paint. Now, I will press on the paint tool to get my brush and by default red, green, and blue will all be turned on. Now, if I paint this down with a paintbrush, you'll see that we are editing this texture. So, this is how we're able to edit textures inside of Unreal and it is this texture that we're feeding into the Sensei master material that will tell the material where to place the different material layers. Now, by default, this is very low texture resolution. So, if you want to raise the texture resolution back in details, under advanced mesh painting, we have overridden mesh paint texture resolution. Turn this on and let's change this to 512. And it won't update just yet. That's because we have to click on fix. So, now we have a lot more resolution to work with and these are just smoother strokes here. Of course, if you want to paint a different color, you could change this color to something like blue. Although, as you'll see soon, that's generally not the workflow that we do. We can increase the strength to then paint down even more. So, now we're painting down the complete strength of this color. Or we can use the bracket keys. So, the right bracket key to increase the size of this, left bracket key to decrease the size of this. Now, if you hold down shift, you will then start to paint the erase color, which is right now black. So, hold down shift and then paint in, you'll see that I painted black there. Or I can switch my colors by selecting the switch icon or the shortcut is X. So, now just painting normally, not holding down shift, I'm painting down my secondary color, which is black. And then pressing X again, now I am painting my blue color. So, this is very similar to the landscaping tools or just any creative program that you use that has a brush. You can also see the texture directly on the mesh without having to open up the actual texture by coming over here to color view mode, which is a visualization for us, and selecting RGB channel. So, now we can see the mesh right here and know exactly what's happening when I'm painting on it. So, this is the texture and we have the fill tool up here. And the fill tool will fill, by clicking on this, the entire thing with whatever color is the paint color. And do keep in mind, the strength does matter. So, if I bring this down to a small strength, and then let's make this greenish, then if I click on fill, then it's only partly filling that in. So, if I bring this all the way up to one, then that will fill in the complete green. Now, I don't want this, so I'll press X to switch my primary color back to black, and then fill it in to just remove all those colors. I'll press X again to switch back to green. And it generally the workflow that we use is that we keep this pink color. We don't ever edit it right here. Instead, we make this always white. So, you want to keep this at 100% white, and then it is the channels that we edit. Now, the way I set up this material is that the red channel will paint down the secondary material. So, material B will be painted with red. The third material, which is material C, will be painted with green, and then blue will be puddles. So, if I want to paint down the second material, and let me turn this off right now for color view mode, so I'm actually looking at the material, then what I will do is uncheck green and uncheck blue. So, now I'm only painting down red. So, if I hold down left mouse button and then start to paint, we'll see that Oh, will you look at this? We are now bringing in the secondary material, which is super cool. So, because we don't have a third material or puddles, I will ignore green and blue for now and only have the red channel turned on. And actually, if we go back into RGB channels, we'll see that we're literally just painting red. By deselecting red and only having green activated, I paint in green. And by deselecting green, selecting blue, I'm only painting blue. Since we are only painting one material layer right now, we only need the red channel activated. Before we move on, let me do a quick note about virtual textures. When we're painting, we're actually painting a virtual texture right here. And virtual textures can also be the normal textures that are on top of your materials. And you will often see this in Epic Games sample project that all of these textures are virtual textures. If you scroll in to the thumbnail, you can tell if they're virtual texture because they will be a VT icon at the bottom right-hand corner. Now in my case, these are not virtual textures, but if they are, then you're unable to use it on the default sensei material. If you're using virtual textures, then instead of using M_BlendMaster or BlendMaster Nanite, use M_BlendMaster Nanite VT or M_BlendMaster VT. So, these are virtual texture versions of the same materials. Everything is the same. It's just the textures that you're using are different because they're virtual. So, that's just a quick note in case you are going down that optimization road. Now, obviously, right now the blend between these two materials are not very realistic. It does look like I just painted down. So, for the rest of the chapter, I will cover how to get a realistic blend between materials using all the nice settings that come with the sensei master material. So, let me undock the details and hop back into mesh paint mode. Now, to begin, we need to work on the falloff. If we go into our texture, we'll see that there is no falloff whatsoever. So, I'd like to use a very small strength, something like 0. 2, and then slowly start to paint this in. And then even hold down shift and then start to chip away again. So, just chip away slightly to then get smoother transition between everything. Already, that does work a little bit. Actually, I'll press X. Let's go strength all the way up to one and click fill. To erase all that, I'll press X again to bring back my whites and red. And now with a big brush, I'll just paint randomly everywhere. So, we have a texture with a lot of falloff to begin so that we can work with it. To start, let's work on tiling. The size where my dirt needs to be a lot bigger. So, go ahead and let's increase this. And also, same thing with the flagstones. So, for here, size, also increase that amount. Okay, nice. Now, when it comes to displacements of the ground, this is way too displaced. You wouldn't expect dirt to look like that. This is just the nature of using the high texture. So, going into displacement amount, I will then just bring that down. Now, so there is just a little bit of displacement going on for the dirt. Now, what is happening behind the scenes is that we are taking the displacement map from the A material and then blending it with the B material. So, in those areas where we're transitioning between one material and the other, the material with higher displacement will win out and get priority compared to the material with lower displacement. So, if you do edit your displacement, for example, coming over here and let's increase the strength, then that will change the transition of the materials. If you want separate controls that do not affect the displacements, then what you can do is select use separate height blend. And then now, this will give you these height controls, but these are only controlling the transition, not the displacements. So, that's how you can separate it. You can also use a separate height texture, so the transition has nothing to do with your material's displacement. Now, in my case, I will just transition using the displacement. Anything for most cases, you do not need this on, except for very specific materials. Now, time to cover all the settings that control the transition between materials. And you can find them in between the A and B material, specifically A and B material blend. So, we have blend contrast, blend offset, and blend invert. So, with blend contrast, this will of course control the falloff. And right now, with zero, we have a very smooth falloff, and it's not really noticeable that there is a height blend going on. By increasing the A and B blend contrast, then we can start to see more of that height blend. Where now it's apparent that the dirt is first filling in the crevices, and actually let's go back into mesh paint. And then with a lighter brush of maybe strength 0. 1, I'll go ahead and paint this down, and now we can start to see how as I paint, only the top of the flagstone material are popping out first, like right here. And then when I keep painting, then all that dirt goes away. So now I'll shift to remove it. We get dirt in the crevices, paint, and then they go away. When I use a default of zero, it is less apparent that is happening. So you may want to increase your blend contrast, not to something crazy like 10, because then the difference is that the displacement will be really noticeable. So I like to keep it generally around somewhere like one, then increase it or decrease it depending on my needs. So I'll keep this at 1. 3. The next option is blend offset, which will give priority over one material compared to the other. So this is how we control the overall blend. So if I increase this to one, we get more and more of my flagstone until at one, we have complete material B. Going then going down, we then have complete dirt. So this is a good way to just control that transition initially. I'll keep that at zero. Also, this is a cool way to then blend your material without using mesh paint. So if I come over here, and then temporarily remove my mesh paint texture, I'll press control Z and bring this back, but now we don't have any texture, but I can still use the blend offset to then increase this to then uniformly blend the two materials. Let's also increase the contrast. So now, this is what the flagstone looks like. Maybe I do want some dirt everywhere in the crevices. So then decrease this to then bring up my dirt. So that's a cool way to very quickly blend materials without painting them. Now press control and Z cuz that was just an example to get back my mesh paint texture. And then we have invert. So, invert will do the opposite. Instead of the dirt now filling in the crevices first, if I bring this up to one, now the dirt is filling up the top of my flag material first. So, material A is now on top of material B. And generally, you don't want to use a value in between. It's either zero, which is the normal behavior, or one to put that material on top. And now that's it. That is all the settings to blend materials. As a reminder, if you are using the Nanite master material, then we are blending by the displacements. So, for my dirt material, under displacement offsets, you can see that as I increase the displacement offsets, then we get more and more dirt that's piling up. And then eventually, it completely covers the flagstone material. And then removing away, we start to remove more dirt, revealing the flagstone material. If you don't like how that's set up, then you can use separate height blend right there. And now, when I increase displacement offsets, we'll see that is increasing, but then it is not covering up material B. So, generally, if I'm using Nanite displacement, I do like to blend them using the displacements because then I don't have to worry about if the displacements between the two materials are lined up. That's automatically handled for me with the blend to prevent that weird mismatch. Now, to blend a third material is exactly the same as blending the second. Just enable third material under extra layer option, the very first category, turn this on. So, now we have a C material, and I've already filled it in to use a grass texture. So, to paint this in, let's go to mesh paint. Paint, and then make sure you uncheck red and uncheck green to paint in the third material. And with this paintbrush, let me go ahead and let's select this so we're actually able to paint on it. And I'll bring this down. And let's start to slowly paint in this green material. I think I'm going to have to increase the strength. Okay, and now we're painting in this green. Now, obviously this placement is way too funky. So, for the displacement amount, I will decrease this. And also, you may want to adjust the offset to then make this level with the other materials, in case it's not. Now, in my case, the grass is level with the dirt material. Just like with the AB blend options, with the C material and for the B material, we have the blend options right here. We have the exact same options as before. Except do keep in mind that we're not only blending the B material and the C material, this B material is the combination of the blend that we had between the A and B material. So, it's taking what was created right here and now blending it with the new material right there. And finally, to

### [54:52](https://www.youtube.com/watch?v=WUtl1K9Pn7k&t=3292s) Practical Examples

end this chapter, let's go over two practical examples of how to use this material. And right now, I'm inside of a scorching hot desert. You definitely would not want to be stuck here. But, will you look at this? Over here, we have an oasis and then also a little outpost that we can go to survive. Now, this outpost, the material right here on the ground, if I then grab this and bring it up, we will see that this is just a static mesh and it is using the Unreal Sensei master material and blending between three different materials. We have sand with waves, a darker sand with no waves, and some stone tiling. And it's placed right here because you would expect there to be some kind of brick road between these two buildings. If we hide this, and this is what it looks like if it's just on the landscape, obviously this doesn't make sense because if people are traveling back and forth, or if they're traveling through it, they would want something to step on, not the really hot desert sand. So, you would expect the people that live here to place down tiles, but there wouldn't just be tiles here. Over time, because of sandstorms, nature, or just the wind, a lot of sand would be blown up into this road area. And then it would slowly start to cover all of these tiles, except in the crevices, because it is harder to get sand from wind inside crevices. So, on the side, next to the buildings where people walk a lot, you would expect that you could still see the tile floor. But then in the middle, where it's easier for the sand to get to, and maybe people don't really walk that much on this path, then the sand will build up over time. So, this was a practical example of how I use this. Also, in case you do want a similar master material for landscapes, then you can check out the Unreal Engine 5 landscape master material, also on my channel. You can download that and use it. But for very small detail, especially for tiles like this, specifically for this area, it might be better to just handle the displacement and details with a large mesh that you paint over. And because the way this material is set up, this does give a really cool effect. If we go into our offsets, for BC blend offsets, then as I raise this, we get less and less sand. So, this is what it looks like with just the stone tiles, and then maybe there's some gameplay elements where there's a sandstorm, and then the sand slowly starts to creep up and build up more and more until this entire area is filled with sand. So, that is a really neat effect. I'll leave it at zero. Not to mention that by doing it this way, it really helps to blend these buildings and this environment back into the larger landscape. Because otherwise, we would just have these stone tiles flat like right there, and then that is a jarring transition compared to letting the sand creep up a little bit. Here is another example. I'm in a cyberpunk East Asia type environment, and I love to use this material specifically on bricks like this wall right here. Already, just without any blending, just using the nanite tessellation, it really helps blend this wall in with the environment because we have two lights right now. We have a blue light and an orange light over there, which are complimentary colors. And because of this nanite tessellation, we get real shadows that look insanely cool. So, I love nanite tessellation for one of those reasons. And the way I have this material currently set up is that for the A material, we have a brick, and then B material is rough concrete. So, all I have to do with just a contrast of one for the blend, I could go into mesh paint mode, select this, and with my brush, slowly start to chip away at the brick. So, you can almost imagine that maybe the bricks are falling out, or maybe this wall has been repaired a bunch of times in the past. So, this is also It's all really satisfying just watching the bricks slowly start to pop out like this with having this much control over a single object. And then, of course, with the offsets, we can see that slowly start to transition to no brick, and then the bricks start

### [59:07](https://www.youtube.com/watch?v=WUtl1K9Pn7k&t=3547s) Unreal Masterclass

to pop back up. Now, this tutorial only covers how to use the Sensei master material, not how to create it. If you want to learn how to create a similar master material from scratch and much more, then you could check out the Unreal Masterclass. The Masterclass is an expanding collection of exclusive tutorials and courses for Unreal Engine 5. You will learn how to create this blend master material from scratch and how to apply these same concepts when creating landscapes. This is the most complete learning resource for Unreal with courses covering C++ coding and blueprint programming in the context of creating a complete game, animation and how to make a short film from scratch with MetaHumans and sequencers, realistic architectural visualization, advanced world building and much more. There's over 90 hours of lessons and it is constantly updated with the most relevant information for new Unreal Engine versions. If you want to learn more, there is a link in the description. And finally

### [1:00:05](https://www.youtube.com/watch?v=WUtl1K9Pn7k&t=3605s) Puddles!

let's cover the last feature which is more of a little bonus feature and that is how to paint puddles because we all love puddles. Puddles are pretty self-explanatory. You can activate them on any Sensei material. Under extra layer options, we have puddle layers. Just turn that on. So now within mesh paint mode, other channels, make sure only blue is selected. So blue is for puddles. And then with a brush, we can start to paint in and then you start to see these puddles come in. And then if I try to angle it, that's where we get the sky. It's more apparent that we are now painting in puddles. So this is pretty cool and I know a lot of people want to know how you paint in puddles. Now there are some settings with puddles. The most important settings are making sure for a realistic blend under puddle blend and its placements, that use height for blend is turned on. So with this turned on, now we can control where the puddle starts in relationship to the displacement or the height map of our material. So if we decrease this, we don't have any puddle, but then if I start to increase it, my puddles are first showing up in the crevices. So having a low value is how you get that realistic blend of water first accumulating in the lowest points of the material. And then increasing this, you can witness that puddle start to creep up and up until it engulfs more of the material. And then by default, what I'm doing to help the blend is that I'm also flattening the displacement. So areas where there's puddles will actually have flat displacement. We're no longer going to get any geometric depth because it's kind of hard to tell that there's geometric depth when it's inside water. If you don't like that, then under puddle displacement flatten, then you can decrease this so that you can bring back that geometric depth or leave it to somewhere small like that. And then we also have puddle displacement heights. I'll go leave this at one so we can see it. This is just where the puddle will be depth-wise. Now, let me go reset this and also let's decrease this and then let's bring down the puddle again. And then we have puddle contrast. And by decreasing this, of course, as you can expect, the falloff between the puddle and non-puddle areas will be more smooth. But I tend to like to increase this just to make it more apparent that the puddle is starting off in the lowest points of the material. Now, we have even additional options right here for puddle layers. You can go ahead and play with all these. These are just cosmetic options that you're going to have to adjust and see what looks nice for each situation and environments. And finally, for our last example and a good use case for these puddles is this Cyberpunk environment, specifically the asphalt road because by adding puddles, it really helps to add a lot more detail because there are so many lights in this environment that the reflections on the black ground look really cool. It's almost like a mirror. So that's why I'm using the sensor material for is for this asphalt road. And we can see behind the scenes we're going to mesh paint that I flooded this all with a blue. So press X to go to black and then click fill to then remove the puddles just for this little area to show off how I set this up. You'll see that the bottom material is crushed asphalt. And then the top is a smoother asphalt for B. So, that means when I go into the red channel and I lowered the displacement offsets for the crushed asphalt, that's how it goes below the main asphalt. Now, if I hold down shift and then I paint away at the second material, let's decrease the strength. We can see that it's almost like we're cutting into the floor. You can see that we are basically painting potholes. So, this is a very cool look to add destruction to this road. And then I went in with a blue and I started painting in puddles. Like this. But in my case, for all the asphalt meshes, I just increased the strength up to one and click fill to fill the entire thing. This is also a good showcase of the puddle height option. So, going into material instance, scrolling down, we have puddle blend height. If I decrease this and also increase the blend contrast, then right now these roads don't have any puddles and immediately this scene looks a lot more bland. And then slowly, maybe it starts raining and then this is a gameplay element, we start to build up more and more puddles, specifically first in the potholes. And then we get more and more puddles until the entire thing is just awash in rain for that nice reflection. And with that, this video is finally done. That is how you use the Sensei mass material. Don't forget to subscribe and give this video a like because we have a lot more free assets and tutorials planned in the future. So, go ahead and start creating with this mass material and I'll see you in the next video.

---
*Источник: https://ekstraktznaniy.ru/video/51785*