Hi all,
Is there a way to tell ue4 to use a specific texture coordinate for a particular mask channel without duplicating the said texture in the material editor. Like plug in different texture coordinates to tile different mask channel in a texture sample?
Replies
But you could make this with the custom node. If you really need this, I can make you the code if you want. Its just a few rows. Then it could be saved into a material function so its reusable.
download:
https://www.dropbox.com/sh/r1v5u4u803pv3os/AADO85nOgb5cgOEerYlzhC0Fa?dl=0
Just extract and put it in your content folder.
Its exposed to the library so when you right click in the material editor and type in "CoordPerChannel" it should give you the material function node.
On the left part of the image, you can see whats inside...You don't have much to do with that though. Then on the right, there is the function. You just plug a texture object, and you can tell whats the coordinate of each channel. Result is packed back into channels so you can access them separately with a component mask or a break float node just like on my image. All coordinate inputs defaults to coordinate index 0.
This thing could be developed further and optimized some, by first checking which coordinate inputs are different and sample based on that. Like all of the input coords are the same, just sample once. If 2 are different, sample twice using the 2 different coordinates etc. But if this is only for personal usage and not for sumething super optimized, it should be fine as it is...
This is just perfect. Downloaded immediately. This would make using mask channels easier.
I have also be reading of mask texture added to the alpha channel of diffuse and normal maps. In this case an append node would have to be used to get the rgb channels and plug them to the material nodes accordingly. Is this a good method or should they be left alone.
About the normal map alpha channel, yes, I do that all the time because then you would set that normalmap to use default compression, and after adding the alpha, it has the same resource size as with normal map compression without an alpha.
https://www.dropbox.com/s/yuelell2wdwzk7y/CoordPerChannel4.uasset?dl=0