Ragdoll Early Access

Hi all,

We’ve launched an early access of Ragdoll for Blender! :partying_face:


What is Ragdoll?

Ragdoll is a real-time physics solver for animators originally built for Autodesk Maya and now available to Blender!

Started development in 2021 by animator/engineer Marcus Ottosson (that’s me :blush:), Ragdoll has since been adopted by just about every large visual effects company in the world and several AAA and indie games studios too.

  • Weta (e.g. Avatar, Planet of the Apes)
  • Double Negative (e.g. Furious X)
  • Framestore (e.g. Harry Potter)
  • Imageworks (e.g. Spiderverse)
  • Digital Domain (e.g. Tron Legacy)
  • Kojima Productions (e.g. Death Stranding)
  • CD Projekt Red (e.g. Cyberpunk 2077)
  • Deck Nine Games (e.g. Life is Strange)

If you’ve been to the theatres or played any games at any point in the past few years, it is highly likely you’ve witnessed Ragdoll-powered animations!

Now we’re extending the reach of Ragdoll to those outside of the Maya domain, to you lovely bunch in the Blender camp. Our hope is that more animators will be able to benefit from Ragdoll, whilst also encouraging new animators to join the field with access to more tools to help simplify the animation process.

In fact here’s some recent animation produced by Kojima Productions in Japan, for their next game Death Stranding 2.


Download

If you are up to get your elbows scraped and fingers cut, in an effort to help us perfect this Blender Addon, then this is for you! :partying_face:

WARNING: This is the early access version of Ragdoll for Blender, it contains about 85% of what exists in the Maya plug-in so far.

  • Expect bugs
  • Expect crashes
  • Windows and Linux only
  • Supports Blender 3.4, 3.6 and 4.0
    These will all be addressed in the coming weeks

Here’s where we are right now, fresh out of the oven with a first (advanced!) tutorial.

It’s a little more on the advanced side, stay tuned for beginner level tutorials! :blush:

Changes (since 2024.02.13)

  • Even less crashes
  • More reliable scale, limits won’t freak out
  • Maintain History option for Replace Mesh
  • More robust capsule manipulator, won’t tangle itself
  • Undoable Replace Mesh

Download

And last but not least, a platform independent Ragdoll Blender addon.

The Blender Addon is a bridge between Blender and “Ragdoll Core”, so you’ll need both installed in order to benefit from Ragdoll. The Core installer is a Windows .msi file that you double-click and watch it go.


Step 1

To install Ragdoll Core, double-click the RagdollCore.msi you downloaded from above, and click through the dialogs.


Step 2

To install the addon, you do what you’d normally do for addons, via the “Install” button in Blender’s preferences.

And select the RagdollBlender.zip you downloaded from above.

Once that’s done, you can enable the addon.


Next Steps

Enjoy and we look forward to seeing what you can make with Ragdoll in Blender! We’ll be watching this thread, along with our own forums and LinkedIn page too. Should appear on X and Instagram shortly as well. Bam!

Links

23 Likes

Been waiting for you guys for a while. I’ll get my hands on it once I’ll find some time.

1 Like

Indeed it took a while. Looking forward to your take on it, @nickberckley

2 Likes

I used it on Maya and when I needed help Marcus gave a helping hand all the time (forums and chat). Nice news Ragdoll for Blender. Thanks!!

1 Like

Afree with @Feraud

And very cool to see some of the Maya plugins making it over to Blender.

@ragdolldynamics : Quick question. Why did you decide to port this to Blender? User Numbers, or easier SDK etc. to port things over? Just being curious here :wink:

1 Like

Yes, I’m quite excited about it too!

My overarching goal is to take character animation in film and games further than where it is today. I believe character animation is the primary bottleneck of this industry, both in terms of production cost but primarily output quality; it’s the least believable aspect of any film or game today.

With Maya animators covered, Blender was the next most requested DCC to visit, and so here we are. :blush: I’m hopeful that we can enrich the Blender community, but we are very new to it still, so I’m keen to see how it plays out!

7 Likes

Ok, next up, Universal Transfer with Live Mode.

Download 2024.02.16

This feature enables posing with (pure) physics (no AI), and is a lot of fun. :blush:

We’ve also added a description to the Ctrl/Cmd+click menu.

image

More Examples

Look how fast it is to transfer!

Transferring works outside of Live Mode too.

Some extras, nice results from tuning the global limit stiffness. :blush:

10 Likes

Sounds about right. Just think how far along lighting and rendering have come (as well as the more ‘traditional’ simulations).

Is it me, or is the ‘Documentation’ -link dead/broken in your most recent post?

Anyway, exciting to see this. Now I just need to resist the temptation of getting horribly sidetracked, while I meant to continue (completely unrelated) algorithm research.

greetings, Kologe

1 Like

