Animation in Video Games presented by Jason Gregory

Slides:



Advertisements
Similar presentations
GRAPP, Lisbon, February 2009 University of Ioannina Skeleton-based Rigid Skinning for Character Animation Andreas Vasilakis and Ioannis Fudos Department.
Advertisements

Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
INNER WORKINGS OF UNITY 3D. WHAT WE ARE GOING TO COVER Intro to Unity Physics & Game Objects Cameras & Lighting Textures & Materials Quaternions and Rotation.
1 Characters. 2Introduction The Characters are the Actors of the Games. The Characters are the Actors of the Games. Three Types of Characters : Three.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
Character Setup Character Setup is the process of creating handles and controls for anything that a character animator will need to adjust in order to.
1Notes  Assignment 0 marks should be ready by tonight (hand back in class on Monday)
Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0.
Character Animation CSE 191A: Seminar on Video Game Programming Lecture 5: Character Animation UCSD, Spring, 2003 Instructor: Steve Rotenberg.
3D orientation.
1cs426-winter-2008 Notes  Collision notes part 1 (primitive operations) should be up on the weekend.
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
Now Playing: Gong Sigur Rós From Takk... Released September 13, 2005.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Midterm Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2004.
Week 4 Lecture 3: Character Animation Based on Interactive Computer Graphics (Angel) - Chapter 10 1 Angel: Interactive Computer Graphics 5E © Addison-Wesley.
CSE 473 Dr. Charles B. Owen Fundamentals of 3D Game Development1 Skeletons and Skinning Bones and Skeletons Mesh Skinning.
Algirdas Beinaravičius Gediminas Mazrimas.  Introduction  Motion capture and motion data  Used techniques  Animating human body  Problems  Conclusion.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Chapter 5.2 Character Animation. CS Overview Fundamental Concepts Animation Storage Playing Animations Blending Animations Motion Extraction Mesh.
Modeling Skin Separate object(s) per limb (and joints) Continuous Skin
Video Game Rendering Mathematics
Computer Graphics Group Tobias Weyand Mesh-Based Inverse Kinematics Sumner et al 2005 presented by Tobias Weyand.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
Computer Graphics 2 In the name of God. Outline Introduction Animation The most important senior groups Animation techniques Summary Walking, running,…examples.
Character Animation. Contents Keyframe animation Mocap Smooth skin by vertex blending Rigging & retargeting Gait analysis (Ragdoll physics) Fall
Computer Graphics Soft Body Animation - Skinning CO2409 Computer Graphics Week 22.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Algirdas Beinaravičius Gediminas Mazrimas.  Introduction  Motion capture and motion data  Used techniques  Animating human body  Problems  Conclusion.
Maths & Technologies for Games Animation: Practicalities CO3303 Week 3.
CSE 381 – Advanced Game Programming Animation Systems Jack Skellington, from The Nightmare Before Christmas.
Multimedia System and Networking UTD Slide- 1 University of Texas at Dallas B. Prabhakaran Rigging.
CSCE 552 Fall 2012 Animations By Jijun Tang. Animation terms  frame – an image that is displayed on the screen, usually as part of a sequence.  pose.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Character Setup In addition to rigging for character models, rigging artists are also responsible for setting up animation controls for anything that is.
Direct3D Workshop November 17, 2005 Workshop by Geoff Cagle Presented by Players 2 Professionals.
CS 450: COMPUTER GRAPHICS ANIMATION SPRING 2015 DR. MICHAEL J. REALE.
Skeletal Animation and Skinning A (hardware friendly) software approach By: Brandon Furtwangler.
Computer Graphics Matrices
Honours Graphics 2008 Session 2. Today’s focus Vectors, matrices and associated math Transformations and concatenation 3D space.
Basic Theory (for curve 01). 1.1 Points and Vectors  Real life methods for constructing curves and surfaces often start with points and vectors, which.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
3D GRAPHICS RENDERING PIPELINE CS / TECHNICAL BACKGROUND PAGE 11.
Animation Animation is about bringing things to life Technically: –Generate a sequence of images that, when played one after the other, make things move.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Advanced Math.
Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0.
2014 Animation Programming for Music Video Games Jessica Scott Harmonix Music Systems, Inc. October 10, 2014 #GHC
CGDD 4003 Character Animation. The Skeletal Hierarchy (aka the “rig”) Based on the concept of bones Each bone has exactly one parent Each bone has a transform.
Animation.
Game Engine Architecture
Shaders, part 2 alexandri zavodny.
Ying Zhu Georgia State University
Software Engineering and Game Development
UW Extension Certificate Program in Game Development 2nd quarter: Advanced Graphics Animation.
and an introduction to matrices
Bones Skeletal Unity-2D How & When
Skeletons and Skinning
Computer Animation and Visualisation Lecture 4. Skinning
Real-time Skeletal Skinning with Optimized Centers of Rotation
Chapter XIII Character Animation
UMBC Graphics for Games
CSCE441: Computer Graphics Coordinate & Composite Transformations
Geometric Objects and Transformations (II)
Motion Graphs Davey Krill May 3, 2006.
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Game Programming Algorithms and Techniques
Emerging Technologies for Games Review & Revision Strategy
Presentation transcript:

Animation in Video Games presented by Jason Gregory

Agenda The Goal of Game Animation Old School Animation Skeletons and Skins How Skinning Works (Graphically) The Math of Skinning Animation: Bringing a Character to Life Blending and other Advanced Topics

