Baking maps in Blender
About
If you wish to bake material IDs, or any other type of baking (similar to what Substance Painter does) I recommend my favorite Blender plugin: TexTools.
Requirements
At the time of this writing, use Blender 4.2.x which can be found here:
Textools can be download here. Click the green Code button and select Download zip. In Blender, go to Edit/Preferences. Select Add-ons on the left. In the top-right most corner is a small down arrow button. Select that button and choose Install from Disk... Select the ZIP you just downloaded. Add-ons are activated by clicking the checkbox if not already.
Tutorials
Complete Introduction: https://www.youtube.com/watch?v=rEcJQ6Jdue4
Material IDs: https://www.youtube.com/watch?v=FCvQJAgyg3M