Hello there, welcome to Ms.RedNebula's PlanCo Tips - Thememaker's Toolkit Edition!
In this tutorial, we'll go over how to set up some simple animations in Blender - a pop-up
ghost, and a clock face with spinning hands.
This is a little more advanced than the sign tutorial, so I recommend watching that one first.
I'll put a link to that in the top-right corner!
You can use these techniques on your own creations, or if you'd prefer to follow along with the
tutorial, download the files in the description below.
Our ghost animation is based on this object, just a simple, flat cutout like you might
see in a budget dark ride.
I made this in the same way as I created the signs for the first tutorial.
I've positioned the ghost underneath the grid, which for now we can treat like the ground
from which the ghost will pop up.
All animations for the Thememaker's Toolkit are accomplished by attaching your mesh to
a special piece called a bone.
Most animations feature multiple bones, connected in a sort of skeleton called an armature,
but for this simple rig, we're just going to use one bone.
To add a bone, go to the Create tab at the left hand side of the screen and choose "Armature".
This object is a bone.
Its position doesn't matter much for this example, but just to get it out of the way,
let's shrink it and position it behind our ghost.
Up here in the Outliner, you can see our ghost cutout, as well as the armature group that
contains our bone.
There are several ways to parent the ghost to the bone, but here's an easy way.
In the Outliner, drag the Ghost_L0 object onto the Armature.
When this menu pops up, select "With Automatic Weights".
Weights are a somewhat complicated subject, but for this tutorial I'm going to handle
them as simply as possible.
Basically, the weight is how much influence a particular bone has over each vertex in
your mesh, on a decimal scale between 0 and 1.
When you only have one bone, any object you assign to it with automatic weights will have
all of its vertices 100% weighted to the bone, which is exactly what we want here.
Now, select the bone armature and go into Pose Mode.
When you right click the bone now, it will turn blue, meaning you have that bone selected
and can pose it.
The ghost cutout will move along with it.
By default, Blender will have a view called the Timeline open at the bottom of the screen.
If you don't see this, click and drag the diagonal lines at the bottom left corner of
the screen upward to open a new view.
Use the menu at the very left to change the view to Timeline.
The Timeline has a green line indicating the current frame.
Make sure the indicator is on frame 1.
You can see the current frame at the bottom of the view, you can also type a frame number
to jump there.
With the bone selected, you'll make a keyframe.
This first keyframe will tell Blender the position where you want your animation to begin.
You also need to tell it which property you want to animate - the rotation, location,
scale, or any combination of the three.
Click on this space and choose "Location".
Then, click the buttom with the key icon beside it.
Note a yellow line appears on the timeline, and the location property of your item is
yellow as well.
If you move along the timeline, the location attribute turns green, just an indicator that
at some point on the timeline, this property has at least one keyframe.
Move the timeline to where you want your ghost completely popped up.
By default, there are 24 frames per every second of animation.
To make the ghost pop up in half a second, place the timeline indicator on frame 12.
Move the bone straight up along the Z axis - the ghost will move with it.
You want your ghost just above the ground.
Press the Keyframe button again.
Now, when you move along the timeline between these keyframes, you'll see that Blender has
filled in all the frames in-between.
You can also use the Play button to see how fast the animation plays.
You can add more keyframes this way if you wish.
For the purpose of an animated object in Planet Coaster, you should always reset the object
to its starting point at the end of the animation.
In this case, we'll leave it up for 3 seconds, then ease it back down.
Let's look at another view that helps with animation.
Open a new view by clicking the diagonal lines and dragging up, and then change this view
to the Dope Sheet.
Here, you can see every keyframe attached to the selected bone, and you can select,
move, duplicate, or delete them.
You're at frame 12 now, so three seconds from that is frame 84.
Move the indicator to that frame.
On the Dope Sheet, right click on the second frame to select it.
Press Shift-D to duplicate the keyframe, and then move it over to frame 84, where your
indicator is.
The yellow bars in between just indicates there is no movement between those keyframes.
Next, give it a slow reset of 2 seconds.
Move the indicator out to frame 132.
Right click the very first frame, and duplicate it with Shift-D. Move it out to frame 132.
When you play the animation, the ghost pops up, stays, and then resets.
But there's still a long wait before the animation starts playing again!
In the Timeline, change the End frame to 132, the same as our last keyframe.
Now when you play the animation, it repeats right after it ends.
Of course, if you want to get a little more complex, you can add additional pieces to
an object like this, so it looks like it has some kind of pneumatic rig supporting its
animation, but that's up to you.
Our second animation is a little more complicated.
For this one, you'll need 3 bones - one for the static clock face, and one for each hand.
Go ahead and add an Armature.
In this case, the object is centered already, so the armature appears right where it needs to be.
If that's not the case for the piece you're working on, you can move the armature now
if you need to.
Shrink it and move it down until just the tip of the smaller end is showing.
Then, with the armature still selected, go into Edit Mode.
When editing an armature, you can move either end independently, select and adjust the whole
bone, and most importantly, you can add additional bones.
Select the "Tail" - the smaller end of the bone.
Go to Top Orthographic view - remember that is 5 and 7 on the numberpad.
Press E to extrude, which will create a new bone.
Drag this bone to match the clock's big hand.
Select the top of the original bone again.
Press E, and this time, drag it to match the clock's small hand.
When you have an armature with multiple bones, it's a good idea to name the bones to keep
track of them.
Select the original bone, and go into the Bone tab in the right hand menu.
The names don't matter in PlanCo, so let's call the first one "Root".
Select the bone for the big hand and name it something like "Hand_Big", and then name
the small one "Hand_Small".
That's it for the armature - return to Object Mode.
Next, we'll parent the clock face to the armature.
Since there's now three bones, using automatic weights would actually cause some problems,
as more than one bone would be set to influence different parts of the mesh.
This can work well for more complicated rigs, like an animal's body, but there's an easier
way for simple objects like this.
In the Outliner, drag the Clock_L0 object onto the armature.
This time, choose "With Empty Groups".
This means no bones will be automatically assigned any part of the mesh.
Now, select the clock face and go into Edit Mode.
You might also want to hide the armature in the Outliner so you can see the different
parts of the clock face more easily.
Let's take a quick look at this object.
The clock's mesh is made up of four separate parts - the clock face itself, the two hands,
and then the nose is just a small piece above the rest.
You can see the distinct pieces easily in Wireframe or Solid mode.
An easy way to select an individual piece is by hovering over it with the mouse and
pressing L. And remember, to deselect everything, press A.
We want to attach the clock's face and the nose to the Root bone.
Make sure they are the only two parts selected and then go to the Data tab in the right hand menu.
Under Vertex Groups, you'll see all of the bones listed.
Select "Root" and click "Assign".
Deselect them, and then select just the big hand.
In the Vertex Groups, select "Hand_Big" and then click "Assign".
Then, do the same thing for the small hand.
An easy way to make sure everything is done correctly is to scroll down the right Properties
panel and, under Mesh Display, turn on "Show Weights".
Then, when you click each Vertex Group, the section assigned to that bone will show in red.
You can turn off Show Weights when you're done verifying them.
Go back to Object Mode and make your armature visible again.
You may also want to switch back to Material shading so you can see the image.
Select the armature and go into Pose Mode.
When you select and rotate a bone, the corresponding hand moves with it!
Make sure you're rotating the hands in top orthographic view only, or otherwise limiting
their rotation to the Z axis, otherwise your animation will get weird very quickly!
Remember, you can always use Ctrl-Z to undo, or if you have one or more bones selected,
you can press Alt-R to snap them back to their original rotation.
In the keyframe type, choose Rotation.
Place a keyframe on the big hand in its starting position.
Let's make a 360 degree turn over the course of 60 frames.
Now most people's first thought is to go to frame 60, spin the hand all the way around,
and make another keyframe.
But it won't work, because Blender tries to extrapolate the shortest distance between
the two points - in other words, no distance at all.
An easy way to handle this is to do it in increments.
At frame 20, place a keyframe with the hand rotated 120 degrees - remember you can type
in the number for a precise measurement.
Then go to keyframe 40, rotate another 120 degrees, and place a keyframe.
Finally, to frame 60, rotate the last 120 degrees, and place a keyframe.
Set your entire animation to end at 60 frames so you can see it loop.
When you press play, it now spins, but there's an obvious problem!
It seems to slow down and speed up.
By default, animations in Blender ease in and out of transitions - great for many types
of animation, but not for a steady spin like this.
To fix it, open the Dope Sheet again.
Select all of the keyframes - the A key works to select all here, too - and then go to the
Key menu, Interpolation Mode, and choose "Linear".
There's one more tiny hitch at the end of the animation, when the hand is technically
at the 0 position for two frames in a row - it's there at the beginning of the animation
and 360 degrees later at the end.
Simply change the end of the animation to 59 instead of 60 to lop off that final frame,
and it will spin smoothly.
You can do the same for the other hand, perhaps spinning that one backwards instead.
If you're feeling adventurous, maybe add a tilting animation to the root bone to add
to the wackiness!
Remember that before you export, you'll need to create LODs, face the objects the correct
way, and apply the rotation and scale.
If you need a refresher on how to do any of those, give part 2 of my simple sign tutorial a watch.
There are a couple things about building the LODs that I want to point out, though.
Note that your object is now nested under the armature in the Outliner, so you'll have
to press the plus sign next to Armature to see it.
And for your LODs, you don't have to make any copies of the armature, only of the object
- so your finished project in this case would have one armature with Clock_L0, Clock_L1,
and so on, underneath it.
Any copies you make of the parented object will share its animation - all you have to
do is reduce the poly counts.
Also, when you're ready to export your file, the settings are the same as we did with the
sign in the previous tutorial - FBX 6.1 ASCII and Y Forward - but this time, you want to
leave the Animation option checked.
And that's it for simple animation!
Feel free to like or comment, and if you want random updates from my Planet Coaster exploits,
subscribe!
If you enjoy what I do and are interested in supporting the channel, check out my Patreon.
In addition to helping me out, you can also get fun perks like sneak peeks, voting on
future projects, and being the first to see new videos.
A big thank you to my current Patrons!
I am truly honored by your support.
That's all for now - Bye!
Không có nhận xét nào:
Đăng nhận xét