 So you just want an easy way to turn your polygroups into texture IDs, not a problem. With polypaint turned on, go to UVs and set your size to 4k. Then under polypaint, say paint from polygroups, and then under textures, say create from polypaint. Clone, then under textures, flip V and export the image, okay? Then in substance, file, new, set your size to 4k. Import your object and under texture settings, do whatever normal bake stuff you usually do. Import resources, grab your map, say it's a texture, put it in the current project, then click ID, and set it to your ID map, you're done. From here, just hold control and drag materials wherever they need to go. All that helps, and as always, hope you have a fantastic day, and I'll see you around.