0
$\begingroup$

How to make some part of the texture transparent? I'm using the image below:

Grass Texture

Is it possible to just use 1 image, by making that the texture won't render ONLY the black color?
Is it possible to use 2 images (1 for texture, 1 for mask)?

I know that it can be done with transparent PNG. Just curious about the other method, which allows me to use JPEG. Most of the tutorial I found so far is only about making texture half-visible, which is not what I seek.

$\endgroup$
1
  • $\begingroup$ use it in the factor of a Mix Shader, and plug 2 nodes in the other sockets of the Mix: A Diffuse node with the color you want, and a Transparent node $\endgroup$
    – moonboots
    Commented Jun 21, 2020 at 6:42

2 Answers 2

1
$\begingroup$

You can connect it like this:

Alpha

NOTE - your image has good black and white cutoffs, so you probably don't need the ColorRamp for the alpha, but in case there's more gradient, that's how you solve it. Also, pay attention to the blend modes I've highlighted. You can pick anything to your liking, just not opaque.

$\endgroup$
2
  • $\begingroup$ Also, I just noticed that the image texture in my screenshot is a .png. I saved your image and that's just what it saved it as. It works just as well with a .jpeg. Black and white is what defines the alpha (black = 0, white = 1), so any b&w image will do, $\endgroup$ Commented Jun 21, 2020 at 6:51
  • $\begingroup$ Hi. Nice answer. Might be good to apply the default theme to Blender before taking screenshots, just so the interface looks a bit more like what the user might be using. Thanks. $\endgroup$ Commented Jun 21, 2020 at 12:49
1
$\begingroup$

Plug your "jpeg" image to the alpha socket of the composite node in the compositor,Blender will covert the black values to transparent.

enter image description here

$\endgroup$

You must log in to answer this question.

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