Exactly! Other disciplines in film and games production keep getting toys, like sculpting for modeling and raytracing for rendering. But animators have been stuck with their keyframes and graph editors since the 80s.

Seem familiar?

Ragdoll is early still, and this live mode and posing mechanic is the start of where we’re going. I’d like to completely replace the traditional method selecting bones and rotating them. And then also completely replace method of rigging this in the first place. Following this Blender release, our next version is a Standalone version followed by one that runs in your browser. Meaning you can setup your character in Blender and play with (e.g. in Live Mode) it from a web page.

Oh, yes the link is gone. Here is it again, it’s the documentation for this feature, as demonstrated in Maya but now identical in Blender.

2 Likes

Im super excited at the news of this development,i read that it is slower to develop for blender because of python,what is the peculiarity of this that makes it so slow

Great question! I’ll answer the two possible interpretations of it:

  1. Why is the development process slow with Python?
  2. Why is the run-time performance slow with Python?

Slow Development Process

And the development process of Ragdoll was indeed slow, but not because of Python. Python, compared to C++, can be much quicker to develop with because development with C++ - and indeed any compiled language - involves a compilation step, meaning each change looks like this.

  1. Edit
  2. Compile
  3. Run

Each of which takes time. For example:

  1. Edit (1 minute)
  2. Compile (1-20 seconds)
  3. Run (10 seconds)

Whereas with Python, (2) is skipped entirely, saving precious time.

The development of Ragdoll for Blender was instead slow due to the Blender API and architecture, specifically:

  1. Undo and persistence
  2. Objects versus Bones

See, Ragdoll is like Blender in that it has its own objects, connections between objects, a rendering pipeline and compute stage. So this integration really is a synchronised ballet between the two; whatever happens in Blender needs to be reflected in Ragdoll and vice versa.

This is where the first obstacle becomes relevant; undo. See, whenever you undo in Blender, the memory address to every object and bone is erased. (My understanding is that Blender implements the Memento Pattern for undo/redo). We can keep track of the address to a Ragdoll object by storing it as a property on a Blender object; the Ragdoll memory addresses do not change. But we cannot store the equivalent address to a Blender object within a Ragdoll object, because it cannot be trusted.

We solved this by monitoring for undo, and doing an equivalent wipe on our end; setting a “dirty flag” for every object involved with Ragdoll and scanning the scene for the lost memory address via (1) a unique code (a uuid) placed on every bone and (2) the “session_uuid” used by the Blender source code internally. I’ll break this down further once our code is up on GitHub, but for the curious mind I encourage you to look into the ragdoll/vendor/bpx.py library shipped with the Ragdoll Addon download above.

The next obstacle is Objects versus Bones. In Ragdoll, there is only 1 type of object, called an “entity”. In Blender, there are objects, and then there are bones. These act different, they have their own constraints and their own keyable channels and expose their position and orientation differently. Because of this, we’ve effectively integrated Ragdoll twice into one application. For the user, applying physics to bones and objects should be seamless; you won’t notice any difference. But it effectively doubled the time taken to integrate with Blender.

Ok, so that was one of the things that complicated and slowed down the development of Ragdoll, but the next interpretation of your question is slow as in poor run-time performance, which is also a thing.

Slow Run-time Performance

Run-time performance is in regards to the FPS you get during playback, and there are two reasons why this is slower than Ragdoll in Maya.

  1. Interpreted versus Compiled language
  2. Python-to-C++ and back again

Compiled languages take source code and translate them into machine code that runs directly on your CPU. It’s the purest form of performance; you literally trigger the compute units on your CPU to perform some action, like add or multiply numbers, call some function.

Interpreted langauges on the other hand is akin to asking someone else to run the code for you. Your source code is converted into function calls in the Python API which in turn translate into machine code. I’ll leave you to Google why this is, as this applies to not only Python versus C++ but any compiled versus interpreted language.

In the case of Ragdoll and Blender specifically, (2) is referring Ragdoll being a compiled Python extension (.pyd) and the cost involved in passing data between Python and C++.

See, with a compiled language, accessing data means reading from a memory address of your RAM. It’s as fast as a computer is able to be; in the order of tens of gigabytes per second. Accessing a Blender property on the other hand is nowhere near this simple.

  1. Python calls print(bpy.context.scene.object.someProperty)
  2. Since object is a C++ struct, a conversion of the request is made into C++
  3. C++ finds someProperty, which may involve lookup via a map of <string, value> pairs
  4. C++ returns the value to Python, involving another conversion
  5. Python prints the value

This is already very slow. On the order of 100-1000x slower than accessing just the memory address of some data via a compiled language.

Now add to this that Ragdoll, liked Blender, is also a Python extension written in C++. So whenever we pass data from Blender to Ragdoll, we double the amount of work shown above.

Here’s some early performance tests to bring the point home.

