I am working creating a 2D face for a Lego Minifigure. I have a texture parameter that controls the skin color of the minifigure and I want to add the eye’s and mouth on top. The black and white eye textures are exported on a transparent background and I am using Targa because I read in some forums people having issues with transparency with PNG’s. I am unable to get the black and white eyes to show up properly in the base color. It only shows the white highlight in the black and white eye as if it is using it as a mask. I would appreciate any ideas or assistance with this obstacle. Thank you.
That’s because you’re using Add. Black is (0, 0, 0), so anything added to Black remains the same.
The solution:
- Add a Lerp (Linear Interpolate) node.
- Connect Skin Color’s RGB to Lerp’s A
- Connect Texture Sample’s RGB to Lerp’s B
- Connect Texture Sample’s Alpha to Lerp’s Alpha
This should perfectly achieve the blending effect you need. I strongly recommend you get to know Lerp. It is one of the most useful material nodes.
Hope this helps!