Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The tome of animation
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#1
Heart  The tome of animation

Welcome fellow modder!


Combine this guide with:
(1) Modeling: http://www.frictionalgames.com/forum/thread-9790.html
(2) Texturing: http://www.frictionalgames.com/forum/thread-11232.html

And you should be able to create your very own custom monster!


Images:
https://www.dropbox.com/gallery/20790433...n?h=00f052

Higher resolution:
http://imgur.com/a/EGF17#0

Track-bar picture:
http://imgur.com/5cXlC

1: Track-bar. 2: Track-bar-slider.

1. Introduction

Animating is known to cause: Anger, loss of sleep, confusion & feelings of awesomeness.

Animating something is quite easy actually. There are however a lot of pitfalls, which will result in an incorrect export. I will try to make you aware of these pitfalls & provide general tips for making the animation process easier for you.


All of this knowledge is self-learned, I would however like to express a special thanks to the user "MrBigzy", who has helped me countless times.

Let's start!

2. Rigging a skeleton sucessfully
Golden Rules:
  • One skeleton
  • One mesh
  • Never rotate a joint which is not bound to a mesh! Use the move tool instead.

General tips:
  • An individual joint is selectable by selecting the line between the two points.
  • Always build the skeleton from the center outwards.
  • Think of where the movable/rotatable parts of the body occur.
  • Press "4" for a wireframe view.
I downloaded the model (the horseman) provided by the user "hermoor" as a tutorial resource. You can find it in his thread under "developement resources".


----- Preparing the scene ------
1. Remove the light source
2. Window --> Settings/preferences --> preferences --> Settings
3. Up-axis: Y
4. Linear: Meter
5. Save
6. Rotate the model and center it
7. Add the texture
-------------------------------------

When creating a skeleton for something, think about it's movement. A biped; something with two legs and usually two arms has a basic repeatable skeleton structure.

A skeleton consists of joints which are linked together and placed in a hierarchy. Each joint provides a point of movement. To create a realistic finger for example; 4 joints are required. One at the tip of the finger, one at the first "dent" (about 2 centimeters from the tip), one at the next and one where the finger starts from the palm. Why am I even rambling about this? It is to give you a greater understanding of why skeletons are created the way they are and how they work.


Back to the example at hand. Bring up the 4-perspective view and click "view --> predefined bookmarks --> right side" at the window in the bottom right corner (Picure 1). The first thing you should create is the spine, starting with the root bone.

Think of the rootbone as "the tree" and each other piece as "roots" branching from it. Selecting the rootbone will select every bone in the skeleton. Moving the rootbone will move the entire skeleton. Arms & legs are built separately - and that for a reason. The common thing about them is that they should always be built starting "inwards" and going "outwards". Meaning that an arm should be started at the shoulder and finished at the hand.

Here I have built the spine and head bones (picture 2). I have marked the menus which you should access as well as where on the model to start. Since I centered it at the start and it is symmetrical the spine itself should be created right at the middle of the model. I started the spine at the hip in the side view and built it upward toward the head. Having the skeleton build and movement "in mind" I added one joint in the stomach area, one in the shoulder area, one in the neck area and one near the top of the head. Once I was done I pressed "Enter", which created the skeleton. The stomach area joint will allow the model to bend forward, the shoulder area joint will allow me to add arms and the neck+head joint will allow me to move the head.

Next up I created a leg (picture 3). View --> Predefined bookmarks --> Front. I have marked where to start the leg. Next I added one at the knee, one above the foot, one at the heel and one at the front of the foot. I then finetuned them in the perspective view (marked "2" on the picture). This was to adjust & move the last joint to the front of the foot.

Now you have two different bones, which are not connected yet! One spine and one leg. Since this model is symmetrical I can "copy" the leg I have created to make another! (Picture 4). If it mirrors the leg incorrectly, simply double click the "mirror joint" and a window should open up as in the picture. There you can adjust the direction of the mirroring.

Next I did one arm; the right one (Picture 5). I used the front view to create it and then adjusted it in the perspective view. Explanation of each joint:
1. Will allow me to move the entire arm
2. Will allow me to control elbow moment
3. Hand movement
4. Clasp the hand
5. Finger movement (all except thumb)

I was lazy and didn't do joints for each finger. If you feel like doing it you are free to do so. Simply select point 4 and create one point 5 (followed by the joints for the finger) for each finger.

Next, mirroring! Do the same as you did to the leg.



Now, as we have a skeleton controlling the model we will need to make it one skeleton (picture 6). Select the whole leg joint, then select the closest joint (it is the root joint). Press "P" to bind the leg to it. Now repeat this for the other leg as well as the arms. When working with the arms; bind it to the "shoulder spine" joint - the joint closest to the arms.

The skeleton is done! (picture 7)

Always save your model at this step, something might go wrong once you bind the skeleton to a mesh. Have several saves of the same model.


3. Skin binding + weight painting + test animation


Golden Rules:
  • Maximum number of influences can at most be 3
  • Smooth skin bind
  • Normalize weights!

General tips:
  • Create a test animation to see which parts need weight painting.

Start by drag clicking to select the entire skeleton. Then shift-click the mesh. What to adjust next is viewable in the picture (picture 8). Go to Skin --> smooth bind --> the square right to it. That will bring up the options window (picture 9). The "max influences" = 3 is the most important option here. It determines how many joints each vertex point may be bound to. Three is the maximum number allowed for in Amnesia - higher settings will cause a crash! Then bind the skeleton.

Your skeleton will now be able to move the model. Try selecting one of the arms and rotate it. The arm will rotate with it! Nice. Press ctrl+z to make it back to the usual pose.

Save your project; File --> Save as.

This is how it looks once I tilt the head backwards (picture 10). Without weight painting the mesh will stretch and look unnatural when moved. This is due to the vertexes being bound to joints they shouldn't really be bound to. Thus when I rotate the head a joint at the chest still keeps the mouth parts close to it - dragging the mouth towards the chest making it look really bad.

Select the mesh. Double click the paint skin weights tool (picture 11). The mesh will turn black and white. The black or darker parts reflect zero or little influence by the joint selected in the menu to the right. Adjusting the "Value" (in the menu) to zero will paint black (zero effect), adjusting it to 1 will paint white (full effect). Gray is something in between. This is how you create a good animation. Much work lies here.

Clicking different joints will showcase different areas of white. The weight painting is not perfect and you will want to adjust where it is incorrect. Lets start with the head.

I selected the joints close to the head and checked their influence. The shoulder joint for example influenced the head (picture 12). Moving this arm would therefore cause a mesh distortion on the head. I selected it, set value to zero and painted the head black. Then I selected the head joint and painted the head fully white, giving it maximum influence.


I then went around the different joints looking at their influence. This might seem confusing right now, but you will easier see problem areas once you start animating. You can do this as much as you like, go back weight painting in the middle of an animation to fix it up.

Warning: This monster has some serious dental issues with the weight painting. I think I managed to get it to work correctly though.

Lastly, do not forget to normalize the weights of the model (picture 13).


4. Animation

Now it's time to make your first animation.

I have started the habit of File --> Save as --> BasicPose.mb

Then I load that file every time from the save base pose and create my animation. The base pose is an animation where each bone has one key set to the first and last track square. In that way the character starts at one pose and ends at the same - making it easier to create a looping animation such as walking etc. (Picture 14)

Steps:
Select a joint.
1. Use the rotate tool to rotate it.
2. Select a square on the track bar.
3. Key it.

People who have experience editing videos might be aware of "keying". If I key one joint at say track sqaure 1 then a new position at track square 10 - the joint will automatically move there once the animation is "played" (bottom right corner). This is basically animation. Key a rotation/movement of a joint (rotation is preferred unless moving the whole skeleton with the root joint).

When having added a key it is preferrable to first select a specific time on the track square bar, then rotate the joint and then key it. Keying can be done by pressing "S". To prolong the animation (amount of squares) there is a slider below the track bar. Slide it to the right to gain acces to more squares.

Animations can also be slowed down once imported to the game.


Download the horse man walk animation:
http://dl.dropbox.com/u/20790433/horseman.zip


Something is broken about him. I think I managed to fix some bad normals. The animation won't export correctly though. Will have to talk to MrBigzy about it.
Edit: I have created a .dds diffuse for him. One normal map and one spec too. Rigging is done. Weight painting is good. The only thing is the darned animation..

