new physics object specifically designed to handle streaming matrices

ćwiek's icon

HI!
i v got question. Robert Ramirez some time ago said, that in future there will be a new phys obiect, which will help me to do somethink like this: http://www.youtube.com/watch?v=f_u3sSffS78
do you know when it will be avalible?
thanks for any help!
adam

ch's icon

Hi,
sorry, no idea about that. just thought you might be interested by box2d :
http://charles.bascou.free.fr/box2d/

Rob Ramirez's icon

very soon.
in the next update check for @shape type dynamicmesh.
also @shape type concave now supports streaming matrices.

ćwiek's icon

wow, thats great!

i have been trying with sending matrix to phys.body, but with no success.

i'v got problem with extruding 3d object from binary image especially with removing the rest of unused plane. also when i turn on concave, the max crash..

I will be grateful for any of your help!

Max Patch
Copy patch and select New From Clipboard in Max.

here is my source of binary image
http://galeria-silownia.pl/test.mov
and my patch:

Rob Ramirez's icon

ok, well this should work with the forthcoming update.
however, i would consider downsampling the matrix before sending it to the rigid body.

ćwiek's icon
Max Patch
Copy patch and select New From Clipboard in Max.

hi! i see that update that i have been waiting for has come :)
I see the new shape option, but unfortunately i still can't figure outhow to use it..
can you help me with this? maybe the input matrix is in wrong format?

again thank you for helping me!

ćwiek's icon

up up
sorry for that :)

Rob Ramirez's icon

you need to send 3 plane float32 matrices to generate proper rigid bodies, same as drawing matrices with gl.mesh.
you can use the luminance of the input matrix to generate a third plane, and normalized vals across two dimensions for the other two planes. jit.expr is your friend for this (or jit.gen).

i've also found that setting @kinematic 1 helps with keeping other bodies from falling through the dynamicmesh rigid body.

Max Patch
Copy patch and select New From Clipboard in Max.

here's a patch to get you started:

MuShoo's icon

Is the dynamicmesh option supposed to allow that object to fall out of the worldbox entirely? It doesn't seem to interact with the world box at all, in my brief testings.

MuShoo's icon

Also, veeery unexpectedly crashy.

Rob Ramirez's icon

yes, i think dynamicmesh does not interact with the worldbox. worldbox is mainly for debug purposes.

please post your patch and i'll take a look and try to offer some suggestions.

MuShoo's icon

Sadly my patch is quite a bit on the huge side (and is part of a max 6 'project' file with a bunch of externals). I didn't realize worldbox is meant mainly for debug purposes, though, that's interesting.

Anyway, I've realized that having 8 dynamic mesh objects (which don't seem to interact with each other, either) each running from a 128x128 gridshape matrix is... a bit too taxing to my computer.

Spheres it is!

ćwiek's icon

unfortunately in my case jit.expr and gen are my worst enemies. arent you planning any tutorial about the geometry matrices processing, and other opengl stuff? it its hard to get into without opengl programming knowledge..