Transcripts
1. Intro: Hi and welcome to rigging vehicles with rigid body
physics in Blender. In this class, you're
going to learn how to turn static three
D vehicle models into believable physics
driven machines using Blenders
rigid body system. My name is Ken, and
I've been using and teaching Blender for
several years now, and I love sharing the
skills I've learned over time by publishing classes
and tutorials like this one. Now, in this class, we'll start with the foundations how rigid body physics
actually works. Then we'll build things up from there step by step with small, focused mini rigs, like a motorized wheel and a
working shock absorber. From there, we'll
combine everything into a fully rigged damper truck
complete with suspension, steering, and realistic motion. Now, you might be wondering,
who is this class for? This class is for
three D artists who want their car models
to move realistically, Blender users who are curious
about physics simulations, but are unsure where to start, or anyone interested
in mechanical rigs, vehicles or real world motion. You don't need any
rigging experience, a basic understanding
of blenders I. If you know your way around
Blender, you're good to go. By the end of this class, you'll be able to
do the following. You'll be able to
confidently use active and passive rigid bodies, understand how to control
your rigid bodies with rigid body
constraints, rig wheels, axles, steering systems,
and suspension, test the bug and polish a complete physics
driven vehicle rig. And all you need is Blender and some curiosity for
how things move. So if you've always
wanted to make your vehicle models drivable inside your Blender
three D scene, if you've always
wanted to be able to export that as an animation, then this is a class for
you. Let's get started.
2. Rigid Body Physics Overview: We are inside Blender, and as you can see, this is a brand new Blender
installation. This is the default
view that you should have on your
screen right now. So I'm just going to get rid of the light and the
default camera, and I'm going to use the default cube
because in this lesson, we want to have a
quick overview of the rigid body physics system. We just want to look around
and see what's there, just to familiarize
ourselves with the main concepts we
need to understand. So well we have
this cube selected, I want to make it flat. So I'm going to hit S
on the keyboard, S, and then Z to constrain it to the Z axis so that we're
resizing it only in the Z. And then I'm going to
hit S and then shift Z to scale it in all
axis except the Z axis. Shift Z, maybe up to that point. I'm going to shift A
and add a cube, G Z. Let me just place it up there. So now that we have
these two objects, we're ready to apply the
rigid body physics system to them and start understanding
what's happening. So let me start
by clicking this. And if we hover over
these properties area, we're going to see the
physics properties tab. So I'm going to
click that and we have different
physics systems here. I'm going to go to
the rigid body. So when I click this, now that applies this
rigid body to this plane. I'm going to do the
same for this cube. And because we're in
the physics properties, we can go to rigid body, and now both of them
are rigid bodies. Now, if I click the space bar, if I press the space bar, both of them fall off. And if I rotate, they're still falling off
because Blender has gravity. And the moment we play
the timeline down here, the objects fall off until
the end of the simulation. And so the big question is, how do we make things
stay where they are? How do we suspend
them in the air? If I select this flat ground, now let me call it the ground. If I select that and
go to the rigid body, I need to make it a
passive type of body. Now, that means or
that tells Blender, Hey, this particular object
here should not move. It should stay where it is. When I select this, we will
leave it as an active object. That tells Blender this object should be acted upon by physics. And so if I now play, it falls on this ground
that is not supposed to move because the type of this
rigid body is now passive. Do not move passive. Those are the two first
concepts you need to understand when you're
working with rigid bodies. If you want a ground, a landscape, a floor, a suspended platform that does not fall through
because of gravity, apply a passive
type of rigid body. And the other one that is going to have physics act on it, for example, Shift
D. Now we have two. If I select both of them JZ, and go back to the
first frame, play. Now, let me just push this GX. If I go back to the start
now because of physics, let me push this G Z. If I play. Because these
are active rigid bodies, physics will apply
or act on them. They will behave like
real physical objects. Now, those are just two concepts I wanted us to get
as we get started. In the next lesson, I want us to look at these options right here so we can
understand how they affect what we're
about to build. So I'll see you shortly.
3. Bounding Shapes: Eh, welcome back. So now, in this lesson, we want
to do a few things. Number one, we
want to understand some of these options here, but we're not going to look at all the various options available to the
rigid body system. We're only going to look
at the ones that are relevant to our
task in this class. So before we move further, we want to look at
this shape right here. These are now already
active rigid bodies. And if I select this and
duplicate it shift D, Z, and place it above there. Let me select this
and make it bigger. So a twice, maybe
a in the X axis. Because I want it slightly
bigger than this one. Now, if I rotate this, rotate it in the Y axis
so that it's slightly leaning or maybe rotate
further, just like that. Now I want to go back
to the very beginning, and then I want to have
those two selected. Then GZ, I want the animation
to start from here. I want them to fall on this GX. And if I play that Now, as you can see, they're
falling like boxes. Let's see that again. Yeah, they're
falling like boxes. Now, if I go here to
this shape option, let's say, I think this
is the one selected. Let me select this
one. We're now acting on the rigid body applied
to this one specifically. Now, if I go here and choose cylinder and go back here
to the very beginning, and let me rotate it. As you can see, first of all, when we applied the
cylinder shape to it, inside, if I switch to
this wireframe view, you notice we have
this cylinder. And this cylinder shape is what the rigid body system sees as the shape that's rotating when it's falling
off of this plane. So if we play that Blender and this
rigid body system sees the rotating object, the ghost that's rotating
as this cylinder. And so if we go back
here to the beginning and let me rotate this in the X 90 degrees so that the cylinder ghost is now positioned in a way
that it can rotate. Let's watch what happens now. As you can see, if I
go back to solid view, the cube is sinking. The mesh of the cube is sinking, but the ghost is what's actually
rotating on this shape. So that tells us it's
very important to choose the specific shape
you want for the body or the mesh you want to apply rigid body animations
to or simulations to because it might not behave as you expect it to if you
have the wrong shape. Now, I bring this up
because in this lesson, we're going to be creating
a simple spinning wheel. And if it's a wheel, we will have to choose a cylinder shape, but we're
going to get to that. Before we get to
that, let's have a look at the rest
of these shapes. So let me apply a
cone shape to this, let's look at what
it has inside. So if we go back to the
beginning, how will it behave? Pause it right there, and
let's switch back to solid. As you can see, it's sinking because Blender
sees the cone shape as the shape that
should be rotating. And so the mesh just sinks
through the platform. But now, if we
choose a box and go back to the beginning and
play, it doesn't sink. So let me just go back here
and GY, to put it aside. Then let's see them both. This is sinking, but
this is not sinking, as you can see,
because of the shape. That's very important.
These others, let me show you
surface responses. For example, bounciness. We can make objects bouncy, going back to the
very first frame. Let's play. I think we need
to make this bouncy, as well. So selecting this and
making it bouncy. Now, let's play it.
Both are bouncy. What About one. And this
one bounciness of one. Yes, as you can see, it's much more bouncy
than this other one. So as we continue
working on our tasks, we're going to interact with
some of these properties, and you're going to
learn what they do. So now, I think
this is a good spot to end this lesson because
I just wanted us to have a quick look at that
specific property because it's very important to what we're trying to achieve. With that, in the next lesson, let's now work on our
simple spinning wheel. I'll see you shortly.
4. A Spinning Wheel: I think we're ready to
start building our wheel. So now what I'm going to do is select these and
just delete them. Now we're left with
this flat surface. I want to shift A at a cylinder. I'll hit S to scale
it in the Z axis, hit Z, then 0.5, make it half the height. Now, GZ, I want to
put it up here. I'm going to control A
and apply all transforms. Then I'm going to
rightly said origin, place the origin in the
middle of the geometry. So right there. Now with
this cylinder selected, I want to apply a
rigid body to it, and it's an active body. This is going to be
our passive body. Remember, we already
made it a passive body. Now going to this active, but for this, we're
going to apply cylinder. Very important. And
we already saw why. But before we do anything else, I want to rotate it
along the X axis. R, in the X, you should rotate 90 degrees
to be upright like a wheel. Now, if I drag this
to the beginning, and hit play, nothing happens. It's just a wheel. And so we
played it, it's not playing. And the reason is
because we need a way to tell Blender, Hey, spin this cylinder in this
axis or along this axis, and at this speed because every wheel needs a way
to spin faster or slower. You need a way to
speed up or slow down. How do you do that? We use
what we call constraints. Constraints are the way you control your rigid
body in blender. So if you want to tell an object that has a rigid
body, apply to it, rotate like this
or move like this or scale up to double size. You use what we
call constraints. How do we apply a
constraint to this wheel? First of all, we
let's first of all, push it to the left
or to the right. GY, let me just place it
right there on the side. And I want to add a cube. In fact, let me just make
it very small, G, Z. Now, the reason I'm
adding this cube is because I want to add
the constraint between it and the wheel because what we're doing is
essentially applying a constraint between two
objects, two rigid bodies. How should this wheel behave
in relation to this cube? And how should this cube behave in relation
to this wheel? When we put a constraint
between them, or if we connect them
with a constraint, now the constraint can tell
the wheel how to behave. So because we have the two
of them, first of all, I want to apply the
transforms as usual. Always apply your transforms, Control A to the
cube, all transforms. And now the origin has
moved to the world origin. I want to right link
set origin to geometry. Now it's right there.
Our wheel is awesome. So now I'm going to select
the cube and also make it a rigid body and just
let me make it passive. I just don't want it to move, so it's going to remain there. And I'm going to
select the wheel. So both of them are selected, I'm going to go to object,
rigid body, connect. Now we've connected
the two of them. If I select this, this is the
constraint we've applied, and this is what it looks like. When I select it,
automatically this changes to rigid
body constraint. And the automatic type
selected here is fixed. But what we want is to move this wheel to
power this wheel. So if we look at
the drop down here, the best solution for us
is a motor constraint. So select motor. And now, what we need to
do is select angular. That enables the rotation now we're going
to have to rotate this in order for
the axis to be right because the wheel will
rotate in the X axis. When we enable this
angular motor right here, it applies to the X axis. If I hit play spacebar, as you can see, nothing happens. Now, let me rotate
this rotate in the Z 90 degrees negative or positive, it
doesn't really matter. Now let me play. As
you can see now, it's rotating because
this constraint has to be oriented in a way that this X axis is in line with the axis
that this should rotate in. Now, another thing
we need to do is let me go back here to
the very beginning, select the constraint. And if I switch to
the side to the front and out Z to
make it transparent, as you can see, the
constraint is not positioned at the
center of the wheel. If the wheel is to
spin accurately. We need this constraint
to be in the center because this spins in relation
to where this is position, where the constraint is. So I'm going to select
the constraint and then select the wheel last. So both of them are selected. Then go to object snap
selection to active. So snap this
selection to active. The last item you select in the three D
view port is the active. So selection to active. Now we put it smack in
the middle of the wheel. A Z to togal transparency. Now, if I hit play, now
the wheel is free to move. But the question is, how do I speed it up or slow it down? So what we do is go back to the constraint
because remember, we say the reason we want to add a constraint is because we
need a way to tell Blender, spin this object this
fast or slow down to this degree or scale up
this model to this size. So constraints are
what allow us to define the constraints,
the limits. So if I select this
and go back here, we can use this target
velocity as the acceleration. So let me just go
back here and play. If I move to the negative, it will start moving in
the opposite direction. As you can see, Alright, I want to make this
longer this timeline. So let me just add
one here to 12 50. And now, even though I've
added the frames to 12 50, it will still simulate up to
250. Let me just show you. Let me go to the positive
to push it forward. Now, as you can see,
it got to 250 and just froze because there is
no more simulation here. And to change that, what
we do is go to the I think sin rigid body world. Let's go to the cache and
simulation start and end. Let's add one here. So now the simulation
length is determined by these values here,
not these ones here. So now if I play this, it will continue simulating as long as this is
running up to here. Now, it's heading
in the opposite, and we have our rigid
body constraint here. Let me go to our
constraints and move with the negative let me
just start here again. Play. Let me just start at one. Play. Now, if I move
in the positive, it moves faster.
But very slowly. If you want this target
velocity to be more responsive, we can do that with this. So if I say ten here, maximum impulse, how
impulsive is this? So now, if I go
back here and play, if I go in the positive,
as you can see, it's moving faster, all right, slow down, very drastic. Play again. Now we're moving
in the opposite direction. If I change this
to the positive, let's start moving in
the positive direction. If I move too fast,
it starts skidding. As you can see, because
it's too slippery. And if we want to solve
that slipperiness, all we have to do is select the surface because
it's a rigid body, now let's go to the rigid
body settings it has. Then let's go to the
surface response. Let's increase the
friction to maybe 0.76. Let's also select
the wheel itself, and let's go to its surface
response and also 0.75. Now we've increased the
friction between the two. If I go back in here, zoom in, select the constraint. Let me start at
one and then play. If I accelerate quickly, now there is no more skidding. It just loses control, but there's no more skidding. Let's go. Slow down. Move in the opposite direction. Slow down. Move in the
positive direction. Slow down. If we reduce this to one, it becomes less responsive. As you can see, I need
to drag this very far in order for the
wheel to respond. As you can see, I'm already
at positive 17 and it still was moving backwards. Right now, if I switch
to negative 20, it's still moving towards
the positive side, and I'm at negative. If we increase this, Alright, let me just pause that. Slow down. As you can see,
it's very responsive. I'm showing you these
things because these are this is the constraint you will use to
control the vehicle. So understanding what's
happening is very crucial. So now that we have
a spinning wheel, I think we're ready
to move on to the next crucial part of a rigged car suspension,
shock absorbers. How do we create them?
Let's see how to do that in the next lesson.
See you shortly.
5. A Simple Shock Absorber: So now it's time to see how to create a simple shock absorber. So let me just place
that back there. Select this, Shift
D because all I want to do is create
a platform like that, and I'm just going to S
twice to scale it down, maybe up to that spot. While this is still selected, I'm going to change
this to active. This is what we're going to
apply the shock absorber to. And the shock absorber
is going to be in relation to the
ground, not the wheel. We're just looking
at an example. So while this is selected, I'll select the ground. Now we have those two. We want
to use another constraint. So let's go here, object,
rigid body, connect. And now we have a constraint
right here between them. As usual, the type
by default is fixed, but what we want is what
we call a generic spring. When we add it, we have
these different fields here. But the ones we want
to work with are the limits which have the
angular and linear fields. So if I collapse limits, the other one that
we want is springs, which has angular
and linear, as well. So limits and springs. Let's start with the limits. This is to limit what
side or what axis this platform or object can
rotate in or transform in. So because it's a spring, let me just go back to
selecting the constraint. For now, we don't want
it to rotate it we don't want it to wobble
in any direction. We don't want it to wobble
in the X axis, Y axis. We just want to limit it. So I'm going to check these three boxes and
then set that to zero. That says limit the rotation, the angular rotation of this object in the
X axis to zero, in the Y axis to zero and
in the Z axis to zero. It should not rotate
in any direction. Then linear, of course, is up and down.
We want to limit. We don't want it to
move to the left to the X or in the Y, but we want it to move in the Z. So we don't want to
limit it in the Z. Therefore, we're not
going to check that box. Now, let's go and
expand the springs. The springs section
has the same fields, but the field we're interested
in is because remember, here we're setting limits. Let's limit all these. But here we're setting
the springiness. So if we enable this, you're saying let it be springy
in this axis, the Z axis. Stiffness, how
stiff should it be? Let's give it maybe 150. Let's give this damping one, and I'll show you
what that does. And down here in
the linear section, let's also enable the Z axis. Let's say maybe
150 could also be 160 doesn't really
matter. I'll give it 151. So now, if I play,
as you can see, it's suspended in the air, and it's bouncing around. Now, damping means
if I play again, let's first of all, make it
less constrained, less stiff. Let's just give it a stiffness
of 50 if I play it again. As you can see, it's springy and the springiness dies
down slowly with time. So damping means how much should this object continue
springing afterwards? Right now, it's
still continuing. If we increase this
number to ten, it stops springing very soon, as you can see, let me just
change this to ten as well. Now, let's play that. As you can see, it doesn't
continue springing. If we make this maybe two and the two, let's
see what happens. Yeah. So now, let
me pick this wheel. Let's go back to the
beginning, G, Z, and place it here in the air, and just play and see
what will happen. And we have ourselves
a shock absorber. Once again, So this is the
same principle we're going to apply to our vehicle rig in order for the vehicle to act
like it has shock absorbers. And when it interacts
with other objects, it's going to spring like that. When you hit bumps, it's going to be able
to spring like that. So I think this is a safe
spot to end this lesson. We've seen how to make
a nice shock absorber. Now, I think we're
ready to start creating our actual
collision shapes, the ones we're going
to use as our rig.
6. Prepare the Model: Eh, welcome back. So now we're ready to start working
on the actual rig. And as you can see, I have
this sample damper track here, and I want to use this as
an example to show you how to organize your vehicle model. So as you can see right
here in my outliner, I have a collection
called Damper Truck. So the entire model
here is a collection, but it's a collection of all
these different objects. So it's a collection
called Damper Track. And in the collection, we have just two things. We have two collections, wheels and the chassis. So now, if I hide the
chassis, we have wheels. We have let me just
expand the wheels. We have wheels rear, of course, here,
and wheels front. Now, if I expand the wheels
rear, as you can see, we have left wheels rear, left, wheels rear, right. Now, if I hide L, as you can see, hide right. Let me collapse the wheels rear, expand front, left, right. Collapse the wheels,
expand the chassis, and let me just make it
visible. Hide the wheels. Now, the wheels are hidden. Let me just toggle them. So they're hidden.
This is what we call the chassis in the rigging
system we're creating. We just want to have
this entire thing as one whole collection. Of course, mine is several
different objects, but you can model yours to
be just one whole object. Or if you have several
objects, side mirrors, seats, windscreens, you
can put them all in one collection and just
call them the Chassis. As you can see, right
here on my Chassis, we have the damp frame. I just called this
the damp frame. Let me hide it. We
have the cockpit. And we have the tipping bed because this is a damper truck. So I just gave them those names, but we will not use
them individually because they all
count as the Chassis, and that's all that counts. We will use only these
to create our rig. Now, another thing
we need to keep in mind is applying transforms. You will notice if
I click any object, the origin is at its center. So no matter what I click, its origin is at its center. And that's very important. So the way to do
that is simply to switch to any orthographic
view, maybe that view, select all the objects, go to object, set
origin to geometry. That will put each object's
origin at its center. And that's very
important because when the car is moving around
in the three D viewport, it's going to be
moving around based on its origin in relation
to the world origin. So the relationship between
the world origin and the origin of this
object will make it behave accurately
in the three D world. So that's why we have
to make sure once again every object has its
origin at its center. Let me just hit the forward
slash to zoom in on that. This is what it means to have
the origin at the center. Forward slash again to
move out of isolation. So I think now we're ready to
move on to the next lesson. Let's now start creating the collision shapes that
will define our rig. So I'll see you shortly.
7. Collision Shapes Setup: Ah, welcome back.
It's time for us to create the collision shapes. In other words,
the rigid bodies. They're also called collision
shapes because they're the ones colliding in
the physics world. One thing I need to mention
about the way I model vehicles is if I switch
to the side view, I always make sure
my wheels are placed symmetrically in relation to the origin to the world origin. That makes it very
easy for me to mirror my wheels
in the four spots. I shared a time
lapse video of me modeling this
showing you exactly how I was able to place those wheels
symmetrically, equally. And what that
allows us to do is, let me just start here. Shift A, let's place
a cylinder here. And, of course, as usual
SZ 0.5 to reduce the size. And while it's still
there, I'm going to apply a rigid body
and make it active. Then I'm going to change
this to a cylinder. Control A, apply all transforms. Set origin to geometry, rotating the Y 90 degrees. Then while it's still selected, I'm going to shift select
the rim here of the wheel, go to object snap
selection to active, snap this selection to
active to the last selected. So it's going to place
it smack in the middle. Now I can click away
then click this S twice to scale it down
to maybe that spot. SX may be up to that spot
because I want it to be the ghost of our wheel because this
is the collision shape. This is what the physics
is going to be acting on. It's not going to be acting
on the actual tires. We're going to parent the
tires to the collision shapes. And so what the collision
shapes do, the tires do. So that's why we want to make
sure the collision shape is almost the same exact
size as one of the wheels. So now the reason I was
saying it's important to make this symmetrical is because if I go to the modifiers and add a mirror modifier, apply to the Y and X and Control A to
apply all transforms. That's just to return the
origin to the center. Apply all transforms. Now, that just mirrors this collision shape
across the four axis. If I disable this,
as you can see, it's only mirrored it across. Don't worry about this.
I'll tell you what this is. But now it's mirrored it across. And if I add the Y axis, this is the Y axis. We're going to mirror
these across to the front. So why. Because these tires or wheels
were modeled, symmetrical. As you can see, I'm able to
mirror them very easily. So when you're modeling, always remember to make your
wheels symmetrical. Base your vehicle on where
the wheels are placed. So now, this here is actually
the physics rigid body. And there are actually
four rigid bodies, one for each of these. So now, what I want
to do, first of all, is apply this modifier, go back to modifiers and apply that then I'll switch to edit mode while they are still selected because
now they're one object. Tab. While all of
them are selected, I'm going to right
link one of them and go to separate by loose parts. Now each of them is its
own individual object. Previously, they
were one object. So now if I tab out, I can select this or this. Now, the reason we have all
their collision shapes over there is because their origins
are in the world origin. So I need to right leak here, set origin to geometry. Now you see that
brings that there. Select this, right
leak to geometry. Select this right leak to
geometry, and finally there. So now, I'll just pick this one. Enter into tab mode, select O, say a, rotate in
the Y, 90 degrees. Tab out of edit mode, rotate in the Y again now, and now we've gotten rid
of that confusion there. Let me just select this as well. Enter into Edit mode with tab eight select all
the vertices and faces. Then rotate in the Y 90 degrees. Then tab to object mode, rotate in the Y 90 degrees. Do the same for this. Edit mode, eight, select all faces. RY 90 degrees. At this moment, I'm going to hide the truck
because we don't need it. We just wanted it to know
exactly where the wheels are. Right now, we're not going to need it for quite some time. We're going to show it later. So right now, the next
thing I want to do is, right before we
hide it completely, I want to add a cube. Switch to the side view, GZ. I want to create a sort of platform or frame SY, GY. G Z. I want to place
it right there. So I want to have a platform
that represents the Chassis, and that's what's going
to represent the Chassis. So now, let me
just push it down. GZ SX JZ. So now, this is going to
represent the Chassis when we hide it like that.
We just want those. Now, this is not yet
a physics object. So let's go to physics
and make it a rigid body, and it should also be active. Let's give it a mesh shape. That just means the
collision shape should be exactly the way
the mesh is shaped. So with that, let's now
add some shock absorbers. To the rear wheels
because in this lesson, we're working on rear wheels. Or I think this lesson
has now become too long. I think we should not make
this lesson too long. We just finished preparing
the collision shapes. In the next lesson,
let's now add suspension or shock
absorbers to the rear axle. I'll see you shortly.
8. Rigging the Rear Axle: Welcome back. So now
it's time to add suspension or shock
absorbers to our rear axle. So how do we add
shock absorbers? We already saw that. We use
a generic spring constraint. So we're going to select the chassis and the
wheel, one of the wheels. Then I'm going to go to
object, rigid body, connect. So now we have a constraint. Let me just shrink it down. And now, remember,
we want it to be smack in the middle of the wheel in order for the wheel
to rotate naturally. So while it's still selected, I'll hold down Shift and
select the wheel itself, go to object, snap to active. So now, it's in the
middle of the wheel. If I switch the side with
three on the num pad, it's in the middle. I'm going to do the same
for this other wheel, select the body or chassis, then this other wheel,
object, rigid body connect. And there we have
our constraints, select it, shrink it down. While it's still selected,
hold down shift, select that object
snap to active. Now, I want to
switch to three so I can size these properly. I like using orthographic
view like this S, and now I can just align them, but I like offsetting
one of them to make it easy for me to select
them from this view. So now we have our two
constraints, but of course, remember, by default, if
I select this constraint, the type here is fixed. We want to change that
to generic spring. For the angular limits, we want to limit its rotation
in the Y and Z axis, but we want it to
rotate in the X. Remember, if I switch to
the front and then rotate, it's a best practice to make your cars oriented in the Y axis heading
in this direction. And so the wheel should be
rotating around the X axis. It should be spinning
along the X axis. And that's why our constraint
here has this X axis. So we don't want to
limit that rotation. We want to allow the rotation, so we should not check
this limitation, but we want to limit the
Y and X axis and Z axis. Now, when it comes to
the linear movement, we want to allow up
and down movement. So that's the Z axis. We want to limit
these other two. To zero. We can just leave the
other one like that. Let's go down to springs. How springy do we want it to be? Let's go and set this to maybe
100 and set this to one. Let's go down here to the
linear 100 and set this as one. So if I hit play, wait, we don't have a platform. So let me just go back to the
beginning here and shift A. Let's add a plane.
Let's just size it. I'll hit S then ten to
scale it ten times. Then while it's still selected, I'll go to rigid body and make it the passive object here. So now, it's going to remain
suspended in the air if I hit play, there we go. So now, going back here, let's now switch to this other constraint because
let me just play this. As you can see, it's
suspended here on this side. Let me apply a spring
on this other one. So selecting this, I'll change
this to generic spring. As usual, we don't want
to limit it in the X, but limit it in the zero. We want to limit
these two to zero. And down here, we want to
allow it to move a little bit. Just like that. Now, if we start
again, as you can see, the rear axle is now springy. Let's start again.
Let me hide these to one. And play this. All right. So let's
do the same for these the front axles, but this is not the way we're
going to implement them. I just want the front wheels to not be left without
any suspension, but we're going to
undo all that later. So selecting this,
then the wheel. Let's add a connection there. Make it smaller.
While it's selected, select that. Snap to active. Select this, hold down
shift, select that. Connect. Select the constraint, select the wheel,
snap to active, then select the constraints,
make it smaller. Switch to three. I think they're good. All right. So while this is selected, change to generic
spring. Limit these two. Limit these two. And let's go here 100, one, 101. Finally, let's go here. Let's limit these two. We should also limit these 100, one, 101 enable. Let me just confirm this
one is properly set. Alright, so now if we play that All right. There we go. So now, don't worry about
the wobbliness. We're going to sort that out, but at least right now we have both the front and
rear axles working. Now, let's increase the
stiffness a little bit. Let's make it 300 to reduce
the springiness, 300. Let's also do the same for this. 300, 300, 300 and here 300. I think I forgot
one here. Is gonia. Yeah. There we go. If I select this and
rotate it slightly in the X and then play a
game from the start. Let's play again. Don't
worry about that. We're going to sort
it out. I think this is a nice place
to end this lesson. In the next lesson, let's
now start working on the front axle because it's
going to be different. Remember, we have to
account not just for the suspension and the
spinning of the wheel, but also the steering. How do we account for that? Let's see how to do that in the next lesson.
See you shortly.
9. Front Wheel Steering Discs: Now it's time to work on the front axle and
the steering system. Now, we already have
spinning front wheels, so that's not a problem. That's actually a good thing. Now, I want to zoom in on this front left
wheel right here. Currently, the wheel can only
rotate along the X axis. But we want it to
also rotate along this axis so that it's able
to turn left and right. So it needs to rotate
along this up down axis. But these constraints only
rotate along the X axis. So that means we need to have a constraint that's
rotated in this manner. Rotate, Y, 90 degrees, let's say, negative 90 degrees. So we need the X up there, and that will mean the wheel
can rotate left and right. Let me just undo that.
That was just an example. So what we want to do is have a small disc right here in the inner side
of the front wheel. And the role that small wheel that small disc
is going to play is it's going to be the attachment of the
wheel to the chassis. We're going to attach
the chassis to that small disc and then attach the wheel
to that small disc. We can then add the
constraint I've described with the
X axis facing up, and that disc will be able
to move left and right, to rotate left and right. And when it rotates
left and right, that means the wheel
which is attached to it is also going to
rotate left and right. I hope you're
understanding that. So that's the mechanism
we want to create. I'm going to select
the wheel itself, Shift D, X to move
it in the X axis. And then I'm going to S twice
to just make it smaller. Switch the front Ss. Then let's say GX, I want to bring it closer
here, right there. So we have that small
disc of course, I'm going to mirror it to the other side. Let
me just do that. Mirror in the X, but now it's going to require me to do all those transform
apply transforms again. And I don't really want that. Alright, let's just do it. So let me just apply transforms, and now it's reflected
to this side. Let me apply that
mirror modifier. Then in here, I'm going
to hit tab right leak, separate by loose parts, then tab select this right
link origin to geometry. Tab to enter into Edit mode, rotating the Y 90 degrees, tab object mode, rotating
the Y 90 degrees. Same case applies to this
set origin to geometry, tab, rotating the Y 90, tab, rotate Y 90. All right, so we
have our two discs. And this disc actually, because we just
duplicated this wheel has all the rigid body
properties the wheel had. So we don't need to change
anything because it's already we want it to be
an active rigid body. But what we want to do is
actually select this Chassis, then select the disc. I call it the steering disc
object, rigid body, connect, and now we have a new constraint,
select the constraint, bring select that
disc snap to active, and now it's on the that. I'm going to select the
constraint, shrink it. I want to rotate it along the Y negative 90 to put
the X up here. Now that means apply
if we change this to a motor and apply
this angular motor, the rotation should happen
in a left to right design. But now, right now, if we try to move this, if we play, there's a problem. And that's because this
constraint is a motor constraint. We still need to have
because, remember, the chassis should be
attached to the disc, and then the wheel should
be attached to the disc. So if there is any suspension, it should be on the disc which
is attached to the body. So let me select the body or
the chasis, then the disc. Then we also need
to go to object. In fact, I can just pick this because we had already applied
this as generic spring. So what I can do is while it's selected
because I've selected it, go to its properties. And here we have the objects
that are assigned to it. As you can see, we have cube, which is this and the cylinder. So what I want to change is the cylinder it's assigned
to this cylinder. So pick this speaker and we're going to have
cylinder number four. So now, this constraint
belongs to this, not this. While it's selected, I'll select the disk object snap to active. Just like that. So now we have a constraint that acts
as the spring and we have another
constraint that allows the disc to rotate in a
left and right design. Now, I want to do the
same on this other side, but instead of repeating
what we just did, I'm just going to take
this and, of course, go back in here and
change this to this disc. Then while it's selected, and this is selected, I'll
go to Snap to active. So now, that's our suspension. Let's go ahead and take
this motor constraint, Shift D, X, and I'm going to select this object
snap to active. But now we don't
want it facing up. We want it facing down because they're going to
try to face each other. The two wheels are going
to try to face each other and that's not how
vehicles move. We want them to face opposite directions are
the same direction. So with this selected, I'm going to say rotate
along the Y 180 degrees. Now that just flips it upside
down and the X is below. So this is a generic spring, and this is a
steering constraint. Now, there's still a problem. Now, there's still a problem. My seat is sliding down. Now, there's still an
issue we need to sort out, and let me just show
it to you if I play. Yes, we have the suspension. It's right there. But can you guess what the problem
is with our car? All right. So if you guess
that it's missing the constraint
that's supposed to attach the wheel to the
disc, then you're right. So we need a way to attach
this wheel to the disc. So I'll just select the disk, then the wheel, go to object. Let's add a connection. Let's bring this
constraint, select that, then that, then snap active. Let me just shrink it. Just like that.
While it's selected, we're going to change
this to a generic. This time, it's not a spring
because the springiness or the shock absorber is right here on the chassis to the wheel, shock absorber, but
there should not be any springing between
the disc and the wheel. They should be
clutching one another and moving at the same time in the same direction without any of them sliding against
each other or springing. Like I said, we're
going to use a generic, and the difference
between a generic and a generic spring is that the generic does not
have any springing, but it has limits
because we want to limit The direction that the wheel can rotate in in
relation to the disc. So we do not want the
wheel to rotate in the Y direction
in this direction or in other words,
in this direction. So selecting this
constraint again, we do not want it rotating
in the Y or the Z axis. The Z axis is, of course, we don't want it rotating in this direction because it's going to be rotated by the disc. I should not rotate itself. When the disc rotates,
the wheel rotates. So selecting this
again, limited in that. But we want the
wheel to rotate in the X while it's
attached to the disc, rotate in the X, like the rear wheel. Now, there's a problem I introduced earlier that
I'm now going to mention. The disc itself should not rotate in the X because
it should always remain upright because its job is to just steer the vehicle. It's not supposed to
rotate, spin forward. Supposed to only
rotate left and right. But remember, this here
is its constraint, and I've allowed it
to spin in the X. That should not be, so I
should limit that to zero. So now the only thing
that's going to spin is the wheel along the X axis. Alright, now this
is still selected, the constraint of the wheel. And remember, this is just a generic we do not
want it to move up and down, left and right in any direction. Remember, this constraint
is in relation to the disc, so the wheel should
not move up and down forward and back left and right in
relation to the disc. Now, with that done, I'm going to select
that constraint, shift D X, and now take
it to the other side. Now, while it's still selected, I will go to the objects here, and as you can
see, it's attached to this disc and this disk. So I want to cancel those
two and say it should be attached to this wheel and that disc. So now, moment of truth. I don't know if
it's going to work. Fingers crossed. Let me just
cross check everything. The wheel is allowed
to rotate in the X. Now, I don't think we took care of this rotation here, motor. Cylinder four. I think
this is cylinder five. Yes, this should be cylinder
five from the Chassis. That's the steering constraint, this constraint, same as
this small one in here. So now let's go ahead and play
and see what shall happen. So now, these are falling. Why? Oh, we did not limit this. Yes, we said limit, but we did not set them to zero. Let me put that at
zero. Let's see. Yeah, so let's also
set this other side. We forgot to set these to
zero because we do not want them to rotate
in the Y axis. So the limit should be zero. In other words, when
you hover over this, it says limit rotation
around Y axis 20. So it should not rotate
along the y axis. Right now, it just
fell along the y axis. It tipped over. I
should not do that. So now let's play
that. There we go. So now if I select the
steering constraint, this constraint, let
me give this ten. And if I plate, as you can see, we're
able to turn it. But there is a problem. I think we have an issue here.
10. Testing the Rig: If I play, as you can see, we're able to turn it. But there is a problem. I think we have an issue here. I think I know what
the problem might be. Now, if we get closer
to the front steering, let's do a quick recap
right now to understand our setup and then solve this problem because let me
just play this once again. If you followed me closely
from the beginning up to now, then you have this problem where the wheel is turning
independently of the disc. So let me just play that again. And let me just rotate
this slightly in the X like that to push
the vehicle forward. So if we let it go, as you can see, the disc and
the wheel are not aligned. So in fact, the disc
is remaining straight, facing forward, the two discs. And these discs are the ones responsible for steering
because as they turn, they should turn the wheel
that's attached to them. So going back here, let's now get closer to this and let me show you
what the problem is. So remember, this is our suspension or
our shock absorber, as well as our steering
because it's on the Z axis, Z axis that we tell this disc
to rotate left and right. And what powers that rotation is this other
constraint right here. It's the motor constraint. Remember, the motor constraint
just spins a cylinder. It causes a cylinder
to spin because the cylinder has no way
to know when to spin. You have to use this motor cylinder to give it power, the
target velocity. So to power the wheel, power the steering, we
have this constraint. And when we apply a positive
value, it turns right. When we apply a negative
value, it turns left. But the constraint
responsible for limiting how far we can
rotate left and right, is this constraint right here that has the
shock absorber. That has the limits. In short, we're looking for the limits. The limits we set, first of all, we cannot rotate in the
X in the Y or in the Z. So this disc should
not rotate in the X, rotate in the X. So in the X, it should not rotate. So that's why it's zero. Let me just select it zero. It should not rotate in the Y, but it should rotate in the
Z because we want it to be able to rotate left
and right like that. And when it rotates in the Z, because the wheel
is attached to it, it should also now rotate. So let's go back here. And the problem lies here then because we've limited it to zero instead of allowing
it an angle to rotate. Let's say the lower
Z is negative, maybe 35, and the upper
is positive 35 degrees. So that allows this disc now to rotate left
and right 35 degrees. We're going to select
this and do the same. No, this. I don't
know why I don't have this limited like that. It should be limited. Yes, this should be zero. And this should be negative
35 and this should be 35. Now, if we plate,
as you can see, now they are responsible
for rotating the wheels. But now, of course,
there is a problem here. The wheels are facing
the opposite directions. So what we want to do is, well, this power is selected here, let's change it to negative one. And let's change this other steering
motor to positive one. When this is negative, they should be positive. And we're talking about
the motor constraints. So if we go back here now
and play, there we go. So that's one of the
problems we wanted to solve. Let me show you another
quick problem I noticed while I was
debugging that number three, if I played from the side, and if you followed
me up to this point, there is this problem
of the Chassis seeming to wobble up and
down as it rotates. Let me just power this.
I was planning to add the motor constraint
in the next lesson. In fact, why don't we do
that in the next lesson? I want to show you a second bug, and I think it's best to
do it in its own lesson. So I'll see you shortly, and I'll show you what
bug I'm talking about.
11. Fix Bug: So this is exactly where we left off in
the previous lesson, and I want to show you the
second bug I want us to fix. Now, let me just pull this
back to the very beginning, expand that just slightly. Now, in order to see this
problem more clearly, I'm going to add a motor I'm going to add a
motor constraint to this rear wheel so we
can power the vehicle. Right now, we've
just been depending on gravity to move the car. But right now, let's go
ahead and add the motor. And let's power this.
Selecting the cube and the wheel, then go here. Rigid. Let's add
another constraint. Select the constraint,
select the wheel. Object, snap selected to active. Then let's just shrink it down. Now it's smack in the middle of the wheel and the wheel
will rotate correctly. But I want to GX and
put it right there. Close to the edge of this GX. All right, so there we go. Now, we're going to change this constraint to
a motor constraint. And remember, when
we activate this, the wheel that has the
constraint is going to rotate along the X axis of
the constraint, this axis. So now that this is active, what happens when you play, and this is at one? You can see it's
powering the wheel. Now, let me go ahead
and shift D X, so I can wait, no, let me delete that. I want to make sure we're
properly aligned first. Select that Shift D, X, and let's place it
on the other side. And because this
constraint should be applied to this wheel, I need to come here
to this cylinder and change it to cylinder one. Now this is powering this. So if we play now the two of them are
powering the front wheel. But now if we switch to the
side and I want to select the steering here and put it at zero to avoid steering it to the right
because one is right, negative one is left. Go to this because I want the car to move
in a straight line. Zero. Now when we play, it will move in a straight line. Now, notice what's happening
to this center Chassis. If we switch to the side, it seems to be
limping or wobbling. Let me just start this
play. Can you see that? So there's a problem there, and that's the bag I
was talking about. Now, let's go back here
to the very beginning, and I want to show you
what the problem is. Now, this is the
suspension of this wheel, and this is that
wheel's suspension. With this selected, if we
go here to the limits, we forgot to set this
linear limit right here. To zero. And that just tells
this wheel, do not move. You're not free to
move left and right. That's X because
this is the X axis. So the wheel is not
free to move along the X and X axis.
Let me go back here. So limits, linear limits. You're not free to
move in the Y axis, so you're not free
to move linearly, and you're not free to move
linearly in the Z axis. But now, our problem is, if we go back to
the limits here, we did not have this limit. If you check your settings, we had forgotten
to set this limit. And what we need to do
is have that at zero. That means, as the wheel spins, it does not move up and down in the Z axis because if this is off, let me
just select this. If this is not limited, that's why this keeps
going up and down, but this is not what
is going up and down. It's actually the
wheels that are free to move up and down. But because they're placed on a passive rigid body
that's not moving, they cannot move up and down. So what we see moving up and down is the suspended chassis. But the problem is
that we did not limit the wheels up and down
movement, linear movement. So we need to limit that let me go to the
first frame once again. Go back to this other side. Notice here we had not set
that limit, set it to zero. Let me check this other one. We it that at zero, and this is at zero because
it's attached to the disc. But now, what about the discs? Because those are the ones
attached to the Chassis. We need to do the
same here, zero. Then right here, zero. Now, you might be wondering, what about the springiness? But remember this
sets the limits. You're not allowed to
move in this direction or that direction or rotate
in any direction. If it's springiness, we set the springiness in
the springs area, and we've already allowed the
Z axis on the angular side. They're free to wobble
a little bit as they spring and on
the linear side, we've allowed it to bounce. So if we play this now, let me switch to the front. Now it's moving in
a straight line. Let me just start
again. So right now there is no wobbling. It's moving in a straight
line, and that's what we want. So I hope you understood exactly what
I was talking about. Now, these are a little bit
confusing these constraints. In the next lesson, let's now start labeling them
and organizing our collision shapes because this should be a
reusable rigging system. So I'll see you shortly.
Don't go anywhere.
12. Organizing Rigid Bodies: Now it's time to
rename and organize our constraints as well
as our collision shapes. So I think we should start
with the collision shapes. So first of all, I
select that, that, that, that, and that because those are our collision shapes
and also the disks. Then I'll press M
for new collection, say, new collection here, and I'll call them
Collision shapes. Enter again. So now we have a collection of
collision shapes, a collection of the model, the damper truck, and we want to create a collection
of the constraints. Constraint one all the
way to Constraint nine, press M, new collection. Constraints, Enter. So now, there we go, our constraints. That's a better way
to organize our work, but our work is not done. We need to be able
to distinguish between each and
every one of them. So selecting this W, as you can see, it's in here. It's a collision shape. I'm going to expand that
and call it we rear. We collision shape. We collision, rear L.
Control C to copy that. I'm going to select
this. Paste that. Of course that becomes
R. We collision, rear R. Select this, double click paste that Front. In fact, typically, I do FL. That makes it easier. I have two here, RR F two, RL. And finally, double click
that this should be FR. Then now let's select Oh, this should be the Chassis. Then we also have the discs. Let's just call it heel disk. FL, copy that, select that. FR. Now, let's go to
the constraints, and my seat is sliding down. Yeah, so let's start with this. This is the motor. Motor. In fact, let me
just keep it consistent. Lowercase motor, rear
left or just left. And this is the motor. Right. Let's also now get this. Suspension Rear,
right. Copy that. Suspension, rear left. Suspension front, right. Wait. I made a mistake here. This is front left. And they should be front right. Then, of course, this
is wheel attachment. Wheel to disc. Front right. And here, front L because this is what attaches
the wheel to the disc. I think everything is
labeled except Oh, we also have steering power. Or just power steering. Steering motor L and
steering motor rights. So all our constraints
are now properly named. The plane can be the
ground. There we go. So now, let me just select
the steering First of all, I want us to
remember the impulse here makes this more
or less sensitive. So if we increase this to five, we'll make this more sensitive, that will allow us to
control the car much easier. So I'll select that and
give this positive one. So that means this other
one should be negative one. And we want to make sure
this impulse is balanced. If this is more sensitive
than the other side, it means this wheel will turn a little bit further
than that other wheel. But let's make them both five. And now if we play, it will start going in that direction, right direction. Just like that. Let me now increase Let me
select one of the motors here, this and increase this power. Now we need to
increase the friction. Let me just select the wheel and increase the friction 2.75. And let's also select
the ground 0.75. Let me select this other motor. What's the value of this one? Let me give it a power
of five and this other 15. Don't worry. In the next lesson, I'm going to show you how we can control all these values in
one place so you can drive the vehicle around
because right now you can't, so now let's start again. And now this time the
car moves faster. It's more responsive. It has more friction
with the ground, and thus it's able to move
almost physically accurate. At that. I think ourselves
we have ourselves a nice rig that you can
use with any type of car. You can always use this system to create rigs for your
cars in the future. Now, what happens if we change the steering
direction here? Let me select this X. Let me change this
to positive one. As you can see, we have
this problem here. We need a way to
control both of them. So how do we do
that? Let's see how to do that in the next
lesson. Don't go anywhere.
13. Unified Steering System: Now it's time to create a unified steering
system because right now what we
have is not usable. So how do we do that? Let me just bring it to the
beginning and pause it. Now, getting closer
to the model here, I'm going to shift
A and add a plane, GZ to push it up slightly, maybe make it slightly smaller. Now, with this plane selected, I'm going to go to its
object properties. I want to edit some
of its properties. And specifically, I want to
create new custom properties, two properties
acceleration and steering. We want to be able to accelerate
from one spot because, remember, we have two
motors, one, two. So we want to be able to
accelerate from one spot from one value and
steer from one value. So selecting this plane
will go here down, create new, and this is
a new custom property. We're going to rename
it to acceleration. Acceleration. And let's say we want the default value to be
yes one. Minimum value. If you put it at zero, the car will come to a stop
when the value is zero. But if you put it at negative, maybe two or three, the car
will be able to reverse. So I'll put that
at negative three, maybe positive ten or
eight. Let's say eight. And I want to move
in steps of one, when increasing the speed, yes, I want to move
in steps of one. But I think everything
is okay there. So I'll go ahead and say that. Now we have acceleration. And what I'm going to do
now with this acceleration is right click this
copy as new driver. Then I'll go to the motor. I'll go to this
motor constraint, open the constraint itself. And here, paste it right
here in the target velocity. Remember, this is
the value we are controlling to power the motor. So paste here, paste driver. So that tells Blender, when we change this value, if we change this value, this value should also be
provided to this field. So it's as if we're entering this value indirectly from that other side,
from that driver. So because we still
have that same driver, we can come here and do the
same here, paste driver. And now, as you can
see, the value is one because here in the
properties, it's one. Now, if we want to see this
value while this is selected, the plane and item is
active, here it is. So if I play this, I can slow down the car Alright, now, I think we need to Let's slow it down by default. Let me just put one
and let's play. Wait, there's a problem. What's the problem here? Now acceleration. The problem is the
max impulse here. So it's too low. That means the vehicle is not as responsive to my inputs
as I want it to be. So if I select this and play, The vehicle is not
responding to me, but if I go back here
and set it at five, set this at five as well. All right. All right. So now
let's try and solve this by balancing these values. I just want us to go back to the beginning,
selecting this. Let's make the impulse 1010, see if we can have more
control over the acceleration. So with this selected, let's just start with
one. Just like there. Now if I increase
this gradually, if I slow it down, it
now starts reversing. If I push it forward, it starts moving forward. So the issue here is to make sure we go back to
the different motors. Let's just increase the
maximum impulse to ten. So if you're using the
default Blender scale, then these numbers
should work for you. Max impulse, how responsive is Blender to our input in here. And, of course, you have
to make sure it applies to both motors because we want to make sure
they're both balanced. All right, now, I think
we should move on to the front to the steering. So with this selected, I'll go back to the
object properties and add a new
property. Do the same. Let's go in here and
call this steering, and we want the default
value to be zero. In other words, we want
the varicle to move in a straight line unless
we decide to sway. So the negative side
will be negative one and the maximum
will be positive one. So zero is straight. Negative one is left,
positive one is right. Alright. And here I
want one and one. Okay. So now we have
steering as well. I'm just going to copy
that as new driver. And I'll go to this constraint here that
powers the steering, go to its properties here in the target velocity,
pace driver. I'll do the same for
this. Pace driver. Now, I noticed this
has Oh, yeah, five, and this has maximum
impulse of five. All right. So now I
think we're good to go. Let's test our car, but let me select the plane first so we have the two values. Acceleration, let's
start at one. Steering, let's start at zero, and let's now play it. Let's steer it left. Alright, there's a problem here. I think I think there's a problem with the positive
and negative inputs. We're just freestyling this. How am I going to solve this? Because this expects
a negative value, and the other one expects a
positive value. All right. So what we can do is rotate
this to face the front, this Y to face the front, but still keep the
X facing down. So rotate it in the
Z axis 180 degrees. So the X is still below. Now if I select this I don't know what's
happening here. I need to debug this. Alright, now, let's rotate it in the Y axis because this is just a matter of what
axis it's rotating at. So let's rotate it at the Y axis and see if we're
going to solve that problem. Rotate it in the Y 180 degrees. So now they're both facing up. I think now that's a better now we have a
way to control it. All right. I love that. Alright, so now let's go ahead and see if we can
control it this time. Speed of 2.5. And let's play. Let's move
left. Now, let's move. Alright, now, I want when we
move in the negative side, I want it to also turn left. And when we move in the
positive side, turn it right, not like now because when
I move to the positive, that's when it goes left. So what we need to
do is go back to the beginning and make
these upside down, rotating the Y 180 degrees. 180 degrees. So now, negative, positive
exactly like that. So negative, positive. Let's increase the speed. Negative. Positive. Just like that. I love it. So now, I think we're ready
to move on to the next step, which is attaching
our collision shapes, these collision shapes to our actual vehicle,
the damper truck. How do we attach this collision shape
to our damper truck? And for some reason, this is attached to that, which gives us a hint of what
we're going to be doing. So see you in the next lesson.
14. Collision Shapes to Vehicle Model: So now it's time to
actually drive our truck or our car model if you chose to work with
a different model. How do we attach it? Essentially, what we
want to do is parent the truck model or
your car model to a collision shape so that when the collision shapes
move, the truck moves. So we'll start with the
Chassis, right click, select all objects
in the Chassis, and if I hit the forward
slash to isolate it, this is what we have selected. Forward slash again to
exit Isolation mode. With that selected, the last
item I'm going to select is the Chassis of the collision
shapes. Just like that. Now, while it's still selected, I'm going to say
Control P to parent it. That means we're parenting all the objects selected to
the last object selected, which is the collision shape. So object. Keep transform. Let's just
say object, keep transform. That means all those
objects will remain exactly where they
are in relation to the object
they're parented to. They will always be where
they are in relation to this. So when this moves,
they will move and stay in the same position. So in order for this to work, you must make sure you are anywhere here before
the simulation starts. That makes sure you're properly aligned right here at
the very beginning. So with that, let's just
play and see what we have. Now that we have the Chassis or the model parented to the
Chassis or the rigid body. There we go. The truck is already
moving. I love that. But now, of course,
we have a problem. Our wheels have
been left behind. Why? Because we also need to parent the wheels to their
rigid body counterparts. So let's go back to
the very beginning. And I'm going to
come to this wheel, expand the wheels here,
wheels, rear left. Going to right click select
objects, all of them. And then I'm going to
come close here and Shift click the rigid body
wheel collision RL, then Control P and
keep transform. I'll do the same for these. Select all of them.
Then select this. Control P, keep transform. Let's go to the front. Let's do the front wheels. So Front. Let's start with front R, select object, then select
this. Then Control P. Object keep transform. And make sure you don't move
these collision objects. If you move them, you will break everything
you've worked on. So don't move them
from where they were. Like, don't select this
and then try to align it by going to the front and trying to align it to the front wheel. Doing that is going
to break everything. Your rigid bodies or
collision shapes should remain exactly as they were
when you created them. So finally, let's
go to Well front. Select objects, then select
the collision shape, Control P, keep transformed. And now let's start
driving our truck. Let me select this plane. Fact, let me just pause this
and rename this plane to our What are we
going to control? Vehicle control or controller. Because this plane
is represented by these two values
acceleration and steering. Remember, we applied we created two new
properties for the plane. We can make it even much smaller just to not have that
ugly plane there, but I like having it big enough for me to
select from any angle. So now, when you want to if you select any other
object, it will disappear. If you want to get
the controller again, you can select it from here. I will bring this up or
just select the item here, and you will be able
to see the controller. So now if I play this let me
just go back to the start. So now another thing you
will notice is that we can see the collision shapes as
well as our vehicle model. We want to see only
the vehicle model. So let's select the
collision shapes one by one. For example, this one, let's
go to its object properties. Go down to Viewport display
and change this to wire. So now it's just a wire frame. I'll select this
collision shape. We're still in the
object properties. Change this to
wire, select this. Wire B. So now what we can
see is our truck. And if we hit Shift Alt Z, we're going to hide anything
that's a wire frame. Shift A Z. All right, let me select the
controller here, and then let's see if we can
move left just like that. Another thing you
need to notice is that this is only
viewport display. We've hidden or made
the collision shapes, wireframes in viewport display. But if we render this, it's going to show the solid version of
the collision shapes. For example, collision shapes. So when you render, it's going to show these solids. So what we want to
do is come here. First of all, let me hide that. In the viewport display
now, this is what we see. But when we're rendering it, let's go to visibility. Show in renders. Want to make sure
the collision shapes are not visible in renders. Disable that, select that. Let's globally
disable in renders. But the physics is still
going to be rendered. Because they are influencing the children that are
parented to them. So these are the
children parented to the collision shapes we're
hiding from rendering. This one, as well,
hide them from render. And, of course, the Chassis. One more time. Control
us to save that. Now, another thing I want us to do is you will notice
if we play this, our constraints are
remaining in place. If you want them to
move with the truck, you can make them
move with the truck. I like them moving with
the truck, actually. So let me just hide
it first, like that. And I want to parent them to
the wheels and the discs. Since this is the suspension, let's attach it to this. Control P, keep transform, select this, and this
Control P, keep transform. Let's also select
the other one there. Control P, keep transform. Always make sure you're
making these changes with this marker outside
the simulation zone. So we have this and this Control P. I hope it's parented,
this and this. There we go. Then we
have this and this will control P. What about this? This and this will
keep transform. Yeah, those are
already parented. Keep transformed. Let's
parent this to the Chassis, the motors. Control P. And finally, Control
P keep transform. If we let it move now, everything is moving
together with the vehicle. So now if we unhide
the truck and go back, the only thing you should
not move is the controller. I should always remain there. And the reason is because we're controlling everything
from the origin or the center of the world. So the controller should
remain right there. Everything else is moving
in relation to the origin. Alright, so selecting
the controller and going to the left just a
moment right there. Left. Let's increase the
speed to maximum six. Left. I love it. Now we have a truck.
15. Mini Game Camera View: This is a very brief lesson
where I want to clarify a few things to help
you get unstuck. So if I play this
simulation here, of course, I can
control the vehicle, so I can change the
direction here. Switch it up again. What we're doing essentially is simulating
the driving experience. So I'm moving left.
Let's move right. Et's straighten it slightly. Alright, I want us to
get to the very end. Let me just turn it
this side. There we go. Now, what's happened is Blender has recorded
that driving. As you can see, I'm
not touching my mouse, but now Blender is replaying my recorded simulation,
the way I drove. So if you try to control
the vehicle now, it won't obey you. It will not respond. And that's because what you're
watching is a simulation. Now, when you play the timeline, it will keep playing
this simulation until something
changes in your rig. So maybe this changes to
maybe change some value. Let's say 0.5 or something
and then play this. Let me select the control. Now I can change the direction. So if you notice you're unable
to control your vehicle, it's because you're rewatching or replaying the simulation. Change some value slightly and then start controlling it again. Now, there might be
a better solution. I haven't come across it yet, but this is the best solution I could come up with right now. The other thing I wanted to
show you is that you can change the speed of your
general rigid body world. So how fast do things move? How fast do the physics
effects happen? So inside the scene, rigid body world, you can
come here to the speed. If you say two, it's going to move
twice as fast. Right now it's moving
twice as fast. If I say five, it's going
to be moving much faster. So that's in case if you
want to drive really fast. If you want your
cars to respond, you have that control. So I'll just return this to two. I think that's a
reasonable speed. The other thing I
wanted us to cover is how to add a camera
view to your vehicle. If you want it to look like a minigame, how do you do that? Let's go ahead and add
a camera with Shift A. Camera. Now the
camera is in there, so I'll hit zero on the number to look
through the camera. And then I'll go to view
Lock to camera view. That means now if we're
zooming in or out or orbiting, the camera is locked and we're orbiting inside the camera view. That allows us to position
the truck exactly where we want it in relation to the camera,
maybe right there. And then that's a good spot. I can shift A, add an empty. Let's just say a plain axis, GZ, maybe right there. Then I'm going to select the camera by clicking
its border here. Hold down Shift and
select the empty, then Control P to parent
it and keep transform. Then I'm going to select the
empty ship hold and select the Chassis collision shape and Control P to parent
it to the Chassis. Now, wait. I need to exit from this. Now if I orbit, we get
out of camera view. So this empty is
following this Chassis, and the camera is
following the empty. If I now hit control
if I now hit zero on the numpad and play
now as you can see, let me select this
control, go to item. There we go. Now, this
is confusing out here. So first of all, let me select the camera itself. Go to view. I want
us to bring it down slightly. Yeah, right there. Unlock that. Then while the
camera is still selected, I'll go to the camera
properties and then go to viewport Display
and pass a part out to completely one to
block out everything else. Now, because this is not
locked, I can zoom in. And now let's watch that. There we go. Now
we have a camera. Now we have a minigame
camera view or experience. Let's fall off. And there we go. So is there anything
else remaining?
16. Winding Up: And that brings us to the
very end of this class. You now have a complete
foundation for rigging vehicle models with
rigid body physics inside blender.
That's a great fit. Congratulations.
You now understand how and why these systems work. Which means you can apply
the same principles to cars, trucks, construction equipment,
mechanical assemblies, and your own custom designs. And now a quick reminder, don't forget to publish
your class project. I would really love to see
the rig you've created, whether it's a
simple wheel rig or a suspension test
or a full vehicle, Make sure you share your
project here so you can get feedback from me and
your fellow students. Simply head to the
projects and resources dab below this video
player and upload a screenshot of your Rig
or a link to a short video showing it in action inside
your three D viewport. Seeing other students
rigs is one of the best ways to
learn and improve. Also if you enjoy this class, don't forget to follow me. I'll be sharing more courses on advanced vehicle and
mechanical wigs, card to blender workflows, physics based
animation, and turning three D wigs into
interactive web experiences. More on that very soon. Thank you so much for
taking this class. I don't take it for granted, and I can't wait to
see what you create. Till next time, stay
creative. Peace.