1
$\begingroup$

I have a png with transparency, not an alpha channel:

enter image description here I have set up my shaders like this tute: https://www.katsbits.com/codex/alpha/

My object renders the transparency inverted from the texture map (the transparent map region renders opaque, and the tree regions are transparent). What did I do wrong/how to fix??

I also tried using an explicit alpha channel PNG, and it has the same problem. Also it doesn't matter which render engine I used them all, they all show the same transparency problem.

Also in EVEE, I have the material Blend Mode = Alpha Blend. Alpha clipped, hash and blend all render the same.

Thanks

$\endgroup$
1
  • $\begingroup$ While it is true that alpha doesn't equal just transparency for associated alpha, PNG can only store unassociated alpha. The alpha channel represents opacity in this case. If you have a PNG with transparency then it has an alpha channel. $\endgroup$ Commented Aug 23, 2019 at 22:53

2 Answers 2

1
$\begingroup$

The alpha channel can be plugged into the alpha socket of the Principled BSDF node. If you're using Eevee you will need to set the Blend Mode to Alpha Blend. Then it should display properly and there is no need for a mix shader.

enter image description here

$\endgroup$
4
  • $\begingroup$ Very nice! Thanks! $\endgroup$
    – shawn
    Commented Aug 26, 2019 at 21:27
  • $\begingroup$ @shawn If this solved your problem, please mark the answer as accepted using the checkmark next to it. $\endgroup$ Commented Aug 26, 2019 at 21:30
  • $\begingroup$ It's kinda ridiculous that this much work is needed to get alpha transparency to display as expected. At the very least, there should be a checkbox to invert the alpha value in the basic options of the material. $\endgroup$ Commented Oct 1, 2019 at 18:47
  • $\begingroup$ The only thing that had to be done to solve @shawn's problem was to connect the alpha socket of the Image Texture node to the alpha socket of the Principled BSDF. How is that a ridiculous amount of work? $\endgroup$ Commented Oct 1, 2019 at 19:15
0
$\begingroup$

OK. So after poking at this for a while, I come up with the node ordering going into the mix shader affects the transparency. I had built an alpha channel png, and I was able to get it to work, and when I inverted the mix shader inputs the result was identical to my original post.

So I went back to my original file, swapped the mix shader inputs, and the scene now works as I expect!

Thx enter image description here

$\endgroup$

You must log in to answer this question.

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