Alpha Map Not Working Completely in Cycles

Hey guys, I’m a formerly advanced blender user (I say formerly because I have not been able to truly keep up with all the updates like I used to and feel a little behind, something I’m not used to in Blender. :() but I’m really stumped right now. I’ve followed tutorials on how to do alpha maps in the new Cycles engine, and I’m getting frustrating results.

Following the online tutorials (one of them very recent) I did this new setup for a tree that I downloaded from Blendswap. It was made for BI, but I redid the materials for Cycles.

But the alpha channel doesn’t seem to be working properly at all. Here is what the render looks like using, as suggested, an add shader node to combine the diffuse and the alpha map.


As you can see, the negative space in the alpha channel only makes the areas outside the branches semi transparent.
But here is what it looks like if I render it with the Transparent Node directly:


So based on this correct render of the alpha channel when only using transparency, it would seem that the problem is in the add shader node. But this is how all the tutorials say to do it, and with a bunch of messing around with nodes, I could not figure out another way to make it work.

Just for reference, this is what it looks like with just the diffuse node:


This is really a super simple setup, so I figure that there is some rendering setting or something I’m missing that is making it do this.

Here is the blend file to download and take a look. I have a project I would like to use this for in the morning, so if anyone could help me out fast, that would be great, but if not, I’d still love to know the answer. This is killing me!

www.ecf.org/wp-content/uploads/2012/12/PineCyclesTest.blend

I did enough digging that I found out some things. I don’t know why this worked before, and doesn’t work now, but as I viewed the old tutorials they all appeared to be 2.60 or before. I did find a more up to date written tutorial, and this setting worked:


Apparently you need to use the mix node, a blank transparent shader, and then feed your alpha channel in the factor slot out your mix node. The community saved my bacon tonight, hopefully this might help someone who is struggling with old tutorials as well.

For some (stupid IMO) reason, Cycles doesn’t handle alpha in pictures by default. Here is how I deal with alpha:


In plain English: You plug your material (Diffuse for ex. which uses the color of your image) and a full white Transparent shader into a Mix shader node where you use the alpha of your image as factor.

In your case, you must do that for the 2 images and use the output of the 2 mix shaders as inputs of the Add node.

(Don’t listen to the voices on Internet who talk about using a mask…) :wink:

Guys, this problem keeps coming up on these forums, but unfortunately Brecht doesn’t consider it a bug! See the bug report:

http://projects.blender.org/tracker/index.php?func=detail&aid=33203

Maybe it would help if Brecht is made aware of the fact that this is a problem for many users. If you leave a comment to the bug report, even though it’s closed, an email is sent out to those taking part in the discussion.