IDMapper

Creating id-maps the easy way (now available for 3.3beta *)

(this documentation is also included as a .pdf file in the software distribution)

coverimage.png

When rendering realistic and highly detailed models, memory is often scarce, especially on GPUs where also the number of textures that can be held in memory simultaneously is often severely limited. Physically based  rendering (PBR) often uses four or more textures per material and if you have many materials on your model this adds up. Combining textures used by all the materials on a model may save memory and will reduce the number of textures. 

Texture painting programs like Substance Painter can paint anything you like into a single set of maps. However, you must be able to identify and select groups of polygons on your model that use the same material in order to paint a material at the right place. A convenient way to do this is to supply the texture painting program with an ID-map in the form  of a vertex color layer. Each color in this layer identifies faces that that should be assigned the same material.

A vertex color layer can be painted by hand in Blender, but Blender’s vertex paint tools are focused on painting freehand rather than applying colors to specific groups of vertices.

IDMapper will generate different colors for related polygons automatically. This can save you a lot of time, especially with high poly models. Which polygons are considered related can be configured with several options that you can explore interactively.

If the automatic detection of related faces is not sufficient, extra menu options are provided to set selected faces to the current vertex paint brush color, copy colors from one group of faces to another and more, including the option to copy a ID-map from a low poly mesh to a high poly one.  Also, an additional Face Paint mode is provided to paint individual faces and manipulate colored areas in various ways while keeping face colors uniform, ... and much, much more.

In short, IDMapper aims to provide you with a versatile toolkit to create id-maps easily.


*) download idmapper330-20220731.zip from your Orders page to use it in Blender 3.3.

Changelog


Date

Version


2 November 2016

201611021318

Initial public version

3 September 2017

201708271007

- Add detection of sharp edges

- Help display in face paint mode

- Respect sharp faces when smoothing, expanding or shrinking a region

- improved navigation

- Bug fix: paint selected faces now sets undo stack

18 September 2017

201709181705

- Add ID Color list panel

- Extends color sampling outside object

- Undo levels now configurable

10 December 2017

201712091437

  • Vertex groups to vcolor

  • Vertex colors to materials

  • Bake vcolors to image directly

  • Normalize vertex colors

  • Added tools panel

  • Added area weight option

  • Added custom icons

  • Added modification tracking to ID Color List

29 December 2018

201812291044

Initial 2.80 release

12 March 2019

201903121607

Ui panel layout change and bug fixes

26 May 2019

201905261241

Bug fixes

15 October 2019

201910151421

Bug fixes, user manual 2.80 update  and 2.81beta verification

18 April 2020

20200418

Minor bug fix and 2.83 LTS verification

Installation

Installing IDMapper for the first time is simple:

  • Unpack the .zip file 

you probably already have done that as it contains this document (IDMapperdocumentation.pdf) and the add-on itself (an archive with Python files, idmapperyyyymmdd.zip, where the yyyymmdd portion of the name is a timestamp that may vary)

  • Select File → User Preferences ... → Add-ons from the menu

  • Click ‘Install from file …’ (at the bottom of the screen) and select the idmapperyyyymmdd.zip file

  • Click ‘Install from file ...’ (at the top right of the screen)

  • Check the enable check box to the left of the add-on you just installed

The add-on will now be available in Vertex Paint mode from the Paint menu as ‘IDMapper’.

The operators supplied by the add-on are also available in the toolbar in Vertex Paint mode (press T in the 3d- view if the toolbar is not visible). The operators are available in the ID Mapper utils panel.

Installing an updated version of IDMapper

If you want to replace a previous version of IDMapper you have to remove the old version first. to do this, go to File → User preferences … → Add-ons and either search for IDMapper or go to the ‘Paint’ category where it will be located. Click on the add-on and then on the ‘Remove’ button. after removing the old version follow the instructions above to install the new version.

Workflow

IDMapper is a tool to create an ID-map in a few easy steps. If you have both a high poly mesh and a low poly mesh available, you would normally create a basic ID-map on the low poly mesh first because then it can delimit areas to sharp corners which would be undetectable in the high poly mesh when this high poly mesh was for example created by applying the bevel modifier. In a second step you can then copy this ID-map from the low poly mesh to the high poly mesh.

With your low poly mesh object selected:

  • Go to Vertex Paint mode

  • Select ‘IDMapper’ from the Paint menu or the ID Mapper util panel in the toolbar

  • Change options to get a good initial ID-map

  • If necessary, go to Face Paint mode, either by pressing ‘P’ on your keyboard or by selecting Face Paint from the Paint menu.
    Now you have several options to paint individual faces or change colored regions as a unit. You can leave face Paint mode by pressing ‘ESC’ or by right mouse click.

  • If you have a high poly mesh that you wish to transfer the ID-map to, select this high poly mesh

  • Go to Vertex Paint mode again

  • Select Vertex Color Copy from the Paint menu.
    Of course you can tweak this high poly ID-map in Face Paint mode as well.

  • Finally, export your model using a format that stores vertex colors too. FBX is commonly used when exporting to Substance Painter.




Options reference

the ID-mapper operator comes with many options. Most options affect the way boundaries between regions are detected while others limit the faces to which new colors will be applied.

Boundaries

Most options either determine what should be seen as a material boundary or influence the way separate but related regions are merged.

By Material id

If checked, faces will be assigned a color according to their material id. This is mutually exclusive with all other boundary options.

Display color

If selected, faces with the same material ID will be assigned the diffuse color of the corresponding material instead of a random color. Only available if By material id is checked.

UV Seams

If checked, edges marked as uv-seams will delimit a region.

Sharp edges

If checked, edges marked as sharp will delimit a region.

Bevel threshold

If  a non zero value is selected, edges with a bevel weight greater than this value will delimit a region.

Crease threshold

If  a non zero value is selected, edges with a crease weight greater than this value will delimit a region.

Smooth

If checked, connected faces with a different smooth attribute will be part of different regions.

Merge

If selected IDMapper will try to merge faces that are neighbors but were assigned to a region of their own. This will for example assign faces that belong to a thin ribbon that separates larger areas but are assigned different colors to a single region of their own.

(Similarity was set to 0.94  for both images but on the right Merge was checked. Each vertical face was different enough to be assigned a different color but merge will gather strips of faces with different colors to a single region)

Match

If selected, regions that have received a different color but have the same number of faces will be assigned the same color anyway. This will enable you to assign the same id to mesh parts that are assigned a different color but are perhaps copies. An example would be nuts and bolts in a hull plate.

Closeness

Numbers higher than 0 will restrict the matching of regions with the same number of faces. The higher this number the more strict the matching is.

Restrict map to

Only selected

If checked, only selected faces will be assigned vertex colors according to the region they belong to. Non selected faces will be assigned the Base color. This base color can be changed with a color selector.

Only material ID

If selected, faces are assigned a color based on their assigned material. This is useful if you have assigned materials already but decide to combine everything to a single material later, after converting the material IDs to an id-map first.

Base color

This color will be assigned to any faces that are not assigned a color explicitly. IDMapper also provides a small utility in Paint → Vertex Color Merge that lets you add or multiply two vertex color layers. This way you can generate two vertex color layers with different restrictions and settings and later add (if black is chosen as a base color) or multiply (if white) the two layers (See also )

Options

Similarity

This slider lets you specify how similar faces should be to be considered part of the same region. A value of 0 will group all faces into the same region (if no other delimiters are specified) while a value of 1 will only assign neighboring faces to the same region if their face normals are identical. Selecting a value slightly lower than 1 will allow you to group polygons in slightly curved regions as well.

(From left to right a similarity of 1.0, 0.97 and 0.91 respectively)

Area weight

Consider face area in similarity test

Seed

Each seed value will produce a unique but reproducible set of colors.



Vertex Color Merge

IDMapper also provides a small utility to merge (i.e. add or multiply) two vertex color layers. This is intended as an easy way to combine different id maps that were restricted to different selections. Non selected faces will receive a base color and the default black color will let you combine two different layers by adding them.

The utility is available from the menu Paint → Vertex Color Merge and will create a new vertex color layer with the result of the operation. It has the following options:

Mode

Either Add or Multiply

Layer 1

Lets you select the first vertex color layer

Layer 2

Lets you select the second vertex color layer

Vertex Color Copy

A new option is provided in Paint → Vertex Color Copy. It allows you to copy the vertex colors from another mesh to the vertex color layer you are currently working on. This will work even if the meshes do not have the same number of vertices. In fact, its primary purpose is to copy an ID-map from a low poly mesh to a high poly copy of that same mesh. Because it is often easier and less work to create an ID-map on a low poly version first, this potentially saves quite some time.

The operator has the following options:

Source mesh

lets you select the mesh to copy the vertex colors from. It will always copy from the active vertex color layer of the selected mesh (if present)

Set Colors From Selected

A option is provided in Paint → Set Colors From Selected. It will set the vertex color of selected faces to the color of the current brush. This might help if the automatic detection of related faces is not quite what is needed.

VGroups to Vertex Color

Assign vertex colors based on vertex group membership. Each vertex group present will gets its own unique vertex color. 

Weight threshold

The minimum weight of a vertex in a vertex group the be considered part of that vertex group.

NOTE: if vertices are a member of more than one vertex group the color the will get is undetermined. 

Replace

If checked, any vertex that is not a member of any vertex group will get a default base color.

Base color

The color to assign to vertices not in any vertex group.

Full face

If checked, all faces will get a uniform color, i.e. each face will be uniform in color, even when its vertices have different weights

All

If checked, a face will only get a (uniform) colors if all its vertices are members of a vertex group.

Seed

Different seeds will result in different but reproducible vertex color assignments.

Vertex Colors To Materials

Adds a node based material to the object data for each distinct color in the active vertex color layer. The diffuse color and the Viewport Color (if Cycles is the render engine) are set to the vertex color.

Match Color List

If checked the ID Color List will be checked to see if it contains matching colors. If so, the name of the color will be used as the material name.

Tolerance

Due to the way vertex colors are stored an exact match between colors is difficult. By slightly increasing the tolerance more matches are possible.

Bake Vertex Colors

Creates a new image that contains the colors of the active vertex color layer. If the object has no uv-map, one is created. After baking the focus is shifted to an image editor window or the 3d-view is changed to an image editor if no suitable window is present, Note that you have to save this image if you want to keep a permanent copy!

Size

Selects the size of the image map to create. Currently only square maps are possible.

Add margin

Expand colored regions into non mapped areas by 1 pixel. Might give better results in relatively coarse maps.

Normalize Vertex Colors

Assigns a new color to each unique color in the active vertex color layer. The new colors are chosen in such a way that they are as far apart as possible in the color cube. This is useful if you have very many vertex colors and the random assignment caused some colors o differ only slightly. This situation would make them difficult to select and distinguish in software that lets you sample a color form an ID map. By assigning colors that differ as much as possible this issue can be alleviated.

Face paint

in addition to automatically assigning colors to faces, IDMapper also provides some extra tools to color faces.  Vertex paint mode in Blender is mainly focussed on applying vertex colors in a painterly manner: colors are applied to vertices and blended in several ways. This is less convenient when using vertex color layers as id-maps because here we typically want every face to have a uniform color. 

Face paint mode (available in Paint → Face Paint, shortcut key ‘P’) offers a few options to make applying uniform colors simpler. 


Key

Action 

Modifier

Modified action

Left mouse

Paint

Alt

Restrict paint to region

S

Pick color



K

Fill region

Alt

Fill all regions with similar color

P

Apply color to selected faces



Numpad +-

Resize region

Alt


Ctrl

Restrict resize to current  brush color

Respect uv seams and sharp edges

W

Smooth region

Alt


Ctrl

Restrict changes to current brush color

Respect uv seams and sharp edges

F

Brush size



Numpad /

Normalize



Ctrl-Z

Undo



H

Toggle help display




Painting colors on faces

Left clicking with the mouse will apply the current brush color to the face under the cursor. Pressing the Alt key will restrict painting to coloring just those faces that have the color of the face under the first click.  Moving the mouse wheel while painting will change the size of the brush.

Selecting the brush color

Pressing the ‘S’ key will set the brush color to the color of the face under the cursor. You can hold the ‘S’ key and move the cursor around to pick the color you like.

Note that unlike picking colors in Blender’s regular vertex paint mode, shading is not taken into account. This means that you will always pick the true face color. 

Filling a region with color

Pressing the ‘K’ key will apply the current brush color to the region with same color as the face under the cursor.

Pressing the Alt key will will apply the color to all faces with the same color as the face under the cursor.

Applying a color to faces that were selected in edit mode

Pressing the ‘P’ key will apply the current brush color to all faces that were selected in edit mode. Because you can switch to edit mode and back again using the TAB key this allows you to use convenient face selection options like selecting face loops etc.

Resizing a colored region

Pressing the ‘Numpad +’ key will increase the size of the colored region under the cursor. Pressing the Alt key will restrict the expansion to faces with the same color as the current brush (remember that you can select the brush color with the ‘S’ key).

 ‘Numpad -’ key shrinks the region.

Pressing the Alt key will restrict the resizing to faces with the same color as the current brush.

Pressing the Ctrl key will respect edges which are marked sharp or are a uv-seam.

Smoothing a colored region

