Object ID or Material ID or Custom passes

Thanks for reply Tim.
Please have a look at the attached image

. This is the material they are using as post process. You see that they are using a render target as texture but that render target gets data from a CPP file( I’m not good at C++ but I have few OOP notions from python). That is the file that does the actual segmentation coloring
How possible is it to turn that functionality into a plugin for other type of post process renders like the segmentation by color they are doing? Because as I said in my first post, more and more people use UE4 for cinema work siwtthe new sequencer. We need functionalities like this to be able to composite 3D renders
Thanks.