Skip to content

2021.02.07

ragdollscale

Highlight of this release is Support for Scale!


Scale

This has been an epic challenge, but it finally happened!

Up till now, any scale other than (1, 1, 1) at any level of a hierarchy would have either broken a simulation or refused to work outright. Not anymore! Now you can simulate scaled transforms, including scaled rigs and all of what it entails.

ragdollscaletests

Here's a brief on what works and what doesn't.

Feature Example
✔️ Uniform Scale 1.5, 1.5, 1.5
✔️ Non-uniform Scale 0.5, 0.6, 0.12
✔️ Scaled parent(s) Scaled root control
✔️ Mixed Scale & Constraints Scaled box to differently-scaled capsule
Zero Scale 0.0, 0.0, 0.0
Mixed Zero Scale 1.0, 0.0, 1.0
Negative Scale -1.5, -1.5, -1.5
Mixed Positive/Negative Scale 0.9, -1.5, -1.1
Non-uniform Negative Scale -1.0, 1.0, -2.0
Non Object-Space Scale Scale in World mode

ragdolltiger

There are a few caveats.

  • Avoid negative scale if possible, it works but can surprise you
  • Negative non-uniform scale is more common, e.g. to mirror something across the X-axis, and may work but may surprise you
  • Non object-space scale flat-out doesn't work, not even Maya can do that; it's here for completeness.
  • Scale cannot be animated
  • Scale is set on the start frame, and is part of the Initial State. It is also updated alongside the translate/rotate initial state.

Negative Scale

Commonly found in parent hierarchies that attempt to mirror the behavior of a control or hierarchy of controls. I'd like to better support this, but it is currently limited by math. More specifically, in that a transformation matrix simply cannot distinguish between negative and positive scale.

So this one is semi-supported. The problem is for Ragdoll to distinguish between scale and rotation. It's a bit mathy, but you know how you can achieve the same pose by either scaling something negatively or rotate it 180 degrees along one or more axes? Ragdoll currently cannot know which of the possible outcomes you wanted.

Here's a visual to help illustrate this point. (Reference)

matrix_decomposition

Here's what can happen in practice.

ragdollscalecaveat1

Notice how both the scale and rotation values changed, even though the object in the viewport remains in the same orientation. That's because these values are both correct scale and orientation for this particular transform.

You might think..

Well, whatever. So long as it's oriented right, why should I care?

Well, what if you had animated a realistically looking horse locomotion, rotating around the X-axis?

ragdollscalenegativebad

Did you spot it? Both X and Z got their scale neutralised and X got 180 degrees steeper, compensating for the neutralised scale values. Also Z got flipped too! You can work around it, by accepting the new Z and offsetting your animation by 180 degrees.

There's also the issue with it flying off for the first few frames. It's unclear why this happens, this may be a bug in the solver itself, trying to reconcile an orientation that is 180 degrees wrong.

So, negative scale works, but it's painful. Avoid if possible.

Zero Scale

This is "supported" in that it doesn't fatal crash your Maya session. Ragdoll is a 3D solver, it cannot operate on anything without volume and mass.

Here's an example of what to expect should you find the need for zero scale.

ragdollscale0

Scaled Rotation

TLDR; if you animate something from 0-45 degrees, it will rotate 45 degrees, regardless of scale.

ragdollscalerotate

This should be what you expect and won't need remembering, but for completeness here's what happening under the hood.

Ragdoll strips scale from most internal computations. It's kept mostly so that it can be outputted again, as well as for rendering. See, custom Maya nodes render in the space of the transform. So rendering a point at coordinate (0, 0, 0) ends up in the middle of the transform node. Even as you move that transform around with the translate tool. That's problematic if you need to draw something uniformly, like the limits and drive visualisations. Even more so when you attempt to draw a line from one transform to another.. at different scales!

But stripping it early is beneficial for both readability of code, but also usability for you. Uniform scale normally doesn't affect rotation, but non-uniform scale could.

Consider this.

image

Here, we've got a single angle of 45 degrees. If you were to scale this horizontally, you can see how the angle now changes! At a scale of 0, the angle has gone from 45 degrees to 90 degrees.

This complicates things a lot, and Ragdoll saves you from that by not taking non-uniform scale into consideration for its rotations. A 45 degree angle will remain 45 degree regardless of scale; with the exception of negative scales which still flip the angle as you'd expect.

Non Object-Space Scale

You probably don't do this, but for completeness here's what doesn't work.

ragdollbadscale ragdollbadscale2


NURBS Surfaces

Ragdoll could translate polygon meshes and NURBS curves into collision meshes, and today I'm happy to announce that it now also supports the latest trend in computer graphics, heavily used in the 90s at Dreamworks for critically acclaimed feature animation films Antz and Shark Tale.

Join the future!

ragdollnurbs


Output Attributes

The Attribute Editor now displays the output translate, rotate and scale attributes from each rigid body. In both local and world space coordinates.

ragdolloutputattrs

These are the values that feed into your animation control, or any transform you're simulating.


Zombie Attributes

Minor bug fix.

The Delete All Physics menu item didn't catch the last remaining Local Strength attribute created by Create Dynamic Control. This is all patched up!


Last update: 2021-07-15