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
    Jun 21 '20 at 6:42
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$ Jun 21 '20 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$ Jun 21 '20 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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.