Jump to content


Photo

Soldier, Unit Image Composition


  • Please log in to reply
9 replies to this topic

#1 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 24 May 2007 - 02:25 PM

Someone asked how these images are composed, so i decided to start a thread
so the info would be available to everybody.
Feel free to add information!

Euhm, the images in eg: xcom_0.pck are grouped in 8 frames (for each direction) or 8 frames for an animation, 3 die frames
each frame starts at the NORTH direction (so 0=north,1=northeast,2=east, etc)
Images are stored as BODY, LEGS, LEFTARM, RIGHTARM, DIE frames, sometimes FLYLEGS frames.
Then there are the sequences: STANDING, MOVING, CROUCHING, DYING, FLYING, maybe SLIDING
The arms themselves have 4 modes: FREEHANDS, HOLDLOW (only leftarm), HOLD2ARMS and HOLDHIGH (also leftarm)

Cheers

#2 alytle

alytle

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 27 May 2007 - 10:15 AM

Ok, I'm having trouble understanding the order of some of these items, so I'm hoping you'll continue to lend your experience until I can get this nailed down. I've posted a little helper here so we can reference it. Hopefully I've done it correctly..

Attached Thumbnails

  • xcom_0.png


#3 alytle

alytle

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 27 May 2007 - 10:30 AM

Ok, so looking at the image data I've got posted: some of the components are fairly obvious.

R1:C - LEGS, STANDING (each frame is a direction)
R2:A - LEGS, KNEELING (direction)
R2:B - BODY (direction)
R3-R10:B - LEGS, WALKING (each column is an animation step, each row is a direction)

special cases:
R12:A1-A3 are death animations
R12:A4-B3 are female body replacements

I can't believe they never bothered to make other models for the soldiers. A dark haired, or darker skinned model would have been really cool and help identify soldiers better. Oh well. That's what modding's for.

OK, the big problem I have is with identifying the arms. I've tried to understand based on what you posted earlier, but I'm having trouble with the order. Any help would be awesome :)

#4 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 27 May 2007 - 11:15 AM

I can't believe they never bothered to make other models for the soldiers. A dark haired, or darker skinned model would have been really cool and help identify soldiers better. Oh well. That's what modding's for.


Cool That's a great idea!!

OK, the big problem I have is with identifying the arms. I've tried to understand based on what you posted earlier, but I'm having trouble with the order. Any help would be awesome :)


Well in the attached image you'll see leftarm and rightarm indicated for the "standing" sequence.
If you look at the images closely the left arm is indicated with a "red patch"
and the right arm with a "blue patch"
All the other arms are for the "moving" sequence, each grouped in 8 frames for each direction.
If u look at C1-R2, this is left arm for the North direction (8 frames),
then u have the right arm for the north direction and then the north east direction and so on....

Attached Thumbnails

  • arms.png


#5 alytle

alytle

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 27 May 2007 - 11:53 AM

Ok, the blue/red tag on the arms helps a ton. Can't believe I didn't notice that.

What about the various orders of 'types' of arms (you called them FREEHANDS, HOLDLOW (only leftarm), HOLD2ARMS and HOLDHIGH (also leftarm))

In my image data (after R2 anyways), section A is always right arm, section C is always left arm.

R1:A - right arm (used when standing?)
R2:C - left arm (used when standing?)

R2:C - left arm (North East? A1-A8 are animation frames?)
R3:A - right arm (North East? A1-A8 are animation frames?)
Then each category is just a different direction.

Also, and I've taken this image from the xcom0 PCK (courtesy of Daishiva's little apps) - and my first direction facing in each case appears to be facing North East (taken by looking at the legs and torso). North actually appears to be last. Was that just a typo, or are we looking at different data? :)

#6 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 27 May 2007 - 01:16 PM

North East (taken by looking at the legs and torso). North actually appears to be last. Was that just a typo, or are we looking at different data? :)


Well yeah i guess everybody can interpret it in a different way,
you do whatever u want, that's the freedom you have being a programmer! :)
But it isn't a typo, i use 0=north

And if you do some xcom research you will see the different handstates
while holding different weapons

Cheers!

#7 alytle

alytle

    Rookie

  • New Forum Members
  • Pip
  • 0 posts

Posted 27 May 2007 - 01:45 PM

North East (taken by looking at the legs and torso). North actually appears to be last. Was that just a typo, or are we looking at different data? :)


Well yeah i guess everybody can interpret it in a different way,
you do whatever u want, that's the freedom you have being a programmer! :)
But it isn't a typo, i use 0=north

And if you do some xcom research you will see the different handstates
while holding different weapons

Cheers!



Ah, I see - north is north east because of the isometric view. I just always took "up" to mean North.

#8 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 28 May 2007 - 02:57 PM

What about the various orders of 'types' of arms (you called them FREEHANDS, HOLDLOW (only leftarm), HOLD2ARMS and HOLDHIGH (also leftarm))


SEQ,BODYPART,IMAGEOFFSET
STAND,RARM,8 -> FREEHANDS
STAND,RARM,232 -> HOLDLOW
STAND,RARM248 -> HOLDS2HANDS
STAND,RARM,256 -> HOLDHIGH

I think ?

c image 4 proper offsets

Cheers

Attached Thumbnails

  • arms2.png


#9 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 28 May 2007 - 03:06 PM

What about the various orders of 'types' of arms (you called them FREEHANDS, HOLDLOW (only leftarm), HOLD2ARMS and HOLDHIGH (also leftarm))


An example of the 4 states of the arms!

Attached Thumbnails

  • unit_modes.png


#10 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 28 May 2007 - 03:19 PM

Ah, I see - north is north east because of the isometric view. I just always took "up" to mean North.


I remember when i was looking at the ufo2000 source code that they use a different
approach, in map.h:

enum DIRECTION
{
// The first 8 directions are plain directions, they mean a direction where soldier
// looks to or a direction of movement
DIR_EAST = 0,
DIR_NORTHEAST = 1,
DIR_NORTH = 2,
DIR_NORTHWEST = 3,
DIR_WEST = 4,
DIR_SOUTHWEST = 5,
DIR_SOUTH = 6,
DIR_SOUTHEAST = 7,
// Next 3 can only be used as directions of movement
DIR_NULL = 8,
DIR_UP = 9,
DIR_DOWN = 10,
// Number of directions
DIR_NUM = 11
};

So that's what I mean that each developer implements it as they see fit!