INERTIALIZATION: HIGH-PERFORMANCE ANIMATION TRANSITIONS IN GEARS OF WAR DAVID BOLLO PRINCIPAL SOFTWARE ENGINEER THE COALITION (MICROSOFT STUDIOS)

Similar documents
Radial Basis Function Network Using Orthogonal Least Squares-Genetic Algorithm Learning (RBFN using OLSGA) Christopher Katinas February 16, 2016

8.7: Dating Woolly Mammoths

1871. twadaa t, 30 cta. pat Haa;fe,ttaw Spiritism. From Uis luport of tie vision, and in U e n i e h t i a d i W A C h r f i

oenofc : COXT&IBCTOEU. AU skaacst sftwer thsa4 aafcekr will be ehat«s«ai Bi. C. W. JUBSSOS. PERFECT THBOUGH SDFFEBISG. our

CS-184: Computer Graphics

13 Path Planning Cubic Path P 2 P 1. θ 2

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

LOWELL JOURNAL. MUST APOLOGIZE. such communication with the shore as Is m i Boimhle, noewwary and proper for the comfort

ME5286 Robotics Spring 2017 Quiz 2

Mathematics Ext 2. HSC 2014 Solutions. Suite 403, 410 Elizabeth St, Surry Hills NSW 2010 keystoneeducation.com.

CSE 167: Lecture 11: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Robot Arm Transformations, Path Planning, and Trajectories!

ECE/CS 250 Computer Architecture

( ) and D( x) have been written out in

7.4 Rigid body simulation*

Image Gradients and Gradient Filtering Computer Vision

CMSC427 Parametric curves: Hermite, Catmull-Rom, Bezier

SDI #2 PRE-LAB ASSIGNMENT OPERATIONAL DEFINITIONS OF KINEMATIC TERMS*

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

Lab #2: Digital Simulation of Torsional Disk Systems in LabVIEW

An Implementation of SPELT(31, 4, 96, 96, (32, 16, 8))

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

Lesson 10: Solving Inequalities

Today. Calculus. Linear Regression. Lagrange Multipliers

Support Vector Machines. CSE 4309 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington

ECE521 lecture 4: 19 January Optimization, MLE, regularization

3. Mathematical Modelling

CHAPTER 4 OPTIMIZATION OF COEFFICIENT OF LIFT, DRAG AND POWER - AN ITERATIVE APPROACH

Trajectory Smoothing as a Linear Optimal Control Problem

Lesson 12: Solving Equations

Projectile Motion. v a = -9.8 m/s 2. Good practice problems in book: 3.23, 3.25, 3.27, 3.29, 3.31, 3.33, 3.43, 3.47, 3.51, 3.53, 3.

PSE Game Physics. Session (6) Angular momentum, microcollisions, damping. Oliver Meister, Roland Wittmann

Announcements. CS 188: Artificial Intelligence Fall VPI Example. VPI Properties. Reasoning over Time. Markov Models. Lecture 19: HMMs 11/4/2008

Animation Curves and Splines 1

Physical Pendulum Torsion Pendulum

Mathematical Methods 2019 v1.2

Application Note #3413

Exploring the Potential of Instruction-Level Parallelism of Exposed Datapath Architectures with Buffered Processing Units

Coordinate Systems. Recall that a basis for a vector space, V, is a set of vectors in V that is linearly independent and spans V.

Modeling and Solving Constraints. Erin Catto Blizzard Entertainment

Physical Pendulum, Torsion Pendulum

Terms of Use. Copyright Embark on the Journey

Simple Harmonic Motion

8. Active Filters - 2. Electronic Circuits. Prof. Dr. Qiuting Huang Integrated Systems Laboratory

Section 5: Quadratic Equations and Functions Part 1

Integration of Rational Functions by Partial Fractions

Chapter 22 : Electric potential

EECE 2150 Circuits and Signals Final Exam Fall 2016 Dec 12

