Start a hosting plan from $3.92/mo and get a free year on Tuts+ (normally $180)
Thanks to Cinema 4D version R12, which just released before the brand new R13. We are able to rig and drive a car quickly and easily. In this tutorial, you'll learn how to model a simple car, then you're going to have two options to play with using your rigged car. Either steering it as you wish, or smashing it through a wall with an added slow motion effect. All achieved right here in the Cinema 4D.
Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. This tutorial was first published in October of 2011.
Final Effect Preview
To start. create a "Cube", and then by using the "Extrude Tool", create the shape shown.
Next select the rear top surface and extrude it using "Extrude Inner", then extrude the surface inwards as shown below.
Extrude the front top part and using the "Edge Tool" manipulate it into a windshield shape.
Extrude the front part out as well, to create a hood.
Now select the "Edge Tool" and then use the "cmd+A" (ctrl+A) key combination to select all the edges. Now "Right Click" on the object and select the "Knife" Tool.
In the "Attributes" menu, select the "Loop" mode and then cut two new loops into the surface for the head lights (imitate the example shown.)
Select the rectangle areas, extrude inner, then extrude normally (as shown.)
By following these simple modeling techniques, shape your own car. Since it may take too many steps to shape the car little by little and the actual intent of this tutorial is not modeling a car, I'll skip this part and leave it to your own talent.
Also create a wheel for your car by using simple shapes, and techniques we went through on the previous steps. Here's what I got.
Now the important part is coming. We'll be attaching the wheels to the body, so go to Simulation > Dynamics > Connector.
Now select that connector and the tire on the object tree, then follow the menus shown in the following picture. Through this command you'll be positioning both wheels and the connector at the same middle point. Trying to do this manually may cause problems with circular motion, since you might not find the exact center of the wheel.
Now again select the connector and the wheel, then using the "Cmd + A" (ctrl+A) key combination, package them together in a "Group" object. And thus you won't spoil the positioned objects while moving them.
Position the wheel as you wish, then select the "Connector" object. Under "Attributes", you'll see "Object A" and "Object B" sections. First assign the Body of the car to "Object A", and then the wheel to "Object B". That's important, if you do it the other way around it may lead to problems. After the assignment part, choose "Wheel Suspension" as the "Type".
Now select both the body and the tire, and add a "Dynamics Body" tag.
Now just copy the wheel three times and position them as shown. Since you set everything beforehand, you don't need to set everything up again for each one.
Create a new "Floor" object and assign a "Dynamics Body" tag to it as well.
If you hit the Play button, your car will probably fall onto the ground as if there is no suspension. To adjust the problem, select all the "Connector" objects and set the "Suspension Stiffness" to something around 10. Also by playing with the other suspension options, you can get what you want. But don't touch the steering angle, we'll cover it later.
Now our car is ready to get a motor. So, create a motor object (Simulation>Dynamics>Motor) and then duplicate it.
Select one of them. And again as we did on the "Connector", assign the car body to "Object A" and one of the wheels (which you would like to accelerate) to "Object B". Apply the same to the other motor, this time use another of course.
When you click on the play button, you empower the motor. It will be turning, but the car won't accelerate as it should and will look like it's sliding on oil. That's simple physics. Due to the lack of proper friction it can't catch the ground. So, simply by increasing the friction this problem will be solved. Select all the "Dynamics Body" tags and under the "Collision" tab, increase the friction to 150%.
Now select both of the Motor objects and under the "Object" tab, set any value you wish for the "Torque" section to determine the speed of the car.
If you wish to drive your car straight, it might not be possible (even though your wheels stay straight). I suppose this is due to the random nature of the Dynamics. So, to solve this problem, here is a little trick. Select the "Dynamics Body" tag of the car's body object. And under the "Force" tab, there's a section called "Follow Rotation". If you set that to approximately 10, your car will be fine and should go straight.
Another important and useful feature is steering, of course. To steer our wheels we are going to use the Connector Objects we assigned to the front wheels. Choose those Connector objects and under the "Object" tab, you'll see the "Steering Angle" section. If you change it at the beginning your car will fail and the wheels will move oddly.
Now switch to the "Animation" layout. Again choose those front Connectors and while the "Steering Angle" is set to a value of 0, add a keyframe by keeping the "Cmd" (ctrl) key on your keyboard pressed. Click on the little rounded square icon near the "Steering Angle" section as shown below.
Now slide the green time indicator needle to the right until you find the frame where your wheels will steer, and then add another keyframe. Still the value is 0.
Now select all those keyframes on the timeline, and set the selected keys to "Linear Interpolation" by clicking the button indicated in the picture below.
After a few frames add another keyframe, but this time change the value of the "Steering Angle" (do this before adding the keyframe!). The further away the keyframe is placed, the more time will pass for the wheels to turn. WARNING! - Reset the "Follow Rotation" value ,which we increased for car to go straight. Otherwise your car won't turn properly and will slide on the wheels instead.
Here's my final steering result!
Second Possible Result!
If you would rather smash your car through a wall with a slow motion effect, then keep reading
So far we covered the steering of car. Now we'll do something much more fun. Smashing a wall with a slow motion effect. Copy your project to another new scene or delete the keyframes you created.
Start with a cube object and check the "Fillet" option, make it a little rounded.
Create a new "Cloner" object by going to Mograph>Cloner, and set the correct settings to create a row of bricks horizontally that you're happy with.
Create another "Cloner" object and make the previous one a "Child" of the new one. This time align the bricks vertically. After you're done, select both of the "Cloner" objects and make them "Editable".
Now "Right Click" on the Group file which remained after making them editable, and select all it's "Children".
With all of them selected, assign a "Dynamics Body" tag to the Group. Thus you'll be assigning it to all of them.
Now position your wall a certain distance away, and set the best torque value for your car. Hit "Play" and the car will destroy the wall. However we're not done yet.
Switch to the "Animation" layout. Then by using the "cmd + D" (ctrl+D) key combination on your keyboard access the "General Dynamics" settings.
Here we'll use "Time scale" to create the slow motion effect. Now move the green needle to where you want to start slowing things down, then add a keyframe to the "Time Scale".
Go to the next frame, right near the keyframe we added. This time change the value of the "Time Scale" before adding the keyframe. Change the value to 10 (or anything you like) then add a keyframe.
Add your next keyframe where you want to stop the slow motion effect, don't change the value, leave it as you set it before.
Add the last keyframe on the right side of the previous one, but with a value of 100. Then select the two keyframes which were set to 10 and in between the outer two keyframes. Then set the selected keyframes to "Linear Interpolation" by clicking the icon shown in the image below. If you're now happy with the timing, you can manipulate the values and position of the keyframes to tweak things further.
Here my final slow motion result!