
Building Your Own 3D Particle Generator
Dan Ebberts July 18, 2023
0 Comments
In this tutorial, Dan Ebberts explores how you can use expressions in After Effects 5.5 to build a fairly sophisticated 3D particle generator. Our particles will respond to initial velocity, gravity, wind, drag, and much more. Using this particle generator, we'll look at how you might create explosions, smoke, a fire blast, falling snow, and even a liquid-like flow. We'll explore how to make each particle re-usable, which will allow us to simulate fountain-like particle streams. This one is quite advanced.
Explosion MP4
3D Particle Generator .zip
the basics The basic idea is that we will import a graphic representation of a single particle. We'll drag it into our comp and make it 3D. We'll apply our physical simulation expressions to our particle and then duplicate that layer enough times to get a convincing result. We'll set the expressions up so that each particle (layer) will behave differently. We'll be applying expressions to many of the particle's properties, including position, scale, opacity, and rotation.
We'll start off with a simple explosion and develop more complex expressions from there. It will eventually involve some pretty hairy math and some physics (sorry!) but the good news is that you don't necessarily have to understand exactly how the expressions work - you just need to know how to modify them to get them to do what you want. In the first part of the tutorial, what I'll try to do, as much as possible, is to cover the basics of how the expressions work and how you would modify them. Then, towards the end, the stouthearted can follow me through the hairy math and physics.
the strategy We want each of our particles to have a defined life span that will be random within a certain range. Since we'll be applying expressions to multiple properties of the particle, we need some way to communicate information about the particle's life span to all the expressions that need it. We'll do this by performing the life span calculations in an expression control (if you want to learn more about expression controls, see my tutorial Building the World's Greatest Cameraman (COW Admin: coming soon)). We'll then use the expression control as a read-only global variable that can be accessed by all the other expressions applied to our particle.
let's begin! Go ahead and open the project file and then open the explosion basic comp. You'll notice a graphic layer called star flare and a null layer, which both have 3D turned on. We'll be using the position of the null to set the center of the explosion. We'll refer to the null as the particle emitter and later we'll move the null around to impart emitter velocity to the particles. Select the star flare layer and type u to display all the properties that have expressions applied to them. Also type Ctrl Shift t (PC) or Cmd Shift t (Mac) to display the effects applied the layer. You'll see that a point control has been applied and renamed life . You may be wondering why we'd use a point control instead of a slider control to hold the life value. The reason is that later on (when we get to re-usable particles) we're going to need to pass both life and birth times so we need a control that can pass two values. Couldn't we just use two slider controls? No, because the calculations for birth and life have to be done within the same expression to make it work. In the timeline, click the twirly next to Point to reveal the expression applied to the life point control:
lmin = 1.5; //minimum particle life
lmax = 2.5; //maximum particle life
seed_random(1,true);
life=random(lmin,lmax);
birth=0;
[birth,life]
This expression will generate a random life value for our particle that is between 1.5 and 2.5 seconds. This value will be plugged into the second element of our point control variable. The first element ( birth ) is just set to zero since for this first explosion comp all our particles will be born at time zero. The seed_random call just tells After Effects that we want to get the same random value for life every time we run the expression (otherwise the life value would hop around on every frame - which doesn't help us here). If you want to learn more about seed_random , see my tutorial Generating Random Motion (COW Admin: coming soon). If you wanted to change the life span of the particles, you would just change the lmin and lmax values.
Click the twirly next to Position to reveal this expression:
vmin=500; //minimum initial velocity
vmax=700; //maximum initial velocity
birth=effect( life ).param( Point )[0];
life=effect( life ).param( Point )[1];
origin=this_comp.layer( Null 1 ).position.value_at_time(birth);
age=time-birth;
seed_random(1,true);
s=random(vmin,vmax);//initial speed
a=degrees_to_radians(random(180)); //angle from vertical
r=degrees_to_radians(random(360)) //rotation around y axis
x=s*Math.sin(a)*Math.cos(r);
y=-s*Math.cos(a);
z=s*Math.sin(a)*Math.sin(r);
v=[x,y,z];
origin v*time
This is the basic position expression for a zero g explosion. Our particle will launch at a random direction in 3D space from the origin (which is just the position of the null layer) with an initial speed between 500 and 700 units (which roughly equates to pixels per second). The particle will continue at that speed and direction until it dies out. We haven't yet factored in wind, gravity, and drag. I'm sure you noticed the three lines that use the JavaScript trig functions to calculate the x, y, and z components of the particle's velocity vector. This vector is generated from the random values of speed ( s ), launch angle from vertical ( a ) and the rotation relative to the comp's y
Most recent headlines
06/10/2025
France T l visions, France's leading broadcaster, has received the 2025 EBU ...
04/09/2025
Monumental Sports & Entertainment (MSE), in collaboration with Dalet, has been a...
15/06/2025
July 2025 in Dublin, Berlin, Amsterdam & London
Photo: Thea Martre
Music Production for Women (MPW) have announced that they will be running a series of fo...
15/06/2025
Composer/producer launches free virtual instruments
Sulcata Sound is the latest venture of Jason Graves, a two-time British Academy Award-winnning composer,...
14/06/2025
NEW YORK Pluto TV and the All Womens Sports Network have launched a free ad-supported streaming TV (FAST) AWSN channel in the U.S., Canada, the U.K. and the Nor...
14/06/2025
NEW YORK and CINCINNATI E.W. Scripps has announced a new, multiyear agreement with the WNBA that will continue Ions regular-season coverage of the league on Fri...
14/06/2025
WASHINGTON The National Association of Broadcasters highlighted the hidden importance of spectrum in the production of major sporting events and described wha...
14/06/2025
WASHINGTON Sunsetting ATSC 1.0, expanding business opportunities for NextGen Broadcast and increasing international adoption of the ATSC 3.0 standard were top o...
14/06/2025
SAN FRANCISCO Samba TV and Acxiom have announced that they will dramatically expand their longstanding relationship....
14/06/2025
July 2025 in Dublin, Berlin, Amsterdam & London
Photo: Thea Martre
Music Production for Women (MPW) have announced that they will be running a series of fo...
14/06/2025
San Francisco State University's School of Cinema Uses Blackmagic Design
Brie Clayton June 13, 2025
0 Comments
More than 40 Blackmagic Design came...
14/06/2025
Boris FX Mocha Pro Adds New AI Tools To Tackle VFX Tasks Fast
Jessie Electa Petrov June 13, 2025
0 Comments
The 2025.5 release helps artists work more...
14/06/2025
AJA Debuts DRM2-Plus Mini-Converter Frame at InfoComm 2025
Brie Clayton June 13, 2025
0 Comments
Next-gen frame addresses diverse rackmount needs wit...
13/06/2025
(L-R) Lindsay Utz, Michelle Walshe, and The Right Honourable Dame Jacinda Ardern attend the 2025 Sundance Film Festival premiere of Prime Minister at Eccles T...
13/06/2025
Photo credit: Atsushi Nishijima
If you're a true lover of rom-coms, chances...
13/06/2025
Pure Drama and Fierce Rivalries set to dominate the world's most iconic spor...
13/06/2025
Johannesburg, 12 June 2025 - The National Film and Video Foundation (NFVF), an a...
13/06/2025
ABILENE. Texas A severe storm knocked down the tower and severely damaged the news studio and main facility of Sinclair-owned KTXS here on Sunday, June 8....
13/06/2025
Berklee's Music Business/Management Department Recognized by the Music Biz A...
13/06/2025
WASHINGTON The ATSC, the Broadcast Standards Association, honored veteran technologist Aldo Cugnini and Clarence Hau, Senior Vice President of Standards, Policy...
13/06/2025
(Editor's note: The 2025 UFL Championship Game between the D.C. Defenders and Michigan Panthers kicks off Saturday, June 14, at 8 p.m. Eastern. The game wil...
13/06/2025
New iPad/iPhone synth App announced
Following on from last year's release of Gradient Synth - which reached #6 on the App Store's Paid Music charts ...
13/06/2025
LONDON Warner Bros. Discovery has announced that HBO Max will launch direct-to-consumer in multiple new countries this July as the streamer becomes available in...
13/06/2025
AI voice transcription and captioning platform Verbit has added a new feature to its Captivate ASR solution the ability to identify specific features in automat...
13/06/2025
WASHINGTON Federal Communications Commission member Anna Gomez has wrapped up two weeks in California visiting broadcasters, television studio executives, enter...
13/06/2025
WASHINGTON The U.S. House of Representatives voted mostly along party lines to approve a rescission package that would cancel $9.4 billion in previously approve...
13/06/2025
At InfoComm 2025, AJA Video Systems announced DRM2-Plus, an intuitive, high-capacity 3RU frame that can neatly house up to 24 AJA Mini-Converters. Tailored to s...
13/06/2025
Cinema advertising leader to leverage AOS and suite of AI-enabled solutions to optimize forecasting, yield management, and streamlined ad sales and operations a...
13/06/2025
Manfrotto has launched the ONE Hybrid Tripod, a new support system designed specifically for professional content creators working with mirrorless cameras acros...
13/06/2025
Leading video software provider, Synamedia, today announced that its Media Edge Gateway (MEG), an ATSC 3.0 software-based IRD, now supports Device Security requ...
13/06/2025
LiveU, the global leader in live IP-video contribution, production and distribution solutions, is deepening its commitment to the German-speaking market with th...
13/06/2025
Chaos, the leader in architectural visualisation software, today announces Chaos Corona 13, giving archviz designers new ways to add eye-catching style and flai...
13/06/2025
PALI's Nena Music Video Shot with Blackmagic Design
Brie Clayton June 12, 2025
0 Comments
Blackmagic Cinema Camera 6K and DaVinci Resolve Studio b...
13/06/2025
OddBeast Powers Up iRobot's Newest Roombas with Suite of CGI Launch Assets
Brie Clayton June 12, 2025
0 Comments
The motion design and production ...
13/06/2025
On Chick Coreas Birthday, a Newly Uncovered Archival Release The Visitors, composed by Corea and performed by vibraphonist Gary Burton and pianist Kirill Gers...
13/06/2025
In fulfilment of a recommendation by the Government's Expert Advisory Commit...
13/06/2025
SVG Sit-Down: Backblaze's Gleb Budman Talks Products, Partnerships, and the ...
13/06/2025
SVG Sit-Down: DAZN's Walker Jacobs Calls Streaming the FIFA Club World Cup ...
13/06/2025
New Sponsor Spotlight: Vecima Networks' Paul Strickland on How Improving QoE...
13/06/2025
Pitch Perspective: Where's Next for Specialty Cameras in Soccer? Leaders from Sky Austria and ACS discuss the possibilities of camera placement pitchside B...
13/06/2025
Premiership Rugby Final 2025: Vintage clash between Bath and Leicester gets full...
13/06/2025
Premiership Rugby Final 2025: TNT Sports gears up for Bath vs Leicester battle w...
13/06/2025
NCAA Men's College World Series: ESPN Adds Two-Point SupraCam, Invests in Ne...
13/06/2025
New FSWX signal and spectrum analyzer with novel architecture overcomes limits o...
13/06/2025
Apple today announced the addition of iPad to Self Service Repair, providing iPad owners with access to repair manuals, genuine Apple parts, Apple Diagnostics t...
13/06/2025
CUPERTINO, CALIFORNIA Apple today previewed iOS 26, a major update that brings a beautiful new design, intelligent experiences, and improvements to the apps use...
13/06/2025
At Apple's Worldwide Developers Conference (WWDC), Apple unveiled Apple Games, an all-new destination designed to help players jump back into the games they...
13/06/2025
Industrial AI isn't slowing down. Germany is ready.
Following London Tech Week and GTC Paris at VivaTech, NVIDIA founder and CEO Jensen Huang's Europea...
12/06/2025
In 2018, Spotify launched Heart & Soul, a mental health initiative developed to ...
12/06/2025
50 Years Strong: SBS and NITV Supercharge NAIDOC Week 2025 in a joint 50th celeb...