Create Model Targets from your 3D models in the Model Target Generator (MTG) to recognize and track the model’s equivalent physical object. The MTG supports various file formats and model types and provides options to configure your target for optimal detection and tracking performance. Follow the step-by-step introduction to the MTG and generate your Model Target.
Installing the MTG
Follow the Model Target Generator User Guide to download and install the MTG.
Launching the MTG
- Open the Model Target Generator from the install location or via the shortcut.
- A login dialog opens where you must enter your Vuforia Developer account credentials. See How To Register as a Vuforia Developer if you do not yet have an account.
Creating a Model Target
The MTG installation package includes the NASA Viking Lander as a 3D model.
- Click Create and select Model Target (or select Import Model Target Project to open a previously created project).
- Click Select... and ensure the Location field is not set to an unmapped network path.
- Open VuforiaMars_ModelTarget.pvz, located at: \resources\sampledata\VuforiaMars_ModelTarget
By default, the Model Target Name is filled with the same name as the CAD model file but adjusted for disallowed characters. The name can be changed if you so wish.- Only underscores, hyphens, and ASCII numbers and letters are allowed [_, -, a-z, A-Z, 0-9]. Names are limited to 64 characters.
- Click Create Model Target.
The model is displayed in the 3D viewer alongside an introductory message.- Press Continue or Never Show Again to close the message.
The top bar in the MTG presents several tabs, each representing a step in configuring your model for generating a suitable Model Target. Once a step is complete, the tab will be highlighted in green, and the meter in the upper right corner may increase its progress. When the progress meter turns green, the MTG has determined that the Model is fully configured and ready to be generated as a Model Target. It does not matter which order you go through the tabs. Expert users may skip some tabs and generate a Model Target even when the progress meter is ‘low’.
NOTE: Re-importing a model will require you to repeat some steps, such as Coloring.
In the 3D view pane, use the Rotate, Zoom, and Pan icons to navigate the model and inspect it for missing parts or incorrect normals. For more information, refer to the Model Targets Supported Objects & CAD Model Best Practices.
Model-up Vector
The tab in which your model is displayed is used to adjust the orientation of the imported model.
- Select and Confirm the preview that aligns the plane with your model. Choose the Up Vector from the directions: X, Y, Z, -X, -Y, and -Z.
Model Units
The size of the Model Target needs to match the object's size in the physical world. Since the model units are usually not encoded in a CAD model, selecting the correct units (e.g., meters, feet, centimeters, etc.) is necessary. In the 3D view window, the current interpreted size is displayed.
- Select the File Units to match the size of the physical object.
NOTE: The unit selected does not re-scale the 3D model. Instead, the unit specifies how a unit of one is interpreted. The MTG is a 3D viewer, not a mesh editor. You may need to change the size of the CAD model using another tool. Alternatively, try a different model file format. Some file formats, such as obj, are unit agnostic. Also, be attentive to the model scale when importing the Model Target database into Unity. This vigilance ensures that the sizing is consistent throughout the development process. More information on scaling Model Targets can be found in the Best Practices for Scaling Model Targets.
Coloring
Imported models that consist of multiple parts and do not include texture or numerous colors are recommended to receive automatic coloring by the MTG. Coloring the different parts of a model can help to improve tracking performance. Models with a single mesh would only receive a single color and, therefore, no improved tracking. Models with textures do not need coloring and – assuming the texture represents the physical object – select the Realistic Appearance setting before going to the next step.
- In our case, the model that came with the MTG consists of multiple parts and no texture. Select the Non-Realistic Appearance and click Apply Coloring to color the model automatically. Coloring can always be undone. For a complete guide on coloring, please see Automatic Coloring of Model Targets.
Complexity and Model Simplification
This tab measures the complexity of your model, which should be under a certain number of vertices and parts; see CAD Model Best Practices for recommended model specifications and steps to reduce complexity. The Model Target Generator also offers the possibility to simplify the model directly before generating the Model Target. This will require uploading the model to the Vuforia servers. See MTG Data Processing for more information.
Exceeding the model recommendations will result in a warning that the complex model may harm app performance. This tab can be skipped if the model is within the performance requirements.
NOTE: Coloring should be applied before simplification. Coloring the model after simplification will require repeating the simplification process. See Automatic Coloring of Model Targets for more information.
In this example, the model was identified as too complex, with 102 parts and 1.311.459 polygons.
- To upload your model for processing, click Start Simplification. Once the model is uploaded, the MTG progresses to the next tab – Optimize Tracking. Since simplification is done asynchronously, it is possible to continue with configuring the Model Target in the other tabs, except for coloring.
- At any point, you can return to the Complexity tab and see the progress of simplification or Cancel the process.
When simplification is completed, you can inspect the model. The simplification algorithm is optimized for Model Target detection and tracking, preserving the edges and contours of the model. Ensure that the simplified models do not have any gaps or cracks that were not present in the original model. In the panel to the right, you can see the simplified model’s number of parts and polygons.
- It is possible to Undo the Simplification from the Complexity tab. This will delete the simplified model.
Optimize Tracking
The Optimize Tracking tab is to select a tracking optimization mode for your model. Assigning a tracking mode depends on the physical object and the use case. For a complete guide, please see Optimizing Model Target Tracking.
The possible modes are:
- Default is the standard mode for almost all object types and user scenarios.
- Low-feature Objects can slightly improve tracking performance for cars and objects that are reflective, untextured, and have smooth surfaces.
There is also an AR Controller mode, which can only be set in the Unity Editor or with the API.
It is recommended always to use the DEFAULT option and only try other modes if tracking is not working as expected.
- Select the tracking mode best suited for your model type and use case. In this example, we select DEFAULT, which works well with 3D-printed and matte objects.
Guide Views
Guide Views are essential for initializing tracking of a Model Target. You can choose between Guide Views and Advanced Views. Mixed Guide View types are not supported.
Guide Views are presented as a rendered outline of your model that, during the AR session, users will match with the object to initiate the AR experience.
Advanced Views are recognition ranges that activate the AR experience automatically when the model is recognized from any defined angle. Selecting the Advanced view will require the model to be trained in the cloud. If you wish to create Advanced Views, refer to Advanced Views.
In this guide, we select Create Guide View.
- Before moving on with the Guide View, a field of view should be defined according to how the users would handle the device. Choose between the Digital Eyewear, Landscape, or Portrait. This setting can also be selected from the three icons in the right corner of the 3D view pane. Depending on your selection, the dotted line in the 3D view pane adjusts the screen rendering area of the app.
NOTE: When developing applications for eyewear, consider the recommendations for distance and motion that the users will have compared to handheld devices.
- Click Next Step.
- Now, we need to adjust the view with the tools in the upper left corner of the 3D view pane. The view and dotted frame should be placed in a position we would like the users to match with to start tracking the Model Target. Once adjusted, the Create Guide View will generate a Guide View from that exact position and distance.
TIP: Your mouse can also be used to change the position.
The right column provides guides and tips on the best practice of creating a Guide View.
- In the following step, and depending on the type of Guide View that you have created, you will find three icons;
- edits the recognition ranges. The Recognition Range is only available for Advanced Views. Refer to the Model Target Guide View and Advanced Views for more information on Creating Guide Views.
- repositions the Guide View.
- deletes the Guide View.
- Rename the Guide View, e.g., front, back, above, below, close-up, etc.
- The Model is now ready, and the Progress Meter confirms that we have attended to all the tabs and configurations. Click the Generate Model Target. This will take us back to the Home Screen.
Generating Model Targets
When you click Generate Model Target, a dialog displays the number of remaining targets on your developer account, the created Guide Views, and the directory where the Model Target database is saved. The Guide Views are saved as PNGs, and the Model Target is saved as a .vup project file.
NOTE: The Guide View images can be replaced with custom images instead of MTG's default images.
Every Model Target generated counts against your target quota. Re-generation of the same model with a different Guide View also counts as new. Additionally, every training session counts against the training quota, which is separate. Refer to the pricing page for specific quota options associated with any license.
Managing Model Targets
- In the Home Screen, click the menu (...) icon and select Open Destination Folder.
The destination of the generated Model Target database opens in the project folder.
You can now load the Model Target database into your Unity or Native project environment or download the Model Target Test App to test the your Model Target tracking capabilities.
See Model Target Test App User Guide.
If you wish to create Advanced Model Targets, refer to the Advanced Model Target Databases article.