Transparent parts of image doesn't disappear when alpha applied

Hi, I have a very simple node set up as below for a leaf texture which is a transparent backrounded png file. When i use the transparent shader with alpha node , i still get the white backround appearing as below, I can’t figure out what 's the problem here, please help.

Render view


Node set-up


PNG file
Blender file

thanks a lot

Are you sure that the parts that are white in the image above are transparent in the source image? That’s the first thing that sticks out to me. Your set up should work as long as the original source file is correct.

What was that PNG file created in?
We had a discussion recently about Blender having problems with PNG transparency in some cases. Have a look at your file in the UV/Image Editor: The transparent parts are white, meaning Blender can’t recognize the alpha channel.

I just opened the PNG in Photoshop and immediately saved it again - and the issue was solved. Here’s the new PNG.

I checked the my old png file in photoshop, it appeared completely transparent as seen below


-however it wasn’t appearing as transparent in blender’s image editor, then i downloaded the new PNG file you sent and it solved the problem :slight_smile:


but is it my photoshop setting or etc causing this problem? or is it just blender? have you done aything particular rather than checking the transparency box while saving as the new png file?

thanks a lot

To remedy this:

  1. Switch Blender Internal render engine
  2. Create new Image texture on Texture tab using your image
  3. Check Image - Use Alpha on Texture tab
  4. Switch back to Cycles

If you had UV Editor window open where image is loaded and last icon selected (black&white square) you would see how all white image turns into b/w image alpha mask.

One more - transparent node should be the last in a chain - you do not want to put glossy over ‘nothing’.

If there is a light from behind the leaf in scene consider including translucency (and ‘skeleton’ mask image to drive translucency factor).
http://www.pasteall.org/blend/36583

I just opened the file in Photoshop and immediately “saved as” with default settings:


Still wondering why Blender freaks out with some PNGs, but not with others…
Wait, you didn’t do the “Save for Web” thing, did you? Don’t. Just don’t.

this also solved the problem with my OLD png file, creating a new image texture with alpha checked in blender engine- means a bit extra work rather than just a simple png node set up,

thanksn

yes actually I didi the save for web thing :rolleyes: … shouldn’t i ?

thanks a lot for this little hint, I just noticed how wrong it was in my node set up. and changed it as you described, now perfect! :slight_smile:

From my understanding “Save for Web” is about making compromises:
Get an image that has the smallest possible file size and still looks halfway decent on a website.

That’s indeed pretty nifty for web usage, where every KB of data matters. But with textures I usually want no compromises in terms of image quality. I want the maximum possible - and a few KB more will do no harm.

is it actually possible directly to save a transparent png file under the save as option from file menu? without going thru save for web dialogue box?

thanks

Indeed it is:


hehe, wow it was all in front of me… great… thanks for all the help