Torchmodders

Modding => Modding Questions => Topic started by: Phanjam on October 06, 2014, 08:14:40 am


Title: Combining Animation Skeleton Files
Post by: Phanjam on October 06, 2014, 08:14:40 am
I really think this is doable but my experiment has not worked so far...

a) converted all 3 left-fist animation skeleton files (Lfist1, Lfist2 and Lfist3) into .XMLs,
b) combined them into 1 file (just the "<track>" lines) and named it Lfist1-3.skeleton.xml,
c) then re-converted that file back into .SKELETON (Lfist1-3.skeleton).

Tried to make an entry for it in the .ANIMATION file but I must have screwed up somehow. So I removed almost all the [KEY] contents for it, but the mesh viewer still wouldn't see Lfist1-3.skeleton as an animation option (am using Dusho's viewer).

I've attached the files in case anyone wants to play with them.  Would any of you have some more ideas I could try?

EDIT:
ALso tried OGRE Mesh Viewer - no dice
Title: Re: Combining Animation Skeleton Files
Post by: gytfunke on October 06, 2014, 08:25:27 am
I so wish I understood what you were talking about  :)

I tried playing with animations for a good couple hours.  Never got it.
Title: Re: Combining Animation Skeleton Files
Post by: TwinkleToes on October 06, 2014, 08:30:06 am
ive tried doing this myself, it got all confusing reading the XML files, i think its best to do this with programs that can fully read the skeleton files, like maya and 3ds max

ill still dl the attachment anyways to see if i can do something with it
Title: Re: Combining Animation Skeleton Files
Post by: TwinkleToes on October 06, 2014, 09:17:26 am
wow.. ive come to realization while i was looking over the files, i very much think this is 100% possible, but an extremely tedious and difficult task if done manually.

each set of animations runs on a 0.8 duration, while each bone used for movement is dictated in key frames spanning the animation length, this basically means you have to edit the key frames for the subsequent bones by adding 0.8 to all the keyframe times, then for the 3rd and final appended animation you have to add 1.6 to all the key frames times..

which is a huge task, because there are so many bones being used, in this case its not as harsh since each animation is 0.8 seconds long, but on longer/more complex animations this job is almost impossible to do in any timely manner..

it did however give me the the idea of being able to modify base animation speeds, by altering the  base duration and the key times. but this way would provide no precision and still consumes a lot of time..
Title: Re: Combining Animation Skeleton Files
Post by: Kva3imoda on October 06, 2014, 11:26:42 pm
I really think this is doable but my experiment has not worked so far...
You want to do a series of blows?
I think it is possible, I played with the duration and other stuff.  :) But it's damn painstaking work.
Title: Re: Combining Animation Skeleton Files
Post by: TwinkleToes on October 06, 2014, 11:54:25 pm
yep.. just tried it, you have to edit about 2000-4000 lines per animation, i got to around 500 lines and broke down lol..
im currently trying to find ways to import .skeleton files into blender so you can edit them with far more ease.
Title: Re: Combining Animation Skeleton Files
Post by: Kva3imoda on October 07, 2014, 08:53:02 pm
yep.. just tried it, you have to edit about 2000-4000 lines per animation, i got to around 500 lines and broke down lol..
Well, as I see this problem, it is necessary to change frames timing + copy/paste frames for each bone. About half hour run time.  :)
Title: Re: Combining Animation Skeleton Files
Post by: Kva3imoda on October 07, 2014, 09:05:05 pm
For example:
Time of each animation is 0.8 seconds. 3 animation in total = 2.4 sec.
We have (for example) T for each animation:
0
0.2
0.4
0.6
0.8
Automatically changes to:
A2: 
0(+0.8 ) -> 0.8
0.2 -> 1.0
0.4 -> 1.2
0.6 -> 1.4
0.8->  1.6
A3:
0(+1.6) -> 1.6
0.2 -> 1.8
0.4 -> 2.0
0.6 -> 2.2
0.8->  2.4

Then copy/paste frames:
A2: frames 1.0 - 1.6
A3: frames 1.8 - 2.4

That should work.  :) And now we have a series of blows.
Title: Re: Combining Animation Skeleton Files
Post by: TwinkleToes on October 08, 2014, 01:22:54 am
Quote
Well, as I see this problem, it is necessary to change frames timing + copy/paste frames for each bone. About half hour run time.  :)

yea i just said that in my last post, you still have to change around that many lines per animation even though your copy pasting from the 1st animation, that's if your 2nd animation is the same as the 1st, if it were different you just have to add the maximum duration of the 1st animation to each key time on the 2nd animation.
Title: Re: Combining Animation Skeleton Files
Post by: Phanjam on October 08, 2014, 05:09:44 am
Hmm is this something @Arkander 's PMPE tool might be able to work with?

It does sound like something a script could handle (wish i knew sone scripting)
Title: Re: Combining Animation Skeleton Files
Post by: Phanjam on October 18, 2014, 08:57:35 pm
Hey I thought I'd just make these experiment files of mine available - might help somebody ;D

I noticed the SPECIAL_SLAUGHTER is 5+ seconds long and has a lot of "hit points", but when I tried using it it didn't seem to be hitting anything.

Then I noticed, in the .ANIMATION file, the definition for this [ANIMATION] had no [KEY] components whatsoever!

So I tried inserting [KEY]s ("hit", "attack sound" and "effort sound" keys) for each swing in the animation (I used OGRE Mesh Viewer to step through frame-by-frame and see the frame numbers).  Saved the new definition into the HUM_M.ANIMATION file and tested it in GUTS.

It worked! :P but I haven't attached it to any skill, so I don't know yet if it's hitting like it's supposed to.  I think I inserted too many sound [KEY]s tho - it's a NOISY animation! :D

The new [ANIMATION] definition lines are in the attached archive in the file "SPECIAL_SLAUGHTER_TIMING Animation Definition.txt" which is meant to be added to the .ANIMATION file. 

So as not to interfere with the original SPECIAL_SLAUGHTER.SKELETON I made a copy of it and renamed it internally to SPECIAL_SLAUGHTER_TIMING.  This .SKELETON file is also in the archive.

The Hum_F model doesn't seem to have the original SPECIAL_SLAUGHTER.SKELETON, so this one I made will only work with the Hum_M model.

Hope this helps someone someday 8)