Representations of Motion in One Dimension: Speeding up and slowing down with constant acceleration

Homework 3: Kinematics and Dynamics of Particles Due Friday Feb 16, 2018

Systems of Linear Equations

SPS8. STUDENTS WILL DETERMINE RELATIONSHIPS AMONG FORCE, MASS, AND MOTION.

Bayes Filter Reminder. Kalman Filter Localization. Properties of Gaussians. Gaussians. Prediction. Correction. σ 2. Univariate. 1 2πσ e.

Hidden Markov Models. Vibhav Gogate The University of Texas at Dallas

Secondary Math 2 Honors Unit 4 Graphing Quadratic Functions

Arsène Pérard-Gayot (Slides by Piotr Danilewski)

1. The graph of a function f is given above. Answer the question: a. Find the value(s) of x where f is not differentiable. Ans: x = 4, x = 3, x = 2,

EECE 2150 Circuits and Signals Final Exam Fall 2016 Dec 9

Dynamics and control of mechanical systems

Math (P)Review Part II:

Integration of Rational Functions by Partial Fractions

Demo: x-t, v-t and a-t of a falling basket ball.

Computational Fluid Dynamics Prof. Dr. Suman Chakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur

BIOEN LECTURE 18: VISCOELASTIC MODELS

Solving Polynomial and Rational Inequalities Algebraically. Approximating Solutions to Inequalities Graphically

Enhancing Energy Efficiency among Communication, Computation and Caching with QoI-Guarantee

PHY 221 Lab 9 Work and Energy

14- Hardening Soil Model with Small Strain Stiffness - PLAXIS

Biology Cell Unit Homework Packet #1

Time scales. Notes. Mixed Implicit/Explicit. Newmark Methods [ ] [ ] "!t = O 1 %

10.4 The Cross Product

Baccalieu Collegiate. Physics Course Outline

Chapter 5 Simplifying Formulas and Solving Equations

6-3 Solving Systems by Elimination

Game Physics: Basic Concepts

Lecture 11. Kernel Methods

Today s Outline. Recap: MDPs. Bellman Equations. Q-Value Iteration. Bellman Backup 5/7/2012. CSE 473: Artificial Intelligence Reinforcement Learning

Chapter 4 Dynamics: Newton s Laws of Motion

(W: 12:05-1:50, 50-N202)

Soft Bodies. Good approximation for hard ones. approximation breaks when objects break, or deform. Generalization: soft (deformable) bodies

New Climate Divisions for Monitoring and Predicting Climate in the U.S.

Quadratic Equations and Functions

Before we work on deriving the Lorentz transformations, let's first look at the classical Galilean transformation.

Module 7 (Lecture 25) RETAINING WALLS

PanHomc'r I'rui;* :".>r '.a'' W"»' I'fltolt. 'j'l :. r... Jnfii<on. Kslaiaaac. <.T i.. %.. 1 >

E X P E R I M E N T 11

Gates and Logic: From Transistors to Logic Gates and Logic Circuits

Buoyancy and Stability of Immersed and Floating Bodies

Lesson 24: Using the Quadratic Formula,

Translational and Rotational Dynamics!

Introduction to Vectors

CS4495/6495 Introduction to Computer Vision. 8B-L2 Principle Component Analysis (and its use in Computer Vision)

Chapter 4 Dynamics: Newton s Laws of Motion

The Kernel Trick, Gram Matrices, and Feature Extraction. CS6787 Lecture 4 Fall 2017

Specialist Mathematics 2019 v1.2

Social networks and scripts. Zvi Lotker IRIF-France

KillingFusion: Non-rigid 3D Reconstruction without Correspondences. Supplementary Material

Preparing for the HNC Electrical Maths Components. online learning. Page 1 of 15

REVIEW. Final Exam. Final Exam Information. Final Exam Information. Strategy for Studying. Test taking strategy. Sign Convention Rules

Transcription:

INERTIALIZATION: HIGH-PERFORMANCE ANIMATION TRANSITIONS IN GEARS OF WAR DAVID BOLLO PRINCIPAL SOFTWARE ENGINEER THE COALITION (MICROSOFT STUDIOS)

ANIMATION TRANSITIONS

ANIMATION TRANSITIONS Transition from one animation state to another Typically a cross-fade blend between poses Source Blend Target

ANIMATION TRANSITIONS Optimizations are often focused on the blend step Fast SLERP, optimizing cache and memory usage, etc Source Blend Target

ANIMATION TRANSITIONS Biggest cost is evaluating both Source and Target Source/Target cost is much greater than blend cost Source Blend Target

MULTIPLE CHARACTERS If we re lucky Only a few active transitions at once

MULTIPLE CHARACTERS But in the worst case Everybody transitions at the same time Double the animation cost

CAN WE DO BETTER? Intuition: Real humans don t blend (but they do have inertia) Source Blend Target

CAN WE DO BETTER? IDEA: Eliminate blended transitions! Fix the discontinuities as a post-process Source Blend Target

CAN WE DO BETTER? IDEA: Eliminate blended transitions! Fix the discontinuities as a post-process Source Target

TRANSITIONS AS A POST-PROCESS

TRANSITIONS AS A POST-PROCESS

TRANSITIONS AS A POST-PROCESS

GOALS Respect the original animation No changes when not transitioning Believable and aesthetically pleasing Smooth and momentum-preserving Stay on-model No bad / unnatural poses No overshoot

IDEA #0: FILTER DISCONTINUOUS POSE Apply a filter to the output pose stream Difficult to tune Introduces lag Deviates from input even when not transitioning

IDEA #1: BLEND FROM POSE Capture pose difference between Source and Target Ease out the difference over time

IDEA#1: BLEND FROM POSE

IDEA #2: MATCH VELOCITY Capture pose difference between Source and Target Ease out the difference over time Remember Source velocity (via finite differences) Match initial velocity Quintic polynomial [Flash and Hogan 1985] T. Flash and N. Hogan. 1985. The Coordination of Arm Movements: An Experimentally Confirmed Mathematical Model. Journal of Neuroscience 5, 7 (July 1985), 1688 1703

IDEA #2: MATCH VELOCITY

IDEA #3: LIMIT OVERSHOOT Capture pose difference between Source and Target Ease out the difference over time Remember Source velocity (via finite differences) Match initial velocity Limit overshoot by controlling initial acceleration Choose a 0 to give us zero jerk at t 1

IDEA #3: LIMIT OVERSHOOT

INERTIALIZATION

INERTIALIZATION

INERTIALIZATION INITIAL VALUES xx 0 = 10000 10000-1 xx 1 = 0 vv 1 = 0 aa 1 = 0

INERTIALIZATION INITIAL VELOCITY xx 0 = 10000 10000-1 vv 0 = 10000 10000-1 -2 dtt xx 1 = 0 vv 1 = 0 aa 1 = 0

INERTIALIZATION INITIAL VELOCITY xx 0 = 10000 10000-1 vv 0 = 10000 10000-1 -2 dtt or 0 xx 1 = 0 vv 1 = 0 aa 1 = 0

INERTIALIZATION ACCELERATION xx 0 = 10000 10000-1 vv 0 = 10000 10000-1 -2 dtt or 0 aa 0 = 8vv 0tt 1 20xx 0 tt 1 2 xx 1 = 0 vv 1 = 0 aa 1 = 0

INERTIALIZATION ACCELERATION xx 0 = 10000 10000-1 vv 0 = 10000 10000-1 -2 dtt or 0 aa 0 = 8vv 0tt 1 20xx 0 tt 1 2 or 0 xx 1 = 0 vv 1 = 0 aa 1 = 0

