Opened 12 years ago

Last modified 4 years ago

#1195 new enhancement

New/Improved Animation System

Reported by: Zaggy1024 Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Freagarach)

Since the current animation system doesn't support many features that would be necessary for some animation sets to look good in-game, the game needs a new animation system (or a modified one) that includes the ability to:

  • Transition between animations both automatically (with a customizable time value) and using custom animations. This would be useful for:
    • Making animations appear smoother in-game...go figure.
    • (hopefully) things like death animations that would only play when the unit died while playing a certain animation (i.e. a "running death" animation, which would make units like horses look a lot better when they get killed while charging)
  • Have different animation states (sets of animations that can be randomized somewhat like variants) able to also have transitions between them (so that units don't suddenly jerk between animation sets). These would have values that would tell the engine the chance after an animation has finished playing that it will randomly choose another animation set to switch to. This would allow for an animator to easily add multiple "states" that, for example, an animal could have (a normal state and a feeding state, and perhaps more), which would hopefully make their visual behavior seem more natural and a lot more customizable. Example(s):
    • The peacock, if it is to be able to show off its feathers in the game at all, needs to have some way to have transition animations between showing off and not showing off, otherwise it will look strange in-game.
    • Animals that graze, like the deer, gazelle and sheep, among others, would look a lot more natural if they could begin grazing and still be able to walk around while they graze.

Example of what the actor XML could look like after these changes:

<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
  <castshadow/>
  <group>
    <variant frequency="100" name="indian">
      <mesh>skeletal/peacock.dae</mesh>
      <texture>skeletal/animal_peacock.png</texture>
    </variant>
    <variant frequency="100" name="white_indian">
      <mesh>skeletal/peacock.dae</mesh>
      <texture>skeletal/animal_peacock_white.png</texture>
    </variant>
  </group>
  <animation_set_group>
    <animation_set transitionprobability="25%" name="normal">
      <animations>
        <animation file="quadraped/peacock_idle.dae" name="idle" speed="15"/>
        <animation file="quadraped/peacock_idle-walk.dae" name="idle->walk" speed="15"/>
        <animation file="quadraped/peacock_walk-idle.dae" name="walk->idle" speed="25"/>
        <animation file="quadraped/peacock_walk.dae" name="walk" speed="25"/>
        <animation file="quadraped/peacock_walk-run.dae" name="walk->run" speed="25"/>
        <animation file="quadraped/peacock_run-walk.dae" name="run->walk" speed="35"/>
        <animation file="quadraped/peacock_run.dae" name="run" speed="35"/>
      </animations>
    </animation_set>
    <animation_set name="normal->showing_off">
      <animations>
        <animation file="quadraped/peacock_normal-feeding_idle.dae" name="idle" speed="15"/>
        <animation file="quadraped/peacock_normal-feeding_walk.dae" name="walk" speed="25"/>
        <animation file="quadraped/peacock_normal-feeding_run.dae" name="run" speed="25"/>
      </animations>
    </animation_set>
    <animation_set name="showing_off->normal">
      <animations>
        <animation file="quadraped/peacock_feeding-normal_idle.dae" name="idle" speed="15"/>
        <animation file="quadraped/peacock_feeding-normal_walk.dae" name="walk" speed="25"/>
        <animation file="quadraped/peacock_feeding-normal_run.dae" name="run" speed="25"/>
      </animations>
    </animation_set>
    <animation_set transitionprobability="25%" name="showing_off">
      <animations>
        <animation file="quadraped/peacock_feeding_idle.dae" name="idle" speed="15"/>
        <animation file="quadraped/peacock_feeding_idle-walk.dae" name="idle->walk" speed="15"/>
        <animation file="quadraped/peacock_feeding_walk-idle.dae" name="walk->idle" speed="25"/>
        <animation file="quadraped/peacock_feeding_walk.dae" name="walk" speed="25"/>
        <animation file="quadraped/peacock_feeding_walk-run.dae" name="walk->run" speed="25"/>
        <animation file="quadraped/peacock_feeding_run-walk.dae" name="run->walk" speed="35"/>
        <animation file="quadraped/peacock_feeding_run.dae" name="run" speed="35"/>
      </animations>
    </animation_set>
  </animation_set_group>
  <group>
    <variant frequency="100" name="idle"/>
    <variant name="death">
      <props>
        <prop actor="props/units/blood_01.xml" attachpoint="root"/>
      </props>
    </variant>
  </group>
  <material>basic_trans.xml</material>
</actor>

Change History (1)

comment:1 by Freagarach, 4 years ago

Description: modified (diff)
Keywords: animation system improve transition removed

"Running death anim": #1070.

Note: See TracTickets for help on using tickets.