Constraints XML Files

Main PageMotive DocumentationAssetsSkeleton Tracking → Constraints XML Files

Overview

This page includes detailed step-by-step instructions on customizing constraint XML files for assets.
In order to customize the marker labels, marker colors, and marker sticks for an asset a constraint XML file may be exported, customized, and loaded back into Motive. Alternately, the Constraints pane can be used to modify the marker names and color and the Builder pane can be used to customize marker sticks directly in Motive. This process has been standardized between assets types with the only exception being that marker sticks for rigid bodies does not work in Motive 3.0.

Steps


1. Export a Constraint XML File

a) First, create an asset using the Builder pane or the 3D context menu.

b) Right-click on the asset in the Assets pane and select Export Markers. Alternately, you can click the "..." menu at the top of the Constraints pane.

c) In the export dialog window, select a directory to save the constraints XML file. Click Save to export.

Export Markers option shown in the Assets pane.

2. Customize a Constraint XML File

Customize Marker Labels

a) Open the exported XML file using a text editor. It will contain corresponding marker label information under the <marker_names> section.

b) Customize the marker labels from the XML file. Under the <marker_names> section of the XML, modify labels for the name variables with the desired name, but do not change labels for old_name variables. The order of the markers should remain the same unless you would like to change the labeling order.

c) If you changed marker labels, the corresponding marker names must also be renamed within the <marker_colors> and <marker_sticks> sections as well. Otherwise, the marker colors and marker sticks will not be defined properly.

Modifying marker labels. Default HeadTop marker label is changed to NewHeadTop for skeletons using the XML template file.

Customize Marker Sticks and Colors

a) To customize the marker colors and sticks, open the exported XML file using a text editor and scroll down to the <marker_colors> and/or <marker_sticks> sections. If the <marker_colors> and/or <marker_sticks> sections do not exist in the exported XML file, then you could be using an old skeleton created before Motive 1.10. Updating and exporting old skeleton will provide these sections in the XML.
  • MarkerColors definition section in the skeleton template XML file.
  • MarkerSticks definition section in the skeleton template XML file.

b) You can customize the marker colors and the marker sticks in these sections. For each marker name, you must use exactly same marker labels that were defined by the <marker_names> section of the same XML file. If any marker label was changed in the <marker_names> section, the changed name must be reflected in the respective colors and sticks definitions as well. In other words, if a Custom_Name was assigned under name for a label in the <marker_names> section <marker name="Custom_Name" old_name="Name" />, the same Custom_Name must be used to rename all the respective marker names within <marker_colors> and/or <marker_sticks> sections of the XML.

  • Marker Colors: For each marker in a skeleton, there will be a respective name and color definitions under the <marker_colors> section of the XML. To change corresponding marker colors for the template, edit the RGB parameter and save the XML file.
  • Marker Sticks: A marker stick is simply a line interconnecting two labeled markers within the skeleton. Each marker stick definition consists of two marker labels for creating a marker stick and a RGB value for its color. To modify the marker sticks, edit the marker names and the color values. You can also define additional marker sticks by copying the format from the other marker stick definitions.

3. Import a Constraint XML File

Creating Skeletons with Custom Constraints

Now that you have customized the XML file, it can be loaded each time when creating new skeletons. In the Builder pane under skeleton creation options, select the corresponding markerset. Next, under the Constraints drop down menu select "Choose File..." to find and import the XML file. When you Create the skeleton, the custom marker labels, marker colors, and marker sticks will be applied.

If you manually added extra markers to a skeleton, then you must import the constraint XML file after adding the extra markers or just modify the extra makers using the Constraints pane and Builder pane.

Note: For skeletons, modified Marker XML files can only be used with the same markerset template. In other words, if you exported a Baseline (41) skeleton and modified the constraints XML file, same Baseline (41) markerset will typically need to be created in order to import the customized XML file.

  • Loading skeleton XML when creating a new skeleton
  • Customized skeleton markers labels.


Import Constraints for Existing Assets

You can also apply customized constraint XML file to an existing assets using the import constraints feature. Right-click on an asset in the Assets pane (or click the "..." menu in the Constraints pane) and select Import Constraints from the menu. This will bring up a dialog window for importing a constraint XML file. Import the customized XML template and the modifications will be applied to the asset. This feature must be used if extra markers were added to the default XML template.

Renaming existing skeleton by importing a XML template file.