PDA

View Full Version : pflow objects avoidance


thinkpozzitive
07-11-2008, 07:29 AM
Hello.
Is it posible to make a stream of particles that travel along a surface to avoid diffrent objects that lie in their way in the same manner fluids work (realtively). What i mean is that when they hit something like a spheare, they travel around it. I don't want the stream of particles to resume to a few narrower areas after hitting the object. Think of fluid simulations , and how particles travel along the object faces, and how they disperse to fill the area around the whole object. And ofcourse pflow is the tool of choice here, not third party plugins, or other fluid simulation software (such as realflow).
Thank you, and if you have any ideeas, please share. :)

Bobo
07-11-2008, 08:46 AM
Keep in mind that there is a huge difference between a particle system and an SPH-based particle fluid simulation - in the latter, the particles are aware of each other, so affecting one affects indirectly their neighbors and keeps the fluid uncompressed. In PFlow, you could get a particle to go around an obstacle, but the next particle that does not hit the obstacle would not be affected by that same collision. Thus, if you have a stream of particles you want to affect by an obstacle, it might be a better idea to apply some force based on distance to the (center?) of the collision object, so particles that come close to the surface get affected more than particles that are slightly farther. For a sphere, a Spherical Wind or Gravity with a good falloff aligned to the obstacle might looks close enough...

Bobo
07-11-2008, 09:18 AM
Here is an example that is far from perfect, but gives you an idea. Note that I offset the wind space warp a bit to get a better effect based on the particles direction of motion...

Download Max 9 Scene (28KB ZIP) (http://www.scriptspot.com/bobo/stuff/cgtalk/ParticlesAroundObstacle_max9_tk101.zip)

A Keep Apart operator attempts to keep the distance between particles constant to fake the SPH behavior of "incompressible fluid" - when the particles get too close to each other, they apply a greater force to keep apart. The Drag disallows any forces along the world Z, and provides a resistance along X and Y to remove the influence of the Wind over time as the particles have passed it by.
(http://www.scriptspot.com/bobo/stuff/cgtalk/ParticlesAroundObstacle_max9_tk100.zip)

thinkpozzitive
07-11-2008, 10:38 AM
Thank you Bobo very much for the explanations. I'll be sure to try and do some tests following your recomandations and based on the files you posted. I'll be back with feedback.

PsychoSilence
07-11-2008, 02:58 PM
i did a cheapish fake flooding approach once for the german max forum not essentially what you might looking for but might give you and idea how to deal with it:

http://www.3delicious.de/spielwiese/hochwasser.jpg (http://www.3delicious.de/spielwiese/flood.zip)

http://www.3delicious.de/spielwiese/flood.zip

max9-32 no plugins needed

cheers,
anselm

thinkpozzitive
07-11-2008, 03:44 PM
Thnak you for the ilustration. As i look from the top viewport the particles that are behind the house (the opposite side, not the one that's beeing hit by the flood) there are very few particles...it's like not quite avoiding the obstacle. And if you have many such object in the way of the particle stream, even with quite a lot of distance between then, you could very well end up with almost no particles reaching a certain destination. :( It's a good particle system yet I have to find a way to make it better without fluid simulations.
Thank you for your interest.
Best of luck.

thinkpozzitive
07-11-2008, 09:02 PM
Here is an example that is far from perfect, but gives you an idea. Note that I offset the wind space warp a bit to get a better effect based on the particles direction of motion...

Download Max 9 Scene (28KB ZIP) (http://www.scriptspot.com/bobo/stuff/cgtalk/ParticlesAroundObstacle_max9_tk101.zip)

A Keep Apart operator attempts to keep the distance between particles constant to fake the SPH behavior of "incompressible fluid" - when the particles get too close to each other, they apply a greater force to keep apart. The Drag disallows any forces along the world Z, and provides a resistance along X and Y to remove the influence of the Wind over time as the particles have passed it by.


I've played around with the file you provided for me , and it's very cllose to what I was looking for in terms of particle behaviour. So again thank you for this great piece of knowlege.
Best regards,
Laurentiu Pop

CGTalk Moderation
07-11-2008, 09:02 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.