Skip to content

Instantly share code, notes, and snippets.

@taikomatsu
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taikomatsu/8799833 to your computer and use it in GitHub Desktop.
Save taikomatsu/8799833 to your computer and use it in GitHub Desktop.
Maya Field attenuation parameter approximation
// Maya Field attenuation parameter approximation
vector $p = particleShape1.position;
float $d = mag($p);
float $f = pow(1.0/($d+1.0), particleShape1.attenuation) * particleShape1.magnitude;
particleShape1.acceleration = <<0, $f, 0>>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment