PDA

View Full Version : particle motion question


mantella
03-14-2007, 05:36 AM
I've been trying different things to get particles to act as blood cells "pumping" though a vessel. In theory, the particles accelerate then stop accelerating and almost float for a moment, then accelerate again - all while following a path (or just being pushed through a tube with dynamics, I haven't decided yet). I made a crude expression that would affect the velocity of particles using COS. But, it doesn't really look quite right, and also when I try to use it on a curve flow setup, the expression does nothing. It seems that something in the curve flow is negating or overriding the velocity -?
Anyways, I'm stuck. Any ideas?

MikeRhone
03-14-2007, 05:50 AM
My first thought with this is to use a curve flow. If you are semi-comfy with particle expressions you should be able to get something nice using just that.

overEZ
03-14-2007, 08:51 AM
i'm a novice, but i think it'd be pretty easy to have them 'float' down a tube and slow them down when necessary with drag fields.

mantella
03-14-2007, 03:42 PM
yeah, the first thing I tried was CurveFlow, but like I said, it seems to have a mind of it's own and take over any attempts I make to adjust the veloctiy or acceleration. I'm comfortable creating simple expressions, but I'm a bit lost trying to navigate through the pre-scripted CurveFlow stuff.

I haven't tried drag fields yet, I'll give that a go.
Thanks.

HillyBilly
03-14-2007, 11:17 PM
how about using a curve as a goal, then moving the particles by adding the cos(time) per frame ony when the pump action is positive. So:

$pumpImpulse = cos(time*$speed)*$amplitude;
if ($pumpImpulse>0)
goalU=+ $pumpImpulse;


by keeping the goal low, the particle can still be influenced by turbulence or such.
Also using an "goalOffset" you can adjust the relative distance to the goal-curve, so they dont all follow the exact path.
Hope this helps.

Als
03-15-2007, 06:32 AM
Curve flow works by using goals in expression. In order to slow down you can add a point, or move control object on curve. Check the FLOW extra attributes...
You can also rebuild the curve, which can give you more uniform speed, or speed depending on curvature...


Als

mantella
03-15-2007, 02:33 PM
yeah, I tried messing with the goal curves. But all you can really do with them is change their scale or relative spacing. If you scale them, then the "tube" gets bigger or smaller at that point which is not what I want. If you put them closer together, the particles slow down at that point which is not what I want either. The particles tend to clump together - maybe good for making a clogged artery or something though.

BUT, I think I actually found the magical attribute that I was looking for. It's called "Random Motion Speed". I added a simple COS expression to that attr and voila! The whole stream of particles slows down and speeds up without clumping together.

Thanks everyone for your ideas!

CGTalk Moderation
03-15-2007, 02:33 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.