In this series of tutorials, we'll cover each of the material expressions used to create stunning materials in Unreal Engine 4. We'll start out with some of the most commonly used nodes and explore the rest in an easy to understand way. Software required: Unreal Engine 4.3.
Joshua is a devoted games author at Pluralsight. For years Joshua was a key author behind Digital-Tutors' (now a Pluralsight company) popular game engine training. As a kid, he had a passion for playing video games, which eventually developed into a fascination with the process of game creation. The question of "How'd they do that?" led Joshua on a quest to learn to make these games himself. Ever since then, Joshua has devoted his life to creating games, as well as teaching others to build their own fantastic video games.
Introduction and Project Overview [Autogenerated] and this. Listen, we're going to take a look at the texture sample node. All right, so to create a texture sample note, we either need to go to our palate and find texture. Sample in our list, and you'll find this under the text a ring section. So if we screw all the way down to the bottom here, will find textures and you see texture sample. You'll also notice that you have a keyboard shortcut here that you could use to use it. You can simply hold down T and then left. Click anywhere in the graph and there's your texture sample. And when the texture sample comes up, you'll notice that by default, it doesn't have any image or texture inside of that. Now, if you want to add a texture to this actual file or image, you'll need to go to your content brother. Now inside of the Content browser, you can go to something like your texture solder, and you could choose any texture that you would like. In this case. I'm going to use this brick clay beveled. Go ahead and select that, then go to your material and then here in your details panel, you'll notice that you have several properties that you can use, so starting right here with the basics. We have the material expression texture base. Notice that you have a slot for your texture to go with me. Texture Selected in your content browser All you'll need to do is simply go ahead and choose you. Selected asset from Content browser. Once that has been added, you'll see that that is now previewed in the note. Now with the texture sample. It's pretty straightforward, but there are a couple of things that you may want to take note of. The first thing are the outputs. You'll notice that we have an RGB output, which will output what you see in the texture. Then you can actually output the different channels of that texture so you can output the red channel. You get out, put the green, the blue or even the Alfa in that. Now, if you want to know what information is eat in each one of these channels, you'll simply need to double click on that, and that will highlight it in the content browser. Double click on that texture that's highlighted, and you can come up to your view, and you could start to single out what information is being seen, whether that be in the Red Channel, the Green Channel, Blue Channel or in the Alfa. All right now, by going back, let's go ahead and close that down. You'll notice here that we can plug in the RGB into the base color, or you could put it into really in the input here. But the base color is probably going to be the most helpful in this case. Now. If we wanted to preview this node on the material without hooking it up, what we could do is simply right. Click on it and say, Start previewing. Note. This will show us the preview, what that looks like right inside of our material. Now it's only showing the information that is in this note, so you'll notice that we get this very flat, diffuse texture. Okay, there's no speculum highlights. There's no shyness or roughness to this. Okay, now let's go and take a look at our details panel. You'll notice here that we have our material expression, texture sample. We have this myth value mode. You have two choices. You have the mid level and the mid bias. A MIP is basically going to allow us to, um, use and Elodie method with our textures. So if the camera is further away from the texture, we can begin to down rez that to where it's not showing us full rez 2048 by 2048 texture. It can actually down rest to something like 1 28 or 64 by 64. It's not absolutely necessary to render out that full texture whenever the camera is very far away. So you have these two options to help you with that. Now, whenever you choose one of the options, you'll notice that you get this input called level, okay? Based on this and then you If you choose bias, you now have a bias. Now, these are going to be helpful whenever you create some sort of system for your material to down raise that texture. Now, in this case, we're gonna go ahead and set this to none, because we just want the UV input. Okay, Now the U. V s input is going to allow us to add in some sort of note that we can connect this to that we can adjust the U. V s of this texture, whether that be panning the object or painting the texture, rotating it or even tiling it based on a different value. Now moving on down below. This we have our material expression. This is pretty familiar. If you know how to use materials inside of unrelenting for, you'll know that we have the texture that we can add here. Okay, now you'll also notice that we have the sampler type. If you hit the drop down on this, you'll notice that you have a couple of different options. You can change it to gray scale alfa, normal or mask, and normally this is set up automatically whenever you import textures. So, for example, if we take a look at one of these normals, so go ahead and select it and then hold down T in the left click. This will bring in your normal map and noticed the sampler type. It already detects that this is a normal type. Okay, so it knows exactly what to do with that information and how to compress it. So let's go ahead and delete that. Now let's go and select our texture sample from the original, and then we could go down to our material expression. Now this is pretty common across all of our different notes. We have the ability to add in the description so we can end in a description that says brick texture and then we hit Enter and you'll notice that it creates a little bit of a note here. OK, this could be very helpful now if I wanted to reset any of these inconceivably hit that yellow arrow there, and that would send it back to its default state. Even if we clicked on this texture here, and the texture sample is pretty straightforward. It's one of our most commonly used notes, and it is one that you will probably have access to. But we wanted to just show you some of the different availabilities and different details or properties amount that texture sample, so that way you can use it to its fullest potential