Automatic Coloring of Model Targets

Improve your model’s tracking performance and robustness by applying colors to parts of an untextured 3D model in the Model Target Generator (MTG). The MTG is capable of automatically distinguishing parts and color them for you, making it even easier for Vuforia Engine to track your Model Targets.

Use Cases

While Vuforia Engine’s Model Targets feature is designed to detect objects by shape, giving additional information on the materials such as parts of a model can help to significantly improve detection robustness. Colors can also be used to indicate different parts with small gaps in between that are strongly visible in reality, but difficult to extract from a rendered view. Examples are gaps between the front and back door of a car. 

Therefore, it is good practice to assign different colors to parts in order to indicate different materials or surface properties of the real object, as well as highlighting edges between parts. While it is possible to apply coloring in any CAD modelling software, the Model Target Generator also supports automatically detecting and coloring differentiating parts of a model.

Preparing a Model for Coloring

In addition to coloring the parts of your 3D model, it is advisable to follow the practices on Model Targets Supported Objects and CAD Model Best Practices to prepare your 3D model. First, meet the described properties of the digital model and physical object; then either proceed to color or texture your 3D model before importing it or color it in the MTG. 

Coloring the model with a single color will not improve tracking robustness. This would for example be the case if your model is made from a single mesh. Note also, some file formats such as STL files do not transport color information. 

Coloring Parts in the Model Target Generator

The MTG will automatically detect if an imported 3D model is without texture and color. When a model is without color, and consists of two or more parts, the MTG offers to automatically color them. You can always skip this tab and choose to color the imported model at a later point or not at all. 

Apply Coloring

The option to color your model is available in the Coloring tab.

By clicking Apply Coloring your model will receive a range of colors randomly chosen from a palette. If the source file of a model is changed, re-importing it will require applying Coloring again.

Even if a model already comes with colors, it might still be beneficial to apply coloring in order to highlight edges that are otherwise not visible.
Take the following considerations into account in this case:

  • If a CAD model does not contain realistic colors of the actual physical parts, or parts next to each other are colored with the same color, applying random colors will most likely improve recognition and tracking of that model.
  • If a model already contains very detailed and realistic coloring or even a texture, using that realistic data is most likely beneficial over randomly coloring parts.
  • When in doubt, it is recommended to compare the Model Target performance of both the original and the colored model.

If for any reason you want to undo coloring and re-apply the original colors or textures, this can be done from the Model Attributes tab as well:

Coloring before Simplification

If you are working with a complex model (many parts and triangles) you have the option to simplify it in the Complexity tab of the MTG. Make sure you apply Coloring to the model before Simplification. Attempting to Apply Color or Undo Coloring after having simplified your model will result in having to reset the Simplification and repeat the Simplification process.  See steps to simplify in the How to Create Model Targets - simplification guide.

Training Randomly Colored Model Targets 

When random coloring has been applied to a Model Target, it will automatically set the Appearance Mode to “Non-Realistic” when adding it to an Advanced Model Target Database.

NOTE: When adding more than one Model Target to the database, it is important that they all are either colored and textured accurately as the real-life object, or that they are all uncolored, un-textured or colored with colors not matching the real-life object. This principle will ensure that all objects will be tracked correctly with or without the objects’ colors. The MTG will show a warning message if it registers a discrepancy between the Model Target appearances.