Welcome to force fields and other objects.
So they act slightly differently when force fields are applied to different objects themselves.
Now they are aware of exerting different forces onto our models just like they have always been with
particles now as well as particles.
They will affect soft bodies rigid bodies and cloth objects as well.
So it's worthwhile bearing in mind you can use them with several of the physics models.
Now there is a shift in set up compared with particles.
And the reason for that you will see in a moment um hope it's going to be buggy so you can see why we
need to set it up slightly differently and then we'll have a look at how to make an object completely
unaffected by certain forces.
Now this can be important if you want part of your scene to stay put.
Was making the other part of it explode dramatically perhaps in a real heroes or a realistic physics
cingulate and the whole lot would get obliterated.
But you might not want that to happen for more artistic effects or more had choreographed effects shall
we say.
So let's go play it with force fields and other objects in this case were play with rigid bodies over
in blender.
Okay so welcome back to blender.
Now my default starting scene looks a bit different to how I set it up before I had a bit of a computer
wobbly.
I've sorted that out but unfortunately I've got my default scene back as this.
So there will be some things that I have to redo don't worry assist me resetting up my computer and
silly me I didn't back up the actual blend start file.
So I was left with that offer anyway.
So let's start by giving this cube in the physics properties a forcefield and a rigid body.
Now just like the particles it won't self affect.
So let's add another one into the scene some just going to duplicate that and pop it over here.
Now the forces needed to move objects is often a lot higher especially rigid bodies than particles so
whereas particles would be streaming everywhere of whoop play is not guaranteed in this case so just
to make sure if we do have any effect at all I'm going to set the strength of both of those force fields
to 100 and then we when we press play Oh we haven't turned off gravity yet.
No reason why are we turning off gravity as simply so we can see the effect of the force fields by themselves.
And under this set the end frame to 100 as well and did are.
And let's let it reset.
No they're not doing anything now.
I've had this trouble before you think they would affect one another but not themselves but with those
settings they just don't.
Now I've turned forcefield of field on rigid body off rigid body on and occasionally they actually react
and start B.
What I say behaving themselves as we'd expect them to.
But of course each time you turn these things on and off you actually lose the settings you have before
so that's not ideal.
So this is where the set up change comes.
It will start to become important.
So what we need to do here is instead of actually attaching it directly to there is just like we did
with the particles we add a separate force field.
Sorry go ahead and add a force force field here.
We can already see it starting to push that cube away this one on the right.
So let's go ahead and just increase.
That's maybe 10 and we can see it pushing away and obviously if we set it to minus 10 it will pull it
towards it.
Now once we've started it moving like this we should see them bump into one another.
Oh no we have not got enough frames.
So there's two ways of dealing with that.
And I'm just going to increase the force.
Now they're knocking to one another and then be pulled back.
Did you see that they started to slow down and that's because the force itself is not parenting to the
other cube.
Says the other Q moves the force itself does not.
So we can link those two together imperent them if we wanted to.
Now one of the things you may want to do is let's say let's duplicate another cube just over here and
they all get pulled in.
Now say we wanted this new cube to not get affected by the physics will simply we could turn the physics
off.
However if we still wanted other things to bump into it would still need collision or even perhaps a
rigid body.
But what we want in this case is it not to be affected by this particular force field.
As a couple of ways of doing that.
Number one we can literally move that to another layer that the force feels not on and then it will
not be affected by that force field as we can see here.
That is one way of doing it and then when we bring the two together because they're on separate layers
one will not affect the other.
Let's just reset the simulation and we can see moving things about cause it to go just a little wobbly
but it's unaffected and that's the easiest way to do it to put things on layers that affect one another
and not on others.
Now if you wanted it if it was a particle system itself and we can see this is now emitting particles
you can scroll down there to field weights and well we can change all of the ones that we want to hear
so we can set gravity to have more or less effect on these particles.
The force.
This one over here to have more or less effect.
Of course what we've got at the moment is it on a different layer so it won't affect it all.
We popped it back onto layer 1.
You'd see these particles being attracted in.
There we go.
Once you turn the force up.
However if you make the force zero then they just get emitted and scattered.
Hey that looks like a comet.
How cool is that.
Okay so we're ready now to set you up for a little challenge.
Okay so your challenge is all about meche objects affecting each other.
So use a force field to make two or more meche objects affect one another.
Things to try.
Well we've got a wall that's already having a projectile hitting it.
How about setting up an explosion which happens when the projectile hits our wall.
And perhaps you want some of the bricks not to be forced out by the explosion.
That's something to think about.
Now something extra you can do.
And I found this quite funny and I show you a clip of it after I've completed my challenge is getting
objects to orbit one another.
That's great fun and prehaps you will find a use for it as well.
I certainly found it as I say a lot of fun anyway.
So go ahead pause a video and give that a go.
Okay guys welcome back.
Let's go have our wall exploding.
When the projectile actually hits the wall.
Okay so I've opened up my wall here and let's just recap on what's happening here.
Let's play the animation.
Oh the help of we had a time line as well so we can see what's going on.
Okay so what we can do here is step through and say its all 20 it's okay.
It's impacted.
They're actually in the wall at that point so I can set myself a forcefield coming on at frame to end
too.
So let's go back to frame 0 and I will need the force and that's very tempting.
I've done it in practice as adding the force field to this object.
It won't do anything as we've already discovered it totally ignore everything you've got going.
So we've got our projects let's go ahead and move the cursor to select it so we pop the cursor there
and I am going to do a bit of tidying up because this is driving me just a little bit bonkers that we've
got all of this mess.
So what should we do here.
Let's parents.
Well certainly that parent in the field to that cone and call the cone projectile.
Excellent.
And scroll down and I will.
Well we added the force.
No we haven't so let's add a force field force and parent it to the actual projectile.
Otherwise when the projectile moves our are actually forceful or not.
So that goes in and doesn't seem to do anything let's set a force of 100.
And that also doesn't seem to do anything.
So that's sort of five hundred.
We can see is pushing the wall over as it comes towards.
And what I'm hoping is for the Brits to go absolutely flying so let's do five five thousand.
There we go.
That's pretty impressive how Kate's now we got that.
So we've got an approximate force.
We actually want it to be zero at the very beginning have said it's a zero I'm going to press to key
it in an hour at this.
It's cached some information about there actually some set it frame it when it first starts nudging
and going to set again the strength at zero and by twenty five.
Unlost suddenly set the strength twenty six so yeah about there an MMA set the strength the five fouls
and an unknown to turn up the power to the power of two just so it fades away so it's not constantly
pushing things a way.
Okay so let's see how that looks when we play it back so it should go being oh you know I didn't do
I didn't actually key in that last thing so let's play it through.
Scott all if we don't play it through it starts ruining itself because things aren't cached So we got
zero here zero here and at 25 I won it five thousand.
And remember to quit this time there we go.
So it start from the beginning.
Boom.
Okay.
Let's try.
Fifty thousand that did that didn't do any of this try on the right place 15 1 2 3.
I didn't have the effect I wanted it to go back and.
So the effect ramps up.
Oh only five thousand again.
Fifty.
And why not keep it in my kerson Must not have been over.
Pretty sure I did that.
Oh something weird goes on there.
Okay so the power was a bit too high.
That works but I'm going to have it ramp back down again.
So it's not an A not a continuous force just a sudden force back to zero almost straight after like
a real explosion because after you get the shock wave not continuous force.
Okay that works brilliant.
So the final thing here is just to keep some of the wall intact and make it basically on a different
layer.
And I'm just going to randomly select some bricks hopefully getting a bit bigger as we get to the bottom.
There we go.
And perhaps a set over here as well.
So that's a rough selection there need a couple more in there.
Very exciting me selecting bricks are there apologizing going to move and hot to layer all two or three
in this case because of accidentally moved them to three.
So let's turn on layers 1 and 3.
And now they shouldn't affect one another so that send in our projectile.
Boom.
But they are affected by just falling over.
They are affected by each other.
Excellent sort of gone explosive impact there.
Exactly what I wanted to see is that as the projectile comes through.
Perfect.
How did you guys get on.
Did you manage to destroy a wall.
Did you have the same sort of issues I did with the strength you had to turn up and play with it.
It can be quite interesting trying and get the right settings and I'm happy with this.
And there was this final thing that I wanted to show you so I will show you this orbiting collision
that I set up.
It took quite a while to read because of all the physics involved but it was great fun setting up.
Okay so I I honestly I can't remember how many little balls there are in this scene but they've all
got their own little forcefield and they're all attracted to one another.
And of course when a big bunch of them get together well they attract more so than anything else.
So he have them orbiting together and eventually forming.
Well I don't know what you call it a planet perhaps with all these satellites going around it.
If I just speed up this process you will see that eventually you get a solid moon of three of these
little spheres orbiting as well.
That was great fun.
I enjoyed it anyway.
So I'd love to see what you guys have come up with remembered to share over on the forum and I will
see you guys in the next lecture.