I have been trying to create a “master material” for my own VFX. I know how channel packing (RGB textures) technically works, but I have no clue how to best implement that in Unreal Materials, what node setup to use to put within my material. I would love to not have 3 different texture samples and instead use switches or something similar—whatever is the best and optimised way.
You can take a single texture sample then use a component mask node an the output at any point to extract any of the channels.
(The texture sample node, also comes with it built in using the colored output pins).
If you need to parameterize this, you can use a dot product between the sampled result and a vector representation of your mask. For example if you want to extract the red channel you would dot it on (1,0,0)