[Tutorials] Car Rigging XSI.pdf
(
1695 KB
)
Pobierz
Q
&
A
Q&A |
Rigging a car
SOLUTIONS / FIXES / ADVICE
●
In reality, a car – even a toy car – does not
simply move forwards: it also rocks up and
down on its suspension as it travels over
bumps in the road. In
XSI
, a simple primitive
rig can be used to simulate this motion
QU
ES
TIO
N O
F
T
HE
MO
NTH
S
ubmitte
d by
D
avid B
urns,
via
email
SOFTIMAGE | XSI
“How do you set up a model
car for realistic animation?”
This issue’s answer is supplied by Ola Madsen, who works
as 3D artist for Digital Context in Sweden, animating
everything from medical treatments to children’s toys
“B
eneath the technical wizardry, the way in which
perfectly fl at, the components of the car fail to react to this vertical
motion, adding metaphorical as well as literal bumps to the workfl ow.
But instead of going through the lengthy process of animating
these different parts manually, we can make use of XSI’s dynamics
engine. By adding Rigid Body Dynamics (RBD) to the animation rig,
we can recreate the same essential behaviour as a real car.
FAC TFILE
FOR
Softimage | XSI
DIFFICULTY
Elementary to
Intermediate
TIME TAKEN
One hour
ON THE CD
• Full-size
screenshots
• Start and fi nished
XSI scene fi les
ALSO REQUIRED
N/A
a car works is fundamentally very simple.
Energy generated by the engine is transferred
to the wheels, which in turn, forces them to
rotate. Due to the friction between the tyres and the ground, this
rotation then drives the entire car forwards.
However, when rigging a model of a car for animation, 3D artists
traditionally approach the problem the other way around. It would
be far too complicated to derive the motion of the entire car from
the rotation of the wheels; instead, hierarchies and/or constraints
are used for the overall motion, while expressions are used to make
the wheels rotate accordingly. But while this approach gets the job
done, it isn’t particularly intuitive. If the road surface is anything but
MAKING MOTORS
In this tutorial, we’ll be illustrating this technique on the toy car
above. Working with simplifi ed geometry enables you to interact
intuitively with the components of the scene without losing the
accuracy of the simulation, so we’ll be using an animation rig made
up of simple primitives to simulate the workings of its suspension.
Creating a separate primitive rig eliminates any uncalled-for
calculation and enables you to adjust elements such as the body or
wheels later in production, more or less on the fl y. In this way, one
underlying rig can be used for many different cars.”
068 | 3D WORLD
3D WORLD September 2005
TDW68.qa_lead 068
29/6/05 12:48:59 pm
Rigging a car
| Q&A
STAGE ONE |
Creating the basic rig
If you don’t have a virtual car of your own, start by
opening car.scn from this issue’s CD. While the scene
may appear to be empty at fi rst, opening an Explorer
view shows that it contains all the essential components of a
toy car, although they’re currently hidden. We’ll get to these
later in the tutorial, so just leave them as they are for now.
The fi rst component to create for the rig is the
chassis or the stand-in for the body. As the exact
shape of this object will be irrelevant to the
eventual animation, there’s no reason to use anything fancier
than standard primitives. So, from the Get > Primitive >
Polygon Mesh menu, choose Cube, leave the Length set to 8
and name it ‘rig_chassis’.
While the shape of the chassis might be accurate
enough, we still want its overall width and length
to match up with the high-resolution version of the
car. Scale the cube down to 0.5 on the Y axis and up to 1.7 on
the Z axis. Translate the cube upwards about 4 units along
the Y axis so the chassis is slightly above the supposed
ground plane.
01
02
03
Although we’ve simplifi ed the structure of the car
quite drastically, there’s really no reason for the
driving experience to become unpleasant as a result.
So with your driver’s comfort in mind, we’re going to add
suspension to the car. In order for this to function properly,
we’ll need to create two new objects for each wheel.
As these objects will be used merely to simulate the
suspension effect for the wheels, their actual shape
and size really won’t matter. So from the Primitive >
Polygon Mesh menu, create a new Cube and set the Length
to 1. In the Top viewport, position the Cube just to the right
of the chassis and roughly where the wheels are intended to
sit on the Z axis.
Next, in the Right viewport, move the Cube upwards
so it’s slightly below the top of the chassis. With the
cube still selected, press [Ctrl]+[Alt]+[D] to create a
duplicate and translate it downwards so it aligns with the
bottom of the chassis object. The added [Alt] key in the
shortcut ensures that the new copy stays at the same
position as its original, as opposed to just using [Ctrl]+[D].
04
05
06
Select both suspension cubes, press [Ctrl]+[Alt]+[D]
again and move the duplicates back along the Z axis
to the rear of the car chassis (where the wheels will
be positioned). Next, select all four cubes and duplicate them.
Now, simply add a minus in front of the value in the X axis
transformation box (the SRT Text Box in the Transform panel)
to reposition them on the opposite side of the car.
From the Primitive > Polygon Mesh menu, create a
Cylinder and set the Radius to 2 and the Height to
1.5. While the level of subdivision won’t make any
difference to the accuracy of the simulation (since we won’t
be using the actual geometry for the calculation), it will give
a better visual appearance. So, increase the U Subdivisions to
15 or so and name it ‘rig_wheel’.
Rotate the wheel 90 degrees along the Z axis and
align it to any of the lower suspension cubes. Next,
create three duplicates and align one at each of the
remaining suspension cubes. Go over the scene and make
sure none of the objects are interpenetrating, as this will
create very unpredictable results if we’re to simulate
collisions for them.
07
08
09
September 2005 3D WORLD
3D WORLD | 069
TDW68.qa_lead 069
29/6/05 12:49:07 pm
Q&A |
Rigging a car
STAGE TWO |
Activating RBD for the rig
It’s important to recognise some of the differences
involved when animating with RBD compared to a
more traditional line of attack. When using RBD, all
the objects are being calculated in global space rather than
local. As a result, all objects in the rig should be located
directly under the scene root (or at least on the same level)
and not be relying on standard hierarchies or joint relations.
With the components of our rig completed, it’s time
to start adding their respective RBD properties. So,
press [4] to switch to the Simulate panel. The fi rst
thing we’ll need to do is to turn all the objects into active
rigid body objects. To do so, select all the objects (there
should be 13 in total) and from the Simulate > Create > Rigid
Body menu choose Active Rigid Body.
As you won’t be using any actual collisions on our
objects (apart from our wheels, which we’ll come to
in a moment) you may as well turn off their
activeness. So in the Rigid Body Properties Editor, change the
Collision Activeness to Muted and make sure the Collision
type is set to Bounding Box. You can leave the other
parameters as they are, for now.
10
11
12
STAGE THREE |
Rigid Constraints
To stick the different bits and pieces together we’ll
need to use Rigid Constraints rather than one of the
usual Constraints. Since all the objects in the rig
naturally should stick together in the end, we’ll need to use
three different types of constraints in order for the
components to work in the preferred manner.
The only parts we really want to stick to the chassis
are the upper suspension cubes. Start by selecting
one of them and from the Create > Rigid Body >
Rigid Constraint menu, choose Fixed. Pick the chassis object
and leave the parameters in the PPG as they are. Repeat for
the other three upper suspension cubes.
To create the suspension effect, select one of the
upper suspension cubes and from the Create > Rigid
Body > Rigid Constraint menu and choose Slider.
Pick the lower cube related to the one you’ve got selected.
We’ll edit the parameters for all the sliders at once, so leave
them for now. Repeat for the three remaining pairs of cubes.
13
14
15
STAGE FOUR |
Creating the suspension
Select all four Slider Constraint objects and press
[Enter] to display their PPG. The Spring (Kp)
parameter determines how fast each linkage will
contract. However, we want the very opposite effect to take
place, so to make it expand instead we’ll need to use negative
values. Enter about -150 as the Spring (Kp).
The default dampening effect is a bit too low, so
increase the Dampening (Kd) to about 40. The Rest
Length (R) is the Sliders’ preferred length and
should be set to about -2.5. Which values to use for the
different parameters is really a matter of taste, so ultimately
you should tweak them until they suit your specifi c needs.
Next, we’ll need to limit the minimum and maximum
length of each Slider, so switch to the Limits tab.
The Minimum Extension determines the minimum
length the Slider is allowed to reach during the simulation,
whereas Maximum Extension sets the maximum. Activate
both and set the Minimum to 1 and the Maximum to 2.5.
16
17
18
070 | 3D WORLD
3D WORLD September 2005
TDW68.qa_lead 070
29/6/05 12:49:18 pm
Rigging a car
| Q&A
STAGE FIVE |
Setting up the wheels
Select all four wheels, right click on the Selection
button in the Selection panel and choose Simulation
Properties. Select the Rigid Body Properties in the
PPG and change the Collision Activeness to Active. As the
wheels are round, we also need to change the Collision type
to Bounding Sphere. And fi nally, increase the Friction to 1.
Select one of the wheel objects again and from the
Create > Rigid Body > Rigid Constraint menu, choose
Hinge and pick the corresponding lower suspension
cube. The Hinge Constraint limits the movement of the wheel
to revolving around a preferred axis, which is just what we’re
looking for. Repeat for the other three wheels.
Select the two rear Hinge Constraint objects and
press [Enter] to display their PPG. Switch to the
Motor tab and click the Motor Active checkbox. The
Maximum Velocity determines the rate of the rotation,
whereas the Torque determines the maximum amount of
force to be transferred. Set both the Velocity and the Torque
to around 800 or so.
19
20
21
STAGE SIX |
The road ahead
If at any time you need to reposition or reorient any
of the car rig’s components, it’s vital that you
remember to update their initial state. If you miss
this step, they’ll simply return to their previous initial state
as soon as you run the simulation. To set their new state,
select all the objects and from the Modify > Rigid Body menu,
choose Set Initial State.
22
Press [8] to open the Scene Explorer, select the
ground object and press [H] to unhide it. We don’t
want this object to be affected by any forces in the
scene, but we do want it to be included in the simulation.
From the Create > Rigid Body menu, choose Passive Rigid
Body. In the PPG, change the Collision type to Actual Shape
as we want the car to follow the actual shape of the ground.
The last thing we need to do is to add an actual
force to the scene, so from the Get > Force menu,
choose Gravity and you’re done. To get a more
accurate result, click the Explore button in the Select panel
and choose Environments. Expand the tree Environment >
Operators and pick the Dynamics Operator. In the PPG,
change the Sub steps under Simulation Accuracy to about 10.
Now unhide the high resolution version of the car body and
the wheel (of which you obviously will need another three
duplicates) and use a standard Constrain > Pose to constrain
them to their respective counterpart in the RBD rig. Note that
you should use cnscomp (constraint compensation) for the
body, due to the scaling of the chassis. Your toy car is now
rigged and ready for animation.
23
24
●
September 2005 3D WORLD
3D WORLD | 071
TDW68.qa_lead 071
29/6/05 12:49:30 pm
Plik z chomika:
p.pablo
Inne pliki z tego folderu:
(3D)(Softimage XSI)(eBook) building muscle.pdf
(325 KB)
(Ebook) - Softimage Xsi Final Gathering The Robot.pdf
(407 KB)
(eBook) - Softimage XSI waterfall.pdf
(167 KB)
(eBook) - XSI Optimizing Rendering.pdf
(564 KB)
(Softimage-Xsi) 3D Creature Workshop.pdf
(2979 KB)
Inne foldery tego chomika:
XSI Tutotiale
Zgłoś jeśli
naruszono regulamin