2021.04.23
Highlight for this release is No Limits and Greater Performance!
- ADDED No Limits No rig is now too complex for Ragdoll!
- ADDED 30% Greater Performance You're welcome!
- ADDED Offline Activation For the poor souls without an internet connection
- ADDED Auto-cleanup Shape and Constraint editors now vanish alongside the rest of physics
- ADDED Return To Start More intuitive creation of new rigid bodies
- ADDED Cycle Protection Avoid running into cycle warnings with this early-warning mechanism
- ADDED Hard Pin Tell a rigid body exactly where to be in worldspace, no exceptions
- ADDED Soft Pin Guide a rigid body towards a worldspace position and orientation
- ADDED Animation Constraint Convert translate/rotate to a guide constraint
- ADDED Character Multiplier Characters now get a default multiplier
- IMPROVED Simulated Attribute Active Chains and Trees are now more animator-friendly
- FIXED Import Bugs Ironed out a few quirks with the new import feature
- FIXED User Attributes Names and default values of user attributes wasn't quite up to the task
- FIXED Looped Playback Bug This could under rare circumstances look off
- FIXED Qt Bug In rare cases this could pollute your Script Editor whenever selection changed
- FIXED Low-DPI Cosmetics More eye-candy for those still using a low resolution display
- FIXED Z-up Worldspace Guides Worldspace guides now play nice with a re-oriented world
- FIXED Tree Multipliers Complex active chains weren't multiplied correctly
10 Second Ragdoll
Here's the absolute quickest way to turn a fresh mesh into a full ragdoll.
And here's a more practical example of using this feature to clean up a bad mocap clip.
It'll endure changes to the environment too, with little to no modification of the physics settings or the original animation.
No More Limits!
That's right!
It used to be the case that if your character had a non-default Rotate Order
, or a tweaked Rotate Pivot
or maybe made use of the handy Rotate Axis
or the joints you were using had a non-zero Joint Orient
, then you were out of luck! Ragdoll just couldn't handle those. It would aggressively reset those to their defaults, or flat-out refuse to work.
This release adds support for these missing members, which just so happens to be the very last major limitations of Ragdoll when used with your everyday character rigs!
- ✔️ Rotate Pivot
- ✔️ Rotate Axis
- ✔️ Rotate Order
- ✔️ Joint Orient
From now on, if it doesn't work with your rig, that's a bug (let me know!).
Rotate Pivot
This release introduces support for both the .rotatePivot
and rotatePivotTranslate
attributes, letting you do things like..
I've also added an option to actually use the rotate pivot (for greater good?) such that you can do this.
Rotate Axis
The advanced rigger will know of his lesser-known feature of Maya transform nodes, with the ability to modify the axis around which the Rotate XYZ
channels operate.
Rotate Order
Finally cracked this one, it has been far too long and is a far-too used feature of Maya transform nodes to not support. But it's done! You should now be able to pick any rotate order and experience no flipping or issue of any kind. Don't even bother getting in touch if you do, because I will not believe you. xD
This tiger (courtesy of www.cgspectrum.com) has a different rotate order on nearly every control.
Before
After
Hold on a second!
That final flip of the spine is coming from the rig itself, the joints driven by the controllers we're simulating. Ragdoll isn't the only one having issues with flipping. :)
Joint Orient
When simulating joints, it can be important to retain the original jointOrient
values. Especially if those joints are later used for IK or if you want or need to zero out those rotate values. But it is perhaps most important for an already-animated skeleton, like what you get out of motion capture.
Some motion capture libraries, like Rokoku, do a good job not having any jointOrient
in which case they would already work well with Ragdoll. But for animated skeletons with a non-default jointOrient
you would have been out of luck..
Until now!
30% Greater Performance
Ragdoll used to be really really fast, and is now really really really fast!
Rendering is one of two areas where Ragdoll spends time computing (the other being simulating), and rendering performance has been improved by 400%, making Ragdoll 30% faster overall!
Here you can see the improvement up-close, notice how much time was spent simulating versus rendering each frame in the previous version; almost half the time was spent just rendering!
And if you're wondering...
Ok, but what features did you remove?
On the contrary! Rendering now includes..
- ✔️ Specular
- ✔️ Shadows
- ✔️ Ambient Occlusion
- ✔️ Depth of Field
- ✔️ With more to come!
Even More Performance?
You'll notice that the rendering square isn't entirely gone.
If 4 ms just to render is too much to ask, you'll get even more of a performance jolt by simply hiding anything Ragdoll related, in particular the rdRigid
and rdConstraint
nodes. The simulated result is independent of whether or not it is visible in the viewport.
If you are a rigger, this can be handy for your animators once you've finished setting things up, as they may not benefit from seeing these things anyway and could use all of the performance you can give.
Simulated Attribute
Whenever you make a new chain, an attribute is created on the root of that chain to control whether or not the chain should be Simulated
or animated.
With this release, Simulated = Off
means:
- ✔️ Disabled Solver - meaning no more warnings on skipping frames!
- ✔️ Hidden Drawing of Physics - For a less distracting animation experience
Return To Start
Additions to the physics solver can only happen on the start frame, and if you in previous version created anything on any other frame Ragdoll would yell at you.
This release aids in this process, in that rather then telling you you are wrong, it helps you make it right by automatically returning to the start frame when necessary.
Cycle Protection
Cycle warnings are generally bad but especially bad for Ragdoll. Understanding when they happen and where they come from can be difficult, especially in complex setups.
Ragdoll now includes Cycle Protection to help you spot potential cycles before they happen!
Notice how making a passive rigid here would have resulted in it becoming a child of an otherwise active hierarchy. That would have been bad!
Protected Commands
These commands will try and protect your from cycles.
- ✔️ Active Rigid
- ✔️ Active Chain
- ✔️ Convert Rigid
All other commands is already safe to use and shouldn't cause any cycles.
FAQ
These are some of the things you might want to learn more about.
How does it work?
Whenever a new Passive Rigid or Active Chain (with passive root) is being created, Ragdoll is asked to evaluate the world transformation of the node you are attempting to make dynamic. The solver should not be bothered to simulate anything during this encounter, because if it did then that would mean a cycle is about to happen.
Why?
Because passive rigids pass data into the solver. Namely, the position and orientation of the node you are attempting to turn into a passive rigid. It cannot both pass and receive data. If it is to receive translate/rotate from the solver, then that's an active rigid.
Is it accurate?
Very.
Character rigs can get very complex; how can Ragdoll distinguish between an actual parent being active, and a node acting like a parent via something like Maya's Parent Constraints (i.e. a "broken rig")?
The answer is that the feature builds on Maya's own evaluation mechanism to figure out whether a node is dependent on the solver or not. The mechanism is surprisingly simple.
def is_dynamic(transform, scene):
"""Does `transform` in any way affect `scene`?"""
scene["clean"] = True
# Pull, but do not bother actually serialising it
transform["worldMatrix"].pull()
return not scene["clean"].read()
By pulling on worldMatrix
we ensure all hierarchy and constraints is taken into account, and by not actually retrieving value we limit the computational cost to dirty propagation only - as opposed to actually reading and serialising the 16 values that make up the matrix.
Can it be disabled?
Yes.
The protection is only happening when interacting with Ragdoll via the UI menu items. The API remains unaffected and there is an option in the Preferences to disable it in the UI as well.
New Constraints
Have more fun with more control. 😘
These were previously available under a different names and less intuitive usage
Hard Pin
When you want a rigid to be at an exact place at an exact time, use Hard Pin.
Limitations
- A rigid can currently have 1 Hard Pin each. This will be addressed in a future release.
- These cannot currently be exported, they are primarily intended for use interactively by the animator
Previously called
Passive Control
.
Soft Pin
When you want a rigid to be at an approximate place at an approximate time, whilst still respecting the laws of physics including contacts and gravity, use Soft Pin.
Soft pins are nothing more than a constraint with a guide position towards the newly created transform.
Limitations
- These cannot currently be exported, see Hard Pin for rationale
Previously called
Guide Control
.
Animation Constraint
In the the previous releases I've been experimenting with the idea of turning the Maya translate/rotate channels directly into a guide constraint.
There are three possible scenarios with subtle differences.
- ✔️ Non-dynamic Parent E.g. the first rigid in a new scene with an animated character
- ✔️ Passive Parent E.g. a prop attached to a passive body
- ✔️ Active Parent E.g. what you normally get out of chains
- ➖ Dynamic Grandparent A less-supported special case, see below
In the above, the parent of the newly created rigid with an animation constraint is non-dynamic, it's got nothing to do with Ragdoll. Just your everyday (boring) Maya transform. In this case, the channel is successfully converted to a worldspace position and orientation from your translate/rotate channels.
Here on the other hand, the immediate parent is a Passive Rigid
which is a little more flexible, and gives you an option to actually collide with the parent.
Finally, the parent is active. This is also OK and quite fun. Now the new rigid will affect the parent, since it adds weight onto it. Like a backback.
Dynamic Grandparent
Here's where things get less predictable. If the parent of the control you want physics to follow along with your translate/rotate channels is non-dynamic, but one or more of its parent are active rigids, then the channel box values no longer align.
This will be addressed in a future release.
Character Multiplier
Making a new character now includes a default multiplier for all constraints (just like chains do!), meaning you can more easily create effects like this!
Import Bugs
Two issues were found with the importer introduced in the last version.
- It wasn't able to distinguish between a passive and active rigid
- It wasn't able to correctly identify a chain with only 2 links
Passive versus Rigid
When importing a passive rigid, odds are it got imported as a active rigid instead. This could get very messy, as it could end up creating passive rigids as children of active ones, which could reak all kinds of havoc, including cycle warnings.
2-link chains
Any "chain" with more than one child (head) is a special case of each chain only having 1 rigid each, as opposed to longer chains like arms and legs. Now these can be imported too!
Export is Unchanged
This and the above import fix were only related to importing of physics, both your existing Maya scenes and exported .rag
files are unchanged and were already in good condition. Yay!
User Attributes
Whenever you make a rigid or chain, some attributes are forwarded onto your animation controls. These attributes are called "User Attributes" and the previous release changed these from Maya proxy-attributes to plain-attributes.
In doing so, they lost their nice names and default values. :( This has now been fixed!
Looped Playback Bug
If you've ever had both passive and active rigids and let playback run on a loop, you might have encountered something like this.
Whereas if you rewound and playback without looping, everything would be allright. This bug got squashed in this release, letting you loop things to your hearts content!
Auto-cleanup
Whenever you Delete All Physics
anything created by Ragdoll disappears, including User Attributes. What wasn't included however was the handles that appears when you Edit Constraint Pivot
and Edit Shape
.
These now also vanish with delete-all, making your life just a little bit better!
Thanks to Remi Comtois for pointing this out!
Offline Activation
Activation is streamlined by happening inside of Maya at the paste of a serial and press of a button. Unless you are one of those without access to the internet, in which case we'll need to do a little dance. :)
Step 1 - Generate Request
from ragdoll import licence
key = "YOUR-VERY-LONG-KEY-HERE"
fname = r"c:\ragdoll_activation_request.xml"
licence.activation_request_to_file(key, fname)
Step 2 - Email Request
Send this file to licencing@ragdolldynamics.com. We'll abrakadabra this file before you can say Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu.
Step 3 - Activate
Once you've got a response, activate your licence like this.
from ragdoll import licence
fname = r"c:\ragdoll_activation_response.xml"
licence.activate_from_file(fname)
Linux users, you'll know what to do about that Windows-like path.
Full documentation
Qt Bug
The last release included a callback for synchronising the Import Options UI with the Maya selection. As a result, a bug slipped in which could - in rare cases - produce the following error messages in your Script Editor whenever you changed selection.
../ragdoll/vendor/qargparse.py line 654: Internal C++ object (WidgetHoverFactory) already deleted. //
This has now been patched up, but do shout out if this or anything like it happens to you!
Thanks to Rafael Villar for finding this bug!
Low-DPI Cosmetics
The Import Options UI didn't quite live up to the hype at 720p and 1080p, now it does!
- Preview properly resizes to fit content
- Thumbnail properly fits the square
- Thumbnail and file listing lines up nicely
- Spacing between widgets are consistent across high and low DPI settings
Before | After |
---|---|
Z-up Worldspace Guides
Whenever you make a Guide control (now called Soft Pin
) you are technically creating a constraint between a rigid and the world. That's what makes it worldspace.
Until now, constraints assumed the world didn't move. But you z-up folks out there know that, sometimes, it does! Ragdoll is now OK with that.
Before
After
Thanks to Jason Snyman for finding this bug!
Tree Multipliers
There was a minor bug with multipliers for any chain branching off of another chain (e.g. an arm from a spine) which caused the default multiplier to not correctly affect every link in those chains.
This has now been fixed!
Known Issues
At the time of this release, these are the known issues that will be addressed in a future release.
Evaluation Graph Controllers
If you use "controllers" in your rig, there is a possibility Ragdoll will be drawing things incorrectly.
This can be addressed by either not (1) using controllers, (2) disabling controllers in the evaluation or (3) awaiting a future update. The problem appears visual-only and should have no effect on the simulation itself.
Scale Pivot
When you hold the D
key and move the pivot, there are 4 attributes being edited.
- Rotate Pivot
- Rotate Pivot Translate
- Scale Pivot
- Scale Pivot Translate
If scalePivot
and scalePivotTranslate
result in zero change to a nodes position (the default) then all is well. But, if you edit these independently then that will in turn affect the final position of the node, in which case Ragdoll will struggle to simulate it.
Auto Key
I've narrowed down a particularly annoying behavior (likely a bug) in Maya that can affect users of auto-key and Ragdoll.
This will be fixed in a future release, and if anyone knows of any workaround please let me know!
Joint Orient & Non-linear Hierarchy
When joints do not immediately follow each other, the rotate channel isn't entirely accurate.
Notice how there is a joint inbetween the two rigids? Avoid this edge case for now, or zero out the jointOrient
.
Soft Passive Guides
Solved
Solved in 2021.04.28
Guiding the translation
of an Active Rigid
with a Passive Rigid
is currently problematic and creates an unrealistic increase of acceleration.
The current workaround is to swap solvers under the Advanced tab of the scene.