Coordinating rain with water ripples

I have to do a scene with with rain drops causing ripples on a pool of
water. The problem I'm having is making the ripples coincide with the
rain drops. They need to match up. What I have is a nurbs plain as a
particle emitter and a nurbs plane as a collision object. I've seen the
example of the water ripple shader on the Assist site. What I would like
to do is to feed the collisionU and collisionV of the particle# when it
collides with the nurbs plane into the water#.rippleOriginU and
water#.rippleOriginV. This way the ripple will match up with the
partilce collision event. I only need to do this for 20 or particles (or
maybe more.) Does anyone know how to do this?

If I can't get this to work, I'll try making the collision plane a
softbody and adding a radial field to the particles.

Thanks in advance,

-Kris
spudk@texas.net

//Just make 2 expressions.
//One is runtime for particles-
global int $count;
global vector $collisionUV[];
global int $collisionFrame[];
if( particleShape1.collisionU != -1) {
$collisionUV[$count] = <>;
$collisionFrame[$count] = frame;
$count++;
particleShape1.lifespanPP=0;
}

//Another one is for surfaceShader - I supposed that surfaceShader applied to surface that particles collide with (for visual feedback).
//----------------------------
global int $count;
global vector $collisionUV[];
global int $collisionFrame[];

int $i;
float $max;
float $value;
vector $uv;

float $freq=40.;
float $decay=4.;
float $timeDecay=0.05;

$max=0;
$uv = <>;

if (frame==1) $count = 0;

for ($i=0; $i float $tdist = (frame-$collisionFrame[$i])/4.;
float $dist = mag($uv - $collisionUV[$i]);
float $x = ($dist*$freq- $tdist);
$value= 0.4*(1 - smoothstep(0,3,$x))(1.+cos($x))exp(-$dist*$decay-$tdist*$timeDecay);

$max = max($value, $max);

}

$max += .1;

surfaceShader.outColorR = $max*.7;
surfaceShader.outColorG = $max*.9;
surfaceShader.outColorB = $max;

// correct it for your materials and utilities node names
Sergei Ptits

hi, I just saw something in the scripts section that might help. it was under the Paint FX, it is called seedPaint v 0.5. this works in version 2.x of Maya and maybe in 3.0. you might have to change something around, I really don't know. This script creates a brush where each particle collides with the collision object.

good luck I hope this helps.

Spill