How to Create a Model Target

Model Targets are created with the Model Target Generator (MTG) app. This article provides a step-by-step introduction to the app. For general information about the MTG, refer to the Model Target Generator User Guide.

Installing the MTG

Refer to the Model Target Generator User Guide for installation instructions.

Launching the MTG

  1. In the location where you unzipped the files, open the Model_Target_Generator folder.
  2. Double-click Model_Target_Generator.exe
    A login dialog opens.
  3. Enter your Vuforia Developer account credentials.
Vuforia Image

Creating a Model Target

The MTG package includes the NASA Viking Lander as a 3D model.

  1. Click the Create New Model Target button (or select Open Model Target to open a previously created project).
file
  1. Click the Select... button.
    Ensure the Location field is not set to an unmapped network path.
Vuforia Image
  1. Open VuforiaMars_ModelTarget.pvz, located at:
    \resources\sampledata\VuforiaMars_ModelTarget
    The Model Target Name and Location fields populate. The name of the model target can be changed in the Model Target Name field.
  2. Click the Create Model Target button.
    The model displays in the 3D view pane.
  3. In the 3D view pane, use the Rotate, Zoom, and Pan icons to navigate around the model to inspect for missing parts or incorrect normals. Refer to the Model Targets Supported Objects & CAD Model Best Practices article for more information.
Vuforia Image

Verifying Model Fit

The size of the Model Target needs to match the size of the object in the physical world. In the 3D view pane, the current size will be displayed, showing the bounding-box size along all three axis. The steps below ensure the model corresponds to the physical size of the object.

  1. In the right pane, select Model Attributes.
  2. In the File Units dropdown, select the proper unit for your model. For example, select centimeters for a toy car and meters for an actual car.
  3. Note: The unit selected does not re-scale the 3D model. Instead, the unit specifies how a unit of one is interpreted. Rescaling the model is not supported in the MTG because it's designed to be a 3D model viewer, not a mesh editor. You may need to change the size of the CAD model using its creation 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 ensures that the sizing is consistent. More information on scaling Model Targets can be found in the Best Practices for Scaling Model Targets.

Vuforia Image
  1. In the Up Vector dropdown, ensure that Y is selected.
    Selecting the Y value correctly orients your model. Otherwise, the model displays as flipped on its side or back (see image below).
Vuforia Image
  1. In the Motion Hint dropdown, select either STATIC or ADAPTIVE. If the object is stationary, select STATIC.  If the object is likely to be moved, select ADAPTIVE. The selected value is stored in the generated .xml file and can be overridden later in native or Unity. For more information, refer to the Using the Model Target Motion Hint article.
Vuforia Image

Adding Guide Views

  1. In the 3D view pane, select the HoloLens, Landscape, or Portrait icons to change 'masks'.
    Depending on your selection, the dotted line in the 3D view pane adjusts the screen rendering area of the app.
  2. In the right pane, select Guide Views.
  3. Select the 1 view icon.
  4. Use the navigation icons or your mouse to obtain a guide view.
  5. Note: When training an Advanced Model Target, you can add multiple Guide Views for your object by repeatedly moving the viewpoint and clicking Create 1 Guide View. Alternatively, select one to six views to instantly create several Guide Views around the object at a default distance and angle. Advanced Model Targets 360 require creating a single 360° Guide View. Refer to the Model Target Guide View article for advice on choosing a Guide View position.

  6. When you obtain a suitable Guide View, click the Create 1 Guide View button.
    A preview of the Guide View displays in the right pane.
Vuforia Image
  1. In the right pane, directly above the Guide View, click the cube icon.
    This opens the Target Reconition Range pane. Refer to the Model Target Generator User Guide for information on adjusting these values.
  2. Adjust the Target Reconition Range pane values and click Save Settings.
Vuforia Image
  1. In the right pane, directly above the Guide View, click the pencil icon.
  2. Rename the Guide View (e.g., front, back, above, below) and click Save.

Generate Model Target

  1. In the right pane, click the Generate Model Target button.
  2. Note: The Generate Model Target dialog opens and displays the number of targets remaining. Every Model Target database created using the MTG counts against your target quota. Regeneration of the same model with a different Guide View also counts as new. Additionally, every training session counts against the training quota. For specific quota options associated with any license, refer to the pricing page.

Vuforia Image
  1. In the dialog, click Continue to generate a Model Target database using your model and the configured Guide Views.
    A progress counter displays. The PNG images for each of your Guide Views are saved to the project directory.

    Note: To better understand how these images are used within a Model Target application, refer to the Introduction to Model Targets in Unity article and the Model Target Test App User Guide. The image can be used to create a custom Guide View image to present to the user instead of the Vuforia Engine provided default image.

  2. In the Model Targets window, click the menu (...) icon and select Open Destination Folder.
    The destination of the newly generated target database opens in the project folder.
Vuforia Image

For more informaton on creating an advanced model target database, refer to the Advanced Model Target Databases and Getting Started with Advanced Model Target 360 articles.

Learn More

Model Targets overview

Model Target Generator User Guide

Model Target Guide View

Advanced Model Target Databases

Getting Started with Advanced Model Target 360.