Number of frames question finally answered

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Number of frames question finally answered

Post by FragMe! »

Forever every one was debating how many frames this animation has and that one has and how many should or can be used for new ones. Well there is a way to find how many frames a animation uses.

In the munge.bat file found in the animation folder for example:(assets/animation/SoldierAnimationBank/ep3obiwan) add /comp_debug 0 /debug after where is says obiwan.zaf and before the quotes so it would look like this

@call ..\munge_animation.bat "/keepframe0 /dest obiwan.zaf /comp_debug 0 /debug" Sides\Rep

This will print out a obiwan.zat file. One important thing, if the directory does not have a basepose.msh copy a similar one from another directory, in this case just copied one from human_1 it won't work otherwise.

Now if you open this file with notepad or your editor of choice you will see all sort of information but here is a couple of examples.
Hidden/Spoiler:
ANMS
{
File format version: 8.0
comp_debug level: 0
Num Animations: <9>
ANIM
{
Anim Name: <obiwan_sabre_jumpattack_end_full>
Anim Name CRC: <0x4b4b9636>
Num Frames: <20>
Num Frames (from keys[0].quats.size) <20>
Num Joints: <26>
transBitFlags: <0x4004>
Hidden/Spoiler:
ANIM
{
Anim Name: <obiwan_sabre_stand_attack1b_end_full>
Anim Name CRC: <0xdfccd7e>
Num Frames: <25>
Num Frames (from keys[0].quats.size) <25>
Num Joints: <26>
transBitFlags: <0x4>
Hidden/Spoiler:
ANIM
{
Anim Name: <obiwan_sabre_stand_attack1b_full>
Anim Name CRC: <0x22da82c8>
Num Frames: <9>
Num Frames (from keys[0].quats.size) <9>
Num Joints: <26>
transBitFlags: <0x4>
As you can see there are various different frame lengths so you do not necessarily need to try and fit an animation to 10 or 20 frames.

Other useful things from the zat, you can get a listing of all the bones, and if you follow it down you can find out where a bone is parented to thus finding out the hierarchy. and such
Hidden/Spoiler:
Num Joints: <20>
Joints:
{
0: <1> bone_r_calf
1: <2> bone_r_foot
2: <3> bone_r_toe
3: <4> bone_a_spine
4: <5> bone_b_spine
5: <6> bone_ribcage
6: <7> bone_l_clavicle
7: <8> bone_l_upperarm
8: <9> bone_l_forearm
9: <11> bone_l_thigh
10: <12> bone_r_clavicle
11: <13> bone_r_upperarm
12: <14> bone_r_forearm
13: <16> bone_l_calf
14: <17> bone_l_foot
15: <18> bone_neck
16: <19> bone_head
17: <20> bone_l_toe
18: <21> bone_pelvis
19: <22> bone_r_thigh
}
Hidden/Spoiler:
Name <bone_r_calf>
Name CRC: <0xb2f01cd3>
Parent Name <bone_r_thigh>
Base Rotation: <0.000304,-0.000111,0.130782,0.991411>
Base Trans: <0.480000,0.000008,0.000036>
Base Pose Matrix (LS-WS):
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Number of frames question finally answered

Post by Teancum »

Nice find. You should add this to the FAQ
Post Reply