character animation for realtime applications michael putz klaus hufnagl institute of computer...

17
Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

Upload: edward-anthony

Post on 01-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

Character Animation for Realtime Applications

Michael Putz Klaus Hufnagl

Institute of Computer GraphicsGraz University of Technology

Austria

Page 2: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

STRUCTURE OF THIS PRESENTATION

1. introduction2. an old fashioned way of animation 3. example implementation4. outlook to a new technique5. example implementation6. diskussion

Page 3: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

THE OLD WAY …

• low polygon alien character mesh (~1200 polys)

• main character of a freeware game „STOKEDRIDER“

• currently under developement by a group of students

• animated using keyframes and mesh interpolation (also called: vertex tweening)

Page 4: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

LINEAR MESH INTERPOLATION

• artist models keyframes in 3D Software• export keyframes (vertex & normal positions)• runtime application generates missing

interpolation-frames

BUT NOW: let us take you where the action is..

Page 5: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

free download at http://www.bongfish.com

Page 6: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

CONSTRAINTS OF MESHINTERPOLATION

+ smooth animation+ folding-seams eliminated

(but only within a certain range)+ fast

- multiple copies of the mesh in memory (one for each key frame)- limit on the level of interactivity and realism - no dynamic animations at runtime

Page 7: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

SOME STATISTICS

STOKEDRIDER filesize: 7 MBkeyframe meshes: #21

= 2.3mb ( = 32% of filesize)

only 3 tricks animations, the rest is used for ground movement ( steering, switching direction etc.. )

Page 8: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

WHAT DO WE EXPECT FROM OUR NEXT ANIMATION-SYSTEM ?

• unlimited trick combinations for the alien rider

• response to enviromental stuff (collisions with objects, different ground conditions)

• fluid and physically correct movement

• should be a realtime implementation

• nextgen hardware should be supported (vertex shaders)

Page 9: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

THE NEW APPROACH

2 different animation systems!

1. OFFLINE ANIMATION(exported animation using a skeletal system and softskinning)

2. ONLINE ANIMATION(realtime deformation according to ingame physics)

Page 10: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

SKELETAL ANIMATION

• vertices bound to hierachic bonestrukture• quaternions used for „bones“

bone movement -> skin movement 1 matrix transformation -> many corresponding vertices

+ no need to store vertex positions for all the vertices for every frame of the animation

+ derive intermediate frames by using spherical interpolation+ smooth transitions while changing from one animation to

the other + the memory bandwidth is very small

- „close to joints” deformations can result in creasing

Page 11: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

SKINNING / SOFT-SKINNING

• rigid: each vertex corresponds with only one bone -> bulges

• soft: (multiple weights)

drawback: computation overhead

))(0.1(

))(0.1(

)0.1(

3214332211

2132211

1211

WWWVWVWVWVvBlend

WWVWVWVvBlend

WVWVvBlend

Page 12: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

OFFLINE ANIMATION

premodelled in e.g. 3dsMax, Maya, Milkshape, …• some IK physik & skeleton (like BIPED)• use envelopes to set and correct weights• generate animation-cycle (for the bones

keyframes)

exported filestructure consists of:• mesh container (lokale matritzen)• hierachichic bones (FrameTransformMatrix)• skin (texture UV-coordinates)• list of weights• animations

Page 13: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

ONLINE ANIMATION

• „arm shake“ animation for the alien-character

• both arms should shake according to riding speed

• physics-engine generates animation parallel to offline animation

BUT HOW TO COMBINE BOTH SYSTEMS?

Page 14: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

IMPLEMENTATION OF HANDSHAKING

• using the already existing bone-hierachy parsing code from offline animation

• wait for „shoulder bone“ than modify all bones below using sin/cos depending on riding speed

= simple but effective without almost any cpu costs

Page 15: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

ONLINE ANIMATION

lots of other uses for physic based animation :

• Look-at constraints• Secondary motion (Chest Heaves ,breathing)• Inverse Kinematics• Muscle Bulges• Ponytails, clothes, belly etc.

Page 16: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

OUTLOOK

• more sophisticated online animations than sin/cos

• physic-based realtime IK• using realtime terrain information => realistic

crashes• enhanced motion blending of the animations• support of multichannel precalculated

animations• complexe Offline Animation of details

Page 17: Character Animation for Realtime Applications Michael Putz Klaus Hufnagl Institute of Computer Graphics Graz University of Technology Austria

QUESTIONS ?

for in-depth information about the implementation, please take a look at our paper or visit: http://www.bongfish.com/stokedrider