Making better use of existing animation frames

Production of artwork for the game by regular contributors takes place here.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Making better use of existing animation frames

Post by zookeeper »

I've noticed that attack animations can be made much better looking by just using the existing frames better.

Let's take the dwarvish guardsman for an example. This is what the poor fellow has now:

Code: Select all

[animation]
    [frame]
        begin=-200
        end=100
        image="units/dwarves/guard-attack.png"
    [/frame]
[/animation]
The above means that the single attack frame is displayed all the way from his own hex to the enemy's and back again. It looks silly. Now, since not every unit can get a 3+ frame animation in the next couple of years still, we can use other tricks to make this animation look considerably better:

Code: Select all

[animation]
	[frame]
		begin=-200
		end=-150
		image="units/dwarves/guard.png"
	[/frame]
	[frame]
		begin=-150
		end=-100
		image="units/dwarves/guard-defend.png"
	[/frame]
	[frame]
		begin=-100
		end=50
		image="units/dwarves/guard-attack.png"
	[/frame]
	[frame]
		begin=50
		end=75
		image="units/dwarves/guard-defend.png"
	[/frame]
	[frame]
		begin=75
		end=150
		image="units/dwarves/guard.png"
	[/frame]
[/animation]
The above means that he starts with the base frame, slides just a little bit forwards, changes to the defense frame (which happens to look exactly like a wind-up for the thrust, so we'll use that), continues sliding forwards up until just before the point of impact, which is when we'll change to the actual attack frame. When sliding back, the same frames are displayed in reverse order. The end result is that the attack looks much more nicer and smoother than just sliding back and forth using one frame.

The reason why I use the base frames in the beginning and end of the animation is that it just seems to look smoother that way. I think it's because of this: if the sliding starts at the same time when the frame switches, all the changes (movement and graphic) happen at the very same moment, so the attention is drawn more to these "key points", which makes the whole thing look more jerky. If the changes that happen don't "pair up" like that, but alternate instead, the whole thing looks smoother, maybe because the eye can't so clearly distinquish the "key points", but rather sees one smoother continuous motion. Anyway, it may or may not work this way, but I just felt like writing it anyway as I was thinking about it.

And now the purpose of this post: I'd like to start fixing unit animations to work this way. Defense frames seem to pretty commonly be suitable for a wind-up for the actual attack frame, or a recovery. Since some units have these sweat drops flying out of their heads in their defense frames, I might need to duplicate those frames in order to just get rid of the sweat. If the tweak seems very simple, I might actually change something in the frame while I'm at it. I wouldn't be adding any "new animations" as such in the process, at most taking an existing frame and tweaking it just a bit to make it fit in with the rest of the attack animation. If there are no suitable other frames to use as part of the attack animation, I'd just use the base frame like in the guardsman example. I've tried it with several units, and even that looks better that sliding back and forth with only the one attack frame.

Since it might be quite a big change to how most people look at how attack animations work, I'd figure it's best to announce my intention and confirm that it's ok first. So, any objections?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Jetryl wrote:Just be certain that the following is true:
Defense frames seem to pretty commonly be suitable for a wind-up for the actual attack frame, or a recovery.
Because in many cases (elvish units being one example, horsemen being another), it is not.
True, for elf animations this doesn't work. The fighter and captain, however, can use the defense frames after the strike, when gliding back. The lowering of the sword and covering with the shield when retreating fits there nicely. Defense frames before the strike seem to suit some dwarves and at least a few mermen (most notably the hoplite). The drake burner line, too (except the flameheart).

But obviously, if I add new frames to the animation, I'll check in-game whether it looks ok or not.
User avatar
Jetrel
Art Director
Posts: 7242
Joined: February 23rd, 2004, 3:36 am
Location: Midwest US

Post by Jetrel »

Just be certain that the following is true:
Defense frames seem to pretty commonly be suitable for a wind-up for the actual attack frame, or a recovery.
Because in many cases (elvish units being one example, horsemen being another), it is not.



As for the use of the base frame (briefly) at the start and end, I generally endorse it wholeheartedly. Go to town. Image

I've actually used a similar technique for many of the elvish bow frames, though with a slightly different purpose (since it's ranged, after all).
Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

Post by Darth Fool »

One note, on units where using the defend frame works if the sweat droplets are removed, if you make the tweaked frame, it could also be used for an alternate defend frame, say when the unit is missed. That way the sweat beads would only show when the unit was hit. Overall, a good idea as long as you are checking each result in game and not just doing it in an automated way.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

All right, I spent most of today doing this (and other small animation fixes), and I've now committed the first batch. A few good examples, in case you want to see some, are several drakes, namely sky, hurricane, flare, flameheart, warrior, blademaster, fire, inferno, slasher and warden.

I'll probably commit another batch tomorrow, but it probably takes several days for me to manually tune every unit (especially since I'll be away for a few days).
Post Reply