INERTIALIZATION X(T) xx 0 = 10000 10000-1 AA = aa 0tt 1 2 + 6vv 0 tt 1 + 12xx 0 2tt 1 5 vv 0 = 10000 10000-1 -2 dtt or 0 aa 0 = 8vv 0tt 1 20xx 0 tt 1 2 or 0 xx 1 = 0 vv 1 = 0 aa 1 = 0 BB = 3aa 0tt 1 2 + 16vv 0 tt 1 + 30xx 0 2tt 1 4 CC = 3aa 0tt 1 2 + 12vv 0 tt 1 + 20xx 0 2tt 1 3 xx tt = AAtt 5 + BBtt 4 + CCtt 3 + aa 0 2 tt2 + vv 0 tt + xx 0

OVERSHOOT REVISITED

OVERSHOOT REVISITED xx 0 = 1.2 vv 0 = 12.6 tt 1 = 0.5

OVERSHOOT REVISITED xx 0 = 1.2 vv 0 = 20.0 tt 1 = 0.5

IDEA #4: CLAMP TRANSITION TIME xx 0 = 1.2 vv 0 = 20.0 tt 1 = 0.5

IDEA #4: CLAMP TRANSITION TIME xx 0 = 1.2 vv 0 = 20.0 tt 1 = 0.3

IDEA #4: CLAMP TRANSITION TIME xx 0 = 1.2 vv 0 = 20.0 tt 1 = min(tt 1, 5 xx 0 vv 0 ) tt 1 = 0.3

INERTIALIZATION ON ONE SLIDE xx 0 = 10000 10000-1 AA = aa 0tt 1 2 + 6vv 0 tt 1 + 12xx 0 2tt 1 5 vv 0 = 10000 10000-1 -2 dtt or 0 aa 0 = 8vv 0tt 1 20xx 0 tt 1 2 or tt 1 = min(tt 1, 5 xx 0 vv 0 ) 0 BB = 3aa 0tt 1 2 + 16vv 0 tt 1 + 30xx 0 2tt 1 4 CC = 3aa 0tt 1 2 + 12vv 0 tt 1 + 20xx 0 2tt 1 3 xx tt = AAtt 5 + BBtt 4 + CCtt 3 + aa 0 2 tt2 + vv 0 tt + xx 0

VECTORS AND QUATERNIONS

INERTIALIZING VECTORS Obvious choice: Inertialize x,y,z independently Visual artifacts if vx 0,vy 0,vz 0 are too dissimilar (because of transition time clamping) Instead: Decompose vector into direction and magnitude Inertialize the magnitude

INERTIALIZING VECTORS xx 0 = 10000 10000-1 xx 1 = 10000 10000-2

INERTIALIZING VECTORS xx 0 = 10000 10000-1 xx 1 = 10000 10000-2 xx 0 = xx 0

INERTIALIZING VECTORS xx 0 = 10000 10000-1 xx 0 = xx 0 xx 1 = 10000 10000-2 xx 1 = xx 1 xx 0 xx 0

INERTIALIZING VECTORS xx 0 = 10000 10000-1 xx 0 = xx 0 xx 1 = 10000 10000-2 xx 1 = xx 1 xx 0 xx 0 vv 0 = xx 0 xx 1 tt

INERTIALIZING VECTORS xx 0 = 10000 10000-1 xx 0 = xx 0 xx 1 = 10000 10000-2 xx 1 = xx 1 xx 0 xx 0 vv 0 = xx 0 xx 1 tt xx t = xx t xx 0 xx 0 + t

INERTIALIZING QUATERNIONS Similar construction to vectors: Decompose quaternion into axis and angle Inertialize the angle

INERTIALIZING QUATERNIONS qq 0 = 10000 10000-1 -1-1 qq 1 = 10000 10000-2

INERTIALIZING QUATERNIONS qq 0 = 10000 10000-1 -1-1 qq 1 = 10000 10000-2 xx 0 = AAAAAAAA(qq 0 ) xx 0 = AAAAAAAAAA(qq 0 )

