I don’t actually know if this is the appropriate category to ask this, but what exactly is a mesh ID?
I’ll put you in context: I’m preparing to use Substance Painter and I wanted to create some ID maps inside the software. I’ve seen that there’s an option called “Mesh ID”, which I believe refers to the unique “IDentification” of a mesh, right? But!
Imagine that I have a scene with three objects: a cube and two spheres. Imagine that now I join (Ctrl + J) both spheres. So what would I have then? Two IDs, one for the cube and another one for the “double” sphere, or still three, one for each original object? I think (or maybe hope) the correct answer is the first possibility, but I’m not sure. The fact that its name is “Mesh ID”, instead of “Object ID” confuses me. And to further this confusion, after that you have another option: Polymesh!
So what exactly is a mesh ID? Does it exist something like an Object ID in contrast?
There are several ways to prepare a model for ID map generation in Substance.
The workflow I use involves vertex colors. So in your example, you’d select the cube, go into vertex color mode and fill it with, say, red. Then select the joined spheres, go into vertex color mode and fill one with green, and the other with blue.
EDIT: I failed to mention that the mesh ID option in Substance assigns a color to each individual object. Using vertex colors is the way to go when you want to have different IDs assigned to joined geometry (such as the two joined spheres).
Oh, but that’s exactly what I want! Ha, ha, ha. Maybe I didn’t explain it well (it was the reason why I “hoped” that above ). I wanted both spheres to have the same ID, as they would be a single object.
Just for completion, if I wanted the spheres to have different ID colours, would the option “Polymesh” be an alternative to vertex painting? I.E.: does “Polymesh” refer to each “island” of polygons inside an object, such as the two spheres after joined, which we would select with “L” inside Edit Mode?
I don’t recall for sure, but I don’t think the polygroup option works with Blender, as sub-meshes within an object are handled differently in Blender than in most other software. This may have changed though. I own an old copy of Painter.
On the subject of having a different ID for each object: If you have a lot of seperate objects sharing a texture set, you may experience performance issues in Substance. This is why I typically use vertex colors. I’ll first **join all objects into one then use a vertex color not for each part, but for each material. So all steel parts get a color, all plastic parts, rubber, etc. If I need to mask a specific part in Substance, I’ll just use the mesh island mask tool.
**Joining all objects is only done for the exported mesh. The objects can be kept seperate in the final Blender scene.
What I wanted to do was dividing the asset into materials which, at the same time, would be divided into different portions with ID colours. As you recommend, finally I decided to join all the objects of each material and use vertex painting to differentiate between their parts. Would that be correct, or preferable?
An ID is literally “something (arbitrary) that you can filter on [in the compositor].” If you capture the render output in a MultiLayer OpenEXR file, the IDs are one of the output layers that you can request. You can use this to filter on: "what object produced the value of this particular pixel?"
Personally, I’d start by painting the high-poly mesh and then separately paint the low-poly one, that is to say, “also by hand.” Because usually the two meshes really are different. If you simply try to calculate the low from the high, well, to me it comes out looking a little bit odd. You’re going to use each one in a different context and I think that it works best to decorate each one appropriately.