| Okay, so we can get the dude looking up and
down, why bother? First and foremost it allows
animation mixing between the upper and lower
bodies, so now when a player's lower body is
running, jumping, swimming, or crouching their
upper body can be looking left or right and
aiming up or down. This also reduces the amount
of data per model because the lower body doesn't
need 17 frames to look around, only a simple
standing (aggressive) frame. The lower body
doesn't have to store swimming, jumping, or
crouching because its pose remains unchanged.
Once the critical issue of breaking the animation
sync between modelindexes (aka tris.md2 the
player and his attachments like weapons or flags)
is fixed, a larger issue is how to align these
separate models during some radically different
poses. Quake 3 Arena, the boxed version, uses
special triangles in a model known as tags
to align the torso, head and legs (in the test
they all shared the same model origin). But since
I'd like to avoid messy formatting issues I'll be
using a solution proposed by Fugitive on the RUST
forums. His idea is to store offset points in a
txt file and keep the file in the baseq2\player
folder with these enhanced models. Then as the
models are loaded, the txt file would be read and
these offset values used.

For the alpha
release of this test model I'm using offset
"states" which get stored once and
apply to one or more animations. There is only
one offset at the moment, its unlikely there will
be more, and its used to position the upper body
(and its derivative models like guns, flags, the
head, etc.) whilst the lower body uses the
traditional Q2 player model origin; the one that
sits 24 units off the ground. Cerain animations,
such as death, involve the whole body and as such
a null offset is used and all parts of the model
must be positioned at the traditional origin and
appear in frame sync. For the alpha release there
are only 3 states (aside from null), one for
standing, one for the animation called runTestB
and a final state for the crouched pose. Null
offset animations include runTestC,
crawlTest, and all but
the first frame of jumpTest.
Redundant frames between the models have been
eliminated so the upper body excludes the 1st
frame of jumpTest, all of runTestA,
and runTestB. The lower body doesn't
include any aiming frames, holstering, switching,
or throwing frames. If you haven't already then
check out the text file included with the alpha release (521K).
QDevels
thread dicussing implimentation
Questions, comments, insults,
all welcome and appreciated!
--Priv
|