Skip to content

2021.03.23

Highlight for this release is JSON Export, this one's for you game developers out there!


Important!

This version won't self-install like the past releases, see Dynamic Install on how you need to load the plug-in via Maya's Plug-in Manager from now on.


Ragcar

It's a ragcar allright. You can tell by how bouncy it is!

ragcar3

Knocking things around

No obstacle is too tall for ragcar.

ragcar2

A look underneath

The parts are all there, it's how it would work in real life if you put an engine in it. :D

madmax9

Vehicle model from Mecabricks.


JSON Export

In 2021.03.01 we introduced cmds.ragdollDump to get a copy of all rigids in the form of a JSON dictionary.

This release includes all initial state for the simulation, such that you can reproduce the results you see in Maya in a game engine, like Unreal, Unity, CryEngine or your own custom game engine. Or why not Houdini, Blender or 3dsMax?

This enables you to use Maya as an authoring platform for physics anywhere.

from maya import cmds
dump = cmds.ragdollDump()

# Convert big string to structured dictionary
import json
dump = json.loads(dump)

for entity, data in dump.items():
    components = data["components"]
    name = components["NameComponents"]["members"]["path"]
    print(name)

# |root|pelvis|rRigid1
# |root|pelvis|spine|rRigid2
# |root|pelvis|spine2|rRigid3
# ...

Here's an example of what to expect from the output.

{
  "entities": {
    "10": {
      "components": {
        "NameComponent": "upperArm",
        "ColorComponent": [1.0, 0.0, 0.0],
        "GeometryDescriptionComponent": "Capsule",
        ...
      }
    },
    "15": {
      "components": {
        "NameComponent": "lowerArm",
        "ColorComponent": [0.0, 1.0, 0.0],
        "GeometryDescriptionComponent": "Box",
        ...
      }
  }
}

See the new Serialisation documentation for an overview, examples and data reference.


Dynamic Install

Previous releases shipped with a userSetup.py that triggered on launch of Maya. This made it easy to get setup, but made it challenging to uninstall without physically removing files off of the file system (hint: ~/Documents/maya/modules/Ragdoll.mod).

This release associates install with plug-in load.

Install

ragdollinstall

Uninstall

ragdolluninstall


Active Chain

Dynamic Control has been renamed Active Chain.

Turns out, what Dynamic Control was really all about was a generic chain that can also be turned into hierarchies of chains - or "branches" - to form a tree. Even a literal one!

tree1 tree3


Dynamic Constraint Attributes

Now whatever attributes are relevant show up in the Channel Box, and stay relevant as you make changes. Similar to how the rdRigid.shapeType attribute updates the shapeExtents and shapeOffset attributes!

ragdolldynamicconstraintattrs


What'Z-up?

Ragdoll now understands when the up-axis is Z rather than the default Y.

ragdollzup


Simplified Menu

Items have been re-arranged and grouped together to be easier to find and less cluttered.

newmenu


Greater Guide Strength

The solver Iterations determines how high your Guide Strength attribute can go. Per default, Iterations was set to 1 which enabled strengths between 0-5 or so until their effect dimished.

This release increases this default value to 4 for ranges between 0-100, which means "incredibly high!". The change comes at a minor performance impact - estimated between 1-5% - so if you find the need to optimise, lower this value back to 2 or 1.

Hint

Bear in mind that the number of iterations are spread across all rigid in your scene. Meaning twice the number of rigids would half the amount of iterations dedicated to each one.

Before

ragdolliterations3

After

ragdolliterations4


Crash on Cleanup

In rare cases, Ragdoll could crash Maya due to accessing memory it had no business accessing. Those have now been patched up and refactored for a more stable, crash-free experience!

image


Bad Initial State on Load

In rare cases, opening a scene could lead to some controls being badly positioned. This could happen if the control you made dynamic was parented to a group with no values. That made the parent and local matrices cancel out, producing an identity matrix. Maya doesn't normally save attributes that are equal to their default values, and this includes matrices whose defaults are the identity matrix.

This has now been fixed.


Rotate Order Improvement

In previous releases, any rotation order other than XYZ (the default) would make your rotations all whack. Ragdoll didn't know how to translate physics into any order other than XYZ, so it would put them in the wrong place.

In the last release, I added a warning for that and in this release I've lifted that warning somewhat. Most rotation orders works well, but I have spotted rare instances of one axis flipping.

Here's the problem.

rotateorder

See how arms and torso flips? It tends to happen around the 90 and 180 degree values, values below that normally look fine. This will be fixed in a future release, one way or another!