I'm not sure if this is a Yafaray bug, maybe someone can take a look at it?

I have four objects I want to composite separately.Rendering Index passes and selecting one of the objects leaves a slight (aliased?) outline of the other objects:-

I get the same result with the material index pass, so I'm guessing it's related to the antialiasing, but I don't know whether it's Blender or Yafaray. It's easy to fix with a Dilate/Erode node, but if the objects have a lot of small details they may get lost.

I remember I was worried about it at the beginning, but I could not find a good solution for it.

For example, even if I managed to remove the antialiasing, still I have this problem:

* Imagine you have the background, one object and another object partially overlapping the first object (partially in front of it).* If you have antialiasing (as of now), the edges of the objects will not have the "correct" ObjectID/MaterialID. In fact they will probably have a number not belonging to any as the edge would be a bit "mixed" with samples from background and/or object1 and/or object2

However, in I managed to remove the antialiasing, what should happen with the boundaries between objects and between objects and background? Due to the nature of the render, the pixels at the edges receive contribution from the two objects/background. What criteria should we use to decide to which object those pixels belong without antialiasing?

Also, I noticed that without antialiasing using masking operations would cause pixels in the edge that are ugly, and sometimes getting thin high contrast parts of the other object.

So, this is my dilemma... at the time I decided to keep it as it was (with antialiasing) as for me it was the "lesser evil", but I'm open to any ideas to improve it!!

Yes, that is how I've done it now: the "Absolute" passes will not have AA (values 1.0, 2.0, etc, and in the "boundaries" it will show the highest of the two indexes, not the average). The "Color" passes will have AA