Create a Tree connection
Video: Create a Tree connectionIn this movie, we'll take this state of the composition, which has some hopping spheres all over the screen and the x, y, z space of AfterEffects, and we are going to connect them using the Connect Layers script that I've showed you before. If you don't have access to it or you don't know how to install it, go ahead and watch the first movie in this chapter. But I already set it up so what I'm going to do is go to the file menu and from the scripts menu I'm going to choose connect layers.
- What's next?
Viewers: in countries Watching now:
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.
- Building a random sphere animation
- Creating a tree connection
- Animating letters dangling from rope
- Creating body types and groups
- Staggering layer simulation
Create a Tree connection
In this movie, we'll take this state of the composition, which has some hopping spheres all over the screen and the x, y, z space of AfterEffects, and we are going to connect them using the Connect Layers script that I've showed you before. If you don't have access to it or you don't know how to install it, go ahead and watch the first movie in this chapter. But I already set it up so what I'm going to do is go to the file menu and from the scripts menu I'm going to choose connect layers.
The connect layers script will help you to join elements in your especially if you'll have plenty of shape layers, like we have here. It will also create ropes, tree, or triangulation, which is new shapes that are being connected through expressions. And they will keep update themselves according to the changes or to the modification that you will do in your composition. I can show you how this works.
In this course, I'm going to also demonstrate the rope simulation. But for now, we're going to use the tree one. So I'm just going to move it out of the way over here. And then I need to select all my shape layers. So I'm going to highlight one of them, and then using this label group color, I'm going to select everything which has the same label group. Now let's press on the three button over here and wait a few moments until the script will finish to calculate its thing.
And the things that it is doing, it's creating these joints. You, you can see by the name of this joint, for example, will connect sphere number 24 and sphere number ten. Let's create the click on preview to check the intermediate result. So we are getting a sophisticated array of lines and spheres that are automatically being connected to each other. Now this is a live thing which means that we can return for example, to the null object that we have over here and then we can change this slider value.
And everything will be automatically updated in the composition view. I just want to show you that if we are going to switch from active camera to custom view one. And press C in order to activate the unified camera tool. I'm also going to move my play head over here. This is a complete 3D live array that you can manipulate however you like. So each one of these joined if I'm going to press double E in order to see the expression is being controlled through this sophisticated expression, and it will keep update no matter what you're going to do to this composition.
Now I'm going to turn off the connect layers or actually close this menu because we are done with it in this stage. I'm also going to switch back to the active camera and press on the arrow. I'm also, just in order to make this composition a little bit simpler. Press on the tilde key in order to maximize it on the screen, and then select all the new joints that were created using this script, and let's just color them yellow, so it will be a little bit more easier to manipulate.
Now, I'm going to start with one of those, And let's just bring back all the controls. So this is the one that I've selected. Let's solo it for a moment so that we can concentrate on it. And let's add to it couple of mathematical operators in order to reveal it in a more interesting fashion. So I'm going to open up its contents. And underneath, I'm going to use this add menu in order to add two operation.
The first one will be trim path and the second one, from the same menu, will be wiggle path. Let's start with the trim path and I'm going to go from the beginning here. So just from the first frame, open it up and let's set the start to 100%. Now it's a little bit difficult to see what we are doing. So once again I'm going to press Cmd+Shift+H or Ctrl+Shift+H on the PC.
And this will be a little bit more obvious now when we are animating it. So the first thing that I want to do is animate the start position of the Trim Path, or the start state. Now I've created the key frame at 100% at the first frame. I'm going to move ten frames ahead by pressing Shift and Page Down. And bring it all the way back to zero. So this is what we have so far. Now let's close the stream path, open up the wiggle path, and the wiggle path, as you may have noticed, is giving this path a little bit of a wiggling move.
I want to exaggerate it a little bit. So, let's try 20 instead of 10 and I'm also going to change the points from corner to smooth. Now, this looks a little bit more interesting. We can see that it is moving, however I don't want the movement to be present from the start until the end. So at some point I want to dissolve it to a straight line. And we are going to do it by setting two key frames for the size. So at ten frames over here, let's key frame the size value from 20.
And then let's move two seconds ahead just by highlighting this value and pressing Tools, so two time. And then we will reset it back to zero. So this is the animation that we have so far. This is just one line which will grow itself and then wiggle a little bit until it becomes straight. Okay. Now, I want to use the same thing over and over again. Of course, we can copy and paste it, but I just want to show you another way to work.
You can actually select both, the trim path and the wiggle path. Then go to the Animation menu and save in Animation Preset. I'm going to save it on the desktop here and I'm just going to name it wiggle underscore and trim. Just so I know what it is. AfterEffects will probably warn you that you're not saving in the desired location. For now, I'm just going to ignore this warning and say OK. I'm not planning to reuse it over again, so it's fine by me.
Now, let's make sure that all these yellow layers are selected. So once again, as before, select the label here and select the label group. And then go to the animation menu and here from the recent animation presets, you can apply the recent animation preset that we just saved, the wiggle and trimming archives. So let's apply it to all the layers, and create a quick on preview, to check what we've managed to achieve.
And we can see that it is working as expected. However everything is happening at once. We need to change the timing, and we will do so in the next movie. But for now, you saw how easy it was to use the connected layers free script in order to create this tree of spheres and lines and joints happening almost automatically, and can be dynamically updated inside After Effects.
There are currently no FAQs about Mograph Techniques: Physics Simulations in After Effects.