particle system collide

Hey guys -
just stumbled over this issue - and neither googling nor trying out myself worked so far: i havent found a solution to make particles collide with each other - or other partciles systems. the 3d rerences i am using just “enter” eact other…

any ideas?

appreciate your thoughts.

best,

hans

I can think of solution but it will be slow…
You can iterate thru all points check their distance from all other points.

means for each points you will have to iterate thru all points,
or at-least thru all points from defined group of points.
or and decide how many collisions one point can have and stop the loop once its gone to certain number.

if distance is less then x.
save two points. A and B.

A= A velocity + B velocity
B= A velocity + B velocity

you can also maybe take in account the mass,the more heavy the point the less it will be affected.

A= A velocity + (1/A mass)*B velocity
B= (1/B mass)A velocity + B velocity

or you can look in google about particle systems,
I didnt look on one as i`m writing my thoughts,probably will not be wise to invent the wheel :slight_smile:
also not sure How to push back the information to the particle simulator.
worth a try.

Hans - how are you handling your rendering of particles? If you’re instancing, your could look at some CHOP math to figure out the collision detection.

I also think you’d need to work through how to check your distance between particles in order to detect a collision… rather than iterating through all points, I might instead set up a boundary around each point and only check distance for the points that fall within the bounds. It’s a lot of computation, so you’ll have to think about how that limits the number of particles you can work with.

You might consider looking at some processing examples to help you wrestle with this:
[url]https://processing.org/discourse/beta/num_1273045007.html[/url]

Another option would be to think of doing this with glsl as a vertex shader:
[url]http://nullprogram.com/blog/2014/06/29/[/url]
That’s more work, but would get you close to what you want.

M

If it’s a small amount of particles, check out this boids example:
derivative.ca/Forum/viewtopi … 94&p=20144

It has some of the math you might find useful.

Cheers
Markus

Markus,
if there was a way to change
point attributes like velocity and kick it in the particle node every frame .
(on the same particles, not new born particles)
it could simplified everything …
like “wind” for each point.

started something,cant continue from here.
NewProject.20.toe (5.16 KB)