Creating movement with motors

A motor is a dynamic object that moves a rigid body with the linear or angular force.Think of it like a continuous power supply for your objects that will make themspin or move continuously until they hit another rigid body or collider.So what I have here is a really basic scene.I have got a plane object that's going to act as my floor.It's just a single large polygon and I have a torus object that I am callingleader, and I am calling it leader because we are actually going to make it alittle sort of bicycle, and this is going to be the front part of my bicycle.Eventually, we'll make another copy of this and that's going to be called follower.But it's just a basic torus object that I've fashioned to be a little bitthinner, and put it in location around this Tube object that's going tobecome our wheel, and I put a texture on there, so that we will be able to see it spinning.

So it's just a really basic striped shader.Then I have got the word Motor here up above it is an Extrude NURB. That's justgoing to sit there for now.Eventually, we'll parent it into the hierarchy.But for now it's just going to hang out.So what I want to do is I want to create a setup that is going to allow thiswheel to drive across the floor without any keyframes and it's going to takethis torus object along with it.So the first thing I need to do is to establish both of these objects as dynamicobjects, because the motor object that we are going to use needs to work withdynamic objects in order for it to function correctly.

So first thing I want to do is I'll select both the leader and the tube object.Now I am going to draw rectangle around those guys in the Object Manager, andI'm going to go to the Simulation menu to the Dynamic submenu and Create Rigid Body.I'm at time 0 right now.When I hit Play, something weird is going to happen.You see that they exploded away from each other.Now I'll rewind back to 0.The reason they exploded away from one another is because the dynamiccalculation does not see the inside of the hole of the torus.It only sees the outside of the hole of the torus.So it thinks that there is a tube inside a physical torus object, and it says, "Bam!Explode away from one another."So what we need to do is tell the Dynamic engine that this torus actually has a center.

So if we go to the Dynamics tag just for the leader,the actual torus object, and I go to the Collision property, let's raise thisup just a bit, I'm going to tell the Shape instead of being Automatic to be Moving Mesh.That's going to allow the dynamics engine to see the inside of that torus.So when I let go with that, it's now a moving mesh.If I rewind back to 0 and hit Play, you can see now they are both going to fall.Now they are falling through the plane.Just rewind back to 0 and select our Plane object and go to the Dynamics menu.So under Simulation > Dynamics we tell this to be a Collider.

Now when I hit Play, both of these objects are sitting there.Now you can see the wheel didn't fall because it's just sitting on the floor.The torus did fall.Next thing I need to do is to establish a relationship that locks thesetwo objects together.So I am going to use a connector object for that.We are going to start combining these objects to get the effect that we want.So the first step is to create a relationship between two rigid body objects.So we are going to use a connector to do that.So I'll rewind back to 0, and go to the Simulation menu, and go under theDynamic submenu and add a Connector.

Now the Connector type by default is a hinge object, and so let's switch to theMove tool and I am going to move this up on the Y axis.Now I want this hinge to be in an exact center of this tube.So what I am going to do is parent that connector object to the tube and thenI will go to the Coordinate properties and zero out its position all the way around.So you can see, X in 0 already 0.So I'll just change the Y value to be 0 and hit Enter.Now I know that the connector is exactly in the center.The next thing I want to do is I am going to zoom in on the connector object.

You can see that's two interlocking cylinders.That tells me that, it's going to rotate around the Z axis, which is perfect.I want to have my leader object here basically sit like it's sitting onthe axle of a wheel.So in the connector object, I'm going to establish a relationship between thetube, which is our tire, and the torus, which is our little frame element.So under the Connector Object Properties, there is an A position and a B position.The Type is set by default to Hinge, which is just what I want.So I'm going to put the tube,the actual tire element, into the A position and you see immediately I'll get aconnection between those guys.

Now I will put the leader object into the B position.Now you notice that it dropped down just a hair and then eventually it'sstarted to roll a bit.Let's rewind back to 0 now.So now that we have relationship that locks our two objects together.Now we can use a motor object to drive those objects across the floor.So let's go to the Simulation menu and we're going to add a Motor object, andthe Motor object, under the Object Properties, it has a Type pull-down.You can do Angular or Linear and Angular.

