Cycles Material Index Pass with Alpha Mask ?

Hi all

Does anybody know how to affect only the (pseudo-)alpha-area of a material (in this case the leaves) instead of the complete geometry ?

See here:


Or is this not possible yet with Cycles ?

Edit: Here is an examplefile: alphamap_id_pass.blend (564 KB)

Kind regards
Alain

You can mix your leaf shader with a transparent shader and use an alpha map as mix value.

Watch this tutorial by Greg Zaal http://blendernerd.com/alpha-mapping-in-cycles/

What are you trying to do with just the alpha area?

If your trying to get rid of it, I think I had a similar problem when I was playing with sapling. I kept seeing traces of the alpha in the leaf texture. I found that the alpha channel on some of the leaf textures were a little dirty. I went into gimp and there is a setting under transparency that lets you set it to all or nothing. Set it to all and you shouldn’t have those boxes around your leaves anymore.

@Fishlike
I guess you missunderstood my question.
Read what krixxuss said, it discribes the problem.

I try to change the color of the quader behind the tree in postproductions without rerendering the hole scene, this is why I need the pseudo-alphachannel of the leafmaterial.

@krixxuss
I guess you did that with “Blender intern” Renderer and not with Cycles right ?

In Cycles you can’t use the Alphachannel of a textureimage yet.
In my example the Transparency is defined by a Black and White Image. Tranparency is just pure White (RGB 255,255,255).

Any other solutions ?

Kind regards
Alain

I saw that Jonathan Williamson uses separate Layers to maks specific Objects.

This technic works pretty well with “Alphatextures” :slight_smile:
I updated the File: alphamap_id_pass.blend (600 KB)

Kind regards
Alain