How to combine two materials using a noise mask?

Hello,

I’m trying to combine two materials, composed by different masks, using a noise mask texture. The first one is a simple material with channel packing, and the last one is the first one but with UVs rotated. What I want to do with this is fixing tiling.

But, I get the material rotated darker. What I want to get is the material A in the white area and B in the dark one. With their normal, roughness, ambient occlusion and displacement maks located in the right zone. Because, the darker material in the image [2] does not have displacement at all while the other one does.

edit: Each material has two textures,

  • the top one: RGB channel is the albedo mask and the roughness mask is at the alpha channel.
  • the bottom one: RG channel is the XY Normal mask, B channel is the ambient occlusion and the alpha channel is the displacement.

The bottom texture of Material 2 is pinkier becuase it has the R and G channels exchanged.

Can anyone please help me to find a solution?

Thank you.

There’s some weirdness going on here :wink:

That pinkish texture ( at the bottom ), I’m assuming is MRAO? It would be better to just use the normal, like you have for the top group. Also in the top group, take the first pin for the normal map.

In any case, why are you getting these values ready, packing them and then unpacking them again with the function? Why not just plug the stuff right into the material node?

the bottom texture has a scalar float value for uvs, not vector 2 UV coordinates. Is that intentional?

I just edited the post with more information. If I understood your question, I have decided to use channel packing because for the engine it is cheaper to load just two textures, CR and NOH, instead of five; albedo, normal, etc. This two textures has the five texture maks stored in their respective channels and I use the function MF_UnpackCRNOH to unpack that information. Is just an optimization technique that I saw in a tutorial.

Ok, thanks.

I’d try it with just albedo and normal first, make sure you have it working, then put it through the function.

I think it you want to use heightmap, you’ll need it for both.