CreateMarkerDriverClass#
Creates MoCap markers and links them to the C3D file data.
#include "<AMMR_TOOLS>\AnyMocap/CreateMarkerDriverClass.any"`
#CreateMarkerDriver#
This template is used by all the MoCap models to link the model to the C3D file data. It creates a marker driver on the specified segment on the model and creates the necessary drivers to link the marker position to the C3D file data.
The class template has special options to add optimizations of the marker positions and to add filters to the marker positions.
For example
CreateMarkerDriver RPSI (
MarkerPlacement=Trunk.Segments.PelvisSeg,
PlaceMarkerAt=Right.PSIS,
OptX=OFF, OptY=OFF, OptZ=ON,
UseC3DWeightResiduals=ON
) = {
sRelOpt = {-0.025,0,0.0};
};
Full signature
CreateMarkerDriver <ObjectName>(
MarkerName=_NOT_DEFINED_,
MarkerPlacement=<required>,
WeightX=1,
WeightY=1,
WeightZ=1,
OptX=0,
OptY=0,
OptZ=0,
ScaleMarkerPosOnOff=1,
FilterCutOffFrequency=0,
FilterOrder=2,
UseC3DWeightResiduals=0,
PARAMETER_OPT_STUDY=Main.Studies.ParameterIdentification,
C3D_OBJECT=Main.ModelSetup.C3DFileData,
BODY_MODEL_FOLDER=Main.HumanModel.BodyModel,
PlaceMarkerAt=MoCapMarkerFrameAMMR24,
USE_BVH_INPUT=0,
BVH_OBJECT=Main.ModelSetup.BVHFileData,
MarkerPlacementBVH=REQUIRED_FOR_BVH_INPUT,
DRAW_SCALE=1,
SKIP_MARKER_EXIST_CHECK=0,
) = {
sRelOpt = <Required>;
};
Arguments
- __CLASS__:
AnyFolder
- MarkerName:
The name of marker in the C3D file. It defaults to the name of the class template. (Default: NOT_DEFINED)
- MarkerPlacement:
(Required) The segment on which the marker is place, relative to the Body model. (Required)
- WeightX:
The weight of soft driver for the marker in X direction (Default: 1)
- WeightY:
The weight of soft driver for the marker in Y direction (Default: 1)
- WeightZ:
The weight of soft driver for the marker in Z direction (Default: 1)
- OptX:
Switch to determine if the markers positions can be optimized in the X direction (Default: 0)
- OptY:
Switch to determine if the markers positions can be optimized in the Y direction (Default: 0)
- OptZ:
Switch to determine if the markers positions can be optimized in the Z direction (Default: 0)
- ScaleMarkerPosOnOff:
Switch to indicate if the marker position should be scaled with the segment which it is attached. If the marker is located relative the segments original this should be ON. If the marker is located relative to a bony landmark it may make sense to turn this off. (Default: 1)
- FilterCutOffFrequency:
If set to something different that zero, it will use a special low pass filter on this marker, instead of using the default filter applied by the AnyInputC3D object. (Default: 0)
- FilterOrder:
Filter order to use if FilterCutOffFrequency > 0 (Default: 2)
- UseC3DWeightResiduals:
Switch to specify if the Marker residual value in the C3D file should be used when creating weights for the marker. This is can be used to automatically set the weight of the marker to zero when the marker drops out. (Default: 0)
- PARAMETER_OPT_STUDY:
Can be used to specify which optimization study marker design values should be added. It is useful in advanced cases where multiple marker optimization studies are used. (Default: Main.Studies.ParameterIdentification)
- C3D_OBJECT:
Specifies from which C3D object to link the markers. This only for advanced cases using multiple C3D files for input. (Default: Main.ModelSetup.C3DFileData)
- BODY_MODEL_FOLDER:
Specifies the folder where the body model is located. This is only for advanced cases where the body model is not located in the default location. (Default: Main.HumanModel.BodyModel)
- PlaceMarkerAt:
Specifies which coordinate system on the segment the marker is place. This is used when placing markers relative to bony landmarks. (Defaults to
AnatomicalFrame
) (Default: MoCapMarkerFrameAMMR24)
- USE_BVH_INPUT:
Switch to specify if the marker should be linked to a BVH file instead of a C3D file. (Default: 0)
- BVH_OBJECT:
Specifies from which BVH object to link the markers. This only for advanced cases using multiple BVH files for input. (Default: Main.ModelSetup.BVHFileData)
- MarkerPlacementBVH:
Specifies the segment on which the marker is place, relative to the Body model. This is only used when using BVH input. (Default: REQUIRED_FOR_BVH_INPUT)
- DRAW_SCALE:
Specifies the scale of the marker in the model view. This is only used for visualization purposes. (Default: 1)
- SKIP_MARKER_EXIST_CHECK:
Disable the check if the marker exists in the C3D file. This switch must be enabled if you model is structured so markers are created before the AnyInputC3D file have been defined. (Defaults to 0) (Default: 0)
Required initialization members
sRelOpt = <Required>;
- class type:
AnyVec3
Position of the marker within its local reference frame
Optional initialization members
sRelOnBVH = {0,0,0};
- class type:
AnyVec3
Position of the marker on the BVH stick figure model. This is only used when using BVH input.