# Current Case
>>> timeit.timeit('m["shapeRadius"].read()', setup='from ragdoll.vendor import bpx;m = bpx.ls(type="rdMarker")[0]', number=100000)
0.6791226999484934

# Without finding BpxProperty
>>> timeit.timeit('a.read()', setup='from ragdoll.vendor import bpx;m = bpx.ls(type="rdMarker")[0];a = m["shapeRadius"]', number=100000)
0.4856376000097953

# Static Blender Property
>>> timeit.timeit('m.rdMarker.shapeRadius', setup='import bpy;m = bpy.context.object', number=100000)
0.03511430002981797

# Dynamic Blender Property
>>> timeit.timeit('m["dynamic"]', setup='import bpy;m = bpy.context.object;m["dynamic"] = 5', number=100000)
0.004500499984715134

# Plain Python
>>> timeit.timeit('m.shapeRadius', setup='import bpy;m = type("Object", (object,), {"shapeRadius": 5})()', number=100000)
0.003075299959164113

In laymans terms, we’re accessing a plain Python property 100,000 times in 0.3 ms, compared to 35 ms to access a property within a Blender property group. Our work is not done however, since we do more logic on-top of this to deal with the undo and persistence issue mentioned above, resulting in the same workload taking 680 ms; a 2000x slowdown from just accessing the pure Python attribute - which in itself is still not as fast as accessing memory in a compiled language, probably still 10-100x slower.

So, that’s the short version of this answer. :blush: There is much more to tell, so feel free to ask about any particular area that interests you. And, if you spot something we’ve gotten wrong - especially in bpx.py which encapsulates all of our performance findings and optimisations, and will make more visible on GitHub shortly - do let us know. We are still new to Blender and expect to make more discoveries as time goes on.

6 Likes

I’m not an animator so I can’t judge your software in terms of usefulness or functionality but the way you showed us it give me a great feeling and it sounds a solid solution and followed by professional people.

Said this, I have 2 questions:

  1. is it Windows only? As the Maya version seems available both Linux and MacOs, is it something planned also for non Windows versions?
  2. as early access, it needs a license in any case or is it possible to use it freely?

thanks a lot.

Note there is already a Linux version linked above.

1 Like

thanks so much for your response,im super honoured

Like @Kologe mentioned, there is a link to the Linux version above already.

MacOS is on the map, but will be a little more challenging for Blender since it dropped support for OpenGL since Blender 3.5, meaning we will need a new rendering pipeline (Metal) specifically for Blender on MacOS.

We would be able to prioritise if users of Blender on MacOS with an interest in Ragdoll could let us know, either here or email me directly at [email protected]

It’s free to use without a serial. It will automatically activate a 30-day trial period during which time you can record your simulations onto Blender objects/bones. After the 30 days, you can still use it to learn and simulate, but will be unable to record without a licence. See pricing here:

Oops… I’ve lost it… thank you very much you and @Kologe

Ok. Clear and understood! :slight_smile:

Minor update, some bugs here and there, and some new strides in the performance of undo.

  • Much faster undo in complex scenes
  • Undo/redo now reliably works inside of the Manipulator
  • Tapered Capsule Preview

Download

There’s also this! :blush:

More of this to come, I’d like to incorporate something akin to ZSpheres in Ragdoll. Both for tuning of shapes, like in this example, but also for authoring of new shapes and characters, as an alternative to objects/bones in Blender - and nodes/joints in Maya.

4 Likes

Oooh-
This looks very useful for my projects… the license is quite expensive… but it is lifetime…
I’ll keep this in mind :eyes:

Thanks for chiming in. Regarding price, what would be a reasonable price for you and your project? Would spreading out the cost help, e.g. 19$/month?

1 Like

Two more points on this.

  1. Parallelism
  2. Lack of granularity in property change monitoring

These also affect run-time performance compared to the Maya equivalent.

Parallelism

Python is single-threaded, and because the only means with which to read information from Blender - like the position and orientation of a bone or in fact any property - is via Python, that means we must read each physics object one after the other.

There are things we do internally to parallel process, but by far the bottleneck is reading from the Blender scene. In Maya, this happens in parallel as the Maya scheduler distributes every node into an independent thread. In practice, it means the speedup can be proportional to the number of cores your CPU has. With Blender, this is not possible.

Granularity

There’s no reliable way to know when a property has changed, forcing Ragdoll to query all of them and compare the new result with the old. This also has a significant impact on performance.

Properties do have an update callback, but it only triggers during direct manipulation of an attribute and does not catch:

  • Undoing a property change
  • Change coming from keyframes or drivers

In Maya, properties are cached internally and monitored for changes by Maya itself. Meaning we can ask for a value and trust that no evaluation takes place unless the attribute has changed. Regardless of how it changed.

These are things I expect Blender to eventually implement, as it would affect not just Ragdoll but Blender in general.

3 Likes