How do I remove a certain colour from the texture?

Hello all! My problem is that I would like to remove a certain colour from the texture, I have long been looking for an answer but there are everywhere said to turn to Photoshop or other external programs, but I need to specifically at the beginning of the game, that is, I can not prepare in advance, and if the engine itself to remove a certain colour from the texture? The texture itself is quite primitive, there are just 3 colours and a void, here I need to remove one colour.

Thanks in advance for the answer, best wishes to all!

Can we see an example? Obviously I know what you mean, but how it’s done will vary depending on the sort of textures.

1 Like

Thank you for your reply. Can I send you a screenshot of the texture exactly?

Yes, you can upload it here :slight_smile:

To be sure, I’ve uploaded the texture itself before it became one, in PNG format).Well, and a screenshot in the engine itself.

I need that among the three states remained only one, so I need to remove the other two, at least I think it’s easier than just leave one colour, although I may be wrong. Of course, the colours of all three states I have in the form of variables in the array.

Ok, those 3 colors, maybe not. It really depends how you have your texture setup.

The best thing you can do is make the texture so that the RGB channels have the different parts you want to isolate. Then there’s nothing to it :wink:

You use each channel as a mask to only show one part at a time.

It’s not possible to filter arbitrary colors in a material.

I understand, thank you for your reply. I wanted to do procedural generation based on this, but I guess it won’t work and I’ll have to do everything by hand, but the main thing is that I tried).

Thanks for the reply! :smile:

1 Like