Guest User

Untitled

a guest
Jun 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. int seed = set(ch("seed"));
  2. float strength = ch("strength");
  3.  
  4. // trying out smoothing between two random values
  5. float smoothedRand = smooth(random(seed + @pointnum),random(seed + @pointnum+1), 0.5);
  6.  
  7. // moving random from 0 to 1 to -0.5 to 0.5
  8. float equalized = 0.5 -smoothedRand;
  9.  
  10. // y pos displaced based to rand * strength param
  11. float randomDisplace = smoothedRand * strength;
  12. @P.y += randomDisplace;
  13.  
  14. // using the same rand value to scale the particles
  15. @pscale = fit(smoothedRand, 0, 1, 0, 3);
Add Comment
Please, Sign In to add comment