Here’s a tutorial on how to create a Color ID Map in Maya LT 2018. I use Substance Painter for texturing.
Combine your mesh (Mesh>Combine) and assign it a simple material via Hypershade. Export it (File>Export selection) as an FBX File.
Separate your mesh (Mesh>Separate). Combine the parts sharing the same UV and assign different colours to parts of your model.
Open Texture Baking View window (Windows>Material/Texture Baking Editors>TURTLE>Bake Layer Editor) and select your mesh.
Go to Texture Baking Settings (Windows>Material/Texture Baking Editors>Texture Baking Settings). At first, check Bake selected surfaces in Baking section. Ensure your bake layer is selected in the Bake Layer list. Check Merge to one map and Save to File. Select where you want to save your maps as well as the file format.
In Shader Outputs, select Albedo (which will be your color id in Substance Painter).
Go to Texture Baking View (Windows>Material/Texture Baking Editors>Texture baking View) and click the Texture Bake icon.