Jump to content

Exporting GLA animations with blender


Recommended Posts

Hello everyone! I'm new here and I have a question regarding exporting the _humanoid.gla file with custom animations. I've imported the GLA into blender with the selected range of keyframes. So far 15068 with a range of 1 (I am trying to make a custom stance)

I then pose my skeleton the way I want it (in keyframe 0 in blender, is this wrong?) and export the GLA with the following settings: 

 

Base path: D:\Games\Jedi academy\GameData\base\

GLA name: empty

GLA reference: models\players\_humanoid\_humanoid.gla

 

and when I load the game, it just crash. I'm suspecting my way of saving this GLA overwrites all the games animations and essentially gives me a blank file with only my few modified keyframes in it. So onto my question, how do I properly modify the GLA and export it?

 

Thanks in advance, regards Moose

Vezonia likes this
Link to comment

Have you merged the newly created .gla with the base _humanoid.gla? Essentially, when you export a .gla you only export the animations you currently created or modified. Also, make sure that the animations you created are keyframed, and make sure the frames you're setting actually exist (set the Start and End frames to have a range to work with). I'm not completely sure how it works, but for the record, I usually leave the first frame totally empty, with the skeleton in its T-Pose. Keyframe every single animation frame you intend to export, Insert Keyframe (I) -> Whole Character (W). Export and merge the two .gla files (yours and the base _humanoid.gla) with GLAMerge:

http://jkhub.org/files/file/1471-glamerge/

Modify the animations.cfg file in the _humanoid folder so that the old animation frame set is replaced with the new. For example, suppose you want to replace the fast stance animation:

 

BOTH_SABERFAST_STANCE    13052    2    -1    20

 

Should be modified to:

 

BOTH_SABERFAST_STANCE    21377*   2    -1    20

 

* total amount of frames (21376) plus the new ones you added to the _humanoid.gla.

Hope this cleared things up a bit. If there's anything else, ask away!

Vezonia likes this
Link to comment

Thanks for your answer! GLA merge seems like the thing I'm looking for, however I am a little bit confused as to why blender imports the keyframes and place them at frame 0 in blender regardless of which frame they are from in the GLA. That leaves no room for a T-pose frame unless I move all the keyframes. Should I just move them all forward one frame and insert a T-pose or should I place them at their actual GLA keyframe in blender prior to exporting?

Link to comment

Okay, I understand now!

 

For those seeking assistance I\m gonna share my knowledge as best I can

 

1: Import _humanoid.gla with animations and specify start frame and animation range (These numbers can be found with modviewer)

2: insert a T-pose at frame -1 by selecting all bones and clearing pose transforms

3: modify animation

4: export GLA (I exported from frame 0 to the end of the animation, basically excluding the t-pose but I put it in there just for good pratice)

5: place GLA in the same folder as GLAmerge and the original _humanoid.gla (or whatever GLA you wanna add your animation onto)

Here is the trick, GLAmerge actually add your animation last in the GLA, it doesnt override the original one so you have to change the animation.cfg to make the modified animation target a different set of keyframes in the GLA. basically, just take the start frame from the last animation in the list + the length of said animation and place it on your modified animations start frame.

Next you can rename your new merged GLA file _humanoid.gla and place it in a PK3 together with the modified animations.cfg and enjoy your new animations

 

And thanks for the help ramikad!

 

 

Also, a good tip on GLAmerge is to place a bat file in it with the following code and run using the bat file:

@[member='Echo'] OFF
"glamerge.exe" "_humanoid.gla" "inputfile.gla" -o
PAUSE
EXIT

21mvu9w.jpg

Vezonia likes this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...