Hi all, Happy New Year! I was wondering if anyone had thoughts/suggestions on areas/workflows of Blender that are slow and could be improved with multi-threading. An example would be something like the object sync portion of the rendering process in Cycles. That used to be single threaded and was later multi-threaded. I’m curious if anyone can think of other areas in (any part of) Blender that could be similarly improved.
*Rigid Body simulation
*Also the process for assigning Rigid Body from active to many converted particles/objects. When you select the converted particles/objects, then you assign Rigid Body to the active one, and then with all selected you select “Object > Rigid Body > Copy from active” (Probably copying any attribute from active to many objects is single thread process)
Also, multithreading code isn’t that simple or easy. We tend to look at that as an easy solution that fits all purposes and fixes everything. I know I used to.
Thing is that multithreading adds overhead, splitting tasks into threads and then sending those to the cores has a lot of overhead, there isn’t an automatic way to do it, the coder must deal with that. When tasks are very easy to parallelize and take a lot of time (example, rendering tiles) then the overhead is negligible and the benefits of multithreading are very obvious.
But when tasks are smaller, faster and you must work around them to parallelize… the overhead eats up any benefits and multithreading becomes a burden.
If it was that easy, everybody would do it everywhere, and truth is it doesn’t happen that much. Games have just started parallelizing stuff since those now use multiple passes for rendering frames after geometry is processed, and you can parallelize those passes, but without those… you’d be stuck on single threads as it’s always been the case.
Hi @MetinSeven, I’ve actually made a contribution to Blender, I’m looking to make more. I work at AMD and my group works with software vendors to help improve their software’s performance, hence the question.
I would say modifiers, there are some benchmarks out there that compare several DCCs, Blender included and one of the tests is using a bend modifier on a 3M poly dragon scan model and Blender is terribly slow, around a couple FPS where Maya and Max are more than 10x faster.
The use case of a 3M poly model is obviously to make the differences more obvious, lower density models also show a big difference.
Not sure if its a multithreaded issue or just lack of plain optimizations, but im sure if it gets multithreads on the modifiers, even gpu acceleration, it would make a major difference
There are a couple slow things in the VSE you can easily try, all starting from “File > New > Video Editing”.
Drag a 1080p H.264 video clip onto the timeline and try to play it. Even though your computer can probably play the file fine, performance in the VSE tends to be much slower. Add a transform or effect and it can often drop into single-digit FPS. The “Prefetch frames” feature that generates cached previews could probably be parallelized.
Put some video clips on the timeline and export. You will see that the CPU usage (as measured by top) doesn’t go over approximately 120%, but the VSE could probably render multiple frames in parallel. I’m guessing this is not a trivial modification because some things work best sequentially (decoding source video, encoding output video).
Polypainting is to be redone. There’s in the works a patch that increases performance a huge lot, but was pulled off the master branch due to some problems that need solving, but was indeed a lot faster, I am sure we’ll have news about it sooner than we expect.