The Model Target Generator (MTG) converts an existing 3D model into a Vuforia Engine database 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 usable, to set up the initial snapping position, and then export the final database.
The database generated 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.
Training Model Target databases
The Model Target Generator lets you define one or multiple Guide Views for each object and it allows you to merge different Model Targets, each with one or more Advanced Views, into a single advanced database. An advanced database is trained with the MTG through a cloud-based deep learning process that allows your app to automatically switch between multiple Model Targets, each with one or multiple Advanced Views with recognition ranges up to 360-degree at runtime.
Installing the Model Target Generator
Minimum System Requirements
- The Model Target Generator is supported on Windows and macOS. For more details on supported versions, please refer to the Supported Versions table.
Installation and Setup
The MTG is linked to your developer account and is launched by logging in with your developer credentials. For easy access over multiple MTG launches, the credentials can be stored in the Windows credential store or the macOS Keychain by checking the Remember Me box, and the credentials will be removed again when signing out.
Instead of using Vuforia Developer account credentials between team members, use OAuth2
client_secret credentials as the username and password. See Vuforia Web API Authentication on how to generate client credentials for your team. The generated client credentials must include the Create Dataset Signature scope for standard Model Target generation and Model Targets – All or Advanced Model Targets for advanced Model Target training.
The MTG is available from Vuforia’s Download Page.
The MTG is available as an installer for Windows (.exe) and macOS (.dmg). Download the installer and follow the steps to install the software.
- Open the downloaded installer and choose whether to install for one or all accounts and, thereafter, select the directory to install the Model Target Generator. A shortcut is automatically created on your desktop when the installation is complete.
- Open the downloaded installer and drag the installer file to the Applications folder to install the tool. For repeated use, you can create a shortcut on your desktop or pin the app to the start-menu.
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. The full list of supported formats is listed below.
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
The 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.
Vuforia Engine’s Model Target Tracking performs best on CAD models which have particular characteristics, such as the corresponding color to the physical object, are low in complexity, and when it follows our other best practices.
For more information, see Model Targets Supported Objects & CAD Model Best Practices.
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.
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 Creo View Adapter for JT is installed, then JT data is also supported.
NOTE: The MTG for macOS does not support STEP (.stp, .step) and JT data files.
The best import results have been observed with Creo View Adapter, Collada, FBX, and JT.
NOTE: Supported texture formats on the models are JPG, PNG and PGM files in 32-bit, 24-bit and 8-bit.
For a detailed overview of recommendations and best practices, see Model Targets Supported Objects & CAD Model Best Practices.
When preparing the 3D model for the MTG, you will need 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 and objects should match. See Best Practices for Scaling Model Targets for more information on this topic.
If the model has more than 400,000 polygons or more than 20 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 artefacts. Artefacts 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 database, and still achieved good detection and tracking performance.
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.
Internal parts that are usually contained in a CAD model - but cannot be seen from the outside of the object when trying to initialize tracking, shall also be removed. These increase the size of the device database during storage in your app, and the polygon count at run-time to deal with. Remove these to further increase the performance during detecting and tracking a Model Target.
To simplify or modify your model, use a third-party mesh editing tool, such as PiXYZ Studio, Simplygon, Blender, Maya, Umbra3D, and MeshLab. For more information, refer to the official documentation of your specific tool.
Model Target Generator Interface
The MTG main interface on the Home Screen has two main parts: On the left you will see individual Model Targets that have been imported or created. Double-clicking on any of them will lead to the 3D viewer to manipulate the model and its Guide Views. In the 3D viewer, a range of tabs are available for configuring your Model Target. In the right corner, a progress indicator shows if all options were addressed.
Back on the Home Screen, the right-side column holds training sets for Advanced Model Targets and lists your configured, running, and finished training sessions. It is here you compose one or more Model Targets into one trained Device Database and export the final results.
The status bar on top of the Home Screen displays your available quotas to create Model Targets and advanced databases. A Vuforia Developer account with a Basic plan has a quota of 20 Model Target Generations and 20 training sets for creating Advanced Model Target Databases. Additional quota can be acquired through licensing. Please see the Vuforia Pricing page for more information.
See How to Create a Model Target for a step-by-step guide on creating a new Model Target using the Model Target Generator.
NOTE: If you are facing connection issues or receiving a ‘Service is not available. Please try again later.’ when using the desktop MTG application while in your enterprise environment, please get in touch with Technical Support for assistance.
Using the Output Files
For Unity, you will use the Unity Asset package file. Import it into your Unity project and add and configure a ModelTarget GameObject to use it. See the Introduction to Model Targets in Unity for more information.
For an app developed using the Vuforia Engine native SDK, load the DAT and XML into a Model Target Observer. See Model Targets API Overview 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.
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 Views and Advanced Views
Advanced Model Target Databases
If you want to allow your app to automatically recognize different objects without displaying Guide Views, or if you wish to have one or more Model Targets with a recognition range up to 360°, you need to train an Advanced Model Target database.
This is done by a cloud-based training process from the Model Target Generator desktop tool. See Advanced Model Target Databases for more information.
Advanced Model Target Databases
Model Targets Supported Objects & CAD Model Best Practices