This guide provides basic information about using Vicon Retarget, which enables you to retarget a source skeleton to a suitable character skeleton for use in a game engine or visualization tool.
Vicon Retarget is used as part of the retargeting workflow, which enables you to quickly create constraint mapping between a fixed Vicon skeleton and any custom biped skeleton in FBX format. It uses a mixture of positional and rotation targets, in conjunction with the Vicon globally optimized, full-body solver to constrain one skeleton to another.
If you want to use scripting or need to set Degrees of Freedom (DoFs), the recommended workflow is to use the retargeting functionality in Vicon Shogun Post (see Retarget with Shogun Post in Getting started with Vicon Shogun).
- While the Vicon retargeting workflow enables you to match translation or reach in a similar way to, for example, Autodesk® MotionBuilder®, it doesn't currently offer as much granular control or the ability to key these weights.
- Also note that Vicon Retarget is a global solver, so any changes to, for example, the feet, also affect the hands and the rest of the skeleton.
- Use the retargeting workflow as a first step in the retargeting process, and as a quick and easy way to get your custom characters driven by Vicon mocap.
These topics are covered:
Create a retarget setup file (VSR) with Vicon Retarget
Retargeting requires a retarget setup file (*.vsr) that you can create in Vicon Retarget, for use in Vicon Shogun or Vicon Evoke.
The following steps describe how to create a VSR in Vicon Retarget.
Start Vicon Retarget
The Vicon Retarget app is installed with your Vicon software (Vicon Evoke or Vicon Shogun Live). You can start it in any of these ways:
- From within your Vicon software:
- On the Retarget menu, click Launch Setup.
or
- On the Retarget menu, click Launch Setup.
- From the Windows Start menu:
- Expand Vicon and then select Vicon Retarget.
or
- Expand Vicon and then select Vicon Retarget.
- On the desktop, double-click the Vicon Retarget shortcut.
You can create retarget subjects from any suitable FBX file, using position and rotation constraints to drive target skeleton bones from the Vicon source skeleton bones. As the Vicon source skeleton is human, retargeting works best with biped targets.
Save the retarget subject files to a filename that you will be able to identify easily. An example is included with your Vicon software for retargeting a Vicon source skeleton to the Unreal Engine Mannequin skeleton.
If you created VSX files in earlier versions of Retarget and want to use them in Evoke 1.2, load the VSX files into the latest version of Retarget and save them as VSR files.
Copy the relevant files
If you want to use your own retarget subject instead of using the supplied examples for the Unreal Engine 4 Mannequin, copy your FBX file to:
C:\Users\Public\Documents\Vicon\Skins
Select the skeleton and the FBX
- Start your Vicon software, and on the Retarget menu, select Launch Setup (or start Retarget in one of the other ways described in Start Vicon Retarget).
- Evoke users: If the Source Skeleton is ClusterTemplate, the Retarget Setup view looks similar to this:
- Shogun users: If the Source Skeleton is a full body skeleton with fingers, the Retarget Setup view looks like this:
If you want to use one of the the high fidelity hand models with extra metacarpal joints, choose a skeleton whose name includes 'Fingers', for example, FrontWaist10Fingers.
To select a different source, in the Source Skeleton field, click to load the required file. - Evoke users: If the Source Skeleton is ClusterTemplate, the Retarget Setup view looks similar to this:
- In the Source Skin field, select the required skin.
Choose either the male or female Vicon character.
If you chose a skeleton with fingers in the previous step, ensure you choose a skin with fingers. - In the Target FBX field, select the required FBX file.
- If you are using Shogun and chose a skeleton with one of the finger models, select one of the supplied FBXs with fingers or download the SK_Mannequin_Fingers character from Unreal Asset Store.
- If you are using Evoke, select the supplied Mannequin character without fingers.
- In the Target Root field, select the appropriate root (if you are not sure, try hips or pelvis).
Choose the first joint that you want to apply animation to, not the root of the rig.
In the case of the Mannequin character, select pelvis.
Create the target subject
Note that in the view pane, by default, the View Filters options Source Skin, Target Skin and both Skin X-Ray options are selected. As you work, you may find it easier to see the relevant details if you select or clear the appropriate options.
- Click the Create Target Subject button.
The (pink) target FBX appears in the middle of the Retarget Setup view.
- In the Target Scale field, set an appropriate value to match the size of the target skeleton to the source skeleton.
Note that the Vicon skeleton is locked, so you can only change the custom FBX. - In the Retarget Setup view, click on the pelvis (or the root that you selected) to activate the Manipulator tool, and drag to align the target and source skeletons.
Tip
Adjust the target scale so that the feet, hands and head match as closely as possible. You may need to align joints then adjust scale, and repeat until you're satisfied.
Align the target joints
For best results, align the target skeleton as closely as possible to the source skeleton.
- Before you begin, ensure the mirroring options are as you want them on the Retarget Setup tab:
- To mirror changes to a joint from one side to the other (from the left side side to the right side or vice versa), select the Joint symmetry option.
- To mirror targets created on one side to the other (from the left side side to the right side or vice versa), select the Target symmetry option.
- Use the Manipulator tool to roughly align the main joints, switching between different camera views as required.
From the top view, you can see that the target shoulders are pushed too far back. This must be corrected in the spine joints, so initially you just straighten out the arms.
- Compensate for differences in skeletal proportions by adjusting intermediate joints.
In this example, some curvature to the target spine has been added. This has the effect of moving the shoulder joints down and forward to match the source skeleton.
The target foot is also rigged quite differently from the source skeleton, which must be accounted for when the position targets are created. - Repeat steps 2 and 3 until you are happy with the alignment of the target and source skeletons.
Compensating for differences in proportion
For Shogun users:
- If differences in proportion make a match impossible, aim to make the overall length of the limbs match. For example if your FBX has proportionally longer arms than the source skeleton, you could set the target FBX with slightly bent arms so the overall arm length matches. Note however that the bend in the arms will then occur throughout.
- The solver remembers any offsets when the constraints are applied.
- If you want a straight spine for your custom skeleton, keep the custom spine straight. The constraint offset will retarget from the curved Vicon spine onto the straight one.
- If you want to match rotations, eg, on fingers, ensure the joint axes match as closely as possible.
For Evoke users:
- To achieve good hand-eye coordination in VR, you must accurately match the hand position and rotation; the head and shoulders also affect coordination to a lesser extent.
- When you align the target skeleton, try to prioritize matching the hands for best results. The feet are similarly important to aid navigation.
- For intermediate joints, the choice is often aesthetic, and you may need to experiment with a moving subject to see what looks best.
Add position targets
Position targets are used to ensure that parts of the retarget skeleton match the position of parts of the source skeleton.
- Add position targets to the main bones:
- Shogun users: To feet, hands and hips
- Evoke users: To the ends of the body (feet, hands, and head)
To do this, start with the feet, click the bone on the Vicon skeleton, then click the equivalent position on the FBX (the pink bones) and click Add position target.
The constraints are displayed on the Retarget Setup tab as a list and are also displayed graphically.
In some cases, the bones of the source and target skeletons may be quite different.
Remember to use the meshes to help to align the skeletons.Understanding position targets
A position target adds a constraint to the retarget solver, so the position of the target bone relative to the source is preserved. The wireframe cube represents this offset, and by default is set to origin of the source bone. This means that your Vicon software tries to pose the retarget so that the cube is centered on the source bone origin.
The default offset is usually a good choice, assuming you have aligned the target skeleton well to the source skeleton. However, you can adjust the offset by changing the State X, State Y and State Z fields in the bottom-left of the Retarget Setup tab. For example, if you set the state to (0 0 0), the target bone origin is forced to match the source bone origin exactly. This can sometimes improve retarget results when the default position offset is very small, as it is easier to find the correct target joint rotation when the target position is exactly the same as the source. - Evoke users only: Add at least one position target to the trunk of the body. This is necessary to prevent the body 'floating' when only constrained by rotation targets.
If you find that these target joints slip out of position when solving in Evoke, adding position targets on the hips and shoulders may be a good alternative.
Note that you don't need to set position targets on 'in-between' joints (eg, elbows), because usually, some differences between source and target are acceptable here. Aim to keep the number of position targets to a minimum. Over-constraining the solver in Retarget is counter-productive, usually resulting in persistent retarget errors and/or instability.
Add rotation targets
Rotation targets serve a similar purpose to position targets, but constrain the rotation of joints in the retarget.
- As with position constraints (see Add position targets), click on the target bone then the source bone, and then click Add rotation target.
Each rotation is listed below the Position targets and is also displayed graphically.
Tip
In general, add a rotation target for each bone in the target skeleton. If the Vicon skeleton has more bones (eg, for the spine) than the target FBX, you can safely ignore them.
If your target has more bones than the Vicon skeleton in the same body segment, you can constrain multiple target bones to the same Vicon source bone. - The relative importance of rotation and position targets is determined by their respective weights. To adjust the weight of a target, in the target list, select the target and change the value in the Weight field. A higher weight makes the target more effective in constraining the retarget pose, at the expense of the other targets. Setting rotation weights of 100 is recommended, to help balance the effect of the positional constraints.Understanding rotation targets
A rotation target adds a constraint to the retarget solver, so the rotation of the target joint relative to the source is preserved. The joint state is an angle-axis value, and manually editing it is not recommended.Tip
You may want to click View Filters (at the top of the view) and clear the Constraints check box, to make it easier to see the joints.
Adjust alignment after creating constraints
If you need to adjust the alignment of the skeleton and rotate a joint after a constraint has been created, make the adjustment and then click Update targets.
The constraint updates to use the new position.
Remove unnecessary joints
In the Retarget Setup view, click Remove unnecessary joints to remove unconstrained joints on the template.
This removes any extra joints from the solver mapping and speeds up performance.
This step is necessary because unconstrained joints still have to be fitted by your Vicon software, which increases computational load and may cause dropped frames. For example, finger or face bones don't have an equivalent on the source skeleton, so nothing needs to be constrained. They are just fixed in place in the solve when 'removed' from the retarget subject.
Save the finished setup
When you have finished adding constraints, to save your setup, click Save As and save your retarget file (VSR) to a Retargets folder, for example:
C:\Users\Public\Documents\Vicon\Retargets
Run retargeting in Vicon Shogun Live
Retargeting requires a retarget setup file (*.vsr) that has been created in the Vicon Retarget application (see Create a retarget setup file with Vicon Retarget) or in Shogun Post (see Retarget with Shogun Post in Getting started with Vicon Shogun).
- To turn on retargeting in Shogun Live, in the Processing pane, go to the General section, and make sure the Processing Output level is set to Retargeting.
- In the Filenames field, select the required VSR file(s).
Note that in paths in this field, back slashes are forward slashes.
If you are working with multiple subjects, list the retargeting templates (VSR files), separated with a comma.
If you specify multiple VSRs, you need to specify the same number of matching subjects in the Names field. - In the Names field, enter the name of the subject(s) that you want to retarget.
If you are working with multiple subjects, separate their names with a comma.
Your character is now retargeted in the 3D workspace. - If you need to update the retargeting, change the processing level to Solve and back to Retarget to load the mapping file again.
You may notice discrepancies between the retargeted character and the performer driving it, especially if there was a large difference in scale. This is because the retarget was set up using the base skeleton, not the calibrated performer skeleton. - Open Vicon Retarget (on the Retarget menu, click Launch Setup and in the Vicon Retarget window, ensure the Retarget Setup tab is selected), and update the mapping to use the new scale skeleton.
Run retargeting in Vicon Evoke
You can retarget a Vicon source skeleton to a suitable character skeleton for use in a game engine or visualization tool. You can also preview the character mesh in Evoke. Retargeting requires a retarget setup file (*.vsr) that has been created in the Vicon Retarget application (see Create a retarget setup file (VSR) with Vicon Retarget).
You can choose the retarget file for the character when you first create the character (see Set up character solving in Getting started with Vicon Evoke), but you can change both the retarget file and select a retarget skin.
- In the Evoke Tracking tree, ensure the required character is selected.
- In the Properties pane, go to the General section and from the Retarget menu, select the required file.
- From the Retarget Skin menu, you can also select a retarget skin for visualization in Evoke. For example you might have one retarget file for your character, but a number of different colored skins to represent each player.
To display correctly, the retarget skin must have the same skeleton as the retarget setup.
Retarget files are found in this default location:
C:\Users\Public\Documents\Vicon\Retargets
Installed retarget subject files (which are set up to use the Unreal Mannequin skin) are located by default in:
C:\Program Files\Vicon\Evoke1.2\Configuration\Retargets