Jump to content

Home

NEW ANIMATIONS IN JKA/JK2 - HowTo


ASk

Recommended Posts

New Updates are in red

Last update was at: April 1st 2004 - no, this is not an aprils fool joke :)

 

 

Disclaimer: use the process described here at your own risk. Authors are not responsible for any data loss / damage that may

 

occur as a result of following these instructions.

 

Any modification that wishes to use these instructions to create the animations for their mod MUST include the following in

 

the readme/credits file:

 

For JK2:

========= start paste =========

 

New animations in this mod were created using the skeleton made by Corto and the glaMerge program made by ASk. All rights for

these are reserved to the original creators.

 

 

======== end paste ============

 

For JA:

========= start paste =========

 

New animations in this mod were created using the skeleton made by keshire and the glaMerge program made by ASk. All rights for

these are reserved to the original creators.

 

 

======== end paste ============

 

New animations in JK2/JA

 

 

Your animation must have the base 'DaVinci' pose as first frame. It will be ignored during merge.

 

JK2:

 

The process is simple.

 

Get the .xsi skeleton from this link:

 

Skeleton

I think the link is broken now, does anybody have a mirror of that, so I can update

 

Make your new animations, and export this file as XSI.

 

 

Suggestion by Corto: Use only one animation per XSI, it will keep things more tidy.

 

Open Assimilate, add the XSI to it

Double-click the file, and check these boxes:

 

- Keep "motion" bone

 

- Create own skeleton

 

Add these bones to PCJ

- skeleton_root

- pelvis

- lower_lumbar

- upper_lumbar

- thoracic

- cervical

- cranium

- face

 

 

Set the scale to 0.64, origin to 0,0,24

 

 

Save the .car file, time to get dirty (and use the command line)

 

Run carcass.exe with the following command-line parameters:

 

-flatten path:\to\your\file.car

 

Now, time for the fun part.

 

(continue after JA instructions)

========= end of JK2-specific =====

 

JA:

 

The process is simple.

 