We are going to leave ours on Angular.What that's going to create is a rotational force.That rotational force is going to be based on the location of this object.This object basically needs to be put in the center of mask around which it'sgoing to create that angular force, because we want to put in the center of our wheel object.So let's take the Motor and parent it to the Tube and we are going to go to theCoordinate properties and 0 out its position, so it's right in the center of that tube.Under the Motor Object Properties, you will see there is an Object A and Object B, and the Object A is going to be the object that's going to get spin and theObject B is the object that resist that spin, which is going to cause our objectto move across the floor.

So we want to take the Tube and put it into the Object A column and then takethe leader and put it into the Object B column.Now rewind back to 0 and hit Play and watch what happens.Now I was really tempted to make a screeching car sound effect there, but I didn't do it.I am going to orbit around just a bit, and I'll back out just a ways and I amgoing to rewind back to 0 and let that thing play again and you watch it work its magic.So if I hit Play, this object now is behaving in a very realistic way, where thetire object is spinning and the floor is resisting that spin, creating movementof our object across the floor.

So now let's rewind back to 0 to get our objects back to their defaultpositions and let's create a little bicycle.We are going to make tour these guys and stick them together.I am going to hold down the Ctrl key and Ctrl+Drag a copy of this group andthat keeps the same relationship. It just makes two of these objects.I am going to take this front wheel now and move it on its local X axis.Just behind the front wheel object and I'll rename the second group and call it Back wheel.Now if I rewind and hit Play right here, you can see these guys behave very similarly.

Now I want to link them together.So what I am going to do is establish a relationship between the two frame elements.So these toruses is here for a reason.Those are going to become the frame that locks our two wheels together.So if I go to the Simulation menu and go to the Dynamic submenu and add aConnector object, I'm going to change the Connector Type to be from Hinge to Fixed.Now, Object A and B is going to be our leader and follower.Now under the Back wheel I still have my torus name leader, so I am going torename that and call it Follower.

That's how I know which ones in the front which ones in the back.So let's select the Connector object and I'm going to add the leader torus intothe Object A field and the Follower torus in the Object B field.Now you see that there is a connection between those two, but you notice alsothat the Connector object has established a blue line showing me that, but what Iwant to do is move that guy up so that it's right in line.Really what I want it to do is I want it to be exactly in the same position as the leader.

So I am going to take the Connector and make it a child of the leader object,and then go to Coordinate properties and zero out its position.That way this line stays level.That shows me where the fixed relationship is.Now when I rewind and hit Play, our bicycle here is going to speed off into the distance.I am going to make the floor just a little bit smallerso our bicycle goes off at the end of the world.I think it's going to be kind of fun to watch.Although in real life that is not fun, but here in Cinema 4D we can have all kinds of fun.So let's take the floor.I am going to use the Scale tool, T on the keyboard, and scale it down just a bit.

Then I'm going to go to the Play menu. I am going to rewind and then hit Play.So you can see our bicycle gradually picks up speed, went to the edge of theplatform and then gravity took over, and it went off the edge of the platform ina very realistic way.Now if I want the word Motor to travel with it, I am going to take the wordMotor and parent it right to the leader object, and this time when I rewind andhit Play, you'll see that the whole thing travels right together.

The Motor object can be used to create rotational values.It can also be used just do a straight push on an object as well and it has alot of versatility for creating a wide variety of moving objects.

Resume Transcript Auto-Scroll

Author

Released

12/15/2010

CINEMA 4D R12 Essential Training with Rob Garrott introduces artists to the CINEMA 4D workflow, using CINEMA 4D as an important part of a toolset that includes Adobe After Effects, Photoshop, and Illustrator. The course explains the key foundational concepts, such as polygons, textures, and rays, that are crucial to understanding exactly how this 3D application functions. It also includes practical techniques for creating, selecting, and transforming objects, working with splines, polygonal modeling, and adding materials, lighting, and camera views for a fully realized 3D image. Exercise files are included with the course.