Skip to content

Active Rigid

The most fundamental building block of Ragdoll, the Rigid Body.


Usage

From the Ragdoll menu, select the Active Rigid option.

active_rigid


Attributes

Some of the most relevant attributes of the rdRigid node type.

Attribute Description
Collide Should this rigid collide with other rigid bodies?
Mass How strongly is should affect other rigids, and resist other forces
Friction How much resistance to give one rigid moving along the surface of another
Bounciness A.k.a. "restitution", how strongly one rigid should repel another


Collide

Control whether a rigid should collide with any other rigid.

collide

Pro tip - Disable contacts between two specific rigids

The Collide attribute is great for disabling contacts with all other rigids, but what if you wanted finer control than that?


Mass

How much influence one rigid should have over another during contact.

Pro tip 1 - Misconception about Mass

A common misconception in physics is that Mass affects how quickly something falls to the ground. But in Ragdoll - like in real-life - mass is only relevant during interaction with another rigid and when forces are applied, like Guide Strength.

Have a look at this video of a bowling ball falling in a vacuum alongside a feather.

Pro tip 2 - Making something fall faster

So how do you make something fall faster?

  1. Decrease Scene Scale under the solver node
  2. Increase Gravity, also under the solver node

To make something "bend" faster, like an arm flexing, that would be controlled via the Guide Strength and typically what causes it to reach a given speed and then stay there is governed by the Rotate Damping. That's how much of any motion should be cancelled out, to stabilise the motion. A very fast motion would have very little damping, but then also run the risk of "overshooting". That is, of passing the point at which you wanted it to reach.


Friction

Control how much resistance should be added between two rigids rubbing against each other.

friction2


Bounciness

Control how much rigids should repel each other when coming into contact.

restitution

Values beyond 1.0

Here's a tip!

Bounciness can be greater than 1.0, which means they will gain energy during contact.

In practice, energy will always dissipate in some way. The most-bouncy character in the gif above has a bounciness of 2.0, which in theory means that for every contact it should fly 200% faster away than it did coming in, and keep doing this forever.


Center of Mass

If you try and balance something on your finger, but the "center of mass" is off center, it would fall over.

image

It is the point at which the weight of an object is equal in all directions.

Ragdoll automatically computes this point based on what the shape looks like. For meshes, it will voxelise your geometry to figure out the physically accurate volumetric center of mass, assuming the density of the object is uniform throughout (rather than hollow or variadic, like swiss cheese).

You now override this point using the attribute Center of Mass found under the Advanced tab.

ragdollcom ragdollcom2

Guidelines

  • For realistic results, leave it at 0 to compute the point automatically based on the shape
  • For full control, override it


Angular Mass

In real life, if you spin a broom 180 degrees along its length; that's easy. But if you spin it 180 degrees along any other axis, like a ninja, it's considerably heavier.

The reason is something called "angular mass", also known as "moment of inertia". It's like mass, but in terms of rotation rather than position. The broom has a low angular mass along its length axis. It takes more force to affect a "heavier" axis than a lighter one which is why a broom spins more easily along its length.

This effect happens in Ragdoll too and is typically automatically computed for you based on the shape you use. If it looks like the broom, it will act like a broom.

With this release, you can now customise this for greater control of your rotations.

ragdollangularmass

When would you want to do that?

  1. Your shape looks like a broom, but you want it to act like a box
  2. Your shape doesn't look like a broom, but you would like it to act like one

Or any combination in between. :) Generally, a broom or any thin shape is more easily spun along its length, so you may find stability in setting your angular mass to (1.0, 1.0, 1.0), at the expense of realism.

Guidelines

  • For realistic results, leave it at -1 to automatically compute the angular mass
  • For full control, override it


Shapes

Every rigid body needs a shape, a collision volume.

# Type Description
Box A typical box with customisable Shape Extents
Sphere A perfect sphere with a customisable Radius, the fastest collision shape
Capsule An extruded sphere, the second-fastest collision shape
Mesh A convex hull generated from either a polygonal or NURBS input geometry


Meshes

Before meshes are used for simulation they are converted into a "convex hull", which is a mesh with no valleys.

convexhull

How do I make more complex collision shapes?

You can break a mesh into several rigid bodies and use a Ragdoll Parent Constraint to hold them together. See Parent Constraint for details.

This approach isn't very convenient however - and also doesn't perform well - so in a future release you will be able to turn individual polygon islands of a single mesh into a combined convex hull.

Here's an example of how Ragdoll converts a mesh into a convex hull. Notice how it can't make any holes or valleys this way.

convexhull2


Replace Mesh

When you turn a mesh dynamic, the vertices are plugged into the rigid node.

  • mesh nodes plug into rdRigid.inputMesh
  • nurbsCurve nodes plug into rdRigid.inputCurve
  • nurbsSurface nodes plug into rdRigid.inputSurface

But what if you wanted a different mesh? What if there was no mesh, such as for a joint or empty transform?

I give you, Replace Mesh. 👏

replacemesh

Here's a more practical example, of a dynamic joint being replaced with the mesh of a car wheel.

replacemeshpractical


Edit Shape

Manipulate shapes with a native Maya transform, as an alternative to fiddling with numbers in the Channel Box.

editshape


Sleep

It is possible to reap additional performance benefits in situations where one or more rigids remain immobile for a given amount of time.

The behavior can be tuned via two attributes on each rdRigid node.

Attribute Description
Wake Counter How many frames of inactivity before I fall asleep?
Sleep Threshold How low of a force should be applied before I start counting?

In practice, you'll likely only want to tweak the Wake Counter to some reasonable value like 5 or 20 frames of immobility. The default value of 0 means they'll never fall asleep. Like a proper insomniac or new parent.

Caveat

Currently, the wake counter is not reset when you rewind, so it's possible to have them fall asleep on frame 20, rewind to frame 19 and have the counter reset and keep them awake past frame 20. It's unlikely to affect you, and will be addressed in a later release.

sleep


API

Here's how to use the Active Rigid from the Ragdoll API.

from maya import cmds
from ragdoll import api as rd

cube, _ = cmds.polyCube()
cmds.move(0, 10, 0)
cmds.rotate(35, 50, 30)

scene = rd.createScene()
rigid = rd.createRigid(cube, scene)

cmds.evalDeferred(cmds.play)

Last update: 2021-08-30