Top Banner
Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams College
34

Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Dynamo Dynamic, Data-driven Character Control with Adjustable Balance

Pawel Wrotek Electronic Arts

Chad Jenkins Brown University

Morgan McGuire Williams College

Page 2: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

First, a video…First, a video…

Page 3: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Character MotionCharacter Motion

• An integral part of modern video gamesFIFA 2006 (EA)

San Andreas (Rockstar)

Antigrav (Harmonix)

Page 4: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Kinematic Character MotionKinematic Character Motion

• Expressed by rigid body kinematics

– Rigid bodies connected by joints

– Character pose defined by rotation

of joints

– Vector θ(t) represents pose

at a given instant of time

Page 5: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Motion Generation:Motion Generation:Mocap and KeyframingMocap and Keyframing

• (+) path of least resistance

• (+) absolute control “wyciwyg”

• (-) not physically dynamic

– static and partial snapshot of the dynamics occurred at the time of creation

• Production animation, not interactive games

God of War 2 (Sony)

Page 6: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Motion Generation:Motion Generation:Procedural AnimationProcedural Animation

• Rules/algorithms to automatically generate motion

• Three categories of approaches:

– Indirectly emulate physical plausibility

• [Perlin,Goldberg 94] [Popovic, Witkin 99] [Kovar et al. 02]

– Simulate physics only when necessary

• [Shapiro et al. 03] [Zordan et al. 05]

– Simulate physics directly and persistently

• [Hodgins et al. 95] [Laszlo et al. 00]

Page 7: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Procedural AnimationProcedural Animation

• Indirectly emulate physical plausibility

– Scripting [Perlin,Goldberg 94]

– Blending [Rose et al. 98]

– Optimization [Liu et al. 05] [Arikan et al. 03]

(+) creators retain control

Creators define all rules for movement

(-) violates the “checks and balances” of motion

Motion control abuses its power over physics

(-) limits emergent behavior

Page 8: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Procedural AnimationProcedural Animation

• Simulate physics directly

– Ragdolls

– Controllers to generate motor forces

[Zordan, Hodgins 02] [Faloutsos et al. 01][Popovic et al. 00]

– (+) proper “separation of powers”

• Physics, control, AI

• Allows for emergent, natural interactions

– (-) inherit problems that plague robotics

PhysicsController

Page 9: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Procedural AnimationProcedural Animation

• Simulate physics only when necessary– Dynamic response:

[Shapiro et al. 03] [Zordan et al. 2005] [Natural Motion Endorphin]

– Mocap for “normal” dynamics

– Simulation for disturbance dynamics

(+) the best of mocap and simulation

(-) limited to passive response

• Falling, getting hit, etc.

• No persistent interaction

Page 10: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Fundamental QuestionFundamental Question

• Can we have practical methods for physically simulated characters?

• Revisit the broader picture for autonomous control

– Decision making (AI): objectives, current state (x[t]) → desired motion (xd[t])

– Motion Control: desired motion (xd[t]), current state (x[t]) → motor forces (u[t])

– Physics: current state (x[t]) → next state (x[t+1])

PhysicsMotionControl

DecisionMaking

objectives

x[t+1]

u[t]xd[t]

u[t]=MC(xd[t]-x[t]) x[t+1]=P(x[t],u[t])xd[t]=AI(x[t])

Page 11: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

The Autonomous Physical Motion The Autonomous Physical Motion Control ProblemControl Problem

MotionControl

DecisionMaking

objectives

x[t+1]

u[t]xd[t]

u[t]=MC(xd[t]-x[t])xd[t]=AI(x[t])

Physicsu[t]

x[t+1]=P(x[t],u[t])

Page 12: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

The Autonomous Physical Motion The Autonomous Physical Motion Control ProblemControl Problem

• Simulating physics

– Download ODE

– Buy Havoc

– Implement Guendelman et al. 03

MotionControl

DecisionMaking

objectives

x[t+1]

u[t]xd[t]

u[t]=MC(xd[t]-x[t])xd[t]=AI(x[t])

Page 13: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

The Autonomous Motion Control The Autonomous Motion Control ProblemProblem

• AI for autonomous decision making

– Someone else’s problem

– Interface point for decision making

– Focus on motion control

• Motion capture as decision making placeholder

MotionControl

x[t+1]

u[t]xd[t]

u[t]=MC(xd[t]-x[t])

Mocapdata

Page 14: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Motion Control: ImpedimentsMotion Control: Impediments

• Gain tuning for motion control

• Balance for upright motion

MotionControl

x[t+1]

u[t]xd[t]

u[t]=MC(xd[t]-x[t])

Mocapdata

Page 15: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Motion Control: ImpedimentsMotion Control: Impediments

• Gain tuning for motion control

• Balance for upright motion

MotionControl

x[t+1]

u[t]xd[t]

u[t]=MC(xd[t]-x[t])

Mocapdata

Problem: parent space control?

Page 16: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Motion Control: ImpedimentsMotion Control: Impediments

• Gain tuning for motion control

• Balance for upright motion

MotionControl

x[t+1]

u[t]xd[t]

u[t]=MC(xd[t]-x[t])

Mocapdata

Problem: parent space control?Solution: world space control?

Page 17: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Segway Analogy Segway Analogy

Page 18: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Segway Analogy Segway Analogy

Page 19: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Segway Analogy Segway Analogy

Page 20: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

• Parent PD-servo

– Torque u about an axis

• Appropriate kp and kd values

are necessary for stable control

– Tedious and difficult

– Holdover from robot rotational sensing

Feedback Motion ControlFeedback Motion Control

u

u[t]=kp(θd[t] - θ[t]) + kd(θd[t] - θ[t])..

D. Brogan

Page 21: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

World Space PD-ServoWorld Space PD-Servo

• τ = kp (v · θ) + kd (ωd – ωa)Wd = desired world space rotation matrix

Wa = actual world space rotation matrix

T = Wd * Wa-1

(transformation from Wa to Wd)

v, θ = rotation axis, angle derived from T

ωd = desired world space angular velocity

ωa = actual world space angular velocity

Wd

Wa

v

θ

Page 22: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

A Note about Axis-AngleA Note about Axis-Angle(Source code in the paper)(Source code in the paper)

• Torques determined by desired angular acceleration

– i.e., Proportional to 2nd derivative of rotation

• 1D Hinge [Hodgins95]: 2/t2

• 3D Ball joint: 2[rotation]/t2

– …but Matrix/Quat derivatives produce denormalized results under ODE’s Euler integration and are awkward to convert to torques

– Rotation axis is fixed anyway during the Euler timestep, so reduce to a 1D problem…

• 3D Ball joint: )(],[ ; 1012

2

tt MMaxisAnglevt

v

Page 23: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Early ResultsEarly Results

• Gain Tuning

• Cartwheel with object

Page 24: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Super-balancingSuper-balancing

• An artifact of world space control

• Retain “separation of powers”

– Desired pose relative to character root (Person space)

– Desired root orientation specified by AI

– Actual position and orientation determined by physics

Page 25: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Root-spring controlRoot-spring control

• Spring only opposes gravity (no rotation about FG)

• Torque-limited and breaks under excessive strain

2

G

rootGGrootbalance

F

FF

balanceTorque limit Breaking point

balance

maximum

= 0

Applied Torque

Page 26: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

ResultsResults

• Obstacle course

– Parent space

– Person space

• User interaction

• Balance comparison

• Ballistic

– Person space (meathook)

– Person space (root spring), Parent space

• In-game boxing

Parent space

Dynamo

Page 27: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

ResultsResults

• Obstacle course

– Parent space

– Person space

• User interaction

• Balance comparison

• Ballistic

– Person space (meathook)

– Person space (root spring), Parent space

• In-game boxing

Page 28: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

ResultsResults

• Obstacle course

– Parent space

– Person space

• User interaction

• Balance comparison

• Ballistic

– Person space (meathook)

– Person space (root spring), Parent space

• In-game boxing

Page 29: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

ResultsResults

• Obstacle course

– Parent space

– Person space

• User interaction

• Balance comparison

• Ballistic

– Person space (meathook)

– Person space (root spring), Parent space

• In-game boxing

Page 30: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

ResultsResults

• Obstacle course

– Parent space

– Person space

• User interaction

• Balance comparison

• Ballistic

– Person space (meathook)

– Person space (root spring), Parent space

• In-game boxing

Page 31: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

Future WorkFuture Work

• AI for goal-oriented motion generation

• Experimental parent vs. world analysis

• Biomechanical character constraints

• Embodied perception

Page 32: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

ConclusionConclusion

• Physically dynamic characters are practical

• World-space control yields

– Implicit character balance

– Easier gain tuning

• Path to emergent behavior for interactive characters

Page 33: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

AcknowledgementsAcknowledgements

• NSF Award IIS-0534858

• Dan Byers

• Sam Howell

• mocap.cs.cmu.edu

• G3D and ODE user communities

• “Innovating Game Development”

Guest Lecturers

• A-Lab

Page 34: Dynamo Dynamic, Data-driven Character Control with Adjustable Balance Pawel Wrotek Electronic Arts Chad Jenkins Brown University Morgan McGuire Williams.

RoboCup Dynamical SoccerRoboCup Dynamical Soccer• [email protected]

[email protected]