lfnetwork.com mark read register faq members calendar

Thread: NEW ANIMATIONS IN JKA/JK2 - HowTo
Thread Tools Display Modes
Post a new thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Prev Previous Post   Next Post Next
Old 07-29-2003, 10:15 AM   #1
ASk
No purchase necessary!
 
ASk's Avatar
 
Join Date: Mar 2002
Location: Israel
Posts: 525
NEW ANIMATIONS IN JK2/JA - HowTo

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/showthrea...hreadid=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:
Code:
ANIM_NAME	startingframe	framecount loopframe speed

For example:
Code:
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 ============
Code:
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
//
////////////////////////////////////////////
NEW_ANIM,
//////////// end of example ////////////////



//# #eol
MAX_ANIMATIONS,
MAX_TOTALANIMATIONS
} animNumber_t;
========= eof of game\anims.h =========

and

======== cgame\animtable.h ===========
Code:
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
//
////////////////////////////////////////////
ENUM2STRING(NEW_ANIM),
//////////// 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


Last edited by ASk; 08-01-2004 at 03:51 AM.
ASk is offline   you may: quote & reply,
Post a new thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > General Editing > NEW ANIMATIONS IN JKA/JK2 - HowTo

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:17 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.