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 can help to significantly improve detection robustness. Colors can 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 different 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 choose to 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. 

Specify Appearance and Apply Coloring

The option to color your model is available in the Coloring tab. In this tab, you can choose between Realistic Appearance or Non-Realistic Appearance.

  1. Realistic should be selected if the 3D model realistically represent the real physical objects in terms of textures and colors etc. If this setting is selected, the resulting database will only work well for physical objects that have those same colors, patterns, or decals as contained in the 3D model. This mode is e.g., typically used for 3D scanned objects, toys or in cases when the shape is not distinctive enough between objects. In general, using textures typically helps with recognition.

    The Model Target Generator will automatically detect if a model has been created from a 3D scan based on the properties of its texture. If this is the case, the Realistic Appearance option will be pre-selected:

  2. Non-realistic should be selected for cases where the 3D model does not have realistic colors or texture. The resulting database will not look at the actual colors of the real physical objects. This mode is typically used for 3D models of industrial objects where no information of appearance is available

NOTE: When adding more than one Model Target to an Advanced Model Target database for training, it is beneficial if they all use either Realistic Appearance or Non-Realistic Appearance. Combining targets with different appearance settings might impact recognition performance.

By confirming that the 3D model does not represent a Non-Realistic Appearance, you get the option to randomly color your model 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 MTG-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:

Color 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.

Can this page be better?
Share your feedback via our issue tracker