Jello Simulation Uses Only 88 Lines of Code

Hi,

I’ve just seen below video that demonstrates the possibilities of this source code: https://github.com/yuanming-hu/taichi_mpm

I wonder if it’s possible for Blender developers to make use of it? (Considering the code itself, licence etc.)
Thanks in advance.

8 Likes

Interesting.


We’ve looked at the Taichi library before and it’s definitely and interesting option for certain types of physics simulations that are not possible in Blender now.

10 Likes

So does that mean you are going to integrate it into a future version of Blender? For example, version 2.81 or 2.82?

It may happen at some point, but there are no concrete plans or timelines for it.

5 Likes

is it possible to use taichi for more features than simulation?

This sounds a little strange to me. Taichi is not a physics simulation library.

In my understanding, it is a programming language on its own, with its front end embedded in Python for better user experience, and it has its own kernel written in C++. Its goal is to achieve the need to write easier codes like python codes(high productivity) but still have high performance like C++. You can rewrite a python program in Taichi and that will give you a way faster performance. I don’t see the reason for not having it. You can read about this in Taichi’s github page:

Taichi (太极) is a programming language designed for high-performance computer graphics . It is deeply embedded in Python , and its just-in-time compiler offloads compute-intensive tasks to multi-core CPUs and massively parallel GPUs.

Also Taichi developers are trying hard to have the Taichi kernel running in Blender’s scripting module. It appears that Blender is using IDLE and IDLE is having this problem with a lot of packages:

OSError: source code not available

They came up with a hack that requires the user to manually copy and paste one line of code to the end of the code.py file under Blender’s version_number\python\lib folder. This line of code need the package sourceinspect (which is also developed by Taichi devs specifically to solve this problem) to work. sourceinspect comes with Taichi during installation via pip so there is no problem nor troublem with it. The troublesome part is the need to manually copy the one line of code. The line of code is:

__import__("sourceinspect").remote_hack(globals())

It is simply too little that they can do on their own. This would have been way easier if Blender can officially have Taichi the programming language supported. If Blender can include that line of code in the official distribution, and also the taichi and sourceinspect installed just like numpy, it would have been way easier for you guys to do it instead of they do it themselves. I hope you guys at least considering including Taichi as a coding tool like numpy, you don’t have to come up with a way to use it in physics simulation right away. It is just easier to to it on your end. @brecht

Details of Taichi developers’ effort in Blender:

A hands-on tutorial that teaches people how to use Taichi:

It was a physics library when this topic was created, then it got turned into a programming language. Or at least that’s my understanding, or maybe Taichi was just being used as a shorthand for Taichi MPM in this topic.

It is a programming language and that MPM is one of the things you can do with it.

Check out the Taichi_elements which is a physics engine that works inside of Blender

I did a test with it.

5 Likes

How does it stack against something like xpbd?

I wonder could there be used one of these simulation frameworks or maybe even combine these simulation frame works:
-Taichi Elements

-Zenustech’s “Zeno node system”

-SPlisHSPlasH (they are interested from blender integration at least for addon) developed by InteractiveComputerGraphics
and they have also other interesting open source projects like: PositionBasedDynamics

-Project Chrono

There is also some other interesting projects like
-VadereCrowdSim (open source crowd simulation framework)
-PhysBAM
-libWetCloth
-or how about “o3d.foundation”?

btw.
Realtime GPU smoke simulation - Other Development Topics - Blender Developer Talk this developer on blender forums might be interested to join blender dev?

2 Likes