Get the .xsi skeleton from the OJP repository (how to access - http://www.lucasforums.com/showthread.php?s=&threadid=119776):

 

Make your new animations, and export this file as XSI.

 

 

Suggestion by Corto: Use only one animation per XSI, it will keep things more tidy.

 

Use the .car file in the Modelling SDK released by Ravensoft awhile ago

Run carcass.exe with the following command-line parameters:

 

-flatten path:\to\ravensofts.car

 

Now, time for the fun part.

 

============= end of JA-specific ==

 

Get the glaMerge program, written by yours truly from

 

GlaMerge

 

Put these files in the same directory as the exe:

 

_humanoid.gla

your.gla

 

Run the program using

 

glamerge _humanoid.gla your.gla

 

 

Optional switches:

 

-o - Makes the program optimise the output, removing any redundant bone data. For the above animation, file size is 9.56mb without -o, versus 9.53mb with

 

-l - Makes the program dump the bone (hierarchy, bone names) data from both gla's. This will be appended to file named 'bone.log' (will be created if necessary)

 

If you specify both switches, the second one (in the order they were specified) will be ignored

 

It should prompt you for the output file name.

 

And wait a bit (a file with 2000 frames takes about 5 minutes on my CPU, and should take around 1-2 minutes on a modern one)

 

After it is done, just add the new animations to animations.cfg using this format:

ANIM_NAME	startingframe	framecount loopframe speed

 

 

For example:

NEW_ANIM	17278	40	-1	20

 

Do this for all the animations, remember to update the startingframe positions accordingly (first new animation should start

 

at 17278).

 

Now, the animations are ready to be played in modview.

 

Example:

 

New animation

 

For programmers:

 

To add support for them ingame, add the same name as you used in the animations.cfg in these 2 source files:

 

========== game\anims.h ============

typedef enum //# animNumber_e
{
//=================================================
//ANIMS IN WHICH UPPER AND LOWER OBJECTS ARE IN MD3
//=================================================
BOTH_1CRUFTFORGIL = 0,		//# G2 cannot have a reverse anim at beginning of file
.........
FACE_DEAD,				//# 
////////////////////////////////////////////
//
//  Add your animations here
//
////////////////////////////////////////////
[b]NEW_ANIM,[/b]
//////////// end of example ////////////////



//# #eol
MAX_ANIMATIONS,
MAX_TOTALANIMATIONS
} animNumber_t;

========= eof of game\anims.h =========

 

and

 

======== cgame\animtable.h ===========

stringID_table_t animTable [MAX_ANIMATIONS+1] =
{
//=================================================
//ANIMS IN WHICH UPPER AND LOWER OBJECTS ARE IN MD3
//=================================================
ENUM2STRING(BOTH_1CRUFTFORGIL),		//# G2 cannot have a reverse anim at beginning of file
......
ENUM2STRING(FACE_FROWN),				//# 
ENUM2STRING(FACE_DEAD),				//# 
////////////////////////////////////////////
//
//  Add your animations here
//
////////////////////////////////////////////
[b]ENUM2STRING(NEW_ANIM),[/b]
//////////// end of example ////////////////
//must be terminated
NULL,-1
};

======== eof of cgame\animtable.h ===========

 

 

Afterwards, refer to them ingame with the usual coding.

 

Enjoy.

 

 

P.S.: If you have any technical questions about the process, feel free to post them here, and I will try to reply to them to the best of my ability

 

Credits:

 

- ASk - coder of glaMerge

 

- Corto - creator of the JK2 skeleton

 

- keshire - creator of the JA skeleton

 

- Special thanks to Wudan and Razor_Ace

 

 

History:

- Fixed origin

- Updated glamerge program, updated instructions to reflect that

- Updated glamerge program once more, updated instructions

- Added bone reordering (to fix wrong internal bone order, providing the hierarchy is fine) to the program. Should produce correct animations now.

- Fixed an overlooked harcoded constant

- Implemented a hack around relativeness of gla format. Proper solution is recalculation of bone offsets, but that does not work at the moment :(

- "merged" info from keshire's post about JA animations. I hope he doesn't notice :p

New updates are in red

Link to comment
Share on other sites

  • Replies 150
  • Created
  • Last Reply

If you have some tech. questions about the .xsi file, which I doubt cuz isn't much more to tell, post them here. But, if you have question about animation stuff (like IK chains and keyframing, or using the animations trackview) pls, register at http://cortocg.com and post at the forums in the correct category. I'll reply as much questions as my knowledge allows me.

 

Cheers!

Link to comment
Share on other sites

I only looked through your steps quickly, but I'll go through them in more detail (maybe try to make my own anim using your process). But it looks mostly right. Two things I see though:

 

The origin should be 0, 0, 24, not 0, 0, 30

 

Assimilate generates the animation.cfg based on the anims you have... do any of you have the original .xsi files and .car file? If so, you might be able to use your new XSI with our old ones (now that the skeleton matches) and build the skeleton properly, like we did...?

Link to comment
Share on other sites

We have neither, except the root.xsi which is in the SDK, and the .scn files, which are the raw version of root.xsi

 

As far as I know, the original XSI's are more than 700mb of data, and I do not know of anyone that has them either.

 

We do not have the .car file, rather, I looked at the bone structure and added the PCJ's manually, and the scale is taken from the humanoid gla.

 

This method generates a new .gla file, which is then merged. When I compiled test anims with carcass using command-line (to force -flatten, just in case), it did not generate an animations.cfg file)

 

 

Origin updated.

 

 

[edit]

 

This project's purpose is to enable modders to add new animations to JK2's humanoid gla (and from what I have seen, adding new animations to JA will be even more straightforward). I believe there are plans to strip all the non-mp related animations from the .gla, but that will be done using tools made by Wudan. However as it is now, this project adds new animations, it does not delete any.

Link to comment
Share on other sites

Originally posted by ASk

We have neither, except the root.xsi which is in the SDK, and the .scn files, which are the raw version of root.xsi

 

As far as I know, the original XSI's are more than 700mb of data, and I do not know of anyone that has them either.

 

I think we might be able to provide them, if someone was brave enough to try to use them and had enough space on their hard drive (would end up needing a couple gigs free at least, I think). I think James offered them to a few people before who were struggling with the anim problem when JK2 came out.

 

Originally posted by ASk

We do not have the .car file, rather, I looked at the bone structure and added the PCJ's manually, and the scale is taken from the humanoid gla.

 

We could easily provide that, along with Assimilate.

 

Originally posted by ASk

This project's purpose is to enable modders to add new animations to JK2's humanoid gla (and from what I have seen, adding new animations to JA will be even more straightforward). I believe there are plans to strip all the non-mp related animations from the .gla, but that will be done using tools made by Wudan. However as it is now, this project adds new animations, it does not delete any.

 

Well, you have to, at best, replace anims, unless you're going to do code changes, too, to add new animation slots.

Link to comment
Share on other sites

Originally posted by imyourfather

Finally, here it is

 

You'll need bink to watch it.

 

- I converted it to exe (to allow better portability) and put it on my site. Hope you don't mind

 

Wow, this is great! I can't wait to see some cool JA mods with new animations! And just in time for modders to get used to the process for JA, too! The JA skeleton is pretty similar to JK2, so the process should easily be usable for the new game. Maybe, CortoCG, we could work with you to get a JA skeleton ready for modders before JA even comes out?

 

:)

Link to comment
Share on other sites

Originaly posted by ChanKhan[RAVEN]

Maybe, CortoCG, we could work with you to get a JA skeleton ready for modders before JA even comes out?

 

Great Mr. Gummelt! I'm in. I think ASk needs to work on his glamerger program too, so we'll talk to see what do we need to get the skeleton fully operational :) and mergeable animations for JA.

We'll let you know by posting in here.

Now, if you at Raven have another "plan of attack", I'm at your entire disposal, and I think ASk is too. You have my email, you have my website (with fully op. forums), so, let's get on it.

Link to comment
Share on other sites

Here is a list of things that ASk and me we'll be needing to make a ready-to-make-animations skeleton:

 

- the base humanoid skeleton with all the bones (if it doesn't have all of them I'll create them as I did with JO) you used for JA, in dotXSI.

- the humanoid animations file for SP and MP to look for the correct hierarchy and bone linking order.

- a humanoid Ghoul2 model to preview stuff, unskinned if you like, we don't need that.

- the .car file used to compile the humanoid animations file should saves us some time.

- the tools used to compile a new gla/glm combo: like the xsi exporter/importer, carcass and assimilate, to make correct dumps of the skeletons.

- any extra info on the tools or the gla transformation matrices you wanna add would be most welcome.

 

That's it I think :D.

 

P.S.: call me just 'Corto', Mr. Gummelt, everybody here calls me like that :).

Link to comment
Share on other sites

Attention: glaMerge had been updated (again).

 

Changes:

 

Fixed behaviour when -o was not specified. Without -o switch, the program works much faster, but creates larger files.

 

Removed hardcoded values, program should now work for merging any 2 skeletons with same bone number (and order), as long as GLA format stays the same.

 

Fixed some of bone dump features

 

Several minor bug fixes added with parsing command line

 

 

Known bugs: if using -l switch to dump the hierarchy and origins (mxdaSkel_t data), origins have incorrect (albeit consistent) values. This does not affect the normal operation in any way.

Link to comment
Share on other sites

Sorry for deleting all the posts, but the thread was going to be cluttered with non-related remarks. Only the posts that are related to currently active discussions are remaining.

 

Don't be mad at me, it's for the best :)

Link to comment
Share on other sites

Since carcass is picky, and fixing bone order proved to be harder to do on the real skeleton, I finally got to adding bone reordering function to the glaMerge program.

 

If now, the hierarchy is the same, and bone in position 15 for original file (for example) is in position 50 for user file, the program will automatically rearrange the bone data to fit the same sequence.

 

This fixes quite a bit of weird bone 'bleed', and hopefully the program will work correctly now.

 

 

Do not forget to get the updated version (glaMerge 1.1b) from the link in the first post!

Link to comment
Share on other sites

For the record, that problem cannot be fixed with 3dsmax, I spent the whole night reordering bones and relinking the whole thing. It's impossible to have a bone in the last place of the list while it's children still are in the middle, it just sounds too esoteric. That's simply devil's work... Or a coder's ;). Anyway, seems like now it works fine thanks to the coding ability of ASk.

 

On the other hand I would like to hear a word from Raven's guys about that strange bone ordering contradiction, just for curiosity (I know curiosity killed the cat).

Link to comment
Share on other sites

Sorry for that ASk, I thought it was the same version becasue it was in the same size.

 

Anyway, I'm so glad my animation is fixed now, I thought it was dommed. :D

 

I hope many others would also make beutiful animations. Too bad you have to replace them with something else, though it won't be a problem when making a whole new SP map.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...