Comparing Traditional Key Frame Animation Approach and Hybrid Animation Approach of Humanoid Characters
Total Page:16
File Type:pdf, Size:1020Kb
DEGREE PROJECT FOR MASTER OF SCIENCE IN ENGINEERING GAME AND SOFTWARE ENGINEERING Comparing Traditional Key Frame Animation Approach and Hybrid Animation Approach of Humanoid Characters Lucas Holmqvist | Eric Ahlström Blekinge Institute of Technology, Karlskrona, Sweden, 2017 Supervisor: Prashant Goswami, Department of Creative Technologies, BTH Abstract Humanoid character animation is an essential part in many modern video games. Animating characters is considered a graphical artists task. The pipeline for traditional key frame animation consists of the artist setting up a character model and a skeleton. The skeleton is used to position the character in poses which are saved into key frames. Utilizing interpolation between key frames provides fluid motion throughout the animation clips and gives them life like visual properties. Another approach to animating humanoid characters is procedural animation which employs mathematical functions and methods to achieve motion. In this thesis the authors explore a different approach which uses the basic concept of key frame animation together with procedural animation to reduce the number of key frames needed for an animation clip. This hybrid approach has been used in commercial video games but little is documented regarding the differences in visual quality and performance when compared to traditional key frame animation. Employing the hybrid solution would also relieve graphical artists of workload which would be desirable for studios that have limited resources in that department. To compare the two approaches the authors conducted an experiment consisting of side by side comparisons of animation clips, which participating subjects were asked to rate based on visual appeal. To evaluate the performance of the two approaches, both were implemented and measured by Frames Per Second (FPS). Keywords: Humanoid Character Animation, Procedural Animation, Side By Side Comparison i Sammanfattning Mänsklig karaktärsanimation är en väsentlig del i många moderna datorspel. Att animera karaktärer är en uppgift för grafiker. Tillvägagångssättet för att skapa traditionella key frame animationer består av att artisten skapar en karaktärsmodell och ett skelett. Skelettet används för att positionera karaktären i poser som sparas ned i key frames. Genom att använda interpolation mellan key frames skapas kontinuerliga rörelser med realistiska egenskaper. En annan teknik för att animera mänskliga karaktärer är procedurell animation som förlitar sig på matematiska funktioner och metoder för att uppnå rörelse. I den här avhandlingen utforskar författarna en annan teknik som använder grundkonceptet av key frame animation tillsammans med procedurell animation för att minska antalet key frames som behövs för att skapa ett animationsklipp. Den hybrida tekniken har blivit använd i kommersiella datorspel men sparsam information finns dokumenterad angående skillnader i visuell kvalité och prestanda vid jämförelse till key frame animation. Att använda den hybrida lösningen skulle även avlasta grafikers arbetsbörda vilket kan vara önskvärt för spelstudios som har begränsade resurser av grafiker. För att jämföra dem två teknikerna har författarna utfört ett experiment bestående av sida vid sida jämförelser av animationsklipp som experimentdeltagare blev ombedda att uppskatta baserad på visuell kvalité. För att utvärdera prestandan av båda teknikerna implementerades de i samma plattform och deras Frames Per Second (FPS) mättes. Nyckelord: Mänsklig Karaktärsanimation, Procedurell Animation, Sida Vid Sida Jämförelse iii Preface We are students at Blekinge Institute of Technology and this thesis is the last requirement for our Master of Science in Game and Software Engineering degree. This project stretches over five months and contains four different phases: research, implementation, experiment and reporting. We did not cooperate with a commercial company during our thesis. Acknowledgements We would like to thank Prashant Goswami for supervising this thesis and helping us in all phases of this project. Many thanks to Veronica Sundstedt for helping us design the experiment. Thank you to David Rosen who sparked our interest in this area and provided knowledge about the implementation. Thank you Vegard Myklebust, Ryan Juckett and Dave Hampson for providing source code that was used in the implementation. Authors: Lucas Holmqvist [email protected] Eric Ahlström [email protected] Supervisor: Prashant Goswami Department of Creative Technologies Centre of learning: Department of Creative Technologies Blekinge Institute of Technology 37179 Karlskrona, Sweden v Nomenclature Technical terms and definitions SQUAD Spherical Spline Quaternion Interpolation. The chosen interpolation technique for the hybrid animation approach. Key frame A bone’s rotation and positional data of poses in an animation Key frame increment A term used by the authors to tell how many additional sets of key frames have been added. A set of key frames can contain two to 16 key frames. FPS Frames per seconds. How many times the program manages to update each second. Inbetweening Procedures to calculate poses between key frames. Sometimes called tweening. Velocity jar Sudden and abrupt change in velocity magnitude or direction. vii Table of Contents Abstract i Sammanfattning (Swedish) iii Preface v Nomenclature vii Technical terms and definitions ............................. vii Table of Contents ix 1 Introduction 1 1.1 Introduction .................................... 1 1.2 Background .................................... 2 1.3 Objectives ..................................... 2 1.4 Delimitations .................................... 2 1.5 Thesis questions .................................. 3 2 Theoretical Framework 5 2.1 Traditional Key Frame Animation ......................... 5 2.2 Procedural Animation ............................... 5 2.3 Interpolation .................................... 6 2.4 Damped Spring System .............................. 6 2.5 Inverse Kinematics ................................ 7 2.6 David Rosens GDC Talk .............................. 7 3 Method 9 3.1 Platform ...................................... 9 3.2 Implementation .................................. 9 3.3 Experiment .................................... 16 3.4 Performance Test ................................. 17 4 Results 19 4.1 Experiment Results ................................ 19 4.2 Performance Test Results ............................. 22 5 Discussion 25 5.1 Visual Quality Results ............................... 25 5.2 The Walking Animation Clip Comparison ..................... 25 5.3 The Running Animation Clip Comparison ..................... 26 5.4 The Crouching Animation Clip Comparison .................... 26 5.5 The Idle Animation Clip Comparison ....................... 27 5.6 Grouping Experiment Participants ......................... 27 5.7 Experiment Design ................................ 28 5.8 Performance Results ............................... 29 5.9 Sustainable Development and Ethical Social Aspects .............. 29 6 Conclusions 31 7 Recommendations and Future Work 33 7.1 Inverse Kinematics ................................ 33 7.2 Optimization of the Hybrid Approach ....................... 33 7.3 Exploring Interpolation Techniques Applied to Key Frame Interpolation ..... 33 7.4 Study the Memory Usage of Both Approaches .................. 33 ix 7.5 Implement the Study Without Unity ........................ 33 References 35 A Ethics Committee Feedback 37 B Letter of Invitation 41 C Information leaflet 43 x 1 INTRODUCTION 1.1 Introduction Humanoid character animation plays a big role in modern video games, as a lot of games have humanoid characters as essential components. They can be used as antagonists, a way to convey emotion to the player and a way to drive the story forward among other things. The most common approach to creating animation clips, a data set that contains information used to animate a walk cycle or a jump, is the key frame animation approach[1]. A standard pipeline for key frame animation can be described briefly as: an artist defines a model and a skeleton to match the model, positions the model in poses that relate to one another and exports the animation data. When viewing the poses shifting in the correct order it is seen as fluid motion, this is the same illusion used in cartoon animation. The most powerful aspect of the key frame approach is the amount of control given to the artist[2]. At any given moment in an animation clip the artist can specify how the model should be posed. The downside of having this much control is the required minimal work to create an animation clip. It could be desirable to reduce the production time even at the cost of quality. A less common approach to character animation is procedural animation. When using pure procedural animation the graphical artists only produces the model and then the animations are created through programming code. For instance, if the programmers desire a locomotion animation, e.g walk cycle, they have to program each individual part of the model, such as the legs, arms and torso. Additionally, all bones must function together while following humanoid character bone constraints e.g knees can only bend one way. This complexity is often referred to as degrees of freedom and is the reason why procedural animation is not ideal for animating locomotion[3]. Procedural animation lends itself better to group behavior, secondary animation and inbetweening[4]. Group behavior is an umbrella