RetargetModifier3D
A modifier to transfer parent skeleton poses (or global poses) to child skeletons in model space with different rests.
A modifier to transfer parent skeleton poses (or global poses) to child skeletons in model space with different rests.
Retrieves the pose (or global pose) relative to the parent Skeleton's rest in model space and transfers it to the child Skeleton.
This modifier rewrites the pose of the child skeleton directly in the parent skeleton's update process. This means that it overwrites the mapped bone pose set in the normal process on the target skeleton. If you want to set the target skeleton bone pose after retargeting, you will need to add a SkeletonModifier3D child to the target skeleton and thereby modify the pose.
Note: When the RetargetModifier3D.UseGlobalPose is enabled, even if it is an unmapped bone, it can cause visual problems because the global pose is applied ignoring the parent bone's pose if it has mapped bone children. See also RetargetModifier3D.UseGlobalPose.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
RetargetModifier3DConstructor
public RetargetModifier3D();Properties4
CopyBoneSkinScaleProperty
public bool CopyBoneSkinScale { get; set; }If true, copies Skeleton3D.GetBoneSkinScale of the source skeleton's bones to the child skeletons' mapped bones.
If false, the skin scale of the child skeletons' mapped bones are reset to Vector3(1, 1, 1) once and will not be overwritten after that.
Note: If you want to use Skeleton3D.SetBoneSkinScale on a child skeleton's mapped bone, set this to false. Even if you are not using Skeleton3D.SetBoneSkinScale with parent skeleton, Vector3(1, 1, 1) will always be set for the child skeletons' mapped bones.
EnableProperty
public RetargetModifier3D.TransformFlag Enable { get; set; }Flags to control the process of the transform elements individually when RetargetModifier3D.UseGlobalPose is disabled.
ProfileProperty
public SkeletonProfile Profile { get; set; }SkeletonProfile for retargeting bones with names matching the bone list.
UseGlobalPoseProperty
public bool UseGlobalPose { get; set; }If false, in case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform will be ignored.
Instead, it is possible to retarget between models with different body shapes, and position, rotation, and scale can be retargeted separately.
If true, retargeting is performed taking into account global pose.
In case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform is taken into account. However, bone length between skeletons must match exactly, if not, the bones will be forced to expand or shrink.
This is useful for using dummy bone with length 0 to match postures when retargeting between models with different number of bones.
Methods14
GetEnableFlagsRetargetModifier3D.TransformFlag
public RetargetModifier3D.TransformFlag GetEnableFlags();RetargetModifier3D.TransformFlagGetProfileSkeletonProfile
public SkeletonProfile GetProfile();SkeletonProfileIsCopyingBoneSkinScalebool
public bool IsCopyingBoneSkinScale();boolIsPositionEnabledbool
public bool IsPositionEnabled();Returns true if RetargetModifier3D.Enable has RetargetModifier3D.TransformFlag.Position.
boolIsRotationEnabledbool
public bool IsRotationEnabled();Returns true if RetargetModifier3D.Enable has RetargetModifier3D.TransformFlag.Rotation.
boolIsScaleEnabledbool
public bool IsScaleEnabled();Returns true if RetargetModifier3D.Enable has RetargetModifier3D.TransformFlag.Scale.
boolIsUsingGlobalPosebool
public bool IsUsingGlobalPose();boolSetCopyBoneSkinScalevoid
public void SetCopyBoneSkinScale(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetEnableFlagsvoid
public void SetEnableFlags(RetargetModifier3D.TransformFlag enableFlags);| Name | Type | Default |
|---|---|---|
enableFlags | RetargetModifier3D.TransformFlag | — |
SetPositionEnabledvoid
public void SetPositionEnabled(bool enabled);Sets RetargetModifier3D.TransformFlag.Position into RetargetModifier3D.Enable.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetProfilevoid
public void SetProfile(SkeletonProfile profile);| Name | Type | Default |
|---|---|---|
profile | SkeletonProfile | — |
SetRotationEnabledvoid
public void SetRotationEnabled(bool enabled);Sets RetargetModifier3D.TransformFlag.Rotation into RetargetModifier3D.Enable.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetScaleEnabledvoid
public void SetScaleEnabled(bool enabled);Sets RetargetModifier3D.TransformFlag.Scale into RetargetModifier3D.Enable.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetUseGlobalPosevoid
public void SetUseGlobalPose(bool useGlobalPose);| Name | Type | Default |
|---|---|---|
useGlobalPose | bool | — |
RetargetModifier3D.TransformFlag
| Value | Description |
|---|---|
All = 7 | If set, allows to retarget the position/rotation/scale. |
Position = 1 | If set, allows to retarget the position. |
Rotation = 2 | If set, allows to retarget the rotation. |
Scale = 4 | If set, allows to retarget the scale. |