Image on Material with Mix Shader: Problem solved - but why? :-)

Still a beginner in Blender and modelling a bottle. I managed to place the label on the Glasbottle with a Mix Shader Setup. Happy that i found the solution for my myself at first - but then i then noticed: Not really. The Bottle was half the label and the label was half the bottle (glossy, reflections).

I asked a friend and he just plugged the alpha from the Image Texture Node into the factor of the Mix Shader - and all was fine and perfect. The Bottle was glas, the label was not.

I asked him: why. And he said: Dont know - i know this from a website. So i still wants to know: Why is this the solution. Why is this working? Is this the only way or are there other solutions?

Here are two images with and without the alpha plugged in to the factor.

Label wrong

Label perfect

first setup: you are mixing the 2 nodes (Image Texture and Glossy) in a Mix Shader, it just mixes the 2 nodes, the factor determines how much of the image and how much of the glossy

second picture: you use the alpha layer of your Image Texture as a mask in the Mix Shader, the alpha determines where the image and the glossy are supposed to be displayed, it clearly separates the 2 areas

1 Like

Thank you for the short explanation. I think i got it :slight_smile:

But my question about he “why” still remains. Is this “basic knowledge” for 3D Pros or experienced Users?

I had a look in the Blender Manual and nothing in the “Mix Shader” or “Image Texture Node” hints about the “masking” or anything else like this. Im just courious :slight_smile:

I would say this is a basis when you learn the materials, but you can’t count on the manual to correctly explain anything :wink:

Yeah as @moonboots said learning the materials…also just remember the alpha of a transparent image will always be the area that Blocks/Masks the image if connected in a shader…even if an image does not have a transparent background, the color of that background can be used as an alpha by using its color to control the transparency…
That said …say an image has a Green background and also Green in the image…if you use the Green ( from the Color output of the image texture to Alpha or the factor in a mix shader ) all sections of the image with that Green will be transparent…

For example…
1> Image on a plane color to Base Color and Emissive on Principled…
2> Another noodle added to No.1 from color to Alpha… the whole image is transparent…
3> No. 3, as seen in this…where alpha is controlled by RGB node which goes through the Principled and the color of the image, is the factor of the mix shader.

And there are many, many other examples that you just pick up as you Blender along!