From the course: Unreal Engine: Materials for Architectural Visualization

Setting up the base colour - Unreal Engine Tutorial

From the course: Unreal Engine: Materials for Architectural Visualization

Start my 1-month free trial

Setting up the base colour

- [Instructor] As we will typically want to create the most flexible material that we can, what we're going to do next is add a few nodes that will only really become useful once we expose them. And so if you are still unsure as to what they do even after running through the steps and the explanations here, don't worry as we will see them in action a little later on in the process. When it comes to the material's base color then, what I would like to do is give the user the option of being able to use either just a solid color to generate that or add a grayscale map to the precedings as well, in order to create some bitmap based variation to the color. On top of that, I also like to give them the ability to pick the map that they would like to use, as opposed to only being able to choose from a preset list or something, which means that we will need to be able to blend both a black color and grayscale map together in order to produce the end result that we want. Let's add our black color first of all then, which requires a float three node in order to be able to produce the needed R, G, and B values. And so, let's hold down the 3 key and then click in some empty space on the graph. Let's give this a description of, metal tint color, and then set all three of the values here to 0.43, meaning the base material will be a colorless metal, which I feel is a good starting point for anyone wanting to use this material. Next, we need to be able to blend a graysale variation map and the color that we've just created together. And so, after right-clicking in some empty space, let's search for and add a blend overlay node. After which, we can pipe the output of our texture sample node into the blend slot and give the blend node the description of, Blends surface variation detail. Now, if we were to pipe this directly into the diffused input on our material at this point, all we would get would be our variation with color option, but we did say that we also wanted to give the user the ability to either use the variation bitmap or not. And so, let's drag from the blend overlay node's result part, type the word switch, and then choose the static switch parameter from the Parameters section in the list. We can give this the name of Variation Color Selector, and note that, by default, the node is automatically exposed as an adjustable parameter, and so we will need to give it a group name as well, which essentially sets the name of the rollout that the parameter will appear in. Let's call this, Base Color. The Sort Priority value determines where in a list of options this exposed parameter will sit. And so, let's make sure that we set this to one which means that when we expose the base color and variation map controls, we can be certain that this checkbox will always sit at the top of the rollout which is good given that it is the most logical first choice for a person to make when using the material. We will also want to be using the variation map by default, and so let's also put a check in the default value option with the user, of course, always having the option to turn this off if they want. Let's then pipe our parameter three node into the false slot so that just color can be used should the switch parameter be unchecked. We will definitely want to make sure that anybody using the material knows what the parameters are for, and so let's give our switch node a description of, true equals map and color, false equals color, or something to that effect, although I'm sure that you can probably think of a cleaner way of saying that. And with all that done, let's finally pipe our parameter output into the base color slot of our material. Once done, we can be quite happy with the fact that what we've done in this exercise is give ourselves or the end user plenty of flexibility when using the material, as they can essentially turn it into any type of metal material that they like.

Contents