How to get a mask of a Material with "Alphatransparency" ?

I made this:


The Material of the “A” looks like this:


Edit:
Blendfile
Alphamaskmaterial_00_090113.zip (114 KB)

For now the plane covers the cube but I only want the shape of the “A” covering the cube.
How do I have to setup Blender to get a perfect mask of the cube ?

Kind regards
Alain

It looks like only the A is covering the cube.
Not sure what you mean.
By the way, I tried the same node set up for the A but did not get the same result.
Can you post what the A.jpg image looks like?

Sorry, forgot to mention this.
I added the Blendfile in the first Post.

Kind regards
Alain

So the render shows only the A covering the cube, so what is it you’re wanting?

I want a correct mask of the Cube where the shape (not shape of the Plane) of the “A” is considered, see here:

Kind regards
Alain

My example shows just the principle. I do not really need an “A” :wink:

I need mask in a scene with trees which have leaves made of a plane and textured with an alphatexture (the actual shape of the leave).
It has nothing to do with volume textures.

Anyone knows how to achive it ?

Kind regards
Alain

See if this is what you want.
Rendered A out on a separate render layer.

Attachments

alphaplane.blend (645 KB)

Screenshot of the result.


Object index does not take alpha transparency into account because to the index the object is just a ‘dumb’ plane with no other properties. You will need to use a separate layer with its own alpha to get what you’re looking for.