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 ?
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?
My example shows just the principle. I do not really need an “A”
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.
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.