10
$\begingroup$

Is there a way to turn on multithreading to make use of all of my computers cores for simulations? I am running on a monster of a machine, but without utilizing all of the cores, physics simulations take a very long time to process when I have a complex scene with thousands of fractured objects acting under ridged body physics.

$\endgroup$
8
$\begingroup$

Generally speaking, multithreading for physics simulations is only possible for part of the calculations and often quite difficult to implement. This has two main reasons:

  • Simulations have to run sequentially: you cannot calculate the results of frame N before you have the results of frame N-1. This means you cannot split up frames across many workers.
  • Elements of a physical system often interact a lot, through forces, collisions and the like. This makes it also difficult to divide the work spatially, giving subsets of grid cells, vertices, hair strands etc. to separate workers. Processes have to exchange information on stepping results frequently, reducing the efficiency of multithreading. Even where such division of work is possible, the process of dividing elements into suitable packages is far from simple (see e.g. section 4 in this paper on hair sim in 'Brave')

By comparison, rendering is ideally suited for threading, because

  • All the data is available in each frame, so splitting by frames is possible.
  • Samples (in a raytracer) are independent from each other, so tiling is also possible.
$\endgroup$
6
$\begingroup$

Some parts of blender make use of multiple cpu's others don't.

A lot of effort has gone into getting rendering to utilise all available cpu's.

Some time consuming features like dynamic paint, sculpting, smoke sim and camera tracking have been created with the aim of using multiple cpu's or have had the effort put into them.

Just from a quick search, there doesn't appear to be any support for threading in rigid body simulations. I recall mention that threading bullet simulations breaks the BGE, which may be the reason for it not having threaded support.

There is work being done on getting bullet v3 to do it's simulations on gpu, but I have no idea when that will be finished or when blender will start using it.

$\endgroup$
  • $\begingroup$ Yeah that's what I figured. I really just wanted to make sure I wasn't overlooking something! $\endgroup$ – Daniel Mar 15 '15 at 21:45
0
$\begingroup$

The problem is in the cpu's the cores have almost 0% communication, only through the shared L2 and L3 cache (also ram but way too slow) so the process is hard to work around

But they managed to get it for fluids and smoke, and they are step on step processes as well

GPUs are the solution, the cores in them have massive communication, they always work in a team, (of 500-4096 cores) But Gpu calculations are harder to set up, but also extremely fast, soemthign like even a 40% or more improvement is possible by moving

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.