Synthesizing behavioral animation

Ian Horswill notes that we ascribe character, or intentionality to things that move. His recent work on animation control is summarized in a paper to be presented at AIIDE 2008. The example above is from that paper - two children appear to play with a ball while being observed by an adult.

Despite the apparently complex behavior, under the covers there are simple motivators driving the animation. The children want to approach the ball, but not each other. If they get close to the ball they kick it, and since they have been backing away from each other, they appear to kick it between themselves. If they get too far from the parent, a behavior kicks in where they run to the parent for a moment, then run back to play.

This algorithm can be efficiently implemented in terms of Insect AI (*). The way I translated the description of the behavior to an algorithm was to

  1. Identify the sensors needed, which are parent, friend, and ball. The output of these sensors has two components, a orientation component, and a scalar distance component.
  2. Identify the outputs, which in this case are signals to the animation system, move, kick, and hug parent.
  3. Create transfer functions (the green boxes) that encode the important notions, which for this controller are functions of the scalar distance component. From left to right, output as a function of distance can be read as
    • Activate when distant from parent
    • Activate when close to friend
    • Activate except when close to ball
    • Activate when close to ball
    • Activate when close to parent
  4. Enforce a decision hierarchy using thresholding (winner take all) and controlled switches. Kick and Hug Parent take precedence over moving so the controlled switch there switches between the moving hierarchy and a zero input which stops motion completely. Kick or Hug Parent can override moving, so they are summed and thresholded before being fed to the switch.
  5. Once the child gets a hug, they need to have a chance to get away so the ball chasing behavior can take over again. The triggered delay modulates the close to parent signal to suppress the Hug Parent signal, which will allow the move to ball signal to pull the child out of the parent's field of influence.

(*)

Porcino, Nick, An Architecture for A-Life, AI Game Programming Wisdom 2,Steve Rabin ed., Charles River Media, 2004, pp. 339-349

Porcino, Nick, Insect AI 2: Implementation Strategies, AI Game Programming Wisdom 3, Steve Rabin ed., Charles River Media, 2006, pp. 189-204

AI___Robotics/procedural/games/animation

Content by Nick Porcino (c) 1990-2011