NoSleepCreative Wiki
  • Welcome to NoSleepCreative
  • After Effects
    • Getting Started with Expressions
    • Expressions & Snippets
      • JSX Cheatsheet
      • Expression Troubleshooting
      • Utilities
      • Shape & Mask
      • Type & Text
    • Cookbook
      • Algorithmic
      • Random properties
      • Harmonic Motion
      • Staggering
      • Tessellation & Tiling
      • Type animators
      • Speed lines
      • Radial Array
      • Orb & Trails
      • Shading & Texturing
      • Responsive
      • Automation
      • Setup & Rigs
    • Getting started with Scripting
    • Scripting
      • Utilities
      • Master Properties
    • ScriptUI
  • Studio Ops
    • Tooling
    • Toolkitting
    • Knowledge Base
    • Naming Convention
    • DAM
  • Cinema 4D
    • Formulas
    • Python Cheat Sheet
      • For Artists
      • Maya Environment
      • Maya snippets
      • VSFX 705
    • Cookbook
  • Info
    • About
    • Portfolio
    • Course
    • YouTube
    • Gumroad
    • GitHub
  • Dev
    • archive
      • Webscraping
      • Google Sheets Formulas
      • SQL
      • Terminal
      • C++
      • Unreal Engine
      • Concert Visualization
      • Dome-projection
      • UI UX
      • Professional Etiquettes
      • Woes
      • How to get better
        • Portfolio / Showreel
        • Design with cooking
      • Media theories
        • Post Cinematic Affect
        • Marxism, Reproduction and Aura
        • Heuristics & Authorship
        • 02 Semiotics
        • 3 Process?
        • 05
        • 06 Technology & Mediation
        • Formalism
        • Simulation
        • The Gaze & Media Critique
        • Import
        • 10-12
      • Recommended books
        • šŸ”“Things I learned
      • Mac Superuser
        • Applescript
      • InDesign
      • Illustrator
      • Blender
      • Premiere Pro
      • Mathematics
        • Probability
        • Linear Algebra
      • Shader Dev
      • Getting Started with After Effects
        • Best Practices
        • Pimping up AE
        • Environment
      • Houdini
        • Cheatsheet
        • Cookbook
        • Techniques
        • Dynamic
        • Rendering & Lighting
        • Animation
        • Particles
        • Others
          • Modeling
          • Fluids - Pyro & Smoke
          • Rendering
      • REGEX
    • Sandbox
      • Nexrender
        • Terminology
        • Project Files Preparation
Powered by GitBook
On this page
  • Explosion
  • Using a normalized range
  • Base setup

Was this helpful?

  1. After Effects
  2. Cookbook

Radial Array

Tunnel, zoom, iris - WIP

Explosion

Using a normalized range

When using random function for a range, we generally use random(75,400). This works but if we want to upscale the setup, we would need to change both numbers. An alternative is to use a normalize range to multiply a base size eg. random(0.5,1) * 400 will yield a value between 200, to 400. We can still maintain that ratio even if we change

Base setup

random(Radius)āˆ—Math.sin(random(theta)+random(force)random(Radius)*Math.sin(random(theta)+random(force)random(Radius)āˆ—Math.sin(random(theta)+random(force)
var seed = thisComp.layer("controls").effect("seed")("Slider");
seedRandom(seed, true);

var mass = random(thisComp.layer("controls").effect("mass")("Slider"));
var a = thisComp.layer("controls").effect("angle")("Slider");
var r = thisComp.layer("controls").effect("radius")("Slider");

r *= random(0.5, 1); // randomize radius
r += (random(.5, 1) * mass); // add random force
var myAngle = random(360);

var theta = degreesToRadians(myAngle);
var x = r * Math.cos(theta);
var y = r * Math.sin(theta);

[x, y] + [thisComp.width, thisComp.height] / 2

PreviousSpeed linesNextOrb & Trails

Last updated 4 years ago

Was this helpful?