INERTIALIZING QUATERNIONS qq 0 = 10000 10000-1 -1-1 qq 1 = 10000 10000-2 xx 0 = AAAAAAAA(qq 0 ) xx 0 = AAAAAAAAAA(qq 0 ) xx 1 = xx 1 xx 0 xx 0 2 tan 1 qq xyz xx 0 qq w Twist of qq 1 around xx 0 K. Shoemake. 1994. Fiber Bundle Twist Reduction Graphics Gems IV, 230 236

INERTIALIZING QUATERNIONS qq 0 = 10000 10000-1 -1-1 qq 1 = 10000 10000-2 xx 0 = AAAAAAAA(qq 0 ) vv 0 = xx 0 xx 1 tt xx 0 = AAAAAAAAAA(qq 0 ) xx 1 = xx 1 xx 0 xx 0 2 tan 1 qq xyz xx 0 qq w Twist of qq 1 around xx 0 K. Shoemake. 1994. Fiber Bundle Twist Reduction Graphics Gems IV, 230 236

INERTIALIZING QUATERNIONS qq 0 = 10000 10000-1 -1-1 qq 1 = 10000 10000-2 xx 0 = AAAAAAAA(qq 0 ) vv 0 = xx 0 xx 1 tt xx 0 = AAAAAAAAAA(qq 0 ) xx 1 = xx 1 xx 0 2 tan 1 qq xyz xx 0 xx 0 qq w Twist of qq 1 around xx 0 qq t = AAAAAAAA: xx 0 AAAAAAAAAA: xx t t K. Shoemake. 1994. Fiber Bundle Twist Reduction Graphics Gems IV, 230 236

BLENDING VS INERTIALIZATION

BLENDING VS INERTIALIZATION Blending Evaluate both Source & Target during transition Variable anim frame cost Inertialization Only evaluate Target during transition Fixed anim frame cost Source Source Target Blend Target

BLENDING VS INERTIALIZATION Blending Manage multiple sets of state during transitions Adds complexity Inertialization Only maintain one set of state during transitions Fire and forget Source Source Target Blend Target

BLENDING VS INERTIALIZATION Blending Inertialization

BLENDING VS INERTIALIZATION Blending Inertialization

INERTIALIZATION IN A GAME ENGINE

INERTIALIZATION IN A GAME ENGINE Inertialization Node / Filter Animation System Hooks Code Hooks

INERTIALIZATION NODE Evaluated after the main animation graph Input is discontinuous pose stream Output is inertialized pose stream

INERTIALIZATION NODE When a new inertialization is requested: Compute and store x 0, v 0 for all joints Store t 1 and set t = 0 Every frame: Update t with delta time Evaluate and apply x(t) for all joints Store the OUTPUT pose in the pose history buffer

ANIMATION SYSTEM HOOKS Add inertialization as a new blend curve type When a blend is requested with inertialization type: Inertialize with the supplied blend time Zero the blend time to bypass regular blending

CODE HOOKS Expose Request Inertialization to code Eliminate other types of discontinuities And other tricks

TIPS AND TRICKS

SMOOTHING OTHER DISCONTINUITIES Gears of War 3: Snap character rotation when switching to sprint Gears of War 4: Snap character rotation when switching to sprint Inertialize away the discontinuity

LOCOMOTION FILTERING Gears controls are very responsive (twitchy) Filter inputs to locomotion blend spaces If filtered values are too far from actual values Snap to actual values Inertialize Fluid pose even with twitchy inputs

FIRE & FORGET MOTION WARPING Don t need to maintain warp point data across transitions Only 1 active warp at a time Simplifies bookkeeping Simplifies replication S. Dickinson. Motion Warping in Gears of War 4 : Doing More with Less. GDC 2017

THANK YOU DAVID BOLLO dbollo@microsoft.com