The Goal of Game Animation Our goal is simple: To produce realistic looking animated characters in our games!

Old School Animation The very first animated characters were 2D sprites. Just like traditional cel animation or flip books.

Old School Animation (2)

Old School Animation (3) When we moved to 3D, our first animated characters were jointed. Each limb or part of a limb is a separate rigid object. Problem: Interpenetration at joints!

Old School Animation (4)

Skeletons and Skins Modern approach is called skinning. Basic idea: – Create a jointed skeleton. – Attach the skin to the skeleton. – Move skeleton around – skin follows it. Skin is a 3D model made out of triangles. Skeleton is invisible – only the skin is seen by the player.

Skeletons and Skins (2)

Skeletons and Skins (3) Each vertex of each triangle is attached to one or more bones. – We use weights to define bones influences. – Weights at a joint must always add up to 1.

Skeletons and Skins (4)

Skeletons and Skins (5) Skeletons have two kinds of poses: – Bind Pose: The skeletons pose when the skin was first attached. – Current Pose: Any other pose of the skeleton; usually a frame of an animation. The bind pose is like a home base for the characters skeleton. If you drew the mesh without its skeleton, it would appear in its bind pose.

Skeletons and Skins (6) Bind PoseCurrent Pose

How Skinning Works Consider a single vertex (v) skinned to the joint J 1. The skeleton is in bind pose: J1J1 J0J0 y x v

How Skinning Works (2) We want to find the vertexs new location (v') in the current pose. y x v' v

How Skinning Works (3) The basic idea is to transform the vertex: – from model space – into joint space The coordinates of the vertex are invariant in joint space! – So, we can move the joint around all we want. When were done, we go back to model space to find the final position (v').

How Skinning Works (4) Heres the original vertex (v), but now in the joint space of J 1 : J1J1 J0J0 y x v

How Skinning Works (5) No matter what pose the skeleton is in, v and v' are the same when in joint space. y x v' v

How Skinning Works (6) Finally, we go back to model space to find the final location of the vertex (v'). y x v' v

The Math of Skinning Let X i be the translation of joint i. X0X0 y x X1X1 v

The Math of Skinning (2) Let Q i be the rotation of joint i. Q0Q0 y x Q1Q1 v

The Math of Skinning (3) We describe the bind pose matrix of joint J 1 as the matrix product of all the translations and rotations from the root joint to the joint in question:

The Math of Skinning (4) Now consider what happens when we move the skeleton into the current pose: J1J1 J0J0 y x v'

The Math of Skinning (5) This time, let T i be the translation of joint i, and let R i be the rotation of joint i: T0T0 y x T1T1 R0R0 R1R1 v'

The Math of Skinning (6) The matrix describing the current pose is: which is similar to the bind pose matrix:

The Math of Skinning (7) We multiply v by B –1 to get it into joint space from the bind pose. Then we multiply that by P to get it back into model space, in the current pose.

The Math of Skinning (8) Mathematically, this is:

The Math of Skinning (9) Voila! We can find v' for any pose imaginable! y x v' v

The Math of Skinning (10) We do these calculations on each and every vertex in the model. Then we draw the final vertices. For vertices that are affected by more than one joint, we take a weighted average of the positions due to each joint.

The Math of Skinning (11) The weighted average for a vertex affected by joints j and k would be:

Animation: Bringing Characters to Life An animation is really just a sequence of poses at various points in time. The poses are called keys. An animation can be described mathematically as: { P j (t) } j i.e. a set of pose matrices (keys) for all joints j, each of which is a function of time t. To play back the animation, we extract a pose at the current time index, skin the model to that pose, and then draw the model.

Bringing Characters to Life (2) Run Weasel, run!

Bringing Characters to Life (3) In a simple animation system, the keys are equally spaced in time. If we further restrict ourselves to integer time indices, then extracting a pose amounts to selecting the appropriate key. Joint 1: Joint 2: Joint 3: time … time = t … N–1

Bringing Characters to Life (3) To reduce memory overhead, the keys can be compressed, and might not be uniformly spaced. We will want to allow the time index to be a real number (i.e. floating-point). So, extracting a pose now requires interpolation between adjacent key frames. Joint 1: Joint 2: Joint 3: time … time = t … N–1

Interpolation and Blending To interpolate positions, we use simple vector linear interpolation (LERP).

Interpolation and Blending (2) To interpolate rotations, we must use quaternions. (It is next to impossible to interpolate matrices.) We have two choices when interpolating quats: – Linear interpolation (LERP) – Spherical linear interpolation (SLERP)

Interpolation and Blending (3) A quaternion LERP is identical to a vector LERP, but with 4 components. SLERP is like a LERP, but the weights are no longer (1- ) and. Instead they are:

Interpolation and Blending (4) LERP and SLERP can be used to interpolate between adjacent key frames for a specific time t. Interpolation can also be used to blend two entirely different animations together! For example, instead of a character being able to walk or run, he can do anything in between! The blend factor controls how much walk and how much run we see. =0: full walk =1: full run =0.5: half walk, half run

The Animation Pipeline Typical animation pipeline: – Pose extraction at current time t – Pose blending – Matrix palette generation – Palette-driven rendering The matrix palette maps directly to modern vertex shader architectures (a.k.a. indexed skinning).

Advanced Topics Key frame compression techniques Representing animations as spline curves instead of interpolated key frames Action state machines Skeletal partitioning Rag-doll physics …

Q&A Thanks for your attention! Questions can also be sent to: Jason Gregory Electronic Arts Los Angeles