A custom node that applies dynamics to one section of a joint chain. It can be included directly into the rig, or Bake & Purge over the rig.
⚠Warning⚠
Internal Use ID0x7b001
is used.
- Put boneDynamicsNode.mll in
C:\Users\<USERNAME>\Documents\maya\<MAYAVERSION>\plug-ins
. - Load "boneDynamicsNode.mll" from Plug-in Manager.
Create any joint chain and connect the boneDynamicsNode
per section. The minimum required connections are as follows:
Time
Bone Translate
Bone Joint Orient
Bone Parent Matrix
Bone Parent Inverse Matrix
End Translate
Output Rotate
To rotate joint1, with joint2 as the tip...
Let's move the current frame to 1 or later and move the root. The joint-chain shakes!
💡Requirements for Joint
Joint chain must meet the requirements here.
💡Sample Script
basic_usage.py is a script to connect bonedynamicsNode to any joint chain. Please select and execute them in order from the root of the joint to the tip of the joint.
Enable
: Turning it off disables all calculations.Reset Time
: Dynamics are disabled when the current frame is equal to or less than this value. In other words, start frame of the simulation.Fps
: Used to calculate delta time. Enter a value equal to the FPS of the scene. Default is 30.
Damping
: Attenuates speed. The larger the value, the harder it is to accelerate.Elasticity
: Force to return to the original posture.Stiffness
: Suppresses changes between frames (steps). Setting to 1 will result in loss of motion.Mass
: Affects the force to return to the original posture.Gravity
: If Y-up and the unit is in centimeters, set [0,-980,0].Gravity Multiply
: Will be multiplied by Gravity.
Select the joint and execute "Bake Simulation" from the "Key" menu. Then delete the boneDynamicsNode.
- Rotate should be [0,0,0], with only the Joint Orient having a value.
- Do not edit rotatePivot, rotatePivotTranslate, scalePivot, or scalePivotTranslate.
- Rotate Order is only available for xyz.
- Rotate Axis should remain [0,0,0].
- Leave Inherits Transform checked.
- Leave Offset Parent Matrix at its default value.
- Receive InverseScale from the parent Scale and leave Segment Scale Compensate checked. Shear not supported.
All of the above checkpoints can be satisfied by making joints as usual.
5 types of collisions are available: Sphere, Capsule, Infinite plane, Mesh, and Ground.
Radius
: Radius of the end-joint.Iterations
: Higher values increase the accuracy of collisions. Recommended value is 3 to 5. 0 disables collisions.
Collisions are determined by the sphere centered around the end-joint. The radius of the end-joint is set with the Radius attribute.
The attributes that connect the collider are in a list, so you can use more than one. Ground Collision does not need connections.
💡Visualize Radius
Place a nurbsSphere or implicitSphere as a child of end-joint and connectRadius
.
The required connections for these three types of collisions are as follows.
Sphere Col Matrix
: Connect the sphere collider worldMatrix.Sphere Col Radius
: Radius of sphere collider.Capsule Col Matrix A
Capsule Col Matrix B
: Connect worldMatrix on one side of the capsule collider.Capsule Col Radius A
Capsule Col Radius B
: Connect the radius of one side of the capsule collider.Infinite Plane Col Matrix
: Connect worldMatrix of infinite plane collider.
💡Note
Colliders can be created with maya_expressionCollision (expcol), but it is not necessary to use it. Any collider can be used as long as the required attributes are connected.
Any mesh can be used for collisions. Compared to other types of collisions, mesh collisions are more loaded and less stable, so their use is not recommended.
Mesh Collider
: Connect worldMesh of any mesh.Mesh Col Cutoff
: Max distance for mesh collision detection.
💡Note
- As this is an experimental feature, it may be unstable.
- All edges of the collision mesh should be made with soft edges.
- If the collision mesh has a large number of polygons, it will increase the processing load.
- If the collision mesh is not a closed shape, use
Mesh Col Cutoff
to control the range of detections.
A horizontal infinite plane collision. It can be used only with the enable and ground height attribute, no connections are needed.
Enable Ground Col
: Enable ground collision.Ground Height
: Height of the ground.
The Angle Limit
attribute allows for limiting the rotation angle of bones. It has a higher priority than collision, so depending on the posture, it may be penetrated in the colliders.
💡Visualize Angle
Place an implicitCone node and a transform nodes in the same space as the joint, and set and connect their attributes as in the following image:
⚠️ If joint.ty and tz contain values, cone direction will not match accurately.
The converging pose can be manipulated by duplicating the joint-chain and connecting Rotate to Rotation Offset
.
You can cancel the transform by connecting the worldMatrix of the node you do not want affected (such as the root controller of character) to the Offset Matrix
.
Connecting each scale value to Bone Scale
, Bone Inverse Scale
, and End Scale
enables a scale per section.
⚠Please avoid non-uniform scales.
Branching is possible, but good results are obtained with joints like the one on the left of the image. The right one does not give good results.
💡Sample Script
advanced_usage.py is a script to connect bonedynamicsNode to any joint chain. Please select and execute them in order from the root of the joint to the tip of the joint.
- Enable per-section scaling.
- If place the collider created by expcol as a child of 'collider_grp', to be connected.
- If duplicate the joint-chain to be simulated and add '_target' to the end of the name, to allow manipulation of the target posture.
- If a node named "offset" exists, will be connected to cancel the transform.
Pre-built boneDynamicsNode.mll
in the plug-ins folder. Install to the appropriate Maya version and ready to use.
Version | Plug-in (*Click on "Download raw file" at the link.) |
---|---|
Maya 2022 Update 5 win64 | Download |
Maya 2023 Update 3 win64 | Download |
Maya 2024 Update 2 win64 | Download |
Maya 2025 Update 1 win64 | Download |
For example, Maya 2024 in Windows:
- Install Visual Studio 2022
- Install CMake 3.22.1 or higher
- Donwload SDKs from Maya API | Autodesk Platform Services (APS)
- Set
devkitBase
path in theDEVKIT_LOCATION
environment variable. - Generate a project with the following command:
cd src
cmake . -Bbuild_2024 -G "Visual Studio 17 2022" -A x64
- Build with Visual Studio or with the following command:
cmake --build build_2024