JK2 anims in JKA -1 reply

Please wait...

Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#21 8 years ago

Update: I'm mostly done now, except for the math (although I have no idea what's wrong, it should work!), but I can already certainly say: The left hand lightsaber bone will be broken. Unavailable in the JK2 skeleton, it's parented to the elbow in Jedi Academy's skeleton, so it'll follow elbow movement, not hand movement.




eezstreet

Lord of the .DCC files

50 XP

16th June 2008

0 Uploads

2,662 Posts

0 Threads

#22 8 years ago
Mr. Wonko;5649014Update: I'm mostly done now, except for the math (although I have no idea what's wrong, it should work!), but I can already certainly say: The left hand lightsaber bone will be broken. Unavailable in the JK2 skeleton, it's parented to the elbow in Jedi Academy's skeleton, so it'll follow elbow movement, not hand movement.

Good to hear! I can care less about JKA stuff being unavailable with these anims, as most of them are with cinematics (and no JK2 cinematics use JKA stuff, obviously)




Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#23 8 years ago

But I just don't know where I err.

Here's where I'm at:

  • JKA animations are stored as offsets from the base position, in parent space.
  • To get the absolute offset of a bone (i.e. in modelspace), you apply the parent-space offsets in hierarchical order.
  • To get the offset of bone A in bone B's local space (i.e. its parent space if B was A's parent), you multiply Bone A's absolute offset matrix with the inverse of bone B's absolute offset matrix.

Somehow the new parent's (i.e. B in my example above) relative offset appears to influence the result - if there's no parent offset, the new offset is correct. Hmm...

--edit-- Okay, I think I've got it. I had this solution earlier, but since it has some jitter I thought it'd be wrong, but compared to the original animation it's much better than the other one, which had the jitter as well. I suspect it to be a rounding error or some other inaccuracy, though I'm not sure yet. I'll see if I can fix it. Until then, here's the current version.




Erstok

Anonymous

50 XP

18th September 2008

0 Uploads

255 Posts

0 Threads

#24 8 years ago

Don't need the JK2 skeleton. Can edit the JA skeleton to make the models work in JK2.

Psyk0 over at lucasforums explained it to me ages ago.

Only real difference between JA and JK2 skeleton was JA added things on and altered bones on the left hand, setting it up like the one on the right hand, so left hand could utilize animations for sabers. JK2 had no animations setup for saber combat outside of single saber. So for example in JA use a JK2 model sabers stay in the left hand when you do special moves with duals.

Think in the xbox version as well could actually change to left handed saber combat as well with single and staff. But anyway....

rename lhang_tag_bone to lhand_tag_bone. Then take the tag that is in the left hand, bolt_l_hand.

Remove lhang_tag_bone and add in lhand. Weigh ever point on lhand in the bolt_l_hand completely to bolt_l_hand.

That's it. When your done have to compile with the Jedi Outcast .gla in the _humanoid folder.

you will need to rename "lhang_tag_bone" to "lhan[COLOR=Red]d[/COLOR]_tag_bone"

-It's possible the mc5 bone prevents compiling if it's missing.

-The bones that were removed from the old JO skeleton are fingers and "feet" joints, honestly it shouldnt make a difference, no one cares if the toes and remaining fingers are bending or not wink_.gif.

Hope that helps you folks out.

Any model I setup for personal use these days I always weigh with JK2 bones cause love idea of using a model in both games.




minilogoguy18

kitty dances for rep!

50 XP

4th September 2004

0 Uploads

2,675 Posts

0 Threads

#25 8 years ago

Well I posted multiple times that any editing isn't even necessary, if the skeleton+animations can be imported then the frames can easily be transferred to an unanimated JA skeleton. They don't want to listen though and prefer to waste time trying to fix the hierarchy that doesn't even need to be in tact.




Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#26 8 years ago
minilogoguy18;5649200Well I posted multiple times that any editing isn't even necessary, if the skeleton+animations can be imported then the frames can easily be transferred to an unanimated JA skeleton. They don't want to listen though and prefer to waste time trying to fix the hierarchy that doesn't even need to be in tact.

Running an automated script is far more convenient than manually retargetting it in the Mod Tools or wherever. Besides, time spent programming is never wasted.




Erstok

Anonymous

50 XP

18th September 2008

0 Uploads

255 Posts

0 Threads

#27 8 years ago

Wouldn't it just be simpler to use max and load up JK2 animations then just save them under a different name and compile them to JA? Since I imagine only specific animations are gonna be taken from JK2.

I miss my amcrossarms and amthink :(

I would imagine lot of the animations used in JK2 were used in JA. Though I think they just cut out a lot of animations and added in a few new ones.




Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#28 8 years ago
Erstok;5649266Wouldn't it just be simpler to use max and load up JK2 animations then just save them under a different name and compile them to JA? Since I imagine only specific animations are gonna be taken from JK2.

Nope, not that simple.




minilogoguy18

kitty dances for rep!

50 XP

4th September 2004

0 Uploads

2,675 Posts

0 Threads

#29 8 years ago

Erstok;5649266Wouldn't it just be simpler to use max and load up JK2 animations then just save them under a different name and compile them to JA? Since I imagine only specific animations are gonna be taken from JK2.

I miss my amcrossarms and amthink :(

I would imagine lot of the animations used in JK2 were used in JA. Though I think they just cut out a lot of animations and added in a few new ones.

No, firstly, we don't have source files in dotXSI to import and the newer versions of max don't have dotXSI 3.x import/export support even though Softimage was acquired by Autodesk the format isn't supported by the newer crosswalk and it's just so old. Second, a .gla importer doesn't exist since it's meant to be a 1 way compiled format but Mr. Wonko is working on that.

I wonder how much information is retained from the dotXSI format upon compile, like perhaps if some sort of script can be made to reverse the compiling process so that users of Softimage could import them as well.

Also, Mr. Wonko, have you thought about maybe getting in touch with Wudan, the creator of Dragon? I'm sure he probably has quite a bit of info on the .gla format considering his program could open, edit and write/save .gla files.




Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#30 8 years ago

minilogoguy18;5649336Second, a .gla importer doesn't exist since it's meant to be a 1 way compiled format but Mr. Wonko is working on that.[/QUOTE] Wrong. I've been done with that for months, it just doesn't run in the latest version of Blender yet.

[QUOTE=minilogoguy18;5649336]Also, Mr. Wonko, have you thought about maybe getting in touch with Wudan, the creator of Dragon? I'm sure he probably has quite a bit of info on the .gla format considering his program could open, edit and write/save .gla files.

(Almost) all the necessary information on the gla and glm format is included in the Jedi Knight 2 mp source code (in renderer/mdx_format.h, I think).