In various scenes I have areas that could be isolated using cryptomatte or material id or view layer and I want to effect that area only. With colorramp, the result applies color to the entire output rather than the isolated area. On a case by case basis, I can fiddle with the result using color key, alpha over, mix etc. and get an acceptable result. But, what I really want is a way to do this simply every time.
I tried using holdout shaders and view layers. For example, from back to front is:
So, I created view layers:
background + torus holdout + plane holdout + sphere holdout
Torus + plane holdout + sphere holdout
Plane + sphere holdout
But this didn't work. Combining them, in compositor with Mix blend mode, the result does not show the background behind semi-transparent areas of the sphere. Plane does not show the torus in transparent areas, etc.
It seems to me like such an obviously needed thing, that I'm hoping there is a formula to achieve this in compositor. Is there?