Author Topic: The Leflair Sprite Sweatshop, Voxels need not apply  (Read 66130 times)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #60 on: September 24, 2012, 06:10:56 pm »
it still makes sense to draw them this way first, so you can see what it will look like once it's being animated by the game.

ah, btw, which parts of the model are being moved up and down by the game? only the torso-and-head part? everything except the legs? everything?

Offline Leflair

  • Colonel
  • ****
  • Posts: 252
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #61 on: September 24, 2012, 06:26:02 pm »
Ah you see, that's ACTUALLY the unarmed combat animation - if you put in a X-Com soldier you can see how he knees the human in the face  :P

(j/k)

That's pretty helpful to visualize what may be "off" indeed!

That's the "unarmed" movement animation - when armed it will have only one set of arms holding the (two-handed) weapon which will only move up and down with the torso, creating a stiffer appearance.

There's a couple of things at work that creates some of those flaws:
I believe I may have accidently copy-pasted the legs/bodies of some of the sprites in that line out-of-synch compared to my drafts (that I keep in another section of my work sheet). There's actually 1 pixel height difference too much between the first 4 frames and the last 4 frames. I never intended that to be an animation test so I rushed it, just to see so that each set of arms lined up with the bodies and didn't block the legs - and to compare them to each other.

For the first draft I also worked on the assumption that the torso's where at a steady height, but from studying the Muton sprites they actually move the torso like so: 0, 0, +1, +2 (or -1, -1, 0, +1) - that goes for the arms and legs as well so I believe the game is juggling a little on purpose to create a greater sense of movement. Or the game itself may be using some inbuilt Y-coordinates to further change how the sprite moves once in game.

I also now noticed that while the torso and arms are doing the Y-dance, the "non-moving" leg ISN'T which creates that "jumpiness" because I copied it wrongly.

Let's see if I can correct it.

Edit:
New draft


Corrected the 1 pixel left:right height difference.

Modified the rightmost arm a little to show more of it, making the "jump" between it and the frame before it smaller.

Had to elongate the two rightmost legs after correcting for the one and two pixel "drop".

Corrected some minor shading errors on some of the legs.

"Repaired" the fifth leg, making it look thicker.
« Last Edit: September 24, 2012, 06:52:38 pm by Leflair »

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #62 on: September 24, 2012, 06:37:22 pm »
You could state that all non-animated parts (items/item carrying arms/torso) are programmatically moving up and down during walking.
I used following offset if it helps: const int yoffWalk[8] = {1, 0, -1, 0, 1, 0, -1, 0}; https:// bobbing up and down
Animated parts have this bobbing movement in their animation, so they didn't have to move programatically.
« Last Edit: September 24, 2012, 06:39:15 pm by Daiky »

Volutar

  • Guest
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #63 on: September 24, 2012, 06:40:32 pm »
moriarty, torso, hands and weapon sprites being moved up or down when drawn, during walk cycle and when unit sit down (sitting legs spritea are used only for xcom sprites, though could be used for aliens too).

Daiky, Mutons have slightly different offset array :P

Offline Leflair

  • Colonel
  • ****
  • Posts: 252
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #64 on: September 24, 2012, 07:02:36 pm »
Which is why it's such a headache to get everything to line up properly on the final .bmp chart, because you got to keep all that in mind while you can't see the complete sprite - a single pixel off and you got an arm that's hovering in mid air  :P

Offline Leflair

  • Colonel
  • ****
  • Posts: 252
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #65 on: September 25, 2012, 10:06:56 pm »
Ported the changes to the NE movement set and ran into some troubles due to the way things are not entirely mirrored between the opposite sides:


I think I caught another thing that made the animation odd, the last four frames up here had very compact legs which I made longer (compare to their counterparts in my previous posts). Olso tried to make the feet closer in level to each other so that the eventual transition between the two Four-sets were smoother.

The transition between the fifth and sixth frames inner legs / the fifth frames little "squat" where it begins moving the outer leg (complete outer leg movement seen in frame 6, 7, 8 and 1). At the same time the inner leg begins pushing a little and so it moves "backwards".

The transition between the inner leg of Frame 4, 5 and 6 aint great either - maybe switch the inner legs of Frame 4 and 5? I think the drop between 5 and 6 is a bit too steep - I'm having trouble getting a good transition from the rather long inner leg movement to a "solid foundation" to begin the outer leg movement on.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #66 on: September 27, 2012, 09:11:45 pm »
I don't know if it helps at all, but I guess you have to think of the leg movements as two roughly circular motions with a phase shift of .5 - one left is in the "front" position when the other is in the "back" position. actually, "roughly circular" is more like a semicircle sitting on the cut-off part, since the "backwards" motion of the foot happens on solid ground. since you have eight frames, you are more or less forced to have the following foot positions:

0 - frontmost position, on the ground
1 - forward of the middle, on the ground
2 - middle position, on the ground
3 - back of the middle, on the ground
4 - backmost position, on the ground
5 - back of the middle, halfway in the air
6 - middle position, highest in the air
7 - front of the middle, halfway in the air

for design reasons, I guess it would make sense to take the foot slightly off the ground in frames 0 and 4, because otherwise it would be "on the ground" too long.

of course, the "on the ground" position for the inner leg is higher than for the outer leg.

Offline Leflair

  • Colonel
  • ****
  • Posts: 252
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #67 on: September 28, 2012, 08:08:50 pm »
Hmm, that makes some sense yes.

Remember here, frame 0 is not actually frame 0 - I've not yet completed all the "standing still" frames.
The rearmost leg in my first frame here should actually be slightly elevated compared to the static frame, as its movement cycle begin (seen more clearly in Frame 1).
When it's actually moving the figure will also be advancing across tiles - so the second frame is kind of an illusion of movement for the front foot - it's only the upper body "falling forwards" (to go with the physics term  :P) as the Veronian starts walking.

You can try a similar pose/walking stance yourself (helps to mimic by standing on your toes), with the rightmost leg slightly in front of your body and then start going forward - once you hit the ground with the left foot (a long step, say 1 meter) the right foot is already halfway from leaving the ground - which is where the current animation kinda "jumps a step" between frame 4 and 5. In frame 4 the left foot is somewhat too high in the air and in frame 5 it's already in the "back of the middle" position as you say and the right/front foot has already jumped to the equivalent of the back foot in frame 1 (the second frame).
If you get what I mean (we might be meaning the same damn thing ;)).

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #68 on: September 28, 2012, 10:46:24 pm »
actually, for the movement animation you shouldn't care too much about the transition from standing to walking - the unit is usually just standing one moment and walking the next, possibly even in a different direction. the walking animation needs to be a smoothly cycling animation first, and afterwards you can see which frame looks closest to the "standing still" frame and take that as the first movement frame :P

but yes, you are right, and I think we do mean the same thing :)

Offline Leflair

  • Colonel
  • ****
  • Posts: 252
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #69 on: September 29, 2012, 06:56:35 pm »
A bunch of new drafts:

Draft 3

Switched places on Frame 4/8 and 5/8. Some minor adjustments to make frame 5's legs long enough to work in Frame 4 after swap.

Draft 4

Continued with Draft 3, but switched Frame 4/8 with Frame 3/8. Some minor changes to frame 5/8 to move the rear foot closer to the ground for transition with frame 6/8.

Draft 5

Same as Draft 4, but Frame 1/8 got the rear leg further up in the air already.

Draft 6

Same as Draft 5, but modifications to Frame 3, 4 and 5/8 legs. Frame 5/8 now has the rear leg touching the ground.

Draft 7

Same as Draft 6, but Frame 3/8 rear leg is closer and higher relative to the body so there's a more marked difference between it and Frame 4/8.

Draft 8

More minor changes compared to Draft 6/7 - Frame 4/8 leg is now slightly more forward to make the movement change greater.


Offline Leflair

  • Colonel
  • ****
  • Posts: 252
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #70 on: October 04, 2012, 07:01:04 pm »
Been little sleep this week due to a multitude of factors so not much sprite work getting done, but I've been working on this:

400% zoom.
The legs for "standing still" frames. Slight touch-ups on the earlier drafts.

After that it's only the death animation remaining before a full sheet* can be assembled.

*Still got to adjust some other walk animations and such, but it would be nice to have a full sheet done first.

Speaking of death animations:

Which 3 frames + collapsed body pile would you like? I'm aiming for a rather sudden collapse, but maybe it should be spaced out more... not easy with so few frames!

One little question there is that the body piles are all in one big file together with other units - I'm guessing we can't include those in a download?  ???

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #71 on: October 04, 2012, 07:45:50 pm »
well, the only way to test them in-game would be to replace something anyway. I guess we will have to petition for the devs to externalize the graphics - aka allowing loading of graphics from other files... but that's obviously not top priority for now.

for now, maybe we can find someone with mad programming skillz to build some kind of "unit inserter" that automatically replaces units in the pck files, from external images provided in a zip file?

Offline Bomb Bloke

  • Sergeant
  • **
  • Posts: 19
    • View Profile
    • StrategyCore
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #72 on: October 05, 2012, 05:59:18 pm »
Two files for corpses - FloorOb and BigObs. I'm not strictly sure whether you're wanting to replace sprites or simply tack the new ones onto the end, but either way a patcher can be written to apply single sprites to those two archives so users don't need to deal with it manually. A new corpse object would need to be defined in ObData.dat as well if you want to actually add a new item for them though... And don't get me started on the string tables and UFOpedia side of things...

If it helps, I can generate code to automagically turn your sprite sheet into individual images, or even directly into game files. I'd need a copy of the sprite sheet and info as to exactly what results you wanted.

Must say I'm a fan of the chest-explosion style of death.

Offline Leflair

  • Colonel
  • ****
  • Posts: 252
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #73 on: October 05, 2012, 08:23:45 pm »
Good to know, but it's gonna be awhile before I got a sheet that's export-worthy, maybe I can get started this weekend if time allows.

Seeing as OpenXCom doesn't properly support modular graphic packs yet we are not exactly in a rush (pixel art is so relaxing  :P).

Offline Leflair

  • Colonel
  • ****
  • Posts: 252
    • View Profile
Re: The Leflair Sprite Sweatshop, Voxels need not apply
« Reply #74 on: October 25, 2012, 09:17:48 pm »
So, been busy with moving (And will be for another couple of weeks probably) but I've gotten started on some grid stuff

Primarily, the torso placement:


The important bits:
I believe this is the most important to get right, as it will show up in every single other movement frame the game puts together for the various body parts.
There are a frame for each arm/leg movement for each direction, but the torso stays the same (moves with the Y-axis position).

So, the bottom of the body needs to mesh up with the leg placement (which one of the 4 positions though? The Y-movement should take care of the rest from there...)

The torso need to be in a center position so both arms match up - will need some checking just to get the arm frames right in terms of placement.

Wish I had a couple of spare days just to sit down with this and nothing else - pixel hunting needs the right, romantic, mood  :P