[ODE] Particle simulation

Jaroslav Sinecky jsinecky at tiscali.cz
Mon Feb 26 11:40:32 MST 2007

I would say doing particles outside ode is a good idea. Simulating each 
particle as a rigid body is a big overkill and would give very poor 
performance (imagine a particle system emitting 3000 particles per 
second). Usually you need some particle management for very fast 
particle emitting, updating and destroying. The physics is very simple 
part of it: basically just updating velocity in each step applying 
gravity force and/or buoyancy.
If you need collisions, you can use ode for detecting collisions (as 
suggested by Bram) and do collision resolution your self. Again this 
should be very simple, as a moving point, each particle will have max 1 
contact point at a time and as you don't want particle to "push" other 
bodies, just reflect particle velocity with some restitution factor.


Ignacio García Fernández wrote:
> El Lunes, 26 de Febrero de 2007 11:25, Bram Stolk escribió:
>> Ignacio García Fernández wrote:
>>> Hi!
>>> Do anybody have any experience on simulating particles (punctual masses)
>>> within an ODE simulation?
>> I think you would just create a body without associating geometries
>> with it.
> Yes, but what about the dynamic part. Application of forces would always be 
> done in the center of mass, but the equations related to the rotation would 
> still be there. This makes a considerable amount of unnecessary computations. 
> If you use true particle dynamics (only trslation, no rotation, mass matrix, 
> etc.) it would save time, and probably would give stability to some 
> simulations.
> I will do it outside ODE, with its own numerical integrator and so. I wanted 
> to know if any effort is ongoing in order to do this within ODE (perhaps I 
> could help).
> Also, any idea of how to do it can help me, and do it myself (i can't promise 
> anythig!!).
>> Your particles will not collide with your world though.
>> You would need to write custom collision detection by intersecting
>> a line-segment with the world. The line-segment would have endpts
>> p0 and p1 which is the particle pos at t0 and t1.
>> If the segment intersects the world, you need to do collision
>> response by creating contact joints.
>> Come to think of it... such a particle program would make a
>> nice addition to the demo collection in ode. E.g. simulate
>> a water-hose that topples some stacked objects by spraying
>> particles onto them.
> Yes!! It would be nice!
> Thanks a lot!
> Ignacio

More information about the ODE mailing list