OpenArena Message Boards

OpenArena Contributions => Models => Topic started by: cheb on June 19, 2016, 01:50:47 PM

Title: Perils of frankensteining
Post by: cheb on June 19, 2016, 01:50:47 PM
So I was trying to sew a peasant girl from upper half of Ayumi and lower half of Assasin.
They match well, BUT!

It drank several liters of my blood!  :RIP:

Why? Because animation.cfg is screwy  :-X

I copied the lines for lower torso 1:1 from assasin, but the animations turned out to be all broken!

I would never got it right if not remembering about ages-old tool gathering dust in my disk archives. MD3 viewer. Made by Sulaco (the guy himself is long dead) to demonstrate OpenGL using Delphi. Sources included, and, most importantly, it parses animation.cfg the same way as OpenArena does. Perfect for rapid trial-and-error corrections.

Soooo... What did I learn?
  skip := anim[LEGS_WALKCR].firstFrame - anim[TORSO_GESTURE].firstFrame;
    Anim.firstFrame := Anim.firstFrame - skip;
Well, FFFFfffuuuu----
In short, the code ASSUMES that lower part's and upper part's animations begin at the same frame number and forcibly synchronizes crouch-walking to gesture.
Because the lower animation has to both be correct relative the first frame of upper part's gesture animation and use correct frame numbers. In this case (death animations of different length)... Yeah.
I clamped the death animations to values where upper and lower fit, but the gesture animation is screwed. (as you can see with my peasant girl, she has parts of death animation mixed in)

TL;DR: If you make a frankenskin, copy the gesture animation from the lower body's owner's animation.cfg and pray it falls onto usable frames. Because otherwise all lower body animations are screwed. :mad:

Title: Re: Perils of frankensteining
Post by: fromhell on June 19, 2016, 03:13:43 PM
The start of the taunt animation sequence usually throws off the lower animations

In my new OA3 models I have organized animation sequences that all begin evenly, most being 19 or 29 frame sequences, so the file's a little more consistent to read, easier to animate for (in blender) and lines up with both lower and upper animations

Title: Re: Perils of frankensteining
Post by: cheb on June 19, 2016, 11:06:44 PM
In theory it should be possible to fix this by adding an abstraction layer so that the engine processes animations in terms of 0.0..1.0 virtual scale instead using integer frame numbers directly, so even models with different number of frames could be stuck together.

But in practice it's soooo bothersome :no: Who, me? I think, not.
I wonder why no one thought of this before. Frankensteining is fun!

Title: Re: Perils of frankensteining
Post by: fromhell on June 20, 2016, 03:57:54 AM
Some ( Have (!