A Guide to Templating

Templates are a critical tool in streamlining your motion capture workflow. Using a combination of markers and links inside a markerset, templates can automatically ID markers in both Live Mode and Post-Processing. The following is a short guide to create and utilize one of the most powerful tools in Cortex.


What you need

Before creating a Template for your markerset you must:

  1. Add markers to your markerset.
  2. Create links between markers - A link defines the distance between two markers. A general rule of thumb is to connect markers attached to the same segment.

Links are incredibly important in creating a good, working template. The links are what make up the template by defining the distance between markers. Once a link is created, Cortex stores the length of that link. This can be observed in the bottom 3rd of the Markerset Properties panel under the links tab. The min and max length of a link will be the same number when the template is created off of a single frame. The min and max will automatically be altered as the template is extended to account for motion between markers. Extra Stretch is an added tolerance allowing the template to identify markers if they are outside of the min/max link length. Extra Stretch is set to 15% at default. In the 3D view, the grey region at the end of a link represents the Extra Stretch while the black region represents the min/max length of the link.

Links Between Markers

Create a Template

A template should be created based off of a static trial with the subject in a "standard" position that the next subject will be able to repeat quickly and simply. This "standard" position will be saved in the template as the Model Pose. All markers in the marker set must be visible when the template and Model Pose are created. The Model Pose will assist in identifying markers when applying the template to a new subject in live mode. To create a template:

  • Capture a static capture with the subject in the Model Pose
  • Load the capture in Post Process
  • Accurately identify all markers in the capture
  • Select a range of frames in the static capture to base the marker set template off of
  • Find a frame in the static capture that has all markers visible and identified
  • Open Create Template
Create Template
  • Select the "Selected" Frame Range radio button
  • Select the check box next to "Include current frame as the Model Pose" - The model pose only needs to be created once
  • Create Template
  • Right click on the marker set tab and Save the marker set

Extend the Template

The next step in creating a robust template able to accurately identify markers during a live capture is to extend the template. A template should be extended based on one or several range of motion captures to improve the template. Extending the template automatically adjusts the minimum and maximum link lengths based on marker motion during the selected frames in a given capture.

  • Take a range of motion capture - This capture should include a similar range of motion that will be seen during a typical capture with this marker set.
  • Load the capture into Post Process
  • Add the marker set to this capture
  • Correctly identify all markers in the capture
  • Select a range of frames that will be used to extend the template
  • Open Create Template
Extend Template
  • Select the "Selected" radio button
  • Extend Template
    • Note: If "Show Template Linkages" is selected when extending the template, you will see the linkages adjust in the 3D data view. This is a good way to double check that no markers were misidentified during the marker ID process. Template extension will only reduce the minimum length and increase the maximum length. If markers are misidentified when extending the template, link min and max values will drastically change which would be represented by a large black region on the link in the 3D data view similar to the image below.
Show Template Linkage
  • If this happens, you will need to change the link min and max length definitions or re-create/extend the template. If the marker set has not been saved after extending the template, you may be able to salvage the template that was created from the static. To do this, remove the marker set without saving. Next, re-add the markerset to the capture. Finally, Extend Template process should be redone with greater attention to marker identification.
  • If the links look appropriate, save the markerset.

Live Mode New Subject

The New Subject tool is used in Live Mode to scale a markerset to fit a new subject. Before using New Subject, a markerset with a template and model pose must be created.

  • In Live Mode, add the markerset
  • Stream live data
  • Have a subject, outfitted with markers, stand in the volume in the model pose position - the subject must have all markers present, including optional markers
  • Open New Subject using the New Subject button in the lower left corner of Cortex
New Subject
  • Enter the subject's name, height, and weight (optional)
  • Select "Refit the Identifying Template"
  • Have the subject slightly adjust their position to match the Model Pose. Cortex will attempt to fit the unnamed marker cloud using the template. Reset IDs can be used to reset the marker IDs if any markers are misidentified.
  • Once the subject is identified correctly , pause the system
Identify Subject
  • Finally select "Update the Model" - the local markerset template has now been adjusted (scaled) to fit the current subject and will more reliably automatically identify the subject moving forward with dynamic collection
  • Save the markerset

Storing Markersets

Marker sets can be saved in a local folder or in the System Objects folder. The Load Markersets window can be accessed by selecting the Add/Remove button at the top left of the data view pane in Cortex. Within this window there is a list of markersets under Local Objects and under System Objects.

Store Markerset

Local Objects: All markersets stored in the current directory will be listed in the Local Objects section. Markersets can be added to a capture by selecting the check box next to the marker set name.

System Objects: All markersets that are stored in the UserFiles\SystemObjects folder.


Copying a Markerset to the Current Directory

Markersets can only be added to a capture from the Local Objects folder. By only allowing markerset edits to occur in the local directory, any markerset in the System Objects folder is safe from changes made to fit a unique subject. To copy a markerset to the current directory:

  1. Select the markerset in the System Objects list
  2. Press the blue up arrow
Copy Markerset

Copying a Markerset to the System Objects folder

Once a markerset has a working template that has been extended to include range of motion, the markerset should be copied to the System Objects folder. Storing the markerset in the System Objects folder allows access to the markerset from any working directory and prevents unwanted edits to be made to the initial template.

  1. Select the markerset in the Local Objects list
  2. Press the blue down arrow
  3. If a markerset already exists with the same name already exists in the System Objects folder, you will be asked if you would like to overwrite the markerset. Upon selecting yes, the markerset in the System Objects folder will be replaced by the markerset in the Local Objects folder and will save any changes made to the local markerset.
Copy To System Objects
Overwrite

Troubleshooting

There are times when the markerset does not automatically identify in Live Mode using New Subject. If this is the case, the following steps should be taken to update the template to fit a new subject.

  1. Add the markerset in Live Mode
  2. Take a static capture with the Subject in the Model Pose
  3. Load Last Capture to bring the static capture into Post Process
  4. Use Quick ID to identify all markers in the markerset for a frame with the subject in the Model Pose
  5. Open New Subject from the X panel in Post Process
  6. Select Refit the Identifying Template then select Update the Model to scale the markerset to the new subject
  7. Save the markerset
  8. Return to Live Mode, re-add the markerset in Live Mode
  9. With the subject standing in the Model Pose, press plate in Live