Skip to content

Commit a6d749d

Browse files
committed
update
1 parent 6a66104 commit a6d749d

File tree

1 file changed

+38
-36
lines changed

1 file changed

+38
-36
lines changed

tutorials/assets_pipeline/retargeting_3d_skeletons.rst

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ Retargeting 3D Skeletons
66
To share animations among multiple Skeletons
77
--------------------------------------------
88

9-
Godot has Position/Rotation/Scale 3D tracks (hereafter called Transform tracks)
10-
with Nodepaths to bones for Skeleton bone animation. If you think that you can
11-
share animations between multiple Skeletons as long as the bone names are the
12-
same, that is not correct.
9+
Godot has Position/Rotation/Scale 3D tracks (which this document calls "Transform" tracks)
10+
with Nodepaths to bones for Skeleton bone animation. This means you can't
11+
share animations between multiple Skeletons just by using the same bone
12+
names.
1313

1414
Godot allows each bone to have a parent-child relationship and can have rotation
15-
and scale as well as position, which means that bones can have different Transform values.
15+
and scale as well as position, which means that bones that share a name can still
16+
have different Transform values.
1617

1718
The Skeleton stores the Transform values necessary for the default pose as Bone Rest.
1819
If Bone Pose is equal to Bone Rest, it means that the Skeleton is in the default pose.
@@ -23,33 +24,34 @@ If Bone Pose is equal to Bone Rest, it means that the Skeleton is in the default
2324

2425
Skeletal models have different Bone Rests depending on the environment from
2526
which they were exported. For example, the bones of a glTF model output from Blender
26-
have Edit Bone Orientation as the Bone Rest rotation. However, there are skeletal
27+
have "Edit Bone Orientation" as the Bone Rest rotation. However, there are skeletal
2728
models without any Bone Rest rotations, such as the glTF model output from Maya.
2829

29-
To share animations in Godot, it is necessary to match Bone Rests as well as Bone Names,
30-
moreover to remove unwanted tracks in some cases. In Godot 4.0+, you can do that using
31-
the scene importer.
30+
To share animations in Godot, it is necessary to match Bone Rests as well as Bone Names
31+
to remove unwanted tracks in some cases. In Godot 4.0+, you can do that using the scene
32+
importer.
3233

3334
Options for Retargeting
3435
-----------------------
3536

3637
Bone Map
3738
~~~~~~~~
3839

39-
When you select the Skeleton3D node on the scene importer, you can find the Retarget
40-
section on the inspector.
40+
When you select the Skeleton3D node in the advanced scene import menu, a menu will appear
41+
on the right-hand side containing the "Retarget" section. The Retarget section has a single
42+
property ``bone_map``.
4143

4244
.. image:: img/retargeting1.webp
4345

44-
With the Skeleton node selected in the importer, first set up a new BoneMap and SkeletonProfile.
45-
Godot has a preset called SkeletonProfileHumanoid for humanoid models.
46-
This tutorial will proceed with the assumption that you will use SkeletonProfileHumanoid.
46+
With the Skeleton node selected, first set up a new :ref:`class_bonemap` and :ref:`class_skeletonprofile`.
47+
Godot has a preset called :ref:`class_skeletonprofilehumanoid` for humanoid models.
48+
This tutorial proceeds with the assumption that you are using :ref:`class_skeletonprofilehumanoid`.
4749

4850
.. note:: If you need a profile for a model such as a beast or creature, you can export
49-
a SkeletonProfile from SkeletonEditor with some information converted from Skeleton.
51+
a :ref:`class_skeletonprofile` from SkeletonEditor with some information converted from Skeleton.
5052

51-
When you use SkeletonProfileHumanoid, the auto-mapping will be performed when the
52-
SkeletonProfile is set. If the auto-mapping does not work well, you can map bones manually.
53+
When you use :ref:`class_skeletonprofilehumanoid`, auto-mapping will be performed when the
54+
:ref:`class_skeletonprofile` is set. If the auto-mapping does not work well, you can map bones manually.
5355

5456
.. image:: img/retargeting2.webp
5557

@@ -60,14 +62,14 @@ but it warns that animations may not be shared correctly.
6062
.. note:: The auto-mapping uses pattern matching for the bone names. So we recommend
6163
to use common English names for bones.
6264

63-
After you set up the BoneMap, several options are available in the sections below.
65+
After you set up the ``bone_map``, several options are available in the sections below.
6466

6567
.. image:: img/retargeting3.webp
6668

6769
Remove Tracks
6870
~~~~~~~~~~~~~
6971

70-
If you import resources as an AnimationLibrary that will be shared, we recommend to enable these options.
72+
If you import resources as an :ref:`class_animationlibrary` that will be shared, we recommend to enable these options.
7173
However, if you import resources as scenes, these should be disabled in some cases.
7274
For example, if you import a character with animated accessories,
7375
these options may cause the accessories to not animate.
@@ -81,8 +83,8 @@ Unimportant Positions
8183
^^^^^^^^^^^^^^^^^^^^^
8284