Pressing the ‘W’ key will smooth the colored region under the cursor. This means that faces with the matching color but with just one neighbor of the same color or with the non matching color but two or more neighbors that do match will be recolored, reducing the raggedness of the area boundary.

Pressing the Alt key will restrict this behaviour to faces that are neighbors to faces with the same color as the current brush.

Pressing the Ctrl key will respect edges which are marked sharp or are a uv-seam.

Normalizing face colors

Pressing the ‘Numpad /’ key will normalize the colors of faces. This means it will randomly select the color of one of the vertices of a face and apply it to all vertices.

Undoing changes

Face paint has it own (limited) undo stack. This means that while face painting you can undo most operations with Ctrl-Z up to a certain depth.

On screen help

When working in face paint mode a list of the available actions is show in the lower right corner of the screen. This can be toggled on or off with the H-key.

Navigation

Rotating (Click and Drag Middlemouse) and zooming (Mousewheel up/down) works like before as does centering (Numpad .) and toggling edit mode (TAB). HOME and Ctrl-Numpad 2,4,6,8 also work as expected.

The ID Color List Panel

If you have an external list of colors that you want to apply to all your mesh models, the ID Color List Panel offers a tool to utilize such a list.

It is available in the Tools region of the 3D-view

Your workflow would be as usual: first use IDMapper to assign an initial color map and then go to Face Paint mode to fine tune your color assignments. Then, still within Face Paint mode, either sample a color from the ID Color List with the S-key, or use Ctrl-1 through Ctrl-9 to select one of the colors from the ID Color List directly (if you have more than nine colors you can use Ctrl-0 to roll all the colors in the list upward). With this color selected you can now use the K-key or Alt-K to apply the color to a region or color as usual.

Actions

Select

Clicking on the name of an item in the list will make it active and will assign its color to the brush.

In Face Paint mode, Ctrl-1 --- Ctrl-9 are provided as shortcuts.

Set color

Clicking on the color will show a color picker that lets you change the color of this item. This only changes the color for later use of this item, the object in vertex paint mode is not affected.

Rename

Double clicking on the name of the item will let you rename the item. Whether duplicate names are allowed depends on the application setting ‘duplicates allowed’.

Load

Load an ID Color List from disk. An ID Color list is a .csv file. It either consists of 2 or 4 columns, separated by commas.

If a line contains 4 columns, the first column contains the name, the three other columns the red, green and blue components respectively. Each component is in the range 0.0 - 1.0

If a line contains 2 columns, the first column contains the name, the second color contains the color in hexadecimal format: either #RRGGBB or RRGGBB (case is ignored)

Save

Save an ID Color List to disk. The file written is a .csv file with 4 columns, separated by commas. The first column contains the name, the three other columns the red, green and blue components respectively. Each component is in the range 0.0 - 1.0

Note: the Save button displays an asterisk (*) if the current color list has changed.

Init

Create a color list entry for each unique vertex color. If ‘No duplicates’ is checked, now new item will be created if the color is already present in the list. The ‘Tolerance’ option will let you specify how close colors should be to be considered identical.

Add

(click + symbol)

Add a new item with a default name to the end of the list and make it active. The color will be set to the color of the currently active brush.

Remove

(click - symbol)

Remove the active item. The final item cannot be removed.

Move active item

(up- or down-arrow symbol)

Move the active item up or down in the list.

Roll list upward

(curved arrow symbol)

Move all the items in the list upward, the topmost item will become the bottom most. The active position stays the same.

In Face Paint mode, Ctrl-0 is provided as a shortcut.

Caveats

The ID Color List shows the color samples in a gamma-corrected manner, just like the color of the currently active brush. When applying a color in vertex paint mode the actual colors are not 100% identical to the numerical values that you see when you apply the eye dropper to a color sample. This means that when you export a mesh, the values saved for a vertex color layer may differ several percent from the values in your ID Color List. (typically 1-2%) This appears to be inherent to the way Blender handles vertex painting.  When picking colormap colors in texture painting software for use as a mask, you should select a suitable tolerance. 

Add-on preferences

Allow duplicates

If set, you may have duplicate names in a ID Color List. Otherwise names will have suffixes append to distinguish them.

Undo levels

The number of undo steps available in Face Paint mode.




Sales 300+
Customer Ratings 10
Average Rating
Dev Fund Contributor
Published over 7 years ago
Blender Version 2.78, 2.79, 2.8, 2.81, 2.82, 2.83, 2.93, 3.0, 3.1, 3.2, 3.3, 3.6, 4.0
License GPL
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message