Skip to content

Instantly share code, notes, and snippets.

@animoplex
Created September 4, 2018 02:27
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 animoplex/f8c9a4e4fc4cad4ae16dd46c6eb5cf3e to your computer and use it in GitHub Desktop.
Save animoplex/f8c9a4e4fc4cad4ae16dd46c6eb5cf3e to your computer and use it in GitHub Desktop.
Random Expressions - After Effects Expression by Animoplex
// Random Expressions - Created by Animoplex: www.animoplex.com
// Generate random numbers between 0 and 1 with random, seedRandom, and gaussRandom methods.
// Full Tutorial: https://www.youtube.com/watch?v=MITA3ygqvQY
// Random Examples
random() // Returns a random number between 0 and 1 on every frame
random(5) // Returns a random number between 0 and 5 on every frame
random(-5, 5) // Returns a random number between -5 and 5 on every frame
// gaussRandom Examples
gaussRandom(100) // Returns a value with 90% probability of falling within 0 to 100
gaussRandom(100, 200) // Returns a value that likely falls between 100 and 200
// seedRandom Examples
// Note: The seedRandom method still requires the random method to function.
seedRandom(1, true); random() // Seeds a single random value, locked in time
seedRandom(20, false); random() // Seeds new random value, changes every frame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment