Forums > MaxMSP

Particle system + Physics

March 31, 2014 | 1:54 pm

I am trying to build a particle system that obeys the jit.phys objects. I want the particles to be attracted to jit.plato objects by using jit.phys.ghost.  I managed to do that by tweaking the Physics Patch-a-Day 5 (force system) and it works great. My only problem was the amount of particles; I wanted to have many more on my patch.

So I went on looking around in the forum and I came across the gen particle example. It’s perfect because I can get the exact amount of particles I want. I started tweaking it and removed the blackhole math from it. However, I don’t seem to be able to apply jit.phys.ghost forces on the particles created by the jit.gl.mesh object.

Is it possible to apply the jit.phys.ghost forces on the particles created by the jit.gl.mesh object ?

 

 

 

 

 


April 1, 2014 | 12:56 am

Any ideas anyone ?

Someone else asked a similar question http://cycling74.com/forums/topic/gen-particle-with-physics/ but the answer wasn’t clear enough.


April 1, 2014 | 4:31 am

So I made some progress. I inserted the jit.phys objects but as soon as I turn on the metro it causes Max to crash. Any ideas on this ? I’m stuck.


April 2, 2014 | 9:28 am

phys.ghost will only apply forces to rigid-bodies (phys.body or phys.multiple) in a phys.world simulation.

the particles generated by the gen patcher and rendered by the gl.mesh are simply vertices and have no representation in the phys.world.

you can send the particle matrix to phys.multiple, but you need to make the decisions about what kind of rigid-bodies these particles are, as described in the post you linked.

if you simply want forces applied to your gen-based particle system, you will have to roll your own using matrix-operators or gen.


April 23, 2014 | 8:24 am

@rob Thanks for the advice. I’ve made a lot of progress and this is what I ended up with.

My only problem here is the amount of particles. It seems to considerably slow down if you load more than 1000 particles. It might be my computer. Can someone else try this and check the performance?

Mac OS X 10.9.2
12 GB 1067 MHz DDR3
2.8 GHz i7


April 23, 2014 | 10:17 am

my only suggestion is to disable collisions between the particles, however this might not be the effect you are going for.

to do this, simply set the @filterclass of the phys.multiple to something like "pmult", and then set the @filters list of phys.multiple to something other than "pmult", eg "worldbox default" will allow the phys.multiple bodies to collide with the worldbox, and all other default rigid bodies, but not with each other.


April 23, 2014 | 10:18 am

we hope to be making some performance improvements for physics objects in the future.



LLT
April 24, 2014 | 12:07 am

Hi Rob,
"we hope to be making some performance improvements for physics objects in the future."
you mean GPU?


April 24, 2014 | 2:33 pm

possibly, no details yet.


Viewing 9 posts - 1 through 9 (of 9 total)