Advertisement
Guest User

WaveScript

a guest
Oct 27th, 2010
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. //Creation expression
  2. vector $ppos = spray_particleShape.position;
  3. float $pu = $ppos.x;
  4. float $pv = $ppos.z;
  5.  
  6. float $offsetU = 0.5; // center (in X) of bounding box of emitting surface
  7. float $offsetV = 0.5; // center (in Z) of bounding box of emitting surface
  8. float $scaleU = 5; // width of bounding box of emitting surface
  9. float $scaleV = 5; // depth of bounding box of emitting surface thanks to mduvekot on cgTalk
  10.  
  11. float $samp[] = `colorAtPoint -o RGBA -u $pu -v $pv `wave_deformationFile`;
  12. float $py = $samp[0];
  13. float $sprayStart = 0.6;
  14.  
  15. spray_particleShape.position = <<$ppos.x, $py, $ppos.z>>;
  16. spray_particleShape.rgbPP = <<$samp[0], $samp[1], $samp[2]>>;
  17.  
  18. if ($py < $sprayStart){
  19. spray_particleShape.lifespanPP = 0;
  20. }else{
  21. spray_particleShape.lifespanPP = 1;
  22. }
  23.  
  24. // 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