Need help understanding the material set up in the infiltrator tech demo

So I watched this tech demo

And I’m confused on the breakdown of things. I figured a lot of it from this wiki page

https://wiki.unrealengine.com/Creating_Layered_Materials_%28Tutorial%29

However somethings I’m still confused about such as

  1. How do you input the grim and dirt map as well as the scratches map in to the material, basically how is it connected.

  2. So I understand how a material function works, But I would like to know how I can add a panner or rotator to a material function inside of a main material, with effecting the material function itself.

  3. can I offset the Uv values of a material function inside of the main material where it is placed?

  4. Also I’m confused on how they separated the tillable material in to the different Uv channels. What I’m confused about is that in the tech demo the character has like 5 colors on him to attribute to different materials. But when they show how the nodes are connected on the material. Only the 3 channels are used the RGB. How did they get the other color values? So with that is it possible to separate the color values in the UDK. Meaning like I have a picture and I want to take the brown vales and change it in to a black and white value. With only the brown colors in the diffuse being the white in the end result.

You have made a bunch of nodes for the diffuse and this bunch of nodes controls all the color etc in your diffuse input, Now lets say you wanted to add the scratches and dirt to it, What would you do is “add” the final output of that “bunch of nodes” to the other “bunch of nodes” that has the dirt or scratches etc and plug that add node to the diffuse input. (Look into the add function in material docs)

2, I don’t get that question at all.

  1. Yes you just need to set up the controls in the “function” material before bringing it to the master material.

  2. All 4 channels are completely independent from one another, You can have 4 different textures in 1 texture separated in RGBA if thats what you ask. Otherwise you can set up 1 greyscale material and change per instance by creating material instances.

PS: If something didn’t make sense please let me know here and i will break it down even more.

2/3. I know how to set up a control but not sure how to set it up to work with a rotator and panner. The one value scalar control is not enough to properly control a rotator and panner. Can you show me a screenshot of how you would set up the material nodes for something like that?

  1. To clarify I don’t want to offset the UV’s of the channels but rather the UV’s of the material function in another material.

Dropbox - Error This is how the function would look

Dropbox - Error And this is how the material would look.

Pretty simple example but you get it right?

This is not quit what I’m trying to do, check out this link

http://fc06.deviantart.net/fs71/f/2014/115/f/6/untitled_1_by_skate54-d7fvuyn.png

The material should be set to material attribute, because I want the material function to contain the diffuse and bump map. So in the link I provided I managed to do tiling, But I only have one controller in the material to change both tiling the u and the v. I would like to have 2 controls to tile the U or the V. And I want to learn how to apply this same technique to rotating and panning.

Well dont use Text Coordinate, Use 2 input scalar values, Input them to an “add” then name the 2 inputs X and Y then plug your output into your UV channel.

PS: my brain lags either it was input scalars or input 3 with a mask of R and G respectively. It’s too late.

Hiya VisceralD! Hopefully I can answer some questions for ya :slight_smile:

1. How do you input the grim and dirt map as well as the scratches map in to the material, basically how is it connected.

To do this, you have to build it into your function to support it. When we add support for scratches and dirt, we built the function to alter the base color, and roughness blended by a mask. For example, if you have a glossy paint, and when it is scratched you would like to show the primer under the paint, you build the function to support that effect.

Your primary material is “paint” which may have a low roughness value. The primer “scratches” however will have a high roughness value. In the Function you blend between a high & low roughness value with a Lerp, using a function input channel as the mask (select channel using component mask nodes). Doing this to the roughness is great, but you also will want the color of the object to change, so you’d use the same mask on your Base color to lerp between your paint and primer colors. The scratches map then is hooked into the input you created within the function, inside of your material you apply to your mesh. The same set up is used for dirt, and you should organize your lerp nodes based on the order in which those things would happen realistically on a surface.

2. So I understand how a material function works, But I would like to know how I can add a panner or rotator to a material function inside of a main material, with effecting the material function itself.

Not entirely sure I understand, but you can place a panner inside of a Function and pan whatever you want inside the function. When it is used in a Material, it will pan. You can provide function inputs to alter the speed of the panner/rotator, and set those inputs differently in any material you use.

3. can I offset the Uv values of a material function inside of the main material where it is placed?

The function itself does not change, but the things within it do. A function isn’t the same thing as a texture, it is more similar to a Material. You can edit the uvs of textures within your function so long as you provide the appropriate inputs. Based on how you set it up, the material function could appear to change - but you’re actually just editing the contents of the function. You can place a texture sample within the function and manipulate its uvs. You can make this an input as well, but be aware you’ll need to hook a TextureObject to the function input within the material.

You can separate U and V tiling by using the x and y (R and G) inputs of a vector parameter as DieByZer0 mentioned. Or, if you want to use single vectors, you can append two single vector inputs in your function, and multiply that by the texture coordinates - which will allow you to have two function inputs. If you want to move the texture, you’d do the same thing but Add the appended vectors instead of multipling to the texture coordinates.

4. Also I’m confused on how they separated the tillable material in to the different Uv channels. What I’m confused about is that in the tech demo the character has like 5 colors on him to attribute to different materials. But when they show how the nodes are connected on the material. Only the 3 channels are used the RGB. How did they get the other color values? So with that is it possible to separate the color values in the UDK. Meaning like I have a picture and I want to take the brown vales and change it in to a black and white value. With only the brown colors in the diffuse being the white in the end result.

Not totally sure I understand this question. Multiple functions are blended together using the MaterialLayerBlend_Simple function (search for it in the panel!), where you hook in your base & top function, and input a mask to blend between the two.

Color values also come from vector parameters (xyz = rgb), and if you use a channel of a texture, that channel can be used to blend colors (Vectors) together. The orange worker bot that the Infiltrator jumps on for example, is colored completely by vector parameters. There are no RGB textures that define the color of that robot (except the decal texture), it is all done with masks and vector parameters.

For your brown example, you’d probably want to make a specific mask to do that, as brown is a combination of red, green, and blue channels and isn’t a result of a single channel.

Everything is explained but as far as your answer to question 3, can you give me a screenshot of how the nodes would be connected for tiling or rotating, please.