Control texture or decal transparency with nodes

Hi,

I was wondering how to control any texture or decal transparency as in PS transparency or fill controls. I tried mixing the texture with the transparent shader but I always get holes instead of controlling the texture transparency.

What do you mean by holes? What are you using as the factor for the mix?

If you connect the transparent shader on any material you’ll make holes based on the greyscale information.

I am trying to avoid having to go to PS to adjust the label transparency all the time.

Always mind the color coding of the nodes’ inputs and outputs.
Green connectors must always and only be connected to green.

In your example you’re connecting a yellow (color) output to a green (shader) input in the top node network. That does not compute and will of course create “holes”, as the color output provides no shading information at all for the Mix shader to work with.

In the bottom node network you’re feeding the green output of the Mix shader into the yellow color input of the Diffuse shader, which is also wrong.

Please understand that color and shader are different kinds of information. You must decide if you want to mix information on the color or the shader level.

Oh yeah, I didn’t pay attention to that, to be honest. The top nodes work fine so I don’t understand why if it does not compute. I normally use shaders before the mix but in this case, I plugged it as you see and it worked. In reality, I was messing around just to get the transparency control of the decal texture so everything was a mess really. Thanks for pointing that mate.

By the way, the holes are created anyway using the right nodes.

So, any idea regarding my original question?

Ok, so I found a solution that works pretty well. In case anyone is interested here are the nodes I’ve used.


This would only work for a decal on a separate plane and material. The next would be just to control the decal transparency within the same material.

Honestly, it was much easier than I thought and yet I complicated my life for nothing:

Screenshot_12082018_002

That should just control the texture transparency.