Model Target Generator User Guide

Vuforia Image

The Model Target Generator (MTG) converts an existing 3D model into a Vuforia Engine dataset that can be used by the Vuforia Engine for Model Target tracking. This tool enables you to confirm whether the features of your model will be useable, to set-up the initial snapping position, and then export the final dataset.

The dataset produced by the MTG includes renderings of the model from the Guide View (detection position), which you can use if you want to create your own custom Guide View images that might be a better match for the visual style of your app than the default Guide View image that the Vuforia Engine API provides.

Description

MTG can read a variety of 3D file formats and convert them into Vuforia Engine’s internal mesh format. Consequently, any visual error in the model introduced in this conversion process will be displayed in the MTG viewport. Some source model formats can result in wrongly converted models since they are missing mesh information. Therefore, the MTG should be used to check whether the imported model corresponds to the source data. If there are issues, using a different file format may resolve them; if not, the source data may need to be cleaned up.

The Model Target Generator lets you define multiple Guide Views for each object. It also allows you to merge datasets for multiple Model Targets into a single dataset, and create training data that allows your app to automatically switch between multiple objects and/or multiple Guide Views at runtime based on what is visible in the camera.

Functionality

After importing the 3D model into the MTG, the user should make sure the model fulfills the requirements of the checklist displayed on the side. In addition, the user needs to make sure that the scale of the model is correct. Some file formats do not have unit information propagated through the import pipeline. For this reason, the MTG displays the size of the volume occupying the object in meters.

If the object is in fact modelled in different units, this can be quickly fixed via a pop-up menu. This information is then propagated to the exported dataset to ensure tracking works properly. Setting the unit in the UI does not re-scale the 3D object - it only specifies how a unit of 1 is supposed to be interpreted. Rescaling the model is not supported in the MTG as it is only designed to be a 3D model viewer, and not a mesh editor.

Installing the Model Target Generator

Minimum System Requirements

  • 64-bit, Windows 7 or later

Installation and Setup

The MTG comes in its own package which doesn’t need to be installed. The archive needs to be unzipped and the MTG can be run using the executable file. A basic set of model converters is shipped with the MTG. If JT conversion is required for input, Creo View and the accompanying JT adapter need to be installed as well. Only when Creo View is able to import JT files can the MTG do so.

As long as the source model is of a format that the MTG is able to import, no additional model conversion is needed. The MTG takes care of it automatically when a new project is created, or even when the source file is updated (assuming that the source file is still accessible at the location used upon project creation).

Model Requirements and Preparation

Vuforia Engine’s Model Target Tracking performs best on CAD models which have particular characteristics, such as corresponding color to the phyiscal object, are low in complexity, and similar.

For more information, see Model Targets Supported Objects & CAD Model Best Practices.

Supported Features

The import pipeline supports meshes containing:

  • Multiple sub-meshes
  • Vertex positions
  • Vertex normal
  • Vertex texture coordinates (one set only)
  • Diffuse solid colors
  • Diffuse texture colors
  • Normal maps

In case the input model provides more than the aforementioned information (e.g. additional texture coordinate sets), they will be ignored upon import.

Supported Formats

The MTG supports reading of: Creo View (.pvz), Collada (.dae), FBX (.fbx), IGES (.igs, .iges), Wavefront (.obj), STEP (.stp, .step), STL (.stl, .sla), VRML (.wrl, .vrml), glTF 2.0. When installed for Creo View, JT is also supported.

The best import results have been observed with Creo View, Collada, FBX, and JT.

Model Preparation

For a detailed overview of recommendations and best practies, see Model Targets Supported Objects & CAD Model Best Practices.

When preparing the 3D model for the MTG, the user needs to check that the scale of the digital and the physical object matches. Attempting to track a toy replica with the 3D model of the full-size object can fail in some instances. In order to be sure to get the best tracking quality, the sizes of the models need to match.

If the model has more than 400,000 polygons or more than 10 parts, the model will need to be simplified. The process of simplification consists of reducing the number of polygons needed to represent the object as a mesh. Simplification is required for the computer vision algorithms to run on mobile devices in real-time; polygon reduction does not impact the detection and tracking accuracy, as long as it is not too coarse.  

Any simplification tool will introduce some artifacts. Artifacts with a reduction range of 1:10 generally do not impact the computer vision algorithms. For example, reducing a mesh corresponding to the 3D model of a whole car from 500,000 polygons to 50,000 polygons produced a significantly reduced dataset, and still achieved good detection and tracking performance.

Modification

In some cases, the 3D model of an object can contain parts that are not on the object being tracked (or not on all instances), such as an optional extra component that you can specify when ordering the object - extra footrests or a passenger seat on a motorbike, for example. Ideally, the 3D model used for tracking should not contain this part.

In addition, parts that can easily move from their position in the 3D model (e.g. a steering wheel that can be rotated or adjusted to fit the driver) can interfere with tracking. Removing it from the 3D model can improve tracking quality since it decreases the disparities between the 3D model and the real object.

Tools

To simplify or modify your model, use a third-party mesh editing tool, such as SimplygonBlenderMaya, Umbra3D, and MeshLab. For more information, refer to the official documentation of your specific tool.

Model Target Generator Usage

Please see How to Create a Model Target for a step-by-step guide to creating a new Model Target using the Model Target Generator.

For information on setting up the Target Recognition Range for a Guide View, see Model Target Guide View.

Using the Output Files

For Unity, you will use the *.unitypackage file. Import it into your Unity project and add and configure either a ModelTarget GameObejct or an ObjectRecognition GameObject to use it. See the Introduction to Model Targets in Unity for more information.

For an app developed using the Vufora Engine native SDK, load the *.dat and *.xml either into a DataSet created from the ObjectTracker, or a TargetFinder obtained from the ObjectTracker. See Model Targets Native Workflow for more information.

Optionally, use the PNG files as a baseline to design custom Guide View images that your app will use to guide users to correctly align the camera with the tracked objects in order to initialize tracking. If used, note that custom Guide Views need to be loaded and packaged separately by the application developer. See the Model Targets API Overview for details.

Guide Views

Using the Model Target Generator, it is possible to define one or more Guide Views for a Model Target, and to set the Target Recognition Range for each Guide View. For more information, see Model Target Guide View.

Trained Model Target Datasets

If you want to allow your app to automatically switch between different objects, and/or if you want your app to switch Guide Views automatically based on how the user is approaching the object, you need to create a trained Model Target dataset.

This is done from inside the Model Target Generator app. See Trained Model Target Datasets for more information.

Learn More

Model Targets Overview

How to Create a Model Target

Model Target Guide View

Trained Model Target Datasets

Model Targets Supported Objects & CAD Model Best Practices

Model Targets API Overview