Performance improvement or GPU acceleration

HI, I have been using this plugin for a few months and it works really well :smiley:. I started to consider making large scenes in blender, but the performance…
I made a test scene with about 400 markers, but my computer only ran it at about 23 frames. The first thing I thought of was whether it could support GPU acceleration like a game engine, or whether I should consider switching to Maya to make large scenes because of the performance issues of python.

This is the project file, I used ragdoll to make a soft body like ball:
Pf_test.zip (619.7 KB)

This is my CPU:


Maybe I should really learn Maya. :sweat_smile:

Yes, Maya would handle this without issue. That said, the bottleneck for Blender isn’t GPU or CPU, but rather Blender itself. Each frame, we query Blender for the position of each of those spheres, and querying in Blender is different from Maya, which is:

  1. C++
  2. “lazy”

Python means any query takes about 100x longer, especially given that we must query via Python which is slow because it must pass through Python to C to Python, given that data in Blender is ultimately stored in C, and then it must pass from Python to C++ again, which is where Ragdoll’s data is stored. Maya bypasses all of that.

But the second benefit to Maya is that Maya will not even bother computing anything unless it is “dirty”. Meaning if data hasn’t changed, no time is spent trying to compute an answer, hence being “lazy” about computing. In Blender, Ragdoll cannot know whether data has changed, so the cost of querying for position is constant which is why you are seeing such slowdown regardless of whether your spheres change or not.

With this in mind, there are things we could do on our end, which we hope to include in our next release. Primarily a way for you the artist to tell Ragdoll “this sphere does not change” at which point Ragdoll can save 100% of the time spent interacting with Blender, which should yield performance on par with Maya, and the native speed of Ragdoll alone. This property could then be animated, such that you can get specific about which frames and which objects do change.

Ideally, there would be some mechanism in Blender to (a) pass data directly between the Blender C backend and the Ragdoll C++ backend and (b) to bypass computations entirely if nothing has changed. We have our own layer on top of (b) that optimistically caches values for performance, without which things would be even slower. But the main culprit, the most expensive property and the one we cannot cache or know anything about is also the most important one; the position of the sphere.

Got it, I’ll learn Maya.
By the way, when will the next version be released?

As soon as possible, no date yet.