PDA

View Full Version : water droplets and per particle size expression help!


k2exoman
10-31-2006, 12:19 AM
Hello,

I am a relative n00b but have done a fair amount of research and I understand the concepts but I need a little help with a maya expression.

I am trying to create a water drop runoff scene, similar to what you may see on a skylight that is being rained on.

I am using a dome shaped polygon as a particle (droplet1) emitter (emitter1). The particles are set to collide with the dome, and I am using a gravity (gravity1) field to drag them down the sides. I have set up a collision event so that the particles from emitter1 emit particles (droplet2) as they collide with the dome on thier way down the sides. the droplet2 particle inherits the motion but also has a little friction so as to stay behind the lead particles (droplet1). They are also tied to gravity and set to collide with the dome so they run down the sides too.

Both particle sets (droplet1 & 2) are blobby surface (sw) with the threshhold set around 0.7. This works well for creating cohesion between the particles.

The expression I would like help with would adjust per-particle size attributes on the droplet2 particle set so as to create a water-droplet-like 'taper' with the lead particles remaining fuller then the rear particles (the weight of the 'water' leading downward). I believe having the particles decrease in size by age (to a certain width) would be sufficient.

Can anyone help me write such an expression or point to a site with decent examples, or is this idea even possible?

Thanks for your help.

-Steve

k2exoman
11-02-2006, 12:29 AM
Okay.. so here is what I have figured out...

if ( frame % 5 == 0 )
{
if ( particleShape1.radiusPP > 0){
particleShape1.radiusPP = particleShape1.radiusPP - 0.05 ;
}
}

How can I get the particleShape1.radiusPP to equal zero?

A thin particle line remains after using this runtime expression.

k2exoman
11-02-2006, 12:55 AM
Here is what I have now and I think it will work fine for my situation.

I am posting it for others.

if ( frame % 5 == 0 )
{
if ( particleShape1.radiusPP > 0){
particleShape1.radiusPP = particleShape1.radiusPP - 0.05 ;
}
else{
particleShape1.radiusPP = 0;
}
}

CGTalk Moderation
11-02-2006, 12:55 AM
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.