Two materials for one face (one masked the other as background)?

Hello,

I have a trim sheet made of alpha masked textures. This trim sheet has to overlap several different background materials.

I know how to mix textures with the mask being the factor of the Mix Node and also mix shaders. But this means I have to create individual materials for each type of background.

Is there a way I could overlap two materials (MATERIALS, not textures) on one face? This way I could have the material of the trim sheet and then I could place any other underlying material.

Thanks.

Materials are assigned to faces so one face only accepts one material.

But there is the mix shader node, You can make a single material with 2 “material setups” and mix them. If you have the 2 materials as separate materials you can copy-past the nodes on one of them into the other and use the mix shader node to mix them (with a mask as factor.)

I copy pasted the Burlwood nodes into the Carbon fiber setup and mixed them with mix shader - also changed the mame to Carbon fiber + Burlwood.

1 Like

That is not my case, maybe I didn’t explain myself well.

I have one masked trim sheet and N different underlying textures that vary across faces.

I need to use the masked trim sheet to overlay it on a large variety of underlying textures. So I would have to create as many materials as I have underlying textures. Isn’t there any other way?

If I have 30 underlying textures on top of which the one trim sheet has to be applied, that means I need 30 different materials (and 30 draw calls in UE).

I do not think so, you can not mix “separate materials” you need one material that contains all the (n number) of shader node setups. (if I understand correctly the question) I am not familiar with trim sheets and UE.

If you combine all the materials into one and bake it, would that not be just 1 call?

For your both materials you can make everything but the Material Output node (maybe also not including Texture Coordinates node if you use a specific selected Object ) into a node group and then make a new material with both groups and mix the shader results with a mix shader and any node setup ( computed mask / mask image ) to mix them…
…and asign this new material to your faces…

You can set the mask using the color.

I haven’t used it yet :sweat_smile:
If this method works well, it seems that various materials can be controlled with one mask.

1 Like