Inserting or removing slices gradually when bangs are detected

You may have a look at the patch below (use any texture on the quads) before reading on, but I’ll try to explain it here.

What I want is that when a new pair of XY coordinates snaps in, the powder start from the coordinates and fades away with distance. Then, when these coordinates are removed, they have to be gradually remove from the spread, when bangs on the LFO+Change are detected.

Think of this application on a multitouch table. When a blob is detected, it has to generate powder from the finger. Then, when another finger is detected, it has to start generating powder smoothly.

The nodes hidden are just for testing.

If you guys don’t get what I am trying to do, I can explain it again.

Thanks in advance.

powder.v4p (26.7 kB)

Okay, you have a few issues here, mainly with spreadcounts and stuff.

One off the troubles is that when you have the first shape (or finger), you get the first 500 slice an RandomSpread would generate. When you add second finger, you get the next 500 slices.

Now, when you remove the first finger, the 500 slices for the second finger are changing intoo the first 500 slices, since the spreadcount dropped from 2 to 1 finger.

No quick solution now, it requires some S+H stuff, or a queue, dunno, need to check later, wen I have more time.

(I attached the Error Demo, sorry for the lack off answers)

2fingers.v4p (6.8 kB)