News: 1up Discord VOIP
Invite Code: https://discord.gg/VPv9JhP

Author Topic: Examples: Linking and Animation  (Read 1867 times)

0 Members and 1 Guest are viewing this topic.

Offline RonaldLee[1up]

  • *[1up] Clan Founder
  • [1up] UrT Admin
  • [1up] KF Admin
  • [1upZ] NMRiH Admin
  • [1upZ] Zombie
  • Posts: 5,569
  • Karma: 2634
  • 1up Founder
  • Since: 02/03/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • 1up Clan
    • Youtube's channel
Examples: Linking and Animation
« on: July 13, 2010, 05:17:22 PM »
The below information is from Reaction Quake III:  http://screenshots.rq3.com/bird/exporting_guide/guide.html

In this guide, I'm going to focus mainly on weapon models, as they are the most complex of the four types that this guide covers.  Item, map, and ammo models do not require the animations or multiple files needed by the weapon models, making them much simpler to create. 

Linking and Animation

Initially, we have just our default mesh, without any arms.  I'm using the mesh for my daito sword model here, with a basic checker texture so that I can look for any texture coordinate stretching.


At this point, if you're making a weapon model, you'll have to add in the hand models.  These can be found here: http://screenshots.rq3.com/bird/exporting_guide/files/arms.max.  Note that in addition to these arms, you will also have to add different tags for different types of weapons.  For example, a handcannon model does not use the laser or silencer tags to place those objects on the model in first person view, but an m4 model would.  If you are unsure what tags belong on your model, open the appropriate file from the Reaction Quake 3 .pk3 files in Npherno's md3 compiler, and look at what tags are present.  Pk3 files can be opened in any zip program, such as winzip.  Once you have the arms added, scale your weapon to match, and position it about how you'd want it to be held.


At this point, your weapon model is in the right position, and is the right size, but its movements do not follow those of the arms.  Rather than trying to animate the arms and the weapon independently, and then try to make them match, we can make the weapon's movements follow those of the arms.  This is done with a linked X-Form modifier.  By default, objects are not linked, as the following picture shows.


When you click the "Pick Control Object" button, you will be able to pick the object that you want your weapon to follow.  This can be done by either directly clicking on it, or by selecting it from the list of objects in the scene.  In my case, I'm linking to a bone I have, called (b)Knife.


If you rotate the arms now (note that you should never move the arms themselves, only the biped which they are linked to), you should see your weapon move with it.


At this point, you can begin animating.  I usually make a keyframe of the weapon at it's default position, and place copies of it along the timeline.  This way, I can easily go back to my initial pose, and minimize and jerkiness or continuation errors in the process.


Another thing which you might find useful is to ensure that the rotation and movement controllers for your weapon are set to something like Smooth rotation.  This often minimizes the amount of keyframing that is required to have something rotate and move around.


The list of what frames are used for each animation sequence can be found in the Reaction Quake 3 .pk3 files.  They are located in a file called animation.cfg, with one in each directory for the different weapon models.  Note that you MUST have this file in your directory, or else your animations will not work.  Each animation.cfg file has information in the following format, although the exact lines will vary:

// animation config file
// first frame, num frames, looping frames, frames per second
//
0       21      0      30     // slice
21       1      0      10     // reload (redundant)
21     19      0      15     // idle (slice)
101     5      0      10     // disarm (slice)
105     5      0      10     // activate (slice)
104     1      0      10     // empty (slice/redundant?)
40       9      0      23     // extra1 - switch to throwing
94       7      0      15     // extra2 - switch to slice
49       9      0      10     // throw
57     30      0      15     // idle (throw)
86       5      0      10     // disarm (throw)
90       5      0      10     // activate (throw)

Looking at the first line, we see that this tells Quake 3 that you want 21 frames of animation, starting at frame 0, 0 frames will loop, that it should run at 30 frames per second, and that this animation is for the slice.  Note that if you need, you can change the number of frames and framerate, provided that the running time is unchanged.  For example, you could have 42 frames at 60 frames per second.  Your animations should follow this file.  As a result, the first 21 frames (0 inclusive), should contain the slice animation (if you are modelling a knife, as I am).  By hitting the "n" key, you enter animating mode.  At that point, I usually use auto-keyframes, so that when I change the position of an object at a frame, it stores that information for me automatically.  Merely position the arm and weapon models where you want them to be at each point, and have it automatically keyframe the required information.  It is best to have as few keyframes as possible.  This will simplify your animation files, making them easier to edit and control.

If you would prefer to use pre-made animations instead of making your own, and you have a copy of Character Studio, .bip files for each of the weapon types can be found here: http://screenshots.rq3.com/bird/exporting_guide/files/bipeds.zip.  To use these files, load up the arm file, and position your model as normal. Then, click the button shown in the following screenshot:

« Last Edit: July 13, 2010, 05:26:54 PM by RonaldLee[1up] »

Offline SnKQuaKe

  • *Friend of 1up
  • Posts: 1,218
  • Karma: 58
  • Keep it simple stupid
  • Since: 25/11/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • Youtube's channel
Re: Examples: Linking and Animation
« Reply #1 on: July 13, 2010, 06:29:27 PM »
Are you doing this yourself?
“You can think I'm wrong, but that's no reason to quit thinking.”

Offline RonaldLee[1up]

  • *[1up] Clan Founder
  • [1up] UrT Admin
  • [1up] KF Admin
  • [1upZ] NMRiH Admin
  • [1upZ] Zombie
  • Posts: 5,569
  • Karma: 2634
  • 1up Founder
  • Since: 02/03/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • 1up Clan
    • Youtube's channel
Re: Examples: Linking and Animation
« Reply #2 on: July 13, 2010, 06:32:06 PM »
Are you doing this yourself?

I put this here for a model maker to review and for anyone else who wants to do this stuff and needs some info on how it works.

frostdani

Re: Examples: Linking and Animation
« Reply #3 on: July 14, 2010, 05:42:45 AM »
Hello,

But i have a question. You do the model animation in 3ds max , how do you save it so it could be played in the game ?  I know that the game uses md3 files, does this format preserves animation also ?

frostdani

Re: Examples: Linking and Animation
« Reply #4 on: July 14, 2010, 04:40:25 PM »
Hello,

But i have a question. You do the model animation in 3ds max , how do you save it so it could be played in the game ?  I know that the game uses md3 files, does this format preserves animation also ?

Nobody ?

Offline RonaldLee[1up]

  • *[1up] Clan Founder
  • [1up] UrT Admin
  • [1up] KF Admin
  • [1upZ] NMRiH Admin
  • [1upZ] Zombie
  • Posts: 5,569
  • Karma: 2634
  • 1up Founder
  • Since: 02/03/2009
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
    • 1up Clan
    • Youtube's channel
Re: Examples: Linking and Animation
« Reply #5 on: July 14, 2010, 04:46:28 PM »
Hello,

But i have a question. You do the model animation in 3ds max , how do you save it so it could be played in the game ?  I know that the game uses md3 files, does this format preserves animation also ?

http://www.1upclan.info/forum/index.php?topic=4343.0