2
$\begingroup$

I have a 1.0 transmission material and i would like to add a transparent layer with white color.

Here is my png : enter image description here

Here is my shader and the result. I just want to have the eyes in white color... (Just so you know, there is an object behind with a gradient emissive color).

enter image description here

Thanks for your help!

$\endgroup$
2
  • $\begingroup$ Just make the Base Color of the Principled BSDF white and plug the image texture's Color (without inverting) into the Alpha input of the Principled BSDF to make everything but the eyes invisible. Or if this is supposed to be glass, leave the Base Color white and plug the inverted image into the Transmission input. $\endgroup$ Apr 21 at 16:57
  • $\begingroup$ Thx, @GordonBrinkmann. This solution is indeed even more straightforward. If you want to write a solution I'll check it as the (most) correct one. $\endgroup$
    – 16ar
    Apr 22 at 12:37

2 Answers 2

3
$\begingroup$

With the introduction of the Principled BSDF node, for simple things like making parts of the mesh invisible ("alpha" transparent) or glass-like (transmissive), it is no longer necessary to use a Mix Shader. You can simply plug any texture which you want to use as mask into either the Alpha input or the Transmission input (in recent versions: Transmission > Weight) of the Principled BSDF node.

Now it depends on what you want: should the eyes be opaque white on an invisible object or opaque white on a glass object? First of all, when you are using the texture as a mask you can/should set the Color Space to Non-Color.

For opaque white and invisible you can do the following: set the Base Color in the Principled BSDF to white, and plug the image texture as it is (white eyes, black background) into the Alpha input. An alpha value of 1 is opaque, 0 is completely invisible. On the left I've put an emissive object inside like you have.

alpha transparency

Now, if you want to have a glass object with opaque white eyes, you have to invert the color of the texture, because when you are using it as Transmission value, 1 is completely transmissive and 0 is completely solid. The Base Color you can leave white.

transmissive material

But actually if you do not necessary need the object with the eyes as a separate object, you can mix everything together in a single material for the emissive object.

The emissive object can have a Principled BSDF for example where you plug your color gradient in the Emission Color and use the inverted texture as Emission Strength. I've then used the image also as Base Color because I wanted the emissive part to have a black base (left side). Or if you are using an Emission node and the eyes should be emissive as well but white instead of the colorful gradient, then you can use the image texture as mix factor in a Mix Color node where you are mixing the gradient with white (right side).

different combinations for single material

$\endgroup$
1
  • $\begingroup$ Perfectly explained. For the record, I want my emissive gradient to be physically separated from the eyes, as it is supposed to have a "solid" glass in front of the color (hence the grey effect on the side). Thx ! $\endgroup$
    – 16ar
    Apr 22 at 16:35
3
$\begingroup$

Use your image as a factor between your white shader and a Transparent one (or a Glass one or a Principled BSDF with Transmission as it looks like this is what you're using in your material):

enter image description here

$\endgroup$
2
  • $\begingroup$ Perfect ! Thanks a lot! $\endgroup$
    – 16ar
    Apr 21 at 18:29
  • $\begingroup$ @16ar You get exactly the same result without the need for a separate Transparent BSDF mixed in, just with your original setup if you unplug the image from the Base Color and plug it into the Alpha of the Principled BSDF, see my comment under your question. $\endgroup$ Apr 21 at 20:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .