0
$\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$
  • $\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$ – Robert Gützkow Aug 23 at 22:53
0
$\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$
  • $\begingroup$ Very nice! Thanks! $\endgroup$ – shawn Aug 26 at 21:27
  • $\begingroup$ @shawn If this solved your problem, please mark the answer as accepted using the checkmark next to it. $\endgroup$ – Robert Gützkow Aug 26 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$ – Todd Gillissie Oct 1 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$ – Robert Gützkow Oct 1 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$

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.