lightweight procedural animation with believable physical interaction - - PowerPoint PPT Presentation

lightweight procedural animation with believable physical
SMART_READER_LITE
LIVE PREVIEW

lightweight procedural animation with believable physical interaction - - PowerPoint PPT Presentation

lightweight procedural animation with believable physical interaction ian horswill departments of eecs and radio/television/film northwestern university i ian@northwestern.edu @ th t d twig twig Library for y Work in progress p g


slide-1
SLIDE 1

lightweight procedural animation with believable physical interaction

ian horswill departments of eecs and radio/television/film northwestern university i @ th t d ian@northwestern.edu

slide-2
SLIDE 2

twig twig

  • Library for
  • Work in progress

y

– Procedural animation – Simple physics

p g

  • Open source
  • Intended for interactive

narrative

– Runs under XNA – Ought to run on Xbox (not tested) – Fast – AI‐friendly Supports scripting running

  • Two applications

Simulation of Ainsworth’s – Supports scripting, running as a server, or direct authoring of behaviors – Simulation of Ainsworth s “safe home base” phenomenon Webcomic – Webcomic

slide-3
SLIDE 3

demo 1 demo 1

Simulates “safe home base” behavior (Ainsworth)

  • Straightforward behavior‐based control

g

  • Simple STM + attention system
  • No higher‐level cognitive component (yet)
slide-4
SLIDE 4

physics physics

  • Based on Jakobsen’s (GDC, 2001)

work on the Hitman engine

  • Mass aggregate system
  • Mass‐aggregate system

– Objects modeled as point‐masses (nodes) + massless rods (links) – Effectively molecules – Effectively molecules

  • Position‐based update (Verlet 1967)

ll d i i f i d i – All dynamic information captured in current + previous positions of nodes

slide-5
SLIDE 5

constraint satisfaction constraint satisfaction

  • Position‐based physics are good for

constraint satisfaction constraint satisfaction

– Just find the closest position that satisfies the constraint – And move it there

  • Ground plane

– Force Y=0 when Y<0

  • Distance constraints

– View the distance constraint as a spring – View the distance constraint as a spring – Solve for the equilibrium position – Force the positions of the nodes

  • Collision handling

– Compute penetration depth Compute penetration depth – Move both objects apart along contact normal

  • Knees

– Force into the plane defined by foot, hip and body‐forward direction

slide-6
SLIDE 6

limb control limb control

  • Directly control endpoint

ec y co

  • e dpo

position, velocity, acceleration, or force

  • Constraint satisfaction

⇒ inverse kinematics

  • Cartesian coordinates

No joint angles! – No joint angles! – Downside: implementing joint limits is a pain

slide-7
SLIDE 7

limb control (partial) limb control (partial)

walk hug reach grab swing reach grab swing arms feet

slide-8
SLIDE 8

posture control posture control

  • Apply forces to

– Base of spine to move it over the midpoint of the feet – Top of spine to

  • Move it over the base of the
  • Move it over the base of the

spine

  • Move center of mass over

midpoint of feet

– Pelvis to turn it toward walk‐ Pelvis to turn it toward walk vector – Shoulders to turn them toward gaze direction

  • NB: violates conservation of

momentum/energy

slide-9
SLIDE 9

posture control (partial) posture control (partial)

target sit up stand up g p p Sit up Stand

Align shoulders

Align pelvis Face target

head shoulders pelvis feet

slide-10
SLIDE 10

gait generation gait generation

  • Based on Perlin (2003,

( , unpublished) M l i h

  • Move pelvis where you

want it to go

  • Plant the feet

Plant the feet

  • Fire a step when a leg

gets stretched out too far

  • Potential‐field collision

avoidance avoidance

slide-11
SLIDE 11

sensing and attention sensing and attention

  • Sensing

– Characters scan field of view each clock tick – Collision detection caches object contact

  • Registers pain when kinetic

g p energy>threshold

  • Attention

– All objects in field of view and STM appraised on each clock tick for appraised on each clock tick for

  • Valence
  • Salience
  • Monitoring priority

Highest salience object becomes focus – Highest salience object becomes focus

  • f attention
  • Gaze control

– Shifts based on salience and monitoring g priority

slide-12
SLIDE 12

props props

l b d 16 ton weight clipboard paper pen

  • Easy: models can be imported via the XNA Content

Pipeline Pipeline

  • Harder: have to write C# code to define

– Collision volumes – Prop actions – Charts (task‐specific coordinate systems)

slide-13
SLIDE 13

example: writing on a clipboard example: writing on a clipboard

  • Holding the clipboard

– Paper attaches itself to character’s arm – Paper moves itself in front of character character – Paper drags arm along with it

  • Writing
  • Writing

– Pen attaches itself to other arm – Pen moves itself to the correct location relative to clipboard – Pen moves around Pen drags other arm with it – Pen drags other arm with it

slide-14
SLIDE 14

current behavioral repertoire current behavioral repertoire

  • Hold, hold‐for‐use

,

  • Write
  • Walk, sit, standup
  • Gesture
  • Approach, fight, attach

P i ithd l fl

  • Pain withdrawal reflex
  • Gaze control
  • Speak (w/ or w/o turn

Speak (w/ or w/o turn taking)

  • Hug, reach, grapple, drag
slide-15
SLIDE 15

server/scripting interface server/scripting interface

  • Simple text‐based

RPC t l RPC protocol

name: method args …

  • Support for durative actions

Support for durative actions

  • A few system commands like new and pause
  • Can be run as a server or just read from a text file
slide-16
SLIDE 16

demo 2 demo 2

webcomic episode 3 scripted behavior

slide-17
SLIDE 17

Bryan: say "They're doing medical experiments on us?" Michael Bryan: hold script

script fragment

Bryan: goto camera 3.6 & Bryan: say "You bastards!" camera Michael: goto Bryan 0.25 (‐1 0 0) & Thug: goto Bryan 0 5 (0 0 0) &

fragment

Thug: goto Bryan 0.5 (0 0 0) & Michael: say "Quiet!" Bryan Michael: say "They'll hear you!" Bryan Bryan: say "I'm not some lab animal!" Michael Thug: say "I'm with AAAI.\nCome with me" Bryan Bryan: lookat Thug Bryan: say "I know my rights!" Thug Bryan: say "IRB would never sign off on this!" Michael Bryan: say IRB would never sign off on this! Michael Thug: hold Bryan Michael: say "It's run by Alberto Gonzales now." Bryan & Bryan: fight Thug 0 5 pause 0.5 Bryan: say "Widgets of the world unite!" Thug Thug: goto offstage & Bryan: drop script y p p Bryan: "Soylent green!\nIt's made out of pixels!“ Bryan titles: fadetoblack 2

slide-18
SLIDE 18

related work related work

  • Position‐based physics

– Jakobsen (2001), Verlet (1967), PhysX (2005)

  • Procedural character control
  • Procedural character control

– Jack (Badler et al. 1988‐1999) – Improv (Goldberg&Perlin 1996) – Smartbody (Theibaux et al. Smartbody (Theibaux et al. 2007)

  • Gait simulation

– Bruderlin&Calvert (1989), Hodgins (1994), Hase et al. (2003)

slide-19
SLIDE 19

conclusion conclusion

What’s it bad at? What’s it good at?

– Accurate simulation

  • Lots of violations of

conservation

g

– Rough‐and‐ready character behavior R l ti l i

conservation

– Photorealism – Complicated collision l i – Relatively expressive motion – Believability (in the volumes, terrain, etc. – Path planning Disney/Bates sense) – Authoring – AI‐friendly AI friendly

http://twigblog.wordpress.com