PNG alpha rendered as black in Blender

7,519

Just in case none of the two nice fellow at BlenderArtists chose to answer here, here's the two possible ways to do it:

SxJP's answer:

In the viewport, click N, open the "Display" tab and under "Shading", select "GLSL".
Click the link above for the original post.

                                    

Sanctuary's answer:

This one allows you not having to use the GLSL renderer. To avoid duplication, click the link to go to the answer, it has handy screenshots.

                                    

Share:
7,519

Related videos on Youtube

Camilo Martin
Author by

Camilo Martin

Remember: don't take things too seriously. Especially online.

Updated on September 18, 2022

Comments

  • Camilo Martin
    Camilo Martin over 1 year

    I'm a Blender novice, so this is probably easy to fix.

    When I use a transparent PNG as a texture in Blender, the parts that should be transparent are rendered as black.

    This is especially confusing since in the material preview it looks as if the material would indeed be transparent.

    Here's a screenshot:

    screenshot

    This is the test texture, and in the right on top of a checkerboard:

               test image           test image on a checkerboard

    Here is the .blend file in case you want to check it:

                                                         Yes, you may download this PNG and open it in 7-Zip because it has a ZIP in it. Blame the lack of an attachment feature here.

    Edit: After playing with the settings, it does render with transparency in the rendered output, but that's not what I need. I want to use the models with Three.js, so I want to just quickly see how it looks in Blender, I don't need more than simple "Z-transparency" ("regular" one, non-raytraced) here's a reference rendering of what I expect to see in Blender while I edit (this is the same model rendered with Three.js on an HTML <canvas>):

                                                   reference rendering

    • Camilo Martin
      Camilo Martin almost 12 years
      I'm wondering if Blender just isn't capable of showing a transparent texture on the editing panel. I hope this is not the case.
    • Ignacio Vazquez-Abrams
      Ignacio Vazquez-Abrams almost 12 years
      Is it a PNG8 or a PNG24?
    • Camilo Martin
      Camilo Martin almost 12 years
      @IgnacioVazquez-Abrams It is the image I've posted here, so yes, it is PNG32 (remember, PNGs with transparency have 32 bits per pixel... 8R+8G+8B+8A)
    • Camilo Martin
      Camilo Martin almost 12 years
      Note to possible answerers: I've found the answer, a guy at BlenderArtists just posted it. If he choses to post it here, I'll choose his answer. If not, I'll post it myself and choose it. The answer is in this link.
    • Camilo Martin
      Camilo Martin almost 12 years
      Actually, now two guys posted answers there, how timely with my bounty here, lol.
    • Derek 朕會功夫
      Derek 朕會功夫 almost 11 years
      @CamiloMartin - How did you make the I'm actually a .zip file thing?
    • Camilo Martin
      Camilo Martin almost 11 years
      @Derek朕會功夫 - Cool isn't it? :D cat file.png file.zip > mix.png on Unix, and copy /B file.png file.zip mix.png on Windows. This works because 7-Zip (and many other programs) will look for the zip header (or any other valid header that it supports), even if it's not at the beginning. For this reason you can open .docx, installers, and a number of proprietary-format files straight in 7-Zip. The image itself was self-made.
    • Derek 朕會功夫
      Derek 朕會功夫 almost 11 years
      @CamiloMartin - Thanks for the explanation! I'm sure this will be useful for me some time in the future.
    • Camilo Martin
      Camilo Martin almost 11 years
      Glad I could help @Derek ^^
    • Camilo Martin
      Camilo Martin almost 11 years
      Oh, and by the way, the image is public domain, in case you want it you're free to use it too. Here it is, ready to be concatenated with whatever zip: i.imgur.com/1cHoKa4.png
    • Derek 朕會功夫
      Derek 朕會功夫 almost 11 years
      @CamiloMartin - Actually I came here because I encountered a similar problem as yours. Is there any chance you can take a look at my problem: superuser.com/questions/610327/… Thanks! (I had the exact opposite situation as yours, black in rendered, transparent in viewport, weird)
    • Camilo Martin
      Camilo Martin almost 11 years
      @Derek Sorry, wish I could help really, but since this question one year ago, I didn't use Blender at all, and I'm still a complete n00b :(