Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Creation expression
- vector $ppos = spray_particleShape.position;
- float $pu = $ppos.x;
- float $pv = $ppos.z;
- float $offsetU = 0.5; // center (in X) of bounding box of emitting surface
- float $offsetV = 0.5; // center (in Z) of bounding box of emitting surface
- float $scaleU = 5; // width of bounding box of emitting surface
- float $scaleV = 5; // depth of bounding box of emitting surface thanks to mduvekot on cgTalk
- float $samp[] = `colorAtPoint -o RGBA -u $pu -v $pv `wave_deformationFile`;
- float $py = $samp[0];
- float $sprayStart = 0.6;
- spray_particleShape.position = <<$ppos.x, $py, $ppos.z>>;
- spray_particleShape.rgbPP = <<$samp[0], $samp[1], $samp[2]>>;
- if ($py < $sprayStart){
- spray_particleShape.lifespanPP = 0;
- }else{
- spray_particleShape.lifespanPP = 1;
- }
- // runtime contained a similar expression to make sure the particles floated on top of the waves on landing and didn't fly through them.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement