Creating dangling objects with spline dynamics
Video: Creating dangling objects with spline dynamicsA little known part of the Dynamics Engine in CINEMA 4D is something called Spline Dynamics. One of the reasons that it's so little known is that it's not really part of the Dynamics Engine, it's actually part of the Hair Engine in CINEMA 4D. But you can use it for creating some really cool dynamic effects. I'm going to draw a Spline in the scene. So let's middle mouse-click to get to one of the orthographic views. I'll do this in the front view. Let's draw a Spline. I'm going to go to the B-Spline, and I want my first point to hit exactly on the center of the world.
- Final thoughts
Viewers: in countries Watching now:
CINEMA 4D Essentials with Rob Garrott is a graduated introduction to this complex 3D modeling, rendering, and animation program, which breaks down into installments that can be completed within 2 hours. In this installment, Rob introduces particles, a cluster of objects used to simulate effects like snow, sparks, fog, or fire, and dynamics, which allow you to define how objects interact with their environment. The course covers creating a splash effect with particles, working with more advanced Thinking Particles, and how to understand the difference between the dynamics system's rigid bodies and soft bodies.
- Working with particle forces and the Emitter object
- Using Thinking Particles with the MoGraph Tracer
- Understanding the Dynamics engine
- Combining Thinking Particles with Dynamics
- Creating dangling objects with spline dynamics
Creating dangling objects with spline dynamics
A little known part of the Dynamics Engine in CINEMA 4D is something called Spline Dynamics. One of the reasons that it's so little known is that it's not really part of the Dynamics Engine, it's actually part of the Hair Engine in CINEMA 4D. But you can use it for creating some really cool dynamic effects. I'm going to draw a Spline in the scene. So let's middle mouse-click to get to one of the orthographic views. I'll do this in the front view. Let's draw a Spline. I'm going to go to the B-Spline, and I want my first point to hit exactly on the center of the world.
So I'll turn my snapping on, and I'll enable Snapping first by making the view active, and then click and hold on the Icon. What I want to do is snap it to the work plane. So now when I go in here and I click, I know that I'm just clicking exactly on 0, and that made my first point. Now I can go out here and I'll click another one here, and I'll click another point here, and I think that's enough points for now. You notice because my points are all lined up on the grid, I get a perfectly straight line. Let's turn the Snapping off now, and now we can go back to the Perspective View.
So let's back out a little bit so we can see our Spline, and I'm going to right-click on the Spline and go to Hair Tags, and then Spline Dynamics. And when I let go, it looks like nothing happened, except that when I rewind to 0 and hit play, my Spline falls away. The Spline is now on Dynamic Object. Now that may not seem very impressive, until we do a very important step. Let's use the Selection Tool and click on the very first point that we had at the center of the world, and then go back to the Dynamics tag that's on the Spline and go under the Properties Option, and tell it to set the Fixed Point.
When we do that, this first point is now turned a different color. Let's deselect the Spline. You'll see that it's now turn sort of purply magenta color. Let's rewind back to 0 and hit play. When we do that the Spline now dangles as if it were a Dynamic object. And not only that, it's flexible as well. I want to be able to move that Spline around. The unfortunate thing, though, is that you have to kind of trick the tag. Once you put that tag on the Object, the spline point is fixed to wherever it was in relationship to its parent or the center of the world.
Because I did not have the Spline parented, then I won't be able to move it. So what I need to do is go back and parent the Spline to a Null object and now we'll be able to move that Spline around. Let's get out of Point Mode and select the Null Object, and then drag it up a little bit. And you can see you can still move that point. Now what I want to do is to hit play again. You can see that the Spline now will jump back a little bit. That's because it's recalculating the new position. Now it's very flexible. Let's do something else now.
I'm going to rewind back to 0. I want to stick a sphere on the end of that spline. We're going to use a little bit of XPresso to do that. First, let's add a Sphere to the scene. And then let's add another Null object, and this Null object is going to be called Sphere parent. I want that Sphere parent to be right at the tip of the Sphere, at the very top of the pole. So I'll take that Sphere parent and raise it up 100 units on Y. Now let's parent the sphere to that.
Then on the Sphere parent I'm going to add some XPresso, because I want to use XPresso to stick that to the Spline. So let's right-click on the Sphere parent, go to CINEMA 4D Tags, and then do XPresso. Under the XPresso Editor, I'm going to drag in the Sphere parent, and then I'm going to drag in the Spline. What I want to do is I want to get the point information from that Spline out to the Sphere parent to use that as position information. So I'm going to right-click and add a New Node and under XPresso > General, I'm going to add a Point node.
Now every Object in CINEMA 4D has something called a Point Index Value, and you can find out the Point Index Value by going to the Structure Manager. So let's select our Spline and then lower the interface down just a bit. Then over in the tabs on the right is the Structure Manager. When I select that, I now see a little spreadsheet, and this spreadsheet represents the locations of the points on my Spline. You can see I have the first point selected. So it's highlighted point 0. And these are the index values of the points. The first point on a Spline is always 0, and then it counts upward from there.
The last point on the Spline where I want to connect my sphere is point 2. So let's click on that, and now we've got that point selected. So I know that point 2 is the last one on the Spline. And in my node for the Point node, it's highlighted yellow, because it's not calculating anything right now, it's alerting me that it's not calculating. I'm going to change that Point Index Value to be 2, and that matches that number 2 that I have up here. Let's go back to the Object Manager now. We're done with the structure. So now what I want to do is I have to tell the Point node what object should you look at to calculate this value.
So I'll go to the Spline and take the Object Property out of the Spline and then connect it to the Object Property on the input of Point node and you'll see that it will turn gray again. Now it's actually calculating something. Then I want to take the Point Position and put it on the Global Position of the Sphere Parent. So I'll drag a connection out onto the blue here, and when I let go it's going to ask me, where do I want it to connect it to. And I'll connect it to Coordinates, Global Position, and then Global Position. When I do that, the sphere jumps immediately to the Global Position.
Now let's close up the XPresso Editor and rewind back to 0 and hit Play, and you'll see that the sphere will now dangle. I want to give this a little bit of motion as well, just a little bit of jumping around motion. I can use something called a Vibrate tag to do that. Let's right-click on the Null that's the parent of the Spline and go to CINEMA 4D Tags, and then Vibrate. The way to Vibrate tag works is that it doesn't do anything until you activate one of these parameters. We'll activate Position.
Rotation won't do anything in this case. We just want to concentrate on Position. Let's turn on Position, and then rewind back to 0, and hit play. So now you'll see that our object will be dangling. Let's give it a little bit more room to run, and I'll rewind back to 0. And let's change the Preview Range from 90 to, say, 300, and then enlarge the Preview Slider here. And that will give our dangling sphere a little bit more time to be affected by the Amplitude. I'm also going to crank up the Amplitude from 100 to, say, 500, and so our sphere will be jumping all over the place.
And you really get a sense for the flexibility of that Spline. So let's rewind back to 0 and hit play. Now you'll be able to see. Let's raise the view up just a bit, and you can see that the Spline is very flexible and the sphere is going crazy. To add a little bit more flexibility to the Spline, we can go to the Spline Dynamics tag and we can reduce the Stiffness. Let's reduce the Stiffness down from 20% to, say, 5% and let's rewind back to 0 and hit play again.
And now you see that the Spline is a little less stiff than it was before. This is a really fun technique and I've used it in the past to create dangling type effects in motion graphics spots, but I'm sure you can come up with some more amazing uses.
There are currently no FAQs about CINEMA 4D Essentials 9: Particles and Dynamics.