Multiple RGB values for a single black I am very new to blender and would like to understand the mistake I am doing with the color ramp node. I am currently using color ramp to assign different textures to each object in my scene. The complete surface should have the same RGB value. I then use this rendered image and filter out objects based on the pixel values. I have created a simple scene with 2 default cubes(pass index for the bottom cube in 0 and for the upper cube is 1) and added the color ramp settings as shown in the image. But, when I render with this settings, the RGB values on the surface are not uniform. Can someone please help me with this issue. I am using Blender 2.8.
If you over expose your render you can see patern.

Render saved as PNG 8-bit. Nothing is pluged into Surface socket of Material Output node. Tested with Eevee, Cycles, Samples ... all same result. Even if compression is set to zero.



The only difference did PNG saved as 16-bit. Completely black. So I guess OpenEXR will work as well. So the issue comes from output file format.



... and just for lovers of generic graphics - JPEG

 

And as mentioned already - Cryptomatte seems to me as a better friend, especially for material. With this ColorRamp 0/1 option I can't imagine to work on more complex object.