# Marker Name XML Files

This page includes detailed step-by-step instructions on customizing the marker name XML files for skeletons and Marker Set assets.

In order to customize the skeleton marker labels, marker colors, and marker sticks, a Marker XML file needs be exported, customized, and loaded back in. For skeletons, modified Marker XML files can only be used with the same Marker Set  template. In other words, if you exported a [Baseline (41) skeleton](https://docs.optitrack.com/v2.3/motive-ui-panes/marker-sets-pane/broken-reference) and modified the labeling XML file, same Baseline (41) Marker Set needs to be created in order to import the customized XML file. The following section describes the steps for customizing skeleton XML templates.

## Steps

### 1. Export a Marker XML

**a)** First, choose a Marker Set from the [Builder pane](https://docs.optitrack.com/v2.3/motive-ui-panes/builder-pane), and [create](https://docs.optitrack.com/v2.3/builder-pane#skeleton-create) a skeleton.

**b)** Right-click on a skeleton asset in the [Assets pane](https://docs.optitrack.com/v2.3/motive-ui-panes/assets-pane), and select *Export Markers*.

**c)** In the export dialog window, select a directory to save the Marker Name Template (.xml) file. Click *Save* to export.

<figure><img src="https://v23.wiki.optitrack.com/images/thumb/f/f2/Label_Export.png/300px-Label_Export.png" alt=""><figcaption><p>Export Markers option shown in the Assets pane.</p></figcaption></figure>

### 2. Customize the XML

**Customize Marker Labels**

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

**b)** Customize the marker labels from the XML file. Under the MakerNames section of the XML, modify labels for the *name* variables with the desired name, but do not change labels for *oldName* variables. The order of the markers should remain the same.

**c)** If you changed marker labels, the corresponding marker names must also be renamed within the Marker and Marker Sticks definitions as well. Otherwise, the marker colors and marker sticks will not be defined properly.

<figure><img src="https://v23.wiki.optitrack.com/images/thumb/4/4b/SKTracking_MarkerChange.gif/500px-SKTracking_MarkerChange.gif" alt=""><figcaption><p>Modifying marker labels. Default HeadTop marker label is changed to NewHeadTop for skeletons using the XML template file.</p></figcaption></figure>

**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 *Markers* and *Marker Sticks* section. If the Markers and Marker Sticks section does not exist in the exported XML file, you could be using an old skeleton created before Motive 1.10. [Updating](https://v23.wiki.optitrack.com/index.php?title=Skeleton_Tracking#Marker_Colors_and_Marker_Sticks) and exporting old skeleton will provide these sections in the XML.

<figure><img src="https://v23.wiki.optitrack.com/images/thumb/8/8a/MarkerColorsXML.png/500px-MarkerColorsXML.png" alt=""><figcaption><p>MarkerColors definition section in the skeleton template XML file.</p></figcaption></figure>

<figure><img src="https://v23.wiki.optitrack.com/images/thumb/8/8b/MarkerSticksXML.png/470px-MarkerSticksXML.png" alt=""><figcaption><p>MarkerSticks definition section in the skeleton template XML file.</p></figcaption></figure>

**b)** Here, you can customize the marker colors and the marker sticks. For each marker name, you must use exactly same marker labels that were defined by the MarkerNames section of the same XML file. If any marker label was changed in the MarkerNames 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 MarkerNameMap section *\<Marker name="Custom\_Name" oldName="Original\_Name" />*, the same *Custom\_Name* must be used to rename all the respective marker names within Marker and MarkerSticks elements of the XML.

* **Marker Colors:** For each marker in a skeleton, there will be a respective name and color definitions under the *Markers*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 Skeleton XML

**Creating new skeletons**

