IDMapper - create ID-maps the easy way

Thank you for the answers. How do you bake vertex color to a 2k or 4K png? I’m getting artifacts around the hard edge in SP.

Is there a way of changing the default shortcuts?..
Can’t find them on keymap section.
image

Thanks

Those are hard coded i am afraid and only a limited number of events are passed through to the rest of blender (navigation with the mouse for example) so i figured there was no particular need for user configurable keys. Are there any particular keys that get in the way? (Because creating a fully configurable key set is a challenge as these paint actions are not operators themselves so cannot be configured via the shortcut preferences , or at least i do not know how to add new, non-operator entries :slight_smile:

They’re all over the keyboard. I would suggest to restrict them to the left side of it, say close to the ctrl, alt and shift keys.
Having to reach P or K is quite annoying.
Also, would like to know if there’s a way to store the vertex colors into a list and transfer it to another object using a fixed value for them. When I saw the video of this addon I noticed ID Color list and I thought it was that, but can’t find my way around it.
Thanks

I took this example from TexTools addon, it would be helpful to be able to store the values somewhere to reuse in several models and not losing them.
image

1 Like

Hi, is this Addon compatible with 2.83?

I did test it with 2.82 and several 2.83 beta versions and expect it to work with 2.83 LTS but I haven’t tested it in detail (yet). Testing is on my todo list though and i hope to complete that before the end of the month.

1 Like

and … because i’m still at home anyway I tested it right away (on 2.83.2 LTS ) and it looks fine :slight_smile:

stay safe,

– Michel.

Thanks, I appreciate it. :slight_smile:

There is one last question I’d like to ask. I read it is possible to convert the diffuse color of a material of an object directly to its vertex color with this addon. Is this also possible when the object has multiple materials assigned. For example one mesh consists of two cubes, one has a red material on it and the other a green one, would this directly convert into green and red vertex color for the corossponding vertices?

yes, but not exactly: when the Material Id option is checked you have the option to set the vertex colors based on the display color of the material. (The diffuse color would be very difficult to determine in a node based material)

1 Like

Hi, I bought this to support the creation of a crisp post process outline system as seen in Mars: First Logistics. For a single object, this works great!

The problem is that I want to apply this to multiple objects such that the ids will continue to be unique across all of them. Is there a way to accomplish this?

Here’s what I’m trying to apply it to:

Hi Michael,

I don’t think this is directly possible (if by IDs you mean vertex colors): you could of course join your meshes, generate/edit id maps (and use the match option to create the same color for identical patches) and then separate them again, but that would not be very convenient perhaps, as it would mess up the names given to the meshes.

Oh, there are many levels of inconvenience which is why I bought the tool :smile: I spent a couple hours manually cleaning this up to a decent level and got this:

Truth be told, I’m a graphics programmer, not an artist and easily get lost in blender. Like you said, joining and separating seems painful enough to not do it. I may need to do this on a larger scale in the future so I’ll start dissecting your script at some point to optimize workflow. If you could lend me your ear here and there while doing this I’d really appreciate it!

Hi, congrats for IDMapper, it looks really great!

I’m interested above all in the “Vertex Colors To Materials” feature. The doc is unclear about the fact that the created materials are then assigned to the faces (to replace the vertex colors)? Is that really the case please? I need to export in OBJ format, including the materials…

Thanks in advance.

Sorry I did not see all your videos on your youtube channel, especially this part which answers to my question:

:+1:

Important part here is to realize that vertex colors and materials are separate properties: Vertex colors are connected to vertices (well, loops actually, same vertex can have multiple vertex colors if it is shared by multiple faces) and materials are connected to faces. IDMapper (and its face paint tool) always assigns vertex colors to vertices in such a way that a face has a uniform color (and can therefore be used as an id-map in software like Substance Painter etc.). And because those vertex colors are kept consistent on a per face basis, it is possible to create a material for each unique vertex color and assign material to faces with those colors.

hope this helps,

regards,

– Michel.

Thank you for your answer.
Just a few words about OBJ export after IDMapper materials are set: I need to change them all to “Holdout” materials so that the diffuse color is actually exported in the MTL file (next to the OBJ file). The default BsdfPrincipled material is not exported correctly. Changing “use nodes” in each material doesn’t affect the OBJ export. It works if there are no shader nodes or if that’s a Holdout material (yes it’s tricky). Here is my script:

import bpy
            
# Convert IDMapper BsdfPrincipled Materials to None (or optionaly Holdout)
for mat in bpy.data.materials:
    if not mat.name.startswith("IDMap"):
        continue
    nodes = mat.node_tree.nodes
    principled = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeBsdfPrincipled)), None)
    output = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeOutputMaterial)), None)
    # *** optional
    holdout = nodes.new("ShaderNodeHoldout")
    mat.node_tree.links.new(holdout.outputs[0], output.inputs[0])
    # ***
    nodes.remove(principled)

Have a nice day

The materials are created without using nodes first, and then converted to use nodes (the non node-based properties stay with the material anyway, nodes are ‘extra’ in Blender ). This used to have(?) the effect of assigning the diffuse color automatically to the base color of the single principled shader, but apparently that is no longer the case. (upon saving the .mtl file, the base color is exported as the Kd component, but because all the node based materials have the same base color, all Kd are set to (0.8, 0.8, 0.8). Not sure why converting the node tree to a holdout node has the effect you describe, but apparently the OBJ export code used the underlying diffuse color of the material without nodes.)

Anyway, I’ll see if I can change the code to set the base color of the Principled Shader explicitely; That way it’ll probably work for any exporter.

– Michel.

I have uploaded an bugfix release to BlenderMarket: The base color of the principled bsdf in each created material is now set to the vertex color.