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.
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.
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.
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