Cars_Animation_Tutorial.pdf

(867 KB) Pobierz
Cars Animated Automatically
BLENDER TUTORIAL
- Automated animation for cars -
Animating one car on a straight road is easy, but if you want to animate one or several cars
following a curve, with speed variations, and other refinements, you will need a method
allowing automatic steering and proportionnal speed for the wheels rotation.
This tutorial will show up how to make automated animations for cars.
Your car trajectory will be a nurbs curve ( Fig. 1-2 ).
A bezier curve could do the trick, but Nurbs curves are easier to manage with. I say a
trajectory instead of a path, because we will not use it as a real Path. Generally, a Path curve
has a speed Ipo, and plays the animation on a fixed number of frames. The method that I
want to show you, uses a more flexible way in my opinion.
Later, in your animation, you will need a car body. For now, it is not necessary, and you only
have to know that all car bodies you could model will be easily parented to the system that
we will build now.
You only need to model one wheel, and duplicate it four times. The front wheels will remain
free, and the rear wheels will be joined in one unique object.
It is important to put the center of each object exactly at the center of each mesh. So, each
front wheel will have it’s own center, and the rear wheels will have their center at half
distance between them.
The distance between the front and rear wheels is not too important right now, and it will be
adjustable later to the dimension of the car bodies that you will use.
You will need a Mesh that will be used as a Chassis to parent the wheels and the body. As
this object will not be rendered, you will set for it an unvisible material, or a bound box. You
could also use an empty or even a bone, but a flattened cube will be visually of a better help.
Blender tutorial written by Philippe ROUBAL. ©2006. www.3d-synthesis.com . Page 1 of 24.
 
25516046.006.png
BLENDER TUTORIAL
- Automated animation for cars -
Fig. 3 shows the wheels and the Chassis object. The Chassis will not be rendered, and will
only be used for parenting parts like the wheels and the body. It can also be seen as a place
holder for the body during the animation setup.
Fig. 3
Before parenting things, you will have to be sure that all the object have their axis oriented in
the same direction, so apply CTRL-A to all of them. This is very important if you don’t want
to fight with rebel objects later !
An other mesh will be necessary. This one will also be unvisible at rendering, but is very
important for the animation. This mesh, that we’ll call Arrow mesh, because of its shape, will
be the core of the animation ( Fig. 4 ).
You have to choose
a starting direction for your animation. In this example, I have choosen the X axis.
Blender tutorial written by Philippe ROUBAL. ©2006. www.3d-synthesis.com . Page 2 of 24.
25516046.007.png 25516046.008.png 25516046.001.png
BLENDER TUTORIAL
- Automated animation for cars -
For the Arrow mesh, you can start with a single plane that you will duplicate to get a small
square face centered at half distance of the rear wheels, an other one at half distance of the
front wheels.
These two groups of vertices are the references for the animation. We’ll see later what they
are exactly used for.
You can add several other groups of vertices, that will be used as helpers for the animation.
The front end of this mesh will be an arrow head shape, and you can add a tail made of
several square faces. the Arrow mesh is shown in green color on Fig. 4 .
As we might need to select the Arrow when the car body will be present, the head and the
tail of the Arrow mesh will be used to select easily the Arrow mesh when we’ll set up the
animation.
Now, we are going to add the curve, so add a Nurbs curve in top view, and draw the
trajectory of the car by adding as many dots as necessary.
In edit mode, select the first dot of the Nurbs curve, and by SHIFT-S, then Snap Cursor on
Selection. Make this location the center of the Curve Object. As Nurbs curve don’t extend
themselves until the extreme limits, you can add more dots close to the center of the Curve
object, to see the starting tip of the curve.
Your curve will have to be in straight line in the X direction (the direction choosen earlier),
in its starting part, in order to be able to set up correctly the rigging of the car parts ( Fig. 1-2 ).
The easiest way to start drawing the curve is to resize it by 0 in Y direction to get the straight
part, and once you have set the first dot on the left as the center of the curve object, you
extrude the curve from the right side by selecting the dot and using CTRL-LMB.
Be sure that your curve and your arrow have their axis in the same direction by applying
CTRL-A.
Now, we have to link the arrow to the trajectory. Select the Arrow Mesh, and add a Curve
Modifier. Name it Curve, as it is the default name for the curve you have added.
Don’t be afraid, the Arrow will turn of 90°, and its center will get out of the arrow mesh and
will be displaced on the center of the curve. It is normal.
Now, rotate the Arrow of 90° to match the Curve direction. If you select the arrow, and move
it along the Y axis by G-Y, you will see your Arrow moving and bending along the curve.
Apply CTRL-A to your Arrow mesh again.
At first glance, it might be surprising to see that you have to move the Arrow mesh along the
Y axis to start a displacement in X direction, but from now, you must understand and keep in
mind that the straight displacement of the Arrow center along the Y axis represents the
displacements of the Arrow mesh along the curved trajectory. This is very important, because
you will be able to drive your car with only One Ipo curve (Loc X,in this example), and make
speed variations as well with this only curve ( Fig. 6 ).
Blender tutorial written by Philippe ROUBAL. ©2006. www.3d-synthesis.com . Page 3 of 24.
BLENDER TUTORIAL
- Automated animation for cars -
You can also notice that in Edit mode, the Arrow mesh is rotated. This is because you have
rotated the Mesh in object mode. As in Edit mode the Curve modifier is not applied, the mesh
appears rotated. This has no importance, and will not be a problem when you will have to
edit the mesh later.
Now, open an Ipo window. Select the Arrow mesh, and insert a Loc Key at frame one. Go to
Frame 100, or any Frame number matching the animation time you want, and move the
Arrow center along the Y axis, until the arrow mesh reaches the end of the curve. Then, insert
an other Loc Key. As only the Loc Y Ipo is interesting, you can delete the Loc X and Loc Z
Ipos.
You can set the Y Loc Ipo to linear or Bezier as you want. For the first settings, a linear curve
in suitable.
Troubles ? If you have done something wrong, you might notice that the axis direction of
your Arrow mesh is different than the axis direction of the Curve, and the animation now
doesn’t follow the curve. Instead, the Arrow moves along Y direction. If this appens to you, it
can be easily corrected either by applying CTRL-A to your Arrow mesh. You may also need
to play in the Ipo window, by replacing the Loc Y curve by the Loc X curve, using the buffer
(Buttons with yellow arrows).
If you want to rotate the scene of 90°, you have to rotate only the Curve around its center,
and apply CTRL-A to it, and everything will work correctly. Any other angles are also
usable. This said, it is safer to keep the original direction, if you can.
Go back to Frame 1.
Now we have to take care of the rigging of the car parts themselves.
We will need 3 Empties. ( Fig. 7 ).
One is named
Empty Rear .
Blender tutorial written by Philippe ROUBAL. ©2006. www.3d-synthesis.com . Page 4 of 24.
 
25516046.002.png
BLENDER TUTORIAL
- Automated animation for cars -
It will be the rear tracking reference for the Chassis. This Empty will be Vertex Parented to a
square face of the Arrow mesh, placed exactly between the rear wheels. This Empty will be
the warranty that the trajectory will pass exactly in the middle of the rear wheels. This Empty
will be animatable later with a dLoc offset value, if you want to add a skid effect on the rear
wheels.
The second Empty is named Empty Front. It is Vertex Parented to a square face of the Arrow
mesh placed exactly between the two front wheels, in the same way you parented the Empty
Rear.
The Chassis mesh has its center placed exactly on the Empty Front and is parented to it. This
allows it to rotate around this Empty.
The chassis has a Track To constraint aiming the Empty named Empty Rear. ( Fig. 8 ).
As the car body will be parented to this Chassis object, the car body will always be right on
the trajectory.
The third Empty is named Empty Steering. This empty will be used to copy the Z rotation of
the Empty named Empty Front, and to tranfer this rotation to the Front Left wheel. Empty
Steering will be parented to the Chassis. As said, it has a Copy Rotation Constraint, copying
the Z rotation of Empty Front. ( Fig. 9 ).
Blender tutorial written by Philippe ROUBAL. ©2006. www.3d-synthesis.com . Page 5 of 24.
25516046.003.png 25516046.004.png 25516046.005.png
Zgłoś jeśli naruszono regulamin