Create individual particles from jit.gl.isosurf ?

tep's icon

I want to make individual particles - in order to give them some life with jit.phys.body - out of a iso surface which i put some random in.

Naively i thought that a "matrixoutput 1" would allow me to send the matrix to a jit.gl.mesh, but the type of matrix data doesn't match at all and i don't have a clue of how to "convert" it, if i could say so. And anyway i never really understood how to manage the different inputs of the jit.gl.mesh object.

Or would there be a way to give some particles from jit.gl.isosurf a 'physical life' directly with jit.phys.body ?

Rob Ramirez's icon

perhaps these patches will give you some inspiration.
i'm not entirely sure who made them, but i believe it was user matmat

MEtaBall0.002.maxpat
Max Patch
PolyGenMetBalls.maxpat
Max Patch
tep's icon

indeed, very inspiring

thanks !

Wesley Smith's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's a simplified version of the PolyGenMetBalls patch. The Gen patcher used was calculating the length using swiz and hypot, but you can do the same thing with just a length object. Also, connecting many patch cords to an inlet will sum them up, so the + objects can be removed. There's no difference in terms of efficiency when removing the + objects, but it does look a lot cleaner: