Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now

Random sphere animation

Random sphere animation provides you with in-depth training on Video. Taught by Eran Stern as part o… Show More

Mograph Techniques: Physics Simulations in After Effects

with Eran Stern

Video: Random sphere animation

Random sphere animation provides you with in-depth training on Video. Taught by Eran Stern as part of the Mograph Techniques: Physics Simulations in After Effects
please wait ...
Random sphere animation
Video Duration: 9m 33s 2h 0m Intermediate


Random sphere animation provides you with in-depth training on Video. Taught by Eran Stern as part of the Mograph Techniques: Physics Simulations in After Effects

View Course Description

Explore how to create complex physical animations inside After Effects using Newton (a third-party plugin) and the Connect Layers (a free script). This project-based course covers a few specific and popular types of effects, such as letters suspended from strings and connected, randomized spheres. Artist Eran Stern shows how to connect any type of element together in a complex 3D array of strings and work with different dynamic simulations in order to create Dormant and Collision as well as Staggering and Kinematic animation types.

These lessons are perfect for motion graphics artists who want to create earthy physics simulations and add realistic motion to their projects.

Topics include:
  • Building a random sphere animation
  • Creating a tree connection
  • Animating letters dangling from rope
  • Creating body types and groups
  • Staggering layer simulation
After Effects

Random sphere animation

The first step in the connected sphere animation is to create the spheres themselves, and this is what we are going to achieve in this movie. For that, I'm going to open the begin state of this composition, named connected spheres. In this composition, we only have the audio guide and I've set a marker which correspond to the audio effect that we already have in this sound.

So we will be able to easily coordinate our animation. For now, I've muted the audio in the preview panel. So we are clear to go. Let's start by creating our first sphere. Before doing so, I just want to draw your attention to this color scheme file. This is an illustrator file which I've already imported into this project, and this has the five colors that we are going to use throughout this course.

In order to keep the design consistent, I've already set up these five colors which we are going to sample from time to time. Okay, so just make sure it is highlighted over here because we do need to see the colors. Then we turn to the timeline, select it once again, hold down Alt on the PC option on the MAC and click on the grid over here in order to show the guides. I just want to start from the middle of the screen here, and I'm going to select my Ellipse tool.

Now, I'm just going to look at the Info panel to the right until I see 640 by 360. And this tells me that I'm just in the middle of the composition. Then I'm going to click, hold down, cmd on the mac or ctrl on the PC plus shift then just drag until I see this blue sphere. I'll adjust in order to verify that I have the exact color I'm going to click on the field color over here.

And using this eye dropper, I'm just going to sample this blue tint from my color scheme of course. Also, make sure that the stroke is set to nothing. If it's not the case for you just hold down Alt or Option and click the icon, it will cycle through the four modes until you see this diagonal line, which tells you that the stroke is disable. Okay, now, in the timeline, let's just rename this to sphere, and let's open up the ellipse one and under the ellipse path, under the size I just want to change it from what it is now to 30 pixels.

Now it is a little bit difficult to see what we are doing because we are seeing the boundaries of the layer as well as the shape path visibility. So first I'm going to switch this one off, and then, in order to hide After Effect's guides, I'm going to go to the View menu. And from here, you can choose Show Layer Controls and of course, just make sure it's not selected or remember the keyboard shortcut Shift+Cmd+H or Shift+Ctrl+H on the PC.

And this will show you exactly how this looks without the annoying boundaries. I'm also going to hide the grid for now, just by disabling it, and we can close this sphere. Now, my aim here is to duplicate 30 copies of this sphere. And I want each one of them to appear in a different place in terms of After Effects XYZ position. So I want After Effects to randomise the location of the spheres if you will.

In order to do so, I'm going to use a very simple expression. But I'm going to tie this expression to a null object helper which will later help us to gather all these spheres into one place which is here in the middle. So before starting with the expression, I'm going to the layer menu and from here I'm going to create the new null object. I'm going to rename this null object, position and then go to the effect menu.

And under the expression controls I'm going to add a slider control. And to this slider control I'm also going to say that the name will be position. Okay. Now I want to see the slider here in the timeline, so I'm just going to make sure that I open it all the way. We don't actually need to see the eye for the position layer just so it won't destruct us. And I also don't want to show the transform because i have a very small real estate here.

So, I'm going to press Alt+Shift or Option+Shift and just click on this which will hide it from view. Now, I'm going to select this field make sure I convert it to a 3D layer. This means that it will have x, y and z position and then I'm going to press p in order to see the position. Next I want to add an expression in order to select different values. So, I'm going to hold down ALT on the PC, option on the Mac, of course, and click on the stopwatch.

Here, I'm going to type down, wiggle, then open parentheses. The first number here should be the speed or the frequency of the wiggle. In this case, I want a very mild movement. Something which is almost zero, but not complete zero. So let's say, 0.1. Then I'm going to add the comma, and then I'm going to express the value which means how much wiggle it will give this letter by pointing it to the position slider that we've added just a moment ago.

So just select this picquic and point to the slider position and After Effects will write down all the code for you. And this means that it will take this value from this layer that we named Position, and this effect that we named Position, and of course this is the Slider. Make sure to add another closing parenthesis in order to close the expression. And then you can just click outside of it, or press on the Enter on the numeric keys.

Now nothing happens yet because in order for this wiggle to work, we need to plug some number over here. So let's change this slider value to maybe, I don't know, let's say 600 for now and we can see that this number is plugged over here to the value of the wiggle. Now we do have a very, very slight movement. And this is the reason why this ball is moving from the original location to somewhere in this case, over here at the left corner of this composition.

Now, I'm going to close the position, re-select my sphere. And go to the Edit menu and choose Duplicate. So, you can of course press Cmd+D in order to make it faster. Just want to show you where it is. And each time that we are going to duplicate another copy, and this is what I'm doing right now, I'm pressing Cmd+D. After Effects will take the wiggle values and change them according to the index number of the layer itself.

The index number is this number that you see over here. So this means that every time that we are creating another duplicate And I'm going to stop at 29 because I already have the first one. Each time we are doing this we have a different kind of values which are being plugged into the wiggle expression. Let's press zero now, and we can see that we got exactly what we are after. Very simple method to create a lot of rotating or moving spheres around the screen and everything is still live and connected to this null object.

So if you want to spread them across, you can basically just change the value over here. Or if you want the other direction you can reduce it to whatever makes you comfortable. I'm going to stick with 600 and once again I'm going to create a quick run preview in order to check the animation. It does look very promising at this stage, but before applying the Connect Layers script, I think that we can work on it a little bit and improve it.

So in the next movie, I'm going to show you how to create a nice cascade animation. And also scale these spheres so each one will be appearing in a different kind of way. And not it's just be there from the beginning to the end.

There are currently no FAQs about Mograph Techniques: Physics Simulations in After Effects.






Don't show this message again
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.

Mark all as unwatched Cancel


You have completed Mograph Techniques: Physics Simulations in After Effects.

Return to your organization's learning portal to continue training, or close this page.


Upgrade to View Courses Offline


With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

Become a Member and Create Custom Playlists

Join today and get unlimited access to the entire library of online learning video courses—and create as many playlists as you like.

Get started

Already a member?

Log in

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

You started this assessment previously and didn’t complete it.

You can pick up where you left off, or start over.

Resume Start over

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.