Hello everybody.
By the end of this lecture I'm hoping that we're going to be able to create something like this where
a bowling ball is going to be smashing into a ton of pins and doing a lot of the hard work for us using
Blender's physics engine.
Hey everybody I'm super excited to start playing with some physics.
Now this is an insert lecture so I'm concerned you in from the future have come back and I thought you
know what.
We've got some bowling pins and a bowling ball.
Why don't we just smash them together and try out the blender physics engine and see what we can do
with that.
Far more exciting than just looking at them and positioning them in a sort of a static manner.
So first of all we need to go ahead and learn a little bit about the physics in order to do this I'm
going to go and grab the pin that I've made earlier and will use that as a good starting point so let's
go and open up your bowling pin.
And here we go I've got my bowling pin here I'm going to switch to perspective mode.
Now I'm going to send to my thrilly cursor I'm going to pop it in the middle of the scene by this couple
of ways of course we can do this with a new shift an S and do the cursor to centre or we can go shift
and see which is a really quick way.
But it does move the cam your viewport around ever so slightly.
Now we're missing a little bit of a screen that we're going to need some going to go down to the dividing
Widget the splitter widget and make a new area underneath.
And I'm going to change that to a type that is the time line.
Now you may already have this on here as default is going to make my viewing area just a little bit
bigger as well as make sure grab the right area.
There we go.
So this is a time line it's a 250 frames and our frame rate if we go over to the properties area and
have a look at the little camera our frame rate is set at 24 frames per second so that's a little over
10 seconds.
Now at the moment we don't have much in our scene to interact with.
So let's go ahead with the cursor the 3D cursor in the centre.
I'm going to go ahead and add a plain scroll up here.
And that plane is going to act like the ground.
I'm going to scale that up and I'm going to call it the ground straightaway because I know sometimes
I'm a bit naughty and I don't name things as quickly as I should do.
So we've got the ground there that's something that the pin can knock against.
Now what we can do there's a lot of in-depth stuff we can do with physics but for for this lecture let's
just keep it nice and simple.
And I'm going to use the tool shelf over on the left hand side and I'm going to go down to where it
says physics on physics tab and I'm going to select everything in my scene.
I'm going to hit the aiki twice and then select add active.
Now there will be an error of error because it cannot add a rigid body to a non mesh object which is
fine.
It can't add that to the lamp to the camera etc..
So let's ignore the fact that we've got that error there and just see what happens when we go ahead
and hit the play button that's on the timeline.
Hey everything's falling away into the distance.
Now the problem there of course is if I mean it plate the camera around can probably still see it falling
away.
Yep.
The problem of course with that is that the floor is falling away as well.
And that's because we've added it as an active.
So if I just pause that and set it back to the very beginning and I'm going to have to focus on my view
again this move this around come back in there again.
So what we need to do is set the floor because we don't want it to move but we still want it to interact
with other objects.
We want to say add passive.
So now the floor is passive and the pin itself is active when we go ahead and press play.
Okay the pin is just wobbling not doing anything else.
So there are a couple of issues here.
The first one is that the centre of mass that this pin is operating around is its origin.
And obviously that would mean that it's very very bottom heavy at the moment we can see it just gently
wobbling backwards and forwards.
Now let's reset the scene back to frame one select tar pin lift it up slightly and rotate it and then
press play.
And let's see what happens.
Okay so this does look like it's bottom heavy and that would be a really rubbish pin.
So this is one of those cases where we've set the origin to the bottom of the object in order to work
on it properly and have a bottom to the objects.
But the downside to this is now it's centre of gravity is also at the bottom and we need to set the
origin to the centre of gravity.
Now there are a couple of ways of doing that but the easiest one is with the object selected.
We go back over to the tools go to tools at the very top and go to set origin and that's enabling us
to move this origin and we can set it to even the geometry that might work.
The centre of mass by the surface area or the centre of mass by the volume.
Now in this case I'm going to pick the volume and we can see it's moved our object.
We're going to have to lift it back up.
Now when we go ahead and drop it whilst it's Lent at a certain angle Oh make sure you start it from
the very beginning.
We can see there that it behaves much more naturally.
If I put it a more extreme angle then we should see it fall over and rock appropriately.
Excellent.
So that's a great start.
An introduction to the physics.
Couple of other things that you might want to do and you do this over in the physics properties.
Plenty to play with here.
So we go over to the propertys area and all the way at the very end.
There's something that looks like a little bouncing ball with a blue tail coming out of it.
Those are your physics.
And here we have a lot of options now in this particular case the ones that I would definitely play
with are its mass.
This is approximate mass in kilos.
And if we scroll down further we've got its surface response how bouncy is what happens if we turn the
bounciness up to one.
I don't know I presume it's going to bounce more boin There we go it's bouncing and skipping across
the surface a little more.
So these are all things that you can play with and basically make it act like you want it to and it
can be a bit fiddly sometimes.
Of course if you set the friction down to zero guess what happens then is just going to kind of scoot
across as well.
It's given a completely different reaction this time.
So there's lots to play with and each change you make will have a slightly different effect.
Obviously if you put more objects in your scene that's going to make a difference.
Now one of the things that is incredibly important is applying your transforms because if we've scaled
this pin at any point in time but to reveal whether they did or not I can't remember then it will be
behaving wrong because it will be behaving like the small or larger version of itself prior to being
scaled so let's hit the end key and making sure that selected scroll up to the scale the scale is at
once.
That's absolutely fine if the scale was anything else.
We did have some weird stuff happening with the physics and all you need to do to sort that out is control
an A to apply and then scale and you can also get that from the object menu ply and then scale and it
should set to 1 and that's incredibly important.
And let's see if we can invoke that now by scaling it.
So now it's this big is going to act as if it was the much smaller object.
Now I don't know if that's going to cause us any issues let's lift it up out of the ground slightly
turn it around and see how it acts now.
Or you can see that didn't really act like the scale it's supposed to be.
So if I go and apply that scale and then come back to very beginning.
Now let's see what happens.
Now it behaves more like a 1 kg object of this size.
If we change the weight of it or hundred Let's see what happens then.
Much more dead and reaction and a much larger object of course so play with that.
We said it's a point.
Ones are very light objects probably find it falls and bounces much more than it would have done before.
Lots of things you can play with lots of exciting things to do.
And of course along with that it's time for a little challenge.
And your challenge is to go ahead and have some fun with physics.
So don't worry.
Later on in the course we will have a much more detailed look at the physics.
I know after seeing this you're going to be really hungry for more of that physics engine.
But later on when we look at destruction and blowing things up we'll take a closer look at the physics
engine in much more detail.
I'd like you to go ahead and make a bowling ball smash into a load of pins now in order to do that.
I would suggest you make use of a ramp to have the bowling ball gather up as much speed as possible
and you might have to make the bowling ball itself a little heavier than it is currently.
So it has a bit more mass to push through those pins.
Pause a video now and give that a go.
Hello everybody welcome back.
Did you have fun with physics.
I certainly did.
Let's go see what I got up to.
Okay so now that our original bowling alley has got a few things flying here there are a couple of options
of how we can approach.
The first thing I'm going to do of course is name my bowling alley with an alley make sure that the
ground is named appropriately.
The pins are fine and we've got a bowling ball.
Okay so I need to select everything in my scene and I'm going to go straightaway and add an active physics
to it select my ground and add a passive rigid body to it.
Let's just press play now and see what happens.
Everything falls down and those those pins are not behaving as they should be.
Some will select everything and I think I'm safe to do that yeah everything sir a regular shape and
set the origin to the centre of mass by volume and then I'm going to press play again to see what's
going to happen.
Okay now for maximum carnage.
I could pick up this ball and just starts knocking these things flying like so that's one option.
But what happens if I stick a ball in the middle of a ton of pins.
Now we've got a couple of pins falling over already now because these already have physics apply to
them what I could do here is in orthographic meridan looking from the top.
I used add a ton of of these pins and just see what happens.
I'm hoping it would just knock a ton flying and hopefully all some of these are put inside themselves
so I'm expecting them to freak out a little and send things absolutely crazy bullets to see what happens
when I press play.
Well they just kind of.
Not one another over you know I'd be a bit more exciting if I was to rotate the ground ever so slightly
like this.
Everything falls over regardless.
Are we not.
You know what we could do here.
If it works like that.
A wonder of any of use you experimented like this.
So if you rotate the ground everything will fall down that's great.
But that's that's not that exciting but what we can do is we can duplicate the ground rotate it and
actually have the bowling ball coming down that ground.
And hitting and striking our pins this way.
So let's make sure we're right at the beginning of our scene and I'm going to move my bowling ball.
So it's going to fall onto that ground and roll down.
How cool is that going to be.
Now this is what I mean by experimentation.
So the bowling balls coming down it's picking up speed.
Obviously some of these are already knocked over and it didn't get very far.
So what can we do here.
Well it's probably still really really light so if I go into physics properties and change that's all.
Let's set it as a as a whole ton.
Hopefully that means it will just hit the floor pick up speed as it hits there and then it should start
busting through everything.
Perfect.
Okay.
The next thing I want to do is just stop these other ones from falling over straight away.
So my gut reaction was to have them in there initially for a bit of fun.
Let's just press play.
K There are a couple of things that are falling over there.
Let's go back to the beginning.
It's that one there's pushing through so we can delete that.
Let's just press play again.
Yeah.
There's a whole group of eight in the middle here that are pushing through one another.
And that is because I put them next to one another when I started so if I move those ever so slightly
to their impress play they're dropping down.
We're all good.
Well good Where's that ball and smash with a mega strike.
Okay how did you guys get on did you experiment a little further and start adding in slopes and stuff
like this to get the ball going really quickly.
Do show me what experiments you came up with.
I look forward to seeing them.
And of course I will see you all in the next lecture.