Now that you have customized the XML file, it can be loaded each time when creating new skeletons. In the [Builder pane](https://docs.optitrack.com/v2.3/motive-ui-panes/builder-pane) under skeleton creation options, select the corresponding Marker Set. Then, under the Marker Names drop down menu, choose (…) to browse to import the XML file. When you [Create](https://docs.optitrack.com/v2.3/builder-pane#skeleton-create) the skeleton, the custom marker labels, marker sticks, and marker labels will be applied. You will need to auto-label the take again if you are working on a recorded TAK file.

If you manually [added extra markers](https://docs.optitrack.com/v2.3/motive/skeleton-tracking#adding-removing-skeleton-markers) to a skeleton, you must rename the skeleton after creating it. See more at the [Added Markers](https://docs.optitrack.com/v2.3/motive/skeleton-tracking) section.

<figure><img src="https://v23.wiki.optitrack.com/images/f/f5/Label_ImportXML_21.png" alt=""><figcaption><p>Loading skeleton XML when creating a new skeleton</p></figcaption></figure>

<figure><img src="https://v23.wiki.optitrack.com/images/thumb/f/f6/Label_CustomLabel.png/300px-Label_CustomLabel.png" alt=""><figcaption><p>Customized skeleton markers labels.</p></figcaption></figure>

**Renaming Markers on existing Skeleton**

You can also apply customized XML into an existing skeleton using the renaming feature. Right-click on a skeleton asset in the Project pane and select the **Rename Markers** from the context menu, and this will bring up a dialog window for importing a skeleton XML template. Import the customized XML template and modified labels will be applied to the asset. This feature must also be used if extra markers were added to the default XML template.

In order to replace the existing labels with the modified labels, you will need to first delete the existing markers labels and [auto-label](https://v23.wiki.optitrack.com/index.php?title=Data_Types#Auto-label) the skeleton asset again with the renamed markers, or you can Reconstruct and Auto-label the entire *Take* again.

<figure><img src="https://v23.wiki.optitrack.com/images/thumb/d/d0/Label_RenameMarker_20.png/450px-Label_RenameMarker_20.png" alt=""><figcaption><p>Renaming existing skeleton by importing a XML template file.</p></figcaption></figure>

## Notes for added Markers

XML definitions can also be applied to [added markers](https://v23.wiki.optitrack.com/index.php?title=Skeleton_Tracking#Adding.2FRemoving_Skeleton_Markers) on a skeleton asset. When extra markers were added to a skeleton, its exported XML file will have the corresponding marker labels logged at the end of the *MarkerNames* section, and the labels for these markers can be customized from the exported XML file. The marker color and sticks definitions for extra markers will not be created automatically. To assign the marker colors and sticks for the extra markers, you will need to type additional instances which exactly copies the format that is used in other instances.

A newly created skeleton will not contain the added markers within the asset. To apply the customized XML for the extra markers, you must first create a skeleton of the same markerset and add the extra markers before importing the XML. When adding multiple markers, it is important that they are added in exactly the same order that it was added on the skeleton which was exported; Otherwise, the extra labels will be assigned incorrectly. After adding the corresponding markers, use the [Rename Markers](https://v23.wiki.optitrack.com/index.php?title=Skeleton_Tracking#Renaming_Markers_on_existing_Skeleton) feature to apply the customized XML file. Lastly, auto-labeled the *Take* to assign the corresponding marker definitions onto the skeleton.

**Applying Customized XML with Added Markers**

1. **\[Motive: Builder pane]** Create the skeleton using the markers without including the extra markers that were added. These markers will be added on the next step.
2. **\[Motive: Perspective View pane]** Add the extra markers onto the selected skeleton asset. See how to [add markers](https://v23.wiki.optitrack.com/index.php?title=Skeleton_Tracking#Adding.2FRemoving_Skeleton_Markers).
3. **\[Motive:Assets pane]** Select the skeleton and click *Rename Markers* to import the customized skeleton XML template.
4. **\[Motive:Assets pane]** When working with a recorded *Take*, first delete the existing marker labels using the **Delete Marker Labels** from the [Assets pane](https://v23.wiki.optitrack.com/index.php?title=Assets_pane), and auto-label the *Take* to label the markers using the imported XML file.
