I am trying to learn how to use a greyscale map to control a material’s transparency. For instance, black is fully opaque and white is fully transparent. I think I’ve mostly got it figured out, but I’ve hit a situation that I’m not sure is a bug, or a lack in my understanding.
Please see the attached blend file:
alphatest.blend (790.4 KB)
Here’s my main problem: I can “see” through the faces of the outer cube to the face of the inner cube, but the “blue” color carries through, even when they are colored 100% black. I suspect this may have to do with my shader setup.
Here’s what I want instead: I’d like the blue cube to look “solid” (that is, can’t see the inner cube at all) when the “alpha map” is 100% black.
The scene contains two cubes, a blue one with an orange-ish one nested inside. The transparency map is attached to the blue one.
I am using a Principled BDSF mixed with a Transparent BDSF via mix shader. Material texture colors go into Principled BDSF, while “alpha map” colors are used as the mix factor. I thought I would need to use some kind of converter to use the colors as the mix factor , but the value of the greyscale seems to work how I want. Confirmation or refutation of this idea is appreciated…
I am using “Alpha Blend” for the Blend mode. I think this is what I want? It seems like Blend>Hashed>Clip in terms of “accuracy” (with a tradeoff of render time)? I’d also like to be corrected if this is wrong.