"Animating is known to cause: Anger, loss of sleep, confusion & feelings of awesomeness."

[Image: mZiYnxe.png]


(This post was last modified: 11-28-2011, 10:46 PM by Acies.)
11-21-2011, 02:05 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#2
RE: The tome of animation

Quote:"Animating is known to cause: Anger, loss of sleep, confusion & feelings of awesomeness."
HahaBig Grin
Thanks for great guideSmile
I can maybe do my own enemy/bogeyman to my modSmile

When Life No Longer Exists
Full-conversion mod
(This post was last modified: 11-23-2011, 07:01 PM by Unearthlybrutal.)
11-21-2011, 03:59 PM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#3
RE: The tome of animation

Animation is a huge hurdle in this community -- great to see this resource here for people to see. I personally have given up hope as a 3D artist; I just don't have the patience anymore XD

Perhaps in the future I may come back to it. Perhaps.

Thanks for the contribution. +1!

11-22-2011, 07:51 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#4
RE: The tome of animation

Just a few corrections:

-You can bind multiple objects to one bone structure, but you can't have some binded and some not in the scene. You may be able to use separate bone structures for separate meshes in a scene, not sure of that.

-Max influences on a joint is 4. (At least as stated by the modelview error logs)

Additions:

-You should ALWAYS delete history before binding the mesh (as well as save an older version before deleting it). Freezing transformations might help too.

-It is best to practice locking weights while painting them, meaning you should lock all weights except the one you're painting. When painting weights, all weight values must add up to 1, and when painting, weight values will be taken from other joints accordingly. Locking weights can prevent this (it can also override the weight to be a value other than 1, which will cause the vertex to stretch wayyyyy out, as I'm sure many of you have seen in the model viewer before; so you have to be careful about how you paint, and be ready to undo a lot sometimes). After finishing painting with your joint, lock it and unlock the next one you want to paint with, etc.

Also, I don't think there's any need to remove the light source from the scene, I've never had to before.
11-24-2011, 12:00 AM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#5
RE: The tome of animation

i have to check this out wend i have some models Wink
11-24-2011, 02:02 PM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: The tome of animation

....VERY GOOD, finally; a good tutorial on how to make an animation! If this isn't on the wiki, get it on there now lol Smile +1

11-25-2011, 06:45 AM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#7
RE: The tome of animation

What is wrong? I have made new enemy and skeleton for it, but when I open it in model editor or model view, it's about 20x bigger than for example grunt or brute. I have tried to change it's scale but in model view it's still big. Can you help me with this?Sad
_________________________________________________________________________________________________

Edit: SolvedSmile

When Life No Longer Exists
Full-conversion mod
(This post was last modified: 11-27-2011, 07:55 PM by Unearthlybrutal.)
11-27-2011, 02:37 PM
Website Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#8
RE: The tome of animation

"WARNING: Animation missing channel!"
Model Editor.log, I'm not sure what to do with this.
I've done idle animation for monster and when I try to add animation to it, the editor crashesSad

When Life No Longer Exists
Full-conversion mod
11-27-2011, 08:18 PM
Website Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#9
RE: The tome of animation

You should always check the scale before rigging a model. After rigging, even if you just scale the model down by itself and it seems fine, the rig is still the same size and HPL2 will think of it like that. You'll have to unbind the mesh, scale both the model and the skeleton, and rebind.

I think there are other situations where it scales ridiculously large too, but I don't know all the reasons yet.
(This post was last modified: 11-27-2011, 09:49 PM by MrBigzy.)
11-27-2011, 09:49 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#10
RE: The tome of animation

(11-27-2011, 09:49 PM)MrBigzy Wrote: You should always check the scale before rigging a model. After rigging, even if you just scale the model down by itself and it seems fine, the rig is still the same size and HPL2 will think of it like that. You'll have to unbind the mesh, scale both the model and the skeleton, and rebind.

I think there are other situations where it scales ridiculously large too, but I don't know all the reasons yet.
I solved that out when I had this problem. I forgot to set "linear" to meters instead of centimeters in mayaSmile

When Life No Longer Exists
Full-conversion mod
(This post was last modified: 11-28-2011, 04:13 PM by Unearthlybrutal.)
11-28-2011, 04:11 PM
Website Find




Users browsing this thread: 1 Guest(s)