3ds Max and Revit Interoperability - Part 16 - Animating Cars

Login to Follow
  • Design Visualization
  • 2015
  • Interoperability
  • 3ds Max
Skill Level
  • Intermediate
11 min

3ds Max and Revit Interoperability - Part 16 - Animating Cars

In this tutorial, you animate cars and buses using simple keyframing techniques and path constraints.


  • Recorded in: 3ds Max 2015
  • This tutorial is intended for use with 3ds Max version 2015 or higher.


00:00:06 --> 00:00:15
With a set of cars ready to be merged, open the museum file you worked on last. You can also use the file named Museum_cars.max

00:00:16 --> 00:00:24
Using Import > Merge, merge the mycars.max file you have just saved.

00:00:30 --> 00:00:36
Move the vehicles closer to the front of the museum building. This is the main intersection you will be rendering.

00:00:36 --> 00:00:45
There are many ways to animate vehicles. Short of using a traffic simulation plugin, the most common way is to constrain a car to a path.

00:00:45 --> 00:00:52
If the motion is simple such as going from point A to point B in a straight line, you can also keyframe the position.

00:00:52 --> 00:00:58
For example, let's say the bus is moving along this street before it stops at the red light.

00:00:59 --> 00:01:02
In fact, there is a bus stop at this corner hidden from view at this time.

00:01:03 --> 00:01:06
Before you animate the bus, consider your timeline.

00:01:07 --> 00:01:15
The animation length is set to 100 frames by default. That's about tree seconds using an NTSC signal of 30fps.

00:01:15 --> 00:01:19
You'll need to extend that to about 20 seconds or 600 frames.

00:01:20 --> 00:01:23
This is done in the Time Configuration dialog.

00:01:28 --> 00:01:32
Next, you animate the bus by moving it along its road lane.

00:01:32 --> 00:01:37
To animate the motion, ensure Auto Key mode is enabled.

00:01:38 --> 00:01:44
Go to frame 300 and then move the bus towards the intersection.

00:01:50 --> 00:01:55
Play the animation, the bus moves and stops at frame 300,

00:01:59 --> 00:02:02
and is immobile for the remainder of the animation.

00:02:03 --> 00:02:08
However, the motion of the bus seems to be accelerating in the beginning and decelerating at the end.

00:02:08 --> 00:02:12
Deceleration is good, as the bus is braking to a stop.

00:02:12 --> 00:02:18
However, given its starting position, we have to assume it's already moving at a constant speed.

00:02:18 --> 00:02:23
To adjust the speed and timing, right-click the selected bus and go to the Curve Editor.

00:02:24 --> 00:02:29
In this particular case, you are interested in the Y-axis, displaying the motion of the bus.

00:02:30 --> 00:02:35
Notice the curve, how it starts and ends in a shallow mode to become more pronounced in the middle.

00:02:36 --> 00:02:45
Select the first key (beginning of the animation) and adjust the tangent to get a linear speed at the beginning and a deceleration at the end.

00:02:46 --> 00:02:51
If you feel the bus is moving too slowly, then you can adjust the timing.

00:02:51 --> 00:03:01
If the bus needs a shorter time to reach its destination, then change the end key to finish earlier, somewhere between frames 200 or 250.

00:03:05 --> 00:03:10
Adjust the curves accordingly and exit the Curve Editor and Auto Key mode when done.

00:03:15 --> 00:03:17
Playback the animation.

00:03:23 --> 00:03:25
Go back to Frame 0 when done.

00:03:25 --> 00:03:33
As mentioned earlier, while keyframing works well in certain simple situations, it is common to constrain moving vehicles to paths.

00:03:33 --> 00:03:37
This is done by first drawing a path using the Line tool.

00:03:38 --> 00:03:44
Make sure it's set to Corner/Corner modes as a starting point. You can modify that later.

00:03:45 --> 00:03:50
Draw a line along this road lane. Hold Shift to use Ortho mode.

00:03:56 --> 00:04:04
Select one of the cars you imported and then use Animation > Constraints > Path Constraint and then click the line you drew.

00:04:04 --> 00:04:12
Two things happen: the car is relocated to the beginning of the path and is now animated to travel along the path.

00:04:12 --> 00:04:15
You still need to adjust it though.

00:04:17 --> 00:04:19
Zoom in on it and notice it's pointing the wrong way.

00:04:20 --> 00:04:30
In the Motion Panel, set it to "Follow" the path. If anything, it's even worse. You still need to set the travel axis correctly.

00:04:31 --> 00:04:33
Try all three,

00:04:36 --> 00:04:41
the Y-axis seems to work best but it needs to be flipped.

00:04:46 --> 00:04:48
Play the animation,

00:04:52 --> 00:04:55
the motion seems a little slow, even for a safe driver.

00:04:56 --> 00:05:03
There are a couple of things you can do: First, you can extend or shorten the path by moving its vertices.

00:05:11 --> 00:05:14
Second and most importantly, you can adjust the timing.

00:05:15 --> 00:05:18
With the car selected, go to the Curve Editor.

00:05:18 --> 00:05:24
Unlike earlier where you were dealing with position axes, here you are dealing with a "Percent" track.

00:05:25 --> 00:05:32
This track is effectively telling you that the car is at 0% of path travel at the beginning of the animation,

00:05:33 --> 00:05:38
and at 100% of path travel at the end of the animation at frame 600.

00:05:38 --> 00:05:44
In this case, you want the car to reach the intersection earlier, as you did with the bus.

00:05:44 --> 00:05:53
Select the second keyframe and change it from frame 600 to 200. The car is now reaching the intersection quite a bit earlier.

00:05:59 --> 00:06:06
However, two things remain: it's slightly overshooting the stop line and it's stopping abruptly.

00:06:07 --> 00:06:13
Past frame 200, the car is at the end of the path or 100% of path travel.

00:06:14 --> 00:06:23
At 100%, the car's front is overshooting the mark. Reduce the Percent value so that the car doesn't annoy pedestrians crossing the street.

00:06:23 --> 00:06:28
In my case, a value of 97% seems about right.

00:06:32 --> 00:06:38
Looking at the animation curve, it's obviously linear and there are no tangents to adjust speed.

00:06:38 --> 00:06:42
This is because the Percent track is set to a Linear Controller by default.

00:06:43 --> 00:06:52
You can change that by switching it to a Bezier Controller. This is done by first selecting the track, and then assigning a Controller with a right-click.

00:06:58 --> 00:07:02
This will let you adjust the curve and the speed of the vehicle.

00:07:02 --> 00:07:04
Test the animation.

00:07:16 --> 00:07:21
Let's try another, more complex one, with a path that turns a corner.

00:07:22 --> 00:07:26
Draw an L-shaped line using Shift for Ortho mode.

00:07:32 --> 00:07:42
In the Modify panel, use the Fillet command to round off the corner vertex.

00:07:46 --> 00:07:53
You can obviously use another car that you merged, but ultimately, you will need to duplicate a vehicle you have already animated.

00:07:54 --> 00:07:59
You can do that by selecting an animated car and press CTRL+V.

00:07:59 --> 00:08:04
Choose Instance and press OK, and then go to the Motion Panel.

00:08:05 --> 00:08:10
Currently, the duplicate follows the original, being constrained to the same path.

00:08:12 --> 00:08:16
In the Motion panel, click on Delete Path to remove that constraint.

00:08:17 --> 00:08:22
Use Add Path to relocate the duplicated car to the new path.

00:08:22 --> 00:08:25
Click Add path again to exit that mode.

00:08:25 --> 00:08:32
The car is now constrained to the new path but its speed needs adjusting. It needs to slow down for the right turn.

00:08:37 --> 00:08:46
Scrub the animation and take note of the path travel: The car reaches the intersection at about path %: 44

00:08:46 --> 00:08:51
This may be different on your system based on how you drew the line, take note of that value.

00:08:52 --> 00:08:56
The car should decelerate reaching this percentage of path travel.

00:08:56 --> 00:09:07
It should then move at a constant slow speed around the bend, until it reaches path %: 56 and then accelerate out of the corner.

00:09:12 --> 00:09:18
In the Curve Editor, use the Add Keys button to add two keyframes to that curve.

00:09:20 --> 00:09:30
Using Move Keys again, select the first added key, (the second on the curve) and set its value to 44, where the car reaches the intersection.

00:09:31 --> 00:09:39
Now select the second inserted key (the third on the curve) and set its value to 56 marking the car exiting the turn.

00:09:40 --> 00:09:46
Ultimately, you have to adjust the timing and the tangents until the animation feels right.

00:09:51 --> 00:09:56
If you have time, animate more cars and buses to your city environment.

00:10:02 --> 00:10:09
In the next movie, you'll use a version of the city with a few more animated vehicles and create animated cameras.
Posted By
  • 3ds Max
  • 2015
  • Interoperability
To post a comment please login or register
*Save $66 per month on Autodesk's Suggested Retail Price (SRP) when purchasing 1 year term 3ds Max or Maya subscription.