Can someone tell me if there is a way or a node to switch between different masks “channels” within one texture ? I’m using a texture which contains 4 masks in total, R,G,B and in the Alpha channel. After instancing the master material i would like to have control which mask is used, basically switching between the different channels.
I Don’t know of a specific node for this, But you could add a Vector4 parameter to the master material and in your instances just set the vector’s R, G, B or A to 1.0 and leave the others at 0.0;
Multiply the mask textures rgba components by the vector4’s rgba components and add the results
In this example I have named the Vector4 parameter “ChannelSwitch”
Instance Using Red Channel:
Instance Using Green Channel:
Thanks a lot! It works perfectly!
However i’m still curious if there is a simple node for switching the channels of a texture. There has to be one right…
The posted method above is one of the ways you do that. I see some of the Epic content uses that too. AFAIK: There’s no official node for that. (Anyway, try creating a function wrapping this logic)
Yes, it’s the “Channel Mask Parameter” node.
It’s not in the documentation, but I found it by just searching it when adding a node.
Oh! That’s interesting. Glad to know that.
I just rechecked too.
You can also use:
ok thats amazing! Thanks a lot !