first commit

This commit is contained in:
lethanhsonvsp
2025-11-17 15:16:36 +07:00
commit a40d0921eb
17012 changed files with 2652386 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
# Animation Rigging Menu
The top-level Animation Rigging menu contains useful utilities to help with rigging workflows.
## Align
Use Align to align the Transform, Position, or Rotation of a GameObject to another GameObject. This is particularly useful when aligning effectors to bones, or props to an effector.
To use Align, select the GameObject you want to align and then select the GameObject with the transform that you want to align to. In the Animation Rigging menu, select the appropriate align option.
|Tool|Description|
|---|---|
|Align Transform|Updates the Position and Rotation of the GameObject.|
|Align Rotation|Updates the Rotation of the GameObject.|
|Align Position|Updates the Position of the GameObject.|
## Restore Bind Pose
Use the Restore Bind Pose option to restore the Skinned Mesh Renderer bind pose that was originally imported. This is useful for restoring the original character pose of a skinned mesh. This option will only restore poses for bones that are used by skinning. The restore bind pose option may not work as expected for setups where the mesh is only skinned to some bones in the hierarchy.
## Rig Setup
Use the Rig Setup option to set up the required components for Animation Rigging on the selected object.
To use Rig Setup, select a GameObject hierarchy with an Animator component on which you want to create the constraints. Then, select the Rig Setup option.
This creates a RigBuilder component on the selected GameObject and a child GameObject named "Rig 1" with a Rig component that will be assigned to the RigBuilder layers.
Note: Rig Setup is also found in the Animator component options.
## Bone Renderer Setup
Use the Bone Renderer Setup option to create a BoneRenderer component with bones extracted from children SkinnedMeshRenderer components in the selected GameObject hierarchy.
To use Bone Renderer Setup, select the root GameObject and select Bone Renderer Setup.
Note: Bone Renderer Setup is also found in the Animator component options.

View File

@@ -0,0 +1,28 @@
# Bidirectional Motion Transfer
Bidirectional motion transfer is an authoring workflow that lets you transfer existing motion onto active constraints, and inversely, transfer the motion from active constraints back to the original motion source while preserving visual fidelity of the motion.
This workflow makes use of the Animation Window to select the desired clip and preview the constrained result in the Scene View.
Both **“Transfer motion to skeleton”** and **“Transfer motion to constraint”** are available as options on the **constraint components**. You should use either the **Rig component** to Transfer motion of an entire Rig, or the **RigBuilder component** to transfer motion of the entire hierarchy.
![Bidirectional baking menu](images/bidirectional_baking/baking_option_menu.png)
Bidirectional motion transfer can be used on generic character hierarchies. Humanoid is not supported at the moment.
Not all constraints can Transfer motion to constraints. Physics-based constraints like Damped Transform cannot be inferred from existing motion.
Other constraints can be transferred but with limitations. For example, the Twist Chain constraint constrains rotations. It overrides positions and in-between chain rotations. The result of transferring motion does not precisely represent the source animation.
The following constraints support "Transfer motion to constraint" with limitations:
|Constraint|Limitations|
|---|---|
|Two Bone IK Constraint|No limitations.|
|Multi-Aim Constraint|Roll-Axis motion is not guaranteed to be the same.|
|Multi-Parent Constraint|No limitations.|
|Multi-Position Constraint|Disabling constrained axes may change end result|
|Multi-Referential Constraint|No limitations.|
|Multi-Rotation Constraint|Disabling constrained axes may change end result.|
|Twist Chain Constraint|In-between chain transforms are overridden.|

View File

@@ -0,0 +1,18 @@
# Constraint Components
The Animation Rigging package includes the following predefined constraints that you can use to define your Animation rigs:
- [Blend Constraint](./constraints/BlendConstraint.md)
- [Chain IK Constraint](./constraints/ChainIKConstraint.md)
- [Damped Transform](./constraints/DampedTransform.md)
- [Multi-Aim Constraint](./constraints/MultiAimConstraint.md)
- [Multi-Parent Constraint](./constraints/MultiParentConstraint.md)
- [Multi-Position Constraint](./constraints/MultiPositionConstraint.md)
- [Multi-Referential Constraint](./constraints/MultiReferentialConstraint.md)
- [Multi-Rotation Constraint](./constraints/MultiRotationConstraint.md)
- [Override Transform](./constraints/OverrideTransform.md)
- [Twist Chain Constraint](./constraints/TwistChainConstraint.md)
- [Twist Correction](./constraints/TwistCorrection.md)
- [Two Bone IK Constraint](./constraints/TwoBoneIKConstraint.md)
The constraints in the Animation Rigging package are based on the C# Animation Jobs API.

View File

@@ -0,0 +1,108 @@
# Rigging Workflow
This document describes all of the steps and components required to create a custom Animation Rig. This [**video**](https://youtu.be/DzW_jQGO1dc) also demonstrates the process.
## Core Components
Animation Rigs in Unity make use of four key components:
* **Animator:** When added to some root GameObject, this built-in component designates that a hierarchy is animatable. _Animation Rigging works on top of Unity's animation system, and so requires an Animator._
* **Rig Builder:** When added to the root GameObject, this component allows the animated hierarchy to be modified by one or more Rigs, which it assembles into layers.
* **Rig:** When added to GameObjects in an animatable hierarchy, Rigs act as containers for source objects and Constraints that modify the animated hierarchy's pose. You can adjust the weight of a Rig to control its contribution to the final pose.
* **Constraints:** When added to Rig GameObjects or their children, these components specify operations a Rig will perform.
The following illustration depicts a schematic overview of the interdependencies among all of the required types of components.
![Rig Setup Overview](images/rig_setup/rig_setup_overview.png)
Once you have added a Rig Builder component to an animatable hierarchy's root GameObject, you can create a Rig GameObject as a child of this root _(ex: Rig Setup)_. To enable animation rigging, the Rig GameObject must have a Rig component. To then connect the Rig to the Animator, you must assign this Rig component to a Rig Layer on the Rig Builder component.
![Rig Setup](images/rig_setup/rig_setup.gif)
After you connect the Rig GameObject to the Rig Builder component, you can add rig elements (i.e., GameObjects with Constraint components) under the Rig GameObject hierarchy. Different rig elements can be organized and hierarchically structured to accommodate any rigging requirement.
Source objects for Constraints, such as Target Effectors or Hint Effectors, can be placed under their associated Rig GameObject. In the following illustration, _Left Leg IK_ has a **Two Bone IK Constraint** component and is acting as a rig element. It is the parent of both the _LeftFootEffector_ and _LeftLegHint_ source objects.
![Source Object Example](images/rig_setup/source_object_example.png)
### Rig Builder Component
The Rig Builder component lives alongside the Animator component and creates a Playable Graph that is appended to the existing Animator state machine.
The Rig Builder component needs to be added to the GameObject that has the Animator component. Rig Builder needs to affect the same hierarchy as the Animator.
![Rig Builder Setup](images/rig_builder/rig_builder_setup.gif)
Using Rig Layers, the Rig Builder component allows for stacking of multiple Rigs that can be enabled/disabled at any time.
![Rig Builder Layers](images/rig_builder/rig_builder_layers.gif)
### Rig Component
The Rig component is the main entry point for all Constraints in a given control rig.
Note there should only be one Rig component per control rig hierarchy, which you must assign to a Rig Layer on the Rig Builder component.
To use multiple control rigs with a single hierarchy, you must assign each Rig to a different Rig Layer, and enable/disable them independently.
From a technical standpoint, the main purpose of a Rig component is to collect all Constraint components in its local hierarchy.
The component generates an ordered list of _IAnimationJobs_, which are applied to the Animator's pose after its normal evaluation.
The Rig component gathers constraints using _GetComponentsInChildren_, and so the order of components in the Rig's hierarchy determines the evaluation order of the jobs.
This method follows depth-first traversal as shown below:
![Rig Constraint Evaluation Order](images/rig/eval_order.png)
In other words, grouping constraints under a GameObject allows you to manage the evaluation order of these constraints
by modifying the hierarchy.
Control rig hierarchies should hold all the necessary rig elements such as effectors, constraints, and other objects/elements required by the constraint definitions.
The root of a control rig hierarchy should be at the same level as the skeleton root, both under the Game Object holding the Animator.
_In other words, it should not be in the skeleton hierarchy, but rather live beside it._
![Rig Setup](images/rig/rig_setup.gif)
![Rig Weight](images/rig/rig_weight.gif)
Rig components, like all Constraint components, have a Weight property that can be used, animated, and scripted to enable/disable
or ease-in/ease-out an entire control rig hierarchy.
## Other Utilities
### Bone Renderer Component
The Bone Renderer component allows you to define a transform hierarchy to be drawn as bones for visualization and selection during the rigging process.
These bones are not visible in the Game view. This allows you to define your character deformation skeletons for rigging purposes.
![Bone Renderer Setup](images/bone_renderer/bone_renderer_setup.gif)
![Bone Renderer Component](images/bone_renderer/bone_renderer_component.gif)
You can customize the appearance of the bones by modifying Bone Size, Shape and Color.
The package provides these default shapes: Line, Pyramid, and Box.
You can also display tripods of local axes and adjust their size to suit your preference.
![Bone Look Pyramid](images/bone_renderer/bone_looks.png)
### Rig Effectors
Similarly to bones, Rig Effectors allow you to add gizmos to transforms for visualization and selection.
You can add them to any transform in the same hierarchy as a Rig Builder or Rig component.
Like bones, Effectors are not visible in the Game view.
A special Scene View overlay allows you to manage and customize effectors in the Rig hierarchy.
![Rig Effector Overlay](images/rig_effector/rig_effector_setup.gif)
You can also customize the appearance of the effectors by modifying Effector Size, Shape, Color, Offset Position and Offset Rotation.
The shape can be any Mesh asset available in the project.
You can create, delete, or edit multiple effectors at once.
![Rig Effector Shapes](images/rig_effector/rig_effector_shapes.png)
### Rig Transform
When a specific GameObject in your rig's hierarchy is important for manipulation but not referenced by any rig constraints, you must add a **RigTransform** component, found under _Animation Rigging/Setup_.
As shown in the video below, in order to manipulate both the left and right foot IK targets (_lfik_ and _rfik_) of the _2BoneIK_ sample using
their parent transform (_ik_ ), you must add this component to get the expected behavior.
![Rig Transform](images/rig_transform/rig_transform_manipulation.gif)

View File

@@ -0,0 +1,17 @@
* [Animation Rigging](index.md)
* [Rigging workflow](RiggingWorkflow.md)
* [Animation Rigging Menu](AnimationRiggingMenu.md)
* [Bidirectional Motion Transfer](BidirectionalMotionTransfer.md)
* [Constraint components](ConstraintComponents.md)
* [Blend Constraint](constraints/BlendConstraint.md)
* [Chain IK Constraint](constraints/ChainIKConstraint.md)
* [Damped Transform](constraints/DampedTransform.md)
* [Multi-Aim Constraint](constraints/MultiAimConstraint.md)
* [Multi-Parent Constraint](constraints/MultiParentConstraint.md)
* [Multi-Position Constraint](constraints/MultiPositionConstraint.md)
* [Multi-Referential Constraint](constraints/MultiReferentialConstraint.md)
* [Multi-Rotation Constraint](constraints/MultiRotationConstraint.md)
* [Override Transform](constraints/OverrideTransform.md)
* [Twist Chain Constraint](constraints/TwistChainConstraint.md)
* [Twist Correction](constraints/TwistCorrection.md)
* [Two Bone IK Constraint](constraints/TwoBoneIKConstraint.md)

View File

@@ -0,0 +1,19 @@
# Blend Constraint
![Example](../images/constraint_blend/blend_constraint.gif)
A blend constraint allows the constrained GameObject to blend between GameObject Source A Position
and GameObject Source B Position as well as blending between GameObject Source A Rotation
and GameObject Source B Rotation.
![Component](../images/constraint_blend/blend_constraint_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Constrained Object. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Constrained Object|The GameObject affected by the Source Objects.|
|Source A|The first source GameObject that influences the position and rotation of the Constrained Object.|
|Source B|The second source GameObject that influences the position and rotation of the Constrained Object.|
|Maintain Offset|Specifies whether to maintain the initial offset between the Constrained Object and the Source Objects. You can retain any combination of either Position and/or Rotation offset.|
|Blend A | B Position|If enabled, the constrained GameObject's position blends between those of Source A and Source B by the specified amount. As with the constraint's overall weight, intermediate values are interpolated linearly.|
|Blend A | B Rotation|If enabled, the constrained GameObject's rotation blends between those of Source A and Source B by the specified amount. As with the constraint's overall weight, intermediate values are interpolated linearly.|

View File

@@ -0,0 +1,24 @@
# ChainIK Constraint
![Example](../images/constraint_chainik/chainik.gif)
The Chain IK constraint allows you to invert the control of a hierarchy of GameObjects, so the end of the chain can reach a target position.
By defining Root and Tip GameObjects, the Chain IK constraint can find and constrain all GameObjects in between.
This constraint implements the FABRIK solver (Forward and Backward Reaching Inverse Kinematic).
More details can be found [here](http://www.andreasaristidou.com/FABRIK.html).
![Component](../images/constraint_chainik/chainik_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the chain elements. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Root|The root GameObject of the chain hierarchy.|
|Tip|The final GameObject of the chain hierarchy. It must be a descendant of the Root GameObject.|
|Target|The GameObject that specifies the desired target transform for the chain's Tip.|
|Maintain Target Offset|Specifies whether to maintain the initial offset between the Tip and the Target. You can retain any combination of either Position and/or Rotation offset.|
|Chain Rotation Weight|The weight of rotations applied throughout the chain. If set to 1, the chain will fully reach for its target goal. As with the constraint's overall weight, intermediate values are interpolated linearly.|
|Tip Rotation Weight|The weight of the rotation applied to the Tip. If set to 1, the Tip aligns its rotation to the specified Target. As with the constraint's overall weight, intermediate values are interpolated linearly.|
|Max Iterations|The maximum number of solver iterations to perform to try to make the Tip reach the Target within the specified Tolerance threshold.|
|Tolerance|Distance tolerance between the Target and Tip GameObjects. The solver will finish its computation if the distance is less than this value at any point, even if Max Iterations has not been reached.|

View File

@@ -0,0 +1,17 @@
# Damped Transform
![Example](../images/constraint_damped_transform/damped_transform.gif)
The damped transform constraint allows damping the position and rotation transform values from the source GameObject to the constrained GameObject.
The Maintain Aim option forces the constrained object to always aim at the source object.
![Component](../images/constraint_damped_transform/damped_transform_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Constrained Object. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Constrained Object|The GameObject affected by the Source GameObjects.|
|Source|The GameObject that influences the Constrained Object's transform.|
|Damp Position|The weight of positional damping to apply to the Constrained Object. If set to 0, the Constrained Object follows the Source object's position with no damping. If set to 1, the Constrained Object's position is fully damped. As with the constraint's overall weight, intermediate values are interpolated linearly.|
|Damp Rotation|The weight of rotational damping to apply to the Constrained Object. If set to 0, the Constrained Object follows the Source object's rotation with no damping. If set to 1, the Constrained Object's rotation is fully damped. As with the constraint's overall weight, intermediate values are interpolated linearly.|
|Maintain Aim|Specifies whether to maintain the initial rotation offset between the Constrained Object and the Source Object.|

View File

@@ -0,0 +1,41 @@
# Multi-Aim Constraint
![Example](../images/constraint_multi_aim/multi_aim.gif)
A Multi-Aim Constraint rotates a Constrained Object to face a target position specified by one or more Source Objects.
It is typically used to make a GameObject look at objects of interest, such as nearby interactable props or the position of the cursor.
You can specify the aim direction by selecting which Aim Axis to use on the Constrained Object (X, -X, Y, -Y, Z, -Z).
You can optionally specify World Up parameters to help the Constrained Object maintain stable roll orientation.
_Note that this constraint's handling of multiple targets is different from that of most third-party 3D animation software.
Specifically, it calculates an aim rotation to each target, and then produces a weighted sum of all these rotations.
This approach allows you to easily blend in or out the effects of individual targets, since their weight values are not normalized prior to calculation.
To replicate the behavior of other 3D animation software, you should use a single Source Object that is constrained to multiple targets via a [MultiPositionConstraint](./MultiPositionConstraint.md)._
![Component](../images/constraint_multi_aim/multi_aim_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Constrained Object. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Constrained Object|The GameObject affected by the Source Objects.|
|Aim Axis|Specifies the local aim axis of the Constrained Object to use in order to orient its forward direction to the Source Objects.|
|Up Axis|Specifies the local up axis of the Constrained Object to use in order to orient its upward direction (i.e., roll orientation).|
|World Up Type|Specifies which mode to use to stabilize the upward direction (i.e., roll orientation) of the Constrained Object.|
|World Up Axis|A vector in some reference frame that is used to stabilize the upward direction of the Constrained Object. This value is used when World Up Type is either Vector or Object Rotation Up. In those cases, the reference frame is either the world or another object, respectively.
|World Up Object|A GameObject used as a reference frame for World Up Axis. This value is used when World Up Type is either Object Up or Object Rotation Up.|
|Source Objects|The list of GameObjects that influence the Constrained Object's orientation, and the amount of weight they contribute to the final pose. The constraint calculates rotation toward each target to produce a weighted sum. _The order of Source Objects does not affect the result._|
|Maintain Rotation Offset|Specifies whether to maintain the initial rotation offset between the Constrained Object and the Source Objects.|
|Offset|Specifies an additional local space rotation offset to apply to the Constrained Object, after it has been rotated toward its target.|
|Constrained Axes|Specifies the axes to which the constraint can apply rotation.|
|Min Limit|Clamps the minimum rotation that may be applied about any of the constrained axes of rotation.|
|Max Limit|Clamps the maximum rotation that may be applied about any of the constrained axes of rotation.|
World Up Type can have the following values:
|Values|Description|
|---|---|
|None|Do not use a World Up vector.|
|Scene Up|The Y-axis of the scene.|
|Object Up|The Y-axis of the GameObject specified by World Up Object.|
|Object Up Rotation|The axis specified by World Up Vector, in the space of the GameObject specified by World Up Object.|
|Vector|The World Up Vector.|

View File

@@ -0,0 +1,23 @@
# Multi-Parent Constraint
![Example](../images/constraint_multi_parent/multi_parent.gif)
A Multi-Parent Constraint moves and rotates a GameObject as if it is the child of another GameObject in the Hierarchy window.
Because using this constraint does not actually change the GameObject hierarchy, it offers some advantages:
- It does not affect scale.
- The Constrained Object can have multiple Source Objects (i.e., parents).
- The Constrained Object does not have to be a child of any of the Source Objects.
- You can vary the effect of the constraint by specifying an overall weight, as well as individual weights for each of the Source Objects.
- You can still apply normal animation to the Constrained Object's children as normal.
![Component](../images/constraint_multi_parent/multi_parent_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Constrained Object. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Constrained Object|The GameObject affected by the Source Objects.|
|Source Objects|The list of GameObjects that influence the Constrained Object's position and orientation, and the amount of weight they contribute to the final pose. The constraint applies linearly interpolated, weighted translation and rotation toward each target. _The order of Source Objects does not affect the result._|
|Maintain Offset|Specifies whether to maintain the initial offset between the Constrained Object and the Source Objects. You can retain any combination of either Position and/or Rotation offset.|
|Constrained Position Axes|Specifies the axes to which the constraint can apply translation.|
|Constrained Rotation Axes|Specifies the axes to which the constraint can apply rotation.|

View File

@@ -0,0 +1,16 @@
# Multi-Position Constraint
![Example](../images/constraint_multi_position/multi_position.gif)
A Multi-Position Constraint component moves a Constrained Object to follow its Source Objects.
![Component](../images/constraint_multi_position/multi_position_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Constrained Object. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Constrained Object|The GameObject affected by the Source Objects.|
|Constrained Axes|Specifies the axes to which the constraint can apply translation.|
|Source Objects|The list of GameObjects that influence the Constrained Object's position, and the amount of weight they contribute to the final pose. The constraint calculates translation toward each target to produce a weighted sum. _The order of Source Objects does not affect the result._|
|Maintain Position Offset|Specifies whether to maintain the initial position offset between the Constrained Object and the Source Objects.|
|Offset|Specifies an additional local space translation offset to apply to the Constrained Object, after it has been moved toward its target.|

View File

@@ -0,0 +1,16 @@
# Multi-Referential Constraint
![Example](../images/constraint_multi_referential/multi_ref.gif)
The Multi-Referential Constraint allows you to configure a group of GameObjects to have dynamic parent-child-like behavior.
The movement of the Driving object influences all of the other Reference Objects as if it were their parent.
Use this constraint to simulate dynamic parenting changes without modifying your hierarchy.
For example, you could configure a character's hand to sometimes control the motion of a prop, and the prop to sometimes control the motion of the hand.
![Component](../images/constraint_multi_referential/multi_ref_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Reference Objects. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Driving|An object from the list of Referenced Objects, whose motion drives that of all other Referenced Objects.|
|Referenced Objects|A list of GameObjects to be driven by the specified Driving object.|

View File

@@ -0,0 +1,17 @@
# Multi-Rotation Constraint
![Example](../images/constraint_multi_rotation/multi_rotation.gif)
A Multi-Rotation Constraint component rotates a Constrained Object to match the rotation of its Source Objects.
The constraint applies rotation about the shortest path to each target.
![Example](../images/constraint_multi_rotation/multi_rotation_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Constrained Object. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Constrained Object|The GameObject affected by the Source Objects.|
|Constrained Axes|Specifies the axes to which the constraint can apply rotation.|
|Source Objects|The list of GameObjects that influence the Constrained Object's orientation, and the amount of weight they contribute to the final pose. The constraint calculates rotation toward each target to produce a weighted sum. _The order of Source Objects does not affect the result._|
|Maintain Rotation Offset|Specifies whether to maintain the initial rotation offset between the Constrained Object and the Source Objects.|
|Offset|Specifies an additional local space rotation offset to apply to the Constrained Object, after it has been rotated toward its target.|

View File

@@ -0,0 +1,28 @@
# Override Transform
![Example](../images/constraint_override_transform/override_transform.gif)
An Override Transform constraint allows you to override the Constrained Object's transform with a value coming from an Override Source, or from manually specified values.
![Example](../images/constraint_override_transform/override_transform_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Constrained Object. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Constrained Object|The GameObject affected by the Override source.|
|Override Source|The GameObject that influences the Constrained Object's transform. If specified, Override Position and Override Rotation fields are ignored.|
|Override Position|A specific position value to apply to the Constrained Object. This value is ignored if an Override Source is specified.|
|Override Rotation|A specific rotation value to apply to the Constrained Object. This value is ignored if an Override Source is specified.|
|Space|Specifies how the Override Source's local transform values (or manual Override Position and Rotation) should be applied to Constrained Object.|
|Position Weight|The weight of the position influence. A weight of 1 causes the constrained GameObject to be fully influenced by its Override source.|
|Rotation Weight|The weight of the rotation influence. A weight of 1 causes the constrained GameObject to be fully influenced by its Override source.|
Space can have the following values:
|Values|Description|
|---|---|
|World|The displacement of the Override Source's local transform values _replace_ the Constrained Object's global transform values.|
|Local|The displacement of the Override Source's local transform values _replace_ the Constrained Object's local transform values.|
|Pivot|The displacement of the Override Source's local transform values are _added to_ The Constrained Object's local transform values.|
_In each case, the initial position of the Override Source GameObject at the time the constraint is created, is treated as the point of reference for calculating its displacement._

View File

@@ -0,0 +1,17 @@
# TwistChain Constraint
![Example](../images/constraint_twistchain/twistchain.gif)
The Twist Chain constraint allows you to control world rotations on both ends of a GameObject chain hierarchy.
The constraint calculates interpolated rotations for intermediate transforms between a Root and Tip to create a smooth animated hierarchy.
![Component](../images/constraint_twistchain/twistchain_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the chain elements. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Root|The root GameObject of the chain hierarchy.|
|Tip|The final GameObject of the chain hierarchy. It must be a descendant of the Root GameObject.|
|Root Target|The GameObject that specifies the desired target rotation for the chain's Root.|
|Tip Target|The GameObject that specifies the desired target rotation for the chain's Tip.|
|Curve|A curve with a normalized domain and range, specifying how the twist rotation should be distributed down the length of the chain.|

View File

@@ -0,0 +1,15 @@
# Twist Correction
![Example](../images/constraint_twist_correction/twist_correction.gif)
The Twist Correction constraint redistributes a percentage of a Source's rotation to one or more Twist Nodes in order to correct the twist deformation of a body part that rotates on multiple axes.
Common use cases are shoulders, wrists, and upper legs.
![Component](../images/constraint_twist_correction/twist_correction_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the Twist Nodes. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Source|The GameObject that influences the Twist Nodes to rotate around a specific Twist Axis.|
|Twist Axis|Specifies the axis on the Source object from which the rotation is extracted and then redistributed to the Twist Nodes.|
|Twist Nodes|The list of GameObjects that will be influenced by the Source GameObject, and the cumulative percentage of the Source's twist rotation they should inherit. They are generally expected to all be leaf nodes in the hierarchy (i.e., they have a common parent and no children), and to have their twist axes oriented the same as the Source object in their initial pose.|

View File

@@ -0,0 +1,31 @@
# Two Bone IK
![Example](../images/constraint_two_bone_ik/two_bone_ik.gif)
The Two Bone IK constraint allows you to invert the control of a simple hierarchy of two GameObjects, so the Tip of a limb can reach a Target position.
An additional Hint GameObject allows you to specify the direction the limb should be oriented when it bends.
![Component](../images/constraint_two_bone_ik/two_bone_ik_component.png)
|Properties|Description|
|---|---|
|Weight|The overall weight of the constraint. If set to 0, the constraint has no influence on the limb elements. When set to 1, it applies full influence with the current settings. Intermediate values are interpolated linearly.|
|Root|The root GameObject of the limb hierarchy.|
|Mid|The middle GameObject of the limb hierarchy. It must be a child of the Root GameObject.|
|Tip|The final GameObject of the limb hierarchy. It must be a child of the Mid GameObject.|
|Target|Source GameObject that specifies the desired position of the Tip.|
|Hint|Optional Source GameObject, whose position is used to specify the direction the limb should be oriented when it bends.|
|Maintain Target Offset|Specifies whether to maintain the initial offset between the Tip and the Target. You can retain any combination of either Position and/or Rotation offset.|
|Target Position Weight|The weight to apply for calculating the desired position when reaching for the Target. If set to 1, the Root and Mid objects will extend as far as necessary to try to reach the specified Target position. As with the constraint's overall weight, intermediate values are interpolated linearly.|
|Target Rotation Weight|The weight of the rotation applied to the Tip. If set to 1, the Tip aligns it rotation to the specified Target. As with the constraint's overall weight, intermediate values are interpolated linearly.|
|Hint Weight|The amount of influence the Hint has on the configuration of the hierarchy. When set to 1, the Hint fully influences the hierarchy configuration. If no Hint GameObject is specified, the hint weight is ignored.|
## Auto Setup from Tip Transform
The component's context menu available from its header in the Inspector provides a "Auto Setup from Tip Transform" option.
This menu command will automatically create and assign both a Target and Hint GameObject in your Rig's hierarchy.
To use this option:
1. Add a Two Bone IK Constraint to a GameObject in your Rig hierarchy.
2. Assign the Tip GameObject.
3. Select "Auto Setup from Tip Transform" from the component's context menu.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -0,0 +1,29 @@
# Animation Rigging
Use Animation Rigging to create and organize **animation rigs**, or sets of constraints for adding procedural motion to animated objects. Examples include:
* _Deformation rigs_ to control secondary animation of character armor, props, and accessories.
* _World Interaction rigs_ (sets of IK and Aim constraints) to make interactive adjustments for targeting or for correcting animation compression artifacts.
This documentation describes how to set up a simple Animation Rig for use in a variety of workflows. It also includes detailed information on the constraints included in the Animation Rigging package.
* The [Rigging Workflow](RiggingWorkflow.md) topic is the best place to get started. It describes the main components necessary for defining and using an animation rig. It includes suggestions on additional components and constraints that you can define for props, accessories, or other rig controls.
* The [Animation Rigging Menu](AnimationRiggingMenu.md) topic describes utilities that help with the rigging workflow.
* The [Bidirectional Motion Transfer](BidirectionalMotionTransfer.md) topic describes an additional workflow option for transferring motion back and forth between an animation rig and a skeleton.
* The [Constraint Components](ConstraintComponents.md) topic contains detailed information on all of the built-in Constraint components.
# Technical details
## Requirements
This version of Animation Rigging is compatible with the following versions of the Unity Editor:
* 2023.2 and later
## Document revision history
|Date|Reason|
|---|---|
|Jan 21, 2020|Editing pass and restructure of package documentation|
|Nov 12, 2019|Added Bidirectional Motion Transfer workflow and updated images|
|Nov 23, 2018|First draft of package documentation|