documentation

Workflow for Creating a custom Tracking Configuration
Level: Basic

Note: You should not derive your own development scene from ModelTrackingSetup. The debug functionality available in this scene comes with a performance penalty. It is not designed or optimized for deployment.
The intended use case is to temporarily set up your model in the ModelTrackingSetup scene, set the desired initial pose, tweak the relevant tracking parameters and finally export a configuration file for use in your separate development scene.
The typical workflow for creating a custom configuration in this manner is outlined in the following:

  1. Replace the model in the scene (which is the VLMiniCar by default) with your own model. You may use the step-by-step summary given here or refer to Changing the Model in the Unity Quick Start Guide:
    • Import your model into the Unity project (see Unity's documentation). For supported model file types see our documentation on Model Tracker Configuration File Parameters.
    • Drag the imported model asset into the VLTrackingAnchor in the hierarchy.
    • Select the VLTrackingAnchor in the hierarchy and press the Tracking Geometry/Add TrackingMesh components to all models button on the TrackingAnchor component.
    • Delete or disable the existing VLMiniCar in the VLTrackingAnchor.
    • Check the Tracking Configuration component under VLTracking in the hierarchy for any setup issues.
  2. Set the saving directory (see Saving the Current Tracking Settings in a Configuration File in Scene Controls for instructions).
  3. Start tracking with default settings (as provided in the 'DefaultTrackingConfiguration.vl' with the examples package.)
  4. Interact with the model until you reached a satisfactory initialization pose. As an alternative, you can also adjust the initialization pose in the Edit mode (for more details see Setting an Init Pose).
  5. Tweak the tracking parameters as necessary using the parameter panel and debug view. Details on the usage of these tools are provided in the section Parameter Settings in Scene Controls. In advanced use-cases you might also want to record additional initialization data along the way. How this works is explained in the section Reading/Writing/Resetting the Initialization Data in Scene Controls.
  6. Save the init pose and tracking parameter settings in a tracking configuration file using the Save Configuration.
  7. Move the saved configuration into your project:
    • Collect the tracking configuration file from the location it was written to. Refer to the section Saving the Current Tracking Settings in a Configuration File for path settings.
    • Place the tracking configuration file in the StreamingAssets folder of your project.
    • Use this tracking configuration file together with your model and the same AnchorName (see VLTrackingAnchor in the hierarchy) in your new scene.
  8. Optional: Move the saved initialization data into your project — if applicable.
    • Collect the .binz init data file from the location it was written to. Refer to the section Reading/Writing/Resetting the Initialization Data in Scene Controls for path settings.
    • Place the .binz init data file in the StreamingAssets folder of your project. Add the parameter initDataURI to your configuration if it does not exist yet. Point this parameter to your init data file. In the simplest case, place the init data file in the same folder as the configuration file and use the project-dir: scheme (see File Access).

Congratulations! At this point your have successfully set up a new project with your custom tracking model and the corresponding tracking parameters.