Implementing Inverse Kinematics and a Walking System - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Implementing Inverse Kinematics and a Walking System

Description:

A creature can double its speed in two different ways: Take ... Engine Features I Need. Query bone rotations in local space (at any point in time in animation) ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 27
Provided by: Rune48
Category:

less

Transcript and Presenter's Notes

Title: Implementing Inverse Kinematics and a Walking System


1
ImplementingInverse Kinematics and a Walking
System
  • Ideas presented by
  • Rune Skovbo Johansen

2
Inverse Kinematics
  • Local inverse kinematics control limbs such as
    legs and arms.
  • Two or more bones per limb primary focus will
    be two bones, such as arms and legs in humanoids.
  • IK in legs can be used to adapt walking
    animations to various terrain, speed and turning.
  • IK in arms can be used to point at specific
    points, and to touch/grab specific objects.
  • Primary focus on IK in legs.

3
Inverse Kinematics in Legs
  • The inverse kinematics works locally on a limb,
    such as a leg, from hip to ankle, joined by the
    knee.
  • Here, the hip is the root.
  • Any bones extending from the IK limb (such feet
    or hands) could also be referred to as the
    trailing bones.
  • The IK doesnt say anything about how the
    trailing bones move it is a problem in itself!

4
Adaptive Walking
  • Adapting walking to the terrain and situation is
    more than just inverse kinematics
  • Step positions (step markers) must be put on the
    ground, depending on path, speed, and terrain.
    They determine where the feet land.
  • Anatomy of creature must be taken into account
  • Number of legs
  • Placement of legs on body
  • Order in which the legs move (think spiders and
    bugs)
  • The trajectory of the ankles must be interpolated
    between step markers.
  • The alignment of the feet must be interpolated as
    well. (Movement of trailing bones is not
    determined by IK!)

5
Analysing terrain
  • The terrain must be analysed to find suitable
    spots for step markers.
  • This can be done using raycasts (support in
    engine?)
  • ...or another method to easily examine and
    analyse geometry under the feet.
  • Characters current velocity and rotational speed
    is also taken into account to predict a good step
    marker position.

6
Step Markers on Terrain
7
Ankle Trajectories
  1. Global position of ankle (relative to ground) is
    recorded from keyframe data for whole walk-cycle.
  2. Ankle trajectory is deduced from this.
  3. The trajectories are stretched and bended
    according to placement of step markers.

8
Adapted Ankle Trajectories
9
Foot alignment
  • Ankle trajectory is obtained from global position
    in key-frame data (relative to ground)
  • Alignment of feet (or trailing bones in general)
    cannot be deduced this way.
  • Local angles must be maintained (to some extent)
    from the key-frame data.

10
Foot alignment
  • When on a step marker, a foot (trailing bones)
    must be transformed according to the step
    markers local space.
  • When between step markers, a foot must be aligned
    according to local angles (from key-frame data).
  • The system must know at which points the foot is
    touching the ground in the key-framed walk-cycle.
  • The key-framed walk-cycle must be enriched with
    this data.

11
  • Enriched walk-cycle with data (step-nodes) about
    at which points the feet are touching the ground.
  • Must be provided by the animator.

12
The step-node starts having influence on the foot
alignment here, starting at 0.
13
The step-node has 100 influence on the foot
alignment here.
14
The step-node still has 100 influence on the
foot alignment here.
15
The step-node is back to 0 influence on the foot
at this point.
16
Hip Positions
  • Since the positions of the feet are unpredictable
    when adapted, the positions of the hips must be
    adjusted according to the feet.
  • Example The feet are so far from the hips that
    the legs are not long enough. The positions of
    the hips must be adjusted.
  • Moving the hips just close enough is not good, as
    it gives a 100 stretched leg, which give poor
    movement in walk-cycles!
  • The desired hip-ankle distance must be found in
    the key-framed data and applied. A solution that
    fits both legs as good as possible is preferred.
  • Alternatively, local angles in hips and knees
    could be sought maintained, but this cannot be
    done without iterative approximation.

17
The Actual Inverse Kinematics
  • When ankle-position and hip-position is found,
    the inverse kinematics are straightforward to
    apply for a two-bone limb, such as a leg.
  • It can be solved exact.
  • The knee points in same direction as it already
    did. 100 straight legs should be prohibited, but
    workarounds can be implemented anyway.

18
Walking Speed
  • Characters that can walk with different speeds
    are more life-like.
  • Not just walk or run.
  • E.g. comes gradually to a stop, etc.
  • Makes U-turns much more realictic.
  • The system must support adjustments in speed
    without requiring separate walk-cycles for each
    speed.

19
Adjusting Walking Speed
  • A creature can double its speed in two different
    ways
  • Take twice as long steps(double step distance)
  • Take steps twice as fast(double step frequency)
  • What do humans do...?
  • Answer A little of both!
  • Sqrt(2) longer steps
  • Sqrt(2) times as fast
  • (Based on own unscientific tests involving
    walking a fixed distance at various speeds with a
    stop-watch while counting steps!)

20
Adjusting Walking Speed
  • Engine already supports blending several
    walk-cycles this can be done according to
    characters current speed.
  • Result of blending can be used as the basis of
    the adapted walking.
  • The enriched data (step-nodes) must be taken into
    account in the blending though.

21
Additional Areas of Interest
  • Inverse kinematics solutons for arms
  • Extended automated walking system

22
IK Solutions for Arms
  • IK in arms can be used to point at specific
    points, and to touch/grab specific objects.
  • I havent thought as much about this.
  • Touching/grabbing would often require that upper
    torso moves as well (bending down, reaching out)
    for humans.
  • How could a generic flexible solution be
    implemented? Perhaps more conventional IK
    solutions.

23
Extended AutomatedWalking System
  • Ability to analyse terrain and choose most
    suitable keyframed animation, based on step-node
    data in each.
  • If animations walk straight, walk down, and
    walk up exist, most suitable is chosen (or
    blended between) based on terrain.
  • Ability to treat hands as additional feet in some
    animations to enable e.g. climbing.

24
Engine Features I Need
  • Query bone rotations in local space (at any
    point in time in animation).
  • Query bone positions and alignment in model space
    (at any point in time in animation).
  • Adjust bone rotations/alignments.
  • Adjust speed of animations.
  • Make raycasts or similar onto geometry.

25
Content I Need
  • Several different models with standing, walking
    and running animations.
  • Some models with skeletons with realistic human
    proportions.
  • Some models that are not humanoid at all. (Pets,
    spiders, bugs, things with more than two legs.)

26
Questions or thoughts?
Write a Comment
User Comments (0)
About PowerShow.com