Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Open the Rig/Animation exporter tool using the shelf button Image Removed or via the Atoms menu: Atoms > Export > Rig/Animation Exporter

The Rig/Animation Exporter GUI will pop up.

The "Root Joint" field must be set to the root joint of your skeleton.

After that is set, you can select the RightShoulder, LeftShoulder and Neck joints and click the plus button under the "Skip Joints" list.
Then selected all the finger joints ending with "1" (the finger roots) and press the plus button under the "Skin Hierarchy Joints" list.
This is so the tool will not create a rigid body for all the joints in the "Skip Joints" list, it was also skip all joints in the "Skin Hierarchy Joints" list and their children.

For creating the rigid body nodes you have two options:

  • Create an empty group, called "Ragdoll" and keeping it selected click on Pick From Selection > Pick Selection next to the Ragdoll field. 
  • If you have already some rigid body geometry ready for your character and living under a group, make sure each rigid body name is the same as the associated rig joint but ends with the "_RB" suffix. For instance for "Spine1", the rigid body would be named "Spine1_RB" . With the group selected click on Pick From Selection > Pick Selection next to the Ragdoll field.

Click on the "Create rigid bodies and constraints" button and click yes when the pop-up will show.

 Image Removed

Setting up the rigid bodies and constraints

At this point after hiding the skin geometry, you should see something like the first picture on the right.

Under the ragdoll group you will see a rigid body mesh and a locator for each joint, to make any edit on the transform (scale, rotate, scale) please use the locator as the meshes themselves are locked and shouldn't be modified.

Select the Spine_RB, Spine1_RB, Spine2_RB and Spine3_RB rigid bodies and click on the X axis button of the AtomsPhysx shelf Image Removed. You will see the rigid bodies changing orientation.

Select the associated locators and scale them to cover the size of the related skin mesh.

Scale the rigid remaining bodies of your ragdoll setup.

Note

In case you move one or more of the rigid bodies locators, please make sure to place back the children constraints on top of the associated joints. If you fail to do this, your ragdoll setup might produce unpredictable results.

Create a plane and move it below the robot feet, then while still having the plane selected create a rigid body with the AtomsPhysx shelf button Image Removed. Change its mesh type to plane.

You should end up with a setup similar to the one in the second picture on the right.

...

Image Removed

Testing the ragdoll

First select the tcAtomsSolver node and make sure both the "enable" attributes under the "Simulation Attributes" and "Physx" are turned on.

Press play, your ragdoll should fall on the plane, but it will collapse on itself (first picture on the right). This is because we have not worked on the constraints yet.

Select all rigid bodies of the ragdoll and click on the toggle mesh display shelf button Image Removed(AtomsPhysx shelf). All the rigid bodies will become invisible.

If you zoom in you will see the constraints for all joints. 

Select the HipsToSpineContraint constraint and in the "D6" section of the attribute editor, set the Angular Motions to Limit for all 3 axis.
Enable the twist and pyramid limits and set the values to <-10, 10, -1> (second picture on the right).
The same limits will work fine on all Spine constraints.

Feel free to experiment with limits on the other joint contraints.

To test your ragdoll, select all the rigid bodies and click on the toggle mesh display shelf button Image Removed(AtomsPhysx shelf), then press play. 

In the end you should end up with a result similar to the last picture on the right.

The last thing to do is setting up the masses for the rigid bodies (make sure they all have the useMass attribute activated). The best practice is to start with a heavier weight on the Hips and then decrease the mass value for the rigid bodies as they get further.
For instance, these values will work for the robot ragdoll: HipsRigidBodyNode=5, SpineRigidBodyNode=4.5, Spine1RigidBodyNode=4, Spine2RigidBodyNode=3.8, Spine3RigidBodyNode=3.5, Spine4RigidBodyNode=3.5, LeftArmRigidBodyNode=2.5, LeftForeArmRigidBodyNode=2.0, HeadRigidBodyNode=2, NeckRigidBodyNode=0.5, LeftUpLegRigidBodyNode=3.5, LeftLegRigidBodyNode=2.5.

Set the same mass values for the symmetric rigid bodies and leave it to 1 for the others.

As last thing, select all the rigid bodies for the feet and turn on the "Disable Collision Event" attribute, it will disable  the conversion of the ragdoll from kinematic to dynamics for these rigid bodies.

...

Exporting the ragdoll file

...

Use the ragdoll builder to build the ragdoll setup for your character.

Widget Connector
overlayyoutube
_templatecom/atlassian/confluence/extra/widgetconnector/templates/youtube.vm
width400px
urlhttps://www.youtube.com/watch?v=UC13A_vXJpI
height300px