Join Eran Stern for an in-depth discussion in this video Attractor simulation, part of Mograph Techniques: Creating a Flat Vector Look using C4D and After Effects.
In this movie, we'll create the particles attractor object which will take all these duplicate, all these cloner spheres and will help us to attract them to this middle one, the main sphere. In order to do so we are also going to define a simulation system between the cloner and the main sphere object. Before doing so, I just want to change the interface just a touch and also give ourself a little bit more real estate on this screen.
So I am just going to make Cinema 4D full screen by pressing on this icon. I know this is a small change, but using a very low resolution screen that I am using for recording it gives me a little bit more room to breath. Okay. So now we need to add our particle attractor. And you can find it under the Simulate menu under Particles and let's choose the Attractor object. Now, we will set the Attractor object to attract everything, but for now I am just going to give it an initial numbers, which I came up using a trial and error.
Then if we need, we are going to change the Strength and the Speed Limit. So, in order to make it work we need to raise the Strength to a very high number, I'm going to start with 40,000 and for the Speed Limit I'm going to set it to 700. Now once again, these numbers can be changed at any given time, but for now let's leave it like this. I'm also going to go to the Foldoff menu and change the Shape here from Infinite to Sphere.
And you can see that this is where the actual attractor lives. So, just around the sphere. We need to define the larger radius for it. So once again let's change the Size for both x, y, and z. And the numbers that I came up are 2,000 for each one of those. So I'm just going to type them in. I'm also going to change the Falloff. This will actually bring it more closer to the cube shape that we have over here.
Remember that we turned it off, but this is more or less covering the whole scene. If we're going to take a look at it from the camera perspective and press play nothing happens yet. And this is because we haven't defined the simulation object, so let's do it right now, let's add the simulation tag. First I'm going to select the Cloner object and from the Tags over here I'm going to choose the Simulation Tags and define it as a Rigid Body.
Then I'm going to select our Main Sphere over here and this of course will be the Collider Body, so from the same Tags under the Simulation Tags let's choose Collider Body. Now let's go to the beginning of the scene and press play to see if something is happening and we see some kind of a dot just hovering around. So we need to change a couple of the settings here. And the reason that we are not seeing what we expect to see is, due to the settings that we need to change here under the Cloner.
So let's go and select the Cloner, and under the Dynamic Body let's scroll down and under the Collision change it from Individual Elements Off to All, and this means that the simulation will actually be able to look at all the elements that are existing inside this cloner. Now, lets go once again to the beginning and press play. And then we can see that indeed they are attracting to the mesosphere, but they are not doing exactly what we want and there a couple of reasons for it.
At first I just want to change couple of the settings here under the Behavior of the Bounce, Friction and Collision. I'm going to set the Bounce to 20% and the Friction to 150. This will be more clear in a minute. I am not going to set anything for the Collision Noise. The reason that we are seeing this strange behavior of everything basically just falling down is because of the initial gravity of the whole project.
So in order to change the gravity instead of these spheres just hovering around or maybe just falling down, we need to press Cmd+D or Ctrl+D on the PC. And this will take you to the project settings. Over there press on the Dynamics tab and let's change the Gravity from 1000 to 0. Let's give it another test and see what happens. And still we're not getting the desired result.
Okay. So let's bring it back to the beginning. And see maybe we forgot to do something over the clones over here. And I think that I know what it is. So reselect the clones. And we need to change the Distribution from Vertex to Volume. And just to show you what it will do, I'm just going to out of my Camera mode. And see when we are using the Vertex mode we have many more clones that we actually need. And all of them are using the vertex of the tube.
If we're going to change it to Volume, the tube element will be populated with those little spheres and this should help to create the simulation that we are after. Now let's give it a test from here, so let's play forward. And we see that indeed they are attracting to the middle of the screen. We have less of them and they are using the volume of the tube instead of going outside of it. Okay, let's bring the Camera view once again and check it from the desired angle.
So I'm going to play forward and see how this looks. And, this is exactly what I'm after. So we have one sphere in the middle and all the others are attracted to it. Now, I just want to make sure that these are a little bit more smaller than what we are seeing over here. So, I'm just going to place my cursor over here, press 2, and just zoom out a touch, just make sure that in the first frame I'm not seeing any left overs.
So maybe even more. I'm just going to once again press 2 and zoom out of the screen. I really want it to be a very small sphere. And let's test it once again, and I think that this is exactly what I need. Okay, so this is how you create an attractor object and then of course create two simulation tags, the rigid body and the collider in order to pull everything into the scene. Remember, the most important step here was to press Cmd+D or Ctrl+D and change the Gravity to 0, so all the objects are going to be pulled towards the middle of the frame.
- Creating clones
- Adding materials and versioning
- Cloning, repeating, and stepping
- Animating the camera
- Matching elements to the animation
- Compositing elements