Alpha texturing


I did everything, it simply doesn’t work. I even used different textures with black,white backgrounds.
I downloaded some finished trees with already textured leaves, I found out that the background should be grey, so I downloaded leaf alpha texture with grey background and still it’s not transparent.

How to get it done? I want a leaf texture with a transparent background like the image on the left ------->


The order of your mix shaders is important…
Make sure the mix based on the image’s alpha is the last one - otherwise you’re mixing the glossy with the transparent component as well. Which is not what you want…

I did the same as the other dude on a lower image (left image), you can see by the node set it’s the same and yet the results are not.

No, you clearly didn’t.
He just mixes Diffuse with Transparent, while you’re mixing Diffuse with Transparent AND Glossy. That’s one more mix and you got the order wrong.

EDIT:
Wait, what is the result you’re getting? I thought the one on the bottom right?
If not, sorry! Please provide an example .blend file (with textures packed) for us to check. And concerning your texture, what do you mean by “black/white/grey background”? Does your texture have an alpha channel at all?

Like Ikari says, you got the order wrong. You’re mixing a glossy shader with your transparent mix with a factor of 0.5, so the whole thing is half-transparent. You want to first mix glossy and diffuse shaders, then mix that with the transparent shader.

Anyway, I would suggest you don’t work this way and instead create (instanced) geometry for the leaves (e.g. with duplifaces), or at least model an approximate shape so that there isn’t so much “invisible” geometry. Transparent paths can slow down rendering significantly and they will eventually terminate to black when the “transparent bounce” limit is reached (default 8). Instanced Geometry will be cheaper.

The image on the bottom right and left are not mine, I would like to get the result like the bottom left but I got the result of the bottom right by doing the same thing he did on the left.

Well I just write leaf alpha texture and I get leaf with a white and grey cubes, leaf with black background and leaf with white background.

I can’t upload files because everytime I choose insert image or anything, the upload reaches 100% and then nothing happens.

Ugh… you need to be more clear if you expect support. You lost me.

I can’t upload files because everytime I choose insert image or anything, the upload reaches 100% and then nothing happens.

You can’t upload .blend files to the forum, you need to use an external file host, such as google drive or dropbox. For .blend files specifically, there’s pasteall.org.