I mention also this other solution that looks working good https://www.youtube.com/watch?v=FrPC6nkv7L0
I know it's an old question but, you could also use the option "Mesh ID" when baking the ID map in SP, so that each separate object gets a random ID color, you don't even need to do vertex painting for that matter.