Docsity

Locomotion Three - Computer Animation - Lecture Slides, Slides of Computer Graphics and Animation

Partial preview of the text

Download Locomotion Three - Computer Animation - Lecture Slides and more Slides Computer Graphics and Animation in PDF only on Docsity!

Gait Transitions

Gait Efficiency

Trot to Gallop

Automated Locomotion

Step Data

class StepData {

float StepTrigger;

float DutyFactor;

Animation *FootAnim;

 StepData contains all data necessary to describe how a

single leg behaves in the gait

 The FootAnim stores channels for foot motion for one

step, normalized from 0 to 1 in time. This would probably

have xyz translation and xyz rotation, plus any other

DOFs in the leg (redundant DOFs, foot flex…)

Gait Data

class GaitData {

int NumLegs;

float GaitPeriod;

StepData []LegData;

Animation *BodyAnim;

 GaitData contains the top level gait information and a

StepData for each leg

 The BodyAnim contains all the channels to animate the

body motion (not including the legs). It can be

normalized from 0…1 in time

Walker

class Walker {

void Update();

Vector3 Velocity;

float GaitPhase;

Stepper []Step;

Rig *Body;

GaitData *Data;

 The Walker does the runtime management for the whole

character

Walker::Update() [1] Walker::Update() { // Compute velocity

  • Get desired control data from joystick, AI…
  • Examine local terrain (slopes, conditions…)
  • Compute resulting accelerations, turning rates…
  • Integrate to get current velocity (& angular velocity) // Move ā€˜mover’
  • Move main matrix of character mover to current pos // Optional: select appropriate gait & gait period
  • Use resulting motion & rules to make selections
  • Compute an actual interpolated gait to use [continues]

Stepper::Update() [1]

Stepper::Update() {

// Check to trigger stepping (if we’re not already)

  • Check if StepTrigger is between Walker->LastPhase

and Walker->GaitPhase

  • There are various cases that need to be considered,

and can be even more complex if StepTrigger itself

is changing as a result of a gait transition

  • One could also consider triggering steps based on

additional rules other than just the triggering (such

as comfort based rules, etc.)

[continues]

Stepper::Update() [2]

// Update step if(We’re stepping (or starting a new step)) { // Compute ideal foot placement goal

  • This should be based on where we expect the body to be at some time in the future corresponding to when this leg is halfway through it’s next stance phase
  • This might also involve collision detection & analysis of the terrain // Increment step phase
  • Increment StepPhase counter
  • Check if we’ve finished the step (StepPhase>1.0-DutyFactor)
  • Compute normalized phase within the transfer stage (0…1) [continues]

Locomotion Summary Walker::Update() { // Compute velocity // Move Mover // Select appropriate gait // Advance GaitPhase // Pose body // Update Steppers } Stepper::Update() { // Check to trigger a new step // Update step if(stepping) { // Compute ideal foot goal // Increment StepPhase // Set IK goal } // Update IK }