8385
Removes Position tracks other than ``root_bone`` and ``scale_base_bone``
84-
defined in SkeletonProfile from the animations. In SkeletonProfileHumanoid,
85-
this means that to remove Position tracks other than Root and Hips.
86+
defined in :ref:`class_skeletonprofile` from the animations. In :ref:`class_skeletonprofilehumanoid`,
87+
this means that to remove Position tracks other than "Root" and "Hips".
8688
Since Godot 4.0+, animations include Bone Rest in the transform value. If you disable this option,
8789
the animation may change the body shape unpredictably.
8890

@@ -102,13 +104,13 @@ Rename the mapped bones.
102104
Unique Node
103105
^^^^^^^^^^^
104106

105-
Makes Skeleton a unique node with the name specified in the Skeleton Name.
107+
Makes Skeleton a unique node with the name specified in the ``skeleton_name``.
106108
This allows the animation track paths to be unified independent of the scene hierarchy.
107109

108110
Rest Fixer
109111
~~~~~~~~~~
110112

111-
Reference Poses defined in SkeletonProfileHumanoid have the following rules:
113+
Reference poses defined in :ref:`class_skeletonprofilehumanoid` have the following rules:
112114

113115
* The humanoid is T-pose
114116
* The humanoid is facing +Z in the Right-Handed Y-UP Coordinate System
@@ -123,30 +125,30 @@ Apply Node Transform
123125
^^^^^^^^^^^^^^^^^^^^
124126

125127
If the asset is not exported correctly for sharing, the imported Skeleton may have
126-
a transform as a Node. For example, a glTF exported from Blender with no Apply Transform
128+
a transform as a Node. For example, a glTF exported from Blender with no "Apply Transform"
127129
executed is one such case. It looks like the model matches the definition,
128130
but the internal transforms are different from the definition.
129-
This option fixes such models by applying transforms on importer.
131+
This option fixes such models by applying transforms on import.
130132

131-
.. note:: If the imported scene contains objects other than Skeletons, this option may have a bad effect.
133+
.. note:: If the imported scene contains objects other than Skeletons, this option may have a negative effect.
132134

133135
Normalize Position Tracks
134136
^^^^^^^^^^^^^^^^^^^^^^^^^
135137

136138
Position track is used mostly for model movement, but sharing the moving animation
137139
between models with different heights may cause the appearance of slipping
138140
due to the difference in stride length. This option normalizes the Position track values
139-
based on the ``scale_base_bone`` height. The ``scale_base_bone`` height is stored in the Skeleton,
140-
and the normalized Position track values is multiplied by that value on playback.
141-
If this option is disabled, the Position tracks is not normalized
142-
and the Skeleton's ``motion_scale`` is always imported as ``1.0``.
141+
based on the ``scale_base_bone`` height. The ``scale_base_bone`` height is stored
142+
in the Skeleton as the ``motion_scale``, and the normalized Position track values is
143+
multiplied by that value on playback. If this option is disabled, the Position tracks
144+
is not normalized and the Skeleton's ``motion_scale`` is always imported as ``1.0``.
143145

144-
With SkeletonProfileHumanoid, ``scale_base_bone`` is Hips, therefore the Hips' height is used as the Motion Scale.
146+
With :ref:`class_skeletonprofilehumanoid`, ``scale_base_bone`` is "Hips", therefore the Hips' height is used as the ``motion_scale``.
145147

146148
Overwrite Axis
147149
^^^^^^^^^^^^^^
148150

149-
Unifies the models' Bone Rest by overwriting it to match the Reference Pose defined in the SkeletonProfile.
151+
Unifies the models' Bone Rests by overwriting it to match the reference poses defined in the :ref:`class_skeletonprofile`.
150152

151153
.. note:: This is the most important option for sharing animations in Godot 4.0+,
152154
but be aware that this option can produce horrible results **if the original Bone Rest set externally is important**.
@@ -156,15 +158,15 @@ Unifies the models' Bone Rest by overwriting it to match the Reference Pose defi
156158
Fix Silhouette
157159
^^^^^^^^^^^^^^
158160

159-
Attempts to make the model's silhouette match that of the reference pose defined in the SkeletonProfile,
161+
Attempts to make the model's silhouette match that of the reference poses defined in the :ref:`class_skeletonprofile`,
160162
such as T-Pose. This cannot fix silhouettes which are too different, and it may not work for fixing bone roll.
161163

162-
With SkeletonProfileHumanoid, this option does not need to be enabled for T-pose models,
164+
With :ref:`class_skeletonprofilehumanoid`, this option does not need to be enabled for T-pose models,
163165
but should be enabled for A-pose models. However in that case, the fixed foot results
164166
may be bad depending on the heel height of the model, so it may be necessary to add
165-
the SkeletonProfile bone names you do not want fixed in the Filter array, as in the below example.
167+
the :ref:`class_skeletonprofile` bone names you do not want fixed in the ``filter`` array, as in the below example.
166168

167169
.. image:: img/retargeting4.webp
168170

169171
Also, for models with bent knees or feet, it may be necessary to adjust the ``scale_base_bone`` height.
170-
For that, you can use Base Height Adjustment option.
172+
For that, you can use ``base_height_adjustment`` option.

0 commit comments

Comments
 (0)