taichi-dev / taichi_elements

High-performance multi-material continuum physics engine in Taichi
MIT License
492 stars 71 forks source link

Blender refactor: add emitter id attribute for particles #88

Closed PavelBlend closed 2 years ago

PavelBlend commented 2 years ago

I added a new attribute to particles. This is the index of the emitter. This will divide the particles into groups. And these groups can be used separately. For example, to create a mesh in blender using geometry nodes:

https://user-images.githubusercontent.com/7983249/148677825-86b6e009-d29d-4a75-aaa7-677c40903c81.mp4

In this example, the two fluids are different colors. In the previous version of taichi_elements, the liquid was of the single color.

Here's an example blender scene:

emitter_id_test_blend.zip

I used:

Taichi Elements: https://github.com/taichi-dev/taichi_elements/tree/4ae3850e4099231d78a68da8bc038c5c38ff063e

Blender 3.0: https://download.blender.org/release/Blender3.0/

Taichi 0.8.9