Basic Animation Guide.

Tutorials and quick guides collection is posted in this forum. Forum is read only.

Moderator: Oleg

Basic Animation Guide.

Postby Oleg » Thu Jul 26, 2012 11:11 am

ZModeler3 basic animation guide.
This guide will describe basic steps to create your own animation. We shall create wipers animation with two animated objects: Left wiper arm, Right wiper arm, and one static object: windscreen.

Preparing scene, creating objects and blank animation template.
I consider you know ZModeler basics and can create some boxes while preparing to this guide. There should be an object Windscreen, L Arm and R Arm. Wiper arms objects are expected to be rotated slighly, so they lay exactly on windsceen. Also, notice that I've decided to user "Z" axis (blue) as a rotation axis. This is just for this example, you might chose any:

Image

This is an initial layout of objects I would like you to create prior to moving further.
Now, open tracks editor (a button on animation playback bar, next to play/stop buttons set) and press "Animation" button. It will act as "New animation" by default and will create new animation:

Image

Select (click) new animation in a set of animations and press "Track" button in top toolbar:

Image

This will create a track inside new animation. Press this button again to create second track. Then expand animation branch and rename tracks and animation. I suggest to rename animation to "wipers" and tracks to "Left Arm" and "Right Arm":

Image

Now you need to bind scene object with animation track. Animation track will affect binded object(s) during playback, so until you bind anything, no animation will be played. You might noticed that if you ever loaded animations and tried to run playback - nothing happend. So, to bind the object and track, you should drag and drop object onto according track. When you click on a track in Tracks editor, the bottom-left options box will show you a Controls branch - this is the set of object(s) that track controls. You can drag and drop object onto that branch too, it doesn't matter.
Note, you can select an object listed under Controls branch and press 'Delete' key to unbind track and according object.
The image belows show where you can drag an object:

Image

Do the same with "R Arm" object and "Right Arm" track. Once you dragged and dropt an object onto according track, an object will be listed in "Controls" branch of this track:

Image

Now you have each object binded to according track.

Drag and drop animation label from the top-left animations set into the right panel of track editor (track sheet):

Image

This will create a wide group-button "wipers" (animation rollup) in track sheet. Click on it to expand, two track sheets will appear (the one for "Left Arm" track and the one for "Right Arm" track. Expand them both by clicking on Collapse/Expand button:

Image

Now, untick the first (from top) checkmark in each track sheet - this is a track for movements, while we shall apply only rotation animation. Then drag the first (from top) gripper up to make the center sheet fragment bigger. This is a rotation track that we will care about. The last sheet fragment is for Scale not used in ZModeler (and barely used in games). The image below shows what you need to click and what to drag; on the right side an example of layout you should get:

Image

Adjust layout of "Right Arm" track sheet the same way. This is how it should look when set up properly:

Image

We have prepared the scene and created blank animation.


Animating wiper arms.

Once everything is set up properly, you can create animation keys.
First of all, when object is binded to the animation track, this track controls object position and rotation. Thus, you can't move or rotate binded objects by default. In order to create animation, you need a freedom to adjust object position and rotation when creating key frames. The button "Free mode" does this for you. When this button is pressed, the track does not affect an object and you are free to modify object in scene. Press this button now:

Image

Now in Tracks editor, hover the top ruler bar next to zero time (0:00.00) and double-click to create keys at this time:

Image

Then double-click at time 2.00 to create keys there too.

Image

These are initial and final keys of animation.

Image

Notice that track sheet now shows keys as green dots and draws lines in rotation tracks. Click on time 1.00 (in the middle) on the ruler bar of Track Editor (or move animation slider in the ruler to the time 0:01.00:

Image

We shall create a middle key-frame of animation in "one second" time frame. At this frame both wiper arms should be in nearly vertical (a top position of their animation). First of all, pick Rotate tool and make sure it will Rotate Axes and Rotate Geometry:

Image

Then toggle "Local Z" axes constrains mode:

Image

Rotate wiper arms objects and make sure axes are rotating too:

Image

Press Set Key button in animation controls bar. This will create frame in current time (1.00 second) using object's position and rotation:

Image

Animation is ready. You can disable "Free mode" by clicking on that button and make sure it's not red anymore:

Image

You can now press playback button or drag animation slider left/right to see animation playback in perspective view:

Image

That's all. Your first animation is ready.



Saving animation.

You can save your animation or export it into PMA file for ETS/GTS. Since ETS/GTS pma file does not directly bind track to objects, it refers to animateable objects by their ID. If you ever imported anim.pmd model (with "merge models" off) you have seen a lot of separate objects that can be animated. Each object has an ID in External State -> ID in it's properties. This is an ID value you have to set on track to bind this track to an object (for proper export only; does not affect ZModeler) :

Image

I don't mind setting value here, just shown where you set ID on each track. Then you press a drop-down arrow on "Animation" button:

Image

And pick "Save as file" in menu to save an animation:

Image

Type the file "wipers.pma" and press Save to save animation.

Your pma animation is ready. Of cause, this is a sample guide and it will not work properly in game. At least it will not animate wipers, while it could animate something else (it's up to an ID values on animation tracks and according objects in anim.pmd scene), but you are free to practice and create your own animations.

Note, some animation require to animate objects that has parent-child relation in scene. While ZModeler can animate only parent object and child will be affected instantly, this will not work when you deal with PMA animation files. You need to create tracks for each object involved in animation. Evenmore, you have to set up animation tracks relation exactly the same as respective scene objects.
For example, original wipers animation contains four tracks for two wipers: (track for wiper arm and a track for wiper blade) x 2times. Since wiper blade is a child of wiper arm in scene, animation tracks should be drag and dropt to create parent-child relation in Track editor too. Otherwise, an animation will be incorrect. Unfortunally, PMA file does not label tracks, and we don't know which track should be parent, which should be child. However, track's ID value is given, you can check scene object IDs to set up tracks respectively.
User avatar
Oleg
Site Admin
 
Posts: 7830
Joined: Fri Feb 06, 2004 3:54 am

Return to ZModeler3 Knowledge base

Who is online

Users browsing this forum: No registered users and 1 guest

cron