Applications of Evolutionary Computation to Quadrupedal Animal Animation James E. Murphy B.Sc. (Hons.) The thesis is submitted to University College Dublin for the degree of Ph.D. in the College of Engineering, Mathematical and Physical Sciences March 2011 School of Computer Science and Informatics Head of School Prof. Joe Carthy Research Supervisors Dr. Michael O’Neill Dr. Hamish Carr Abstract As humans are familiar with animal movement, a realistic animal an- imation must imitate this motion. This thesis explores how observations of natural evolution and evolutionary computation can be used to pro- duce realistic quadrupedal animal animations, focusing on the grammar- based Genetic Programming method of Grammatical Evolution (GE). A cross-discipline review of animation systems, biological knowledge and natural computing techniques applicable to animal animation is pre- sented. Focusing on the horse, the construction of both a kinematic and physics-based model is described. The origins and representations of the data used to construct and animate these models are also discussed. GE is applied to animation problems for the first time. Animat- ing physics-based models is complex and a GE motion optimisation sys- tem successfully generates realistic, stable motions. Additionally, simple grammars with little domain knowledge generate novel movement. For herd scenes, a GE-based system generates models of varying mor- phology and automatically optimises motion data for them. GE also evolves motion adjuster functions that dynamically modify limb move- ment based on the model’s velocity. These functions are used in a real- time controllable kinematic animation system, in which a horse model moveswithanaccurategaitandexecutesgaittransitionswhennecessary. Overall, the use of GE and natural world observations is found to facilitate the generation of realistic quadrupedal animal animations. Acknowledgements I wish to thank my supervisors Dr. Michael O’Neill and Dr. Hamish Carr. I would also like to thank the members of the Natural Comput- ing Research & Applications Group and the Imaging, Visualisation & Graphics Group for their help and input. Additionally I would like to acknowledge my university examiners, Prof. Anthony Brabazon and Dr. Michela Bertolotto, my external ex- aminer Prof. Simon Lucas and all others who have provided valuable contributions and opinions. This research is co-funded by IBM under IRCSET’s Enterprise Part- nership Scheme and I am hugely grateful for this support. Finally, I wish to thank my parents for their outstanding support throughout my time in university and Emily for her great patience and constant encouragement. JAMES E. MURPHY University College Dublin March 2011 i Contents List of Figures x List of Tables xiii List of Equations xiv List of Grammars xv List of Videos xvi Publications arising xix 1 Introduction 1 1.1 Research aims . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1 Research questions . . . . . . . . . . . . . . . . . 4 1.2 Primary contributions . . . . . . . . . . . . . . . . . . . 5 1.3 Research and implementation decisions . . . . . . . . . . 11 1.4 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.5 Secondary contributions . . . . . . . . . . . . . . . . . . 15 1.5.1 Background research . . . . . . . . . . . . . . . . 16 1.5.2 Applications developed . . . . . . . . . . . . . . . 16 1.5.3 Animation techniques and data representations . 18 1.6 Structure of thesis . . . . . . . . . . . . . . . . . . . . . 19 ii I Related work 22 2 Animation 24 2.1 History and applications . . . . . . . . . . . . . . . . . . 25 2.2 Kinematic animation . . . . . . . . . . . . . . . . . . . . 26 2.2.1 Hierarchical kinematic modelling . . . . . . . . . 28 2.3 Physics-based animation . . . . . . . . . . . . . . . . . . 32 2.3.1 Open Dynamics Engine . . . . . . . . . . . . . . . 35 2.4 Development of quadrupedal animation . . . . . . . . . . 38 2.4.1 Animation techniques . . . . . . . . . . . . . . . . 38 2.4.2 Gait generation . . . . . . . . . . . . . . . . . . . 46 2.5 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 50 3 Natural computing 52 3.1 Biologically inspired algorithms . . . . . . . . . . . . . . 53 3.2 Evolutionary computation . . . . . . . . . . . . . . . . . 55 3.2.1 Evolutionary algorithm overview . . . . . . . . . 56 3.2.2 Evolutionary Programming . . . . . . . . . . . . 58 3.2.3 Evolutionary Strategies . . . . . . . . . . . . . . . 59 3.3 Genetic Algorithms . . . . . . . . . . . . . . . . . . . . . 59 3.3.1 Selection methods . . . . . . . . . . . . . . . . . . 61 3.3.2 Crossover . . . . . . . . . . . . . . . . . . . . . . 64 3.3.3 Mutation . . . . . . . . . . . . . . . . . . . . . . 65 3.3.4 Replacement strategies . . . . . . . . . . . . . . . 67 3.4 Genetic Programming . . . . . . . . . . . . . . . . . . . 68 3.4.1 Initialisation . . . . . . . . . . . . . . . . . . . . . 70 3.4.2 Crossover . . . . . . . . . . . . . . . . . . . . . . 73 iii 3.4.3 Mutation . . . . . . . . . . . . . . . . . . . . . . 74 3.5 Grammatical Evolution . . . . . . . . . . . . . . . . . . . 76 3.5.1 Implementation details . . . . . . . . . . . . . . . 77 3.5.2 Grammar . . . . . . . . . . . . . . . . . . . . . . 79 3.5.3 Genotype-phenotype mapping . . . . . . . . . . . 81 3.5.4 Initialisation . . . . . . . . . . . . . . . . . . . . . 85 3.5.5 Crossover . . . . . . . . . . . . . . . . . . . . . . 86 3.5.6 Mutation . . . . . . . . . . . . . . . . . . . . . . 89 3.6 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 91 4 Biology 94 4.1 Equine evolution and breeding . . . . . . . . . . . . . . . 96 4.1.1 Natural evolution . . . . . . . . . . . . . . . . . . 96 4.1.2 Breeding . . . . . . . . . . . . . . . . . . . . . . . 98 4.2 Anatomy . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 4.2.1 Tissues involved in locomotion . . . . . . . . . . . 104 4.2.2 Bones and joints . . . . . . . . . . . . . . . . . . 106 4.3 Equine musculoskeletal system . . . . . . . . . . . . . . . 108 4.3.1 Neck and head . . . . . . . . . . . . . . . . . . . 109 4.3.2 Back and tail . . . . . . . . . . . . . . . . . . . . 110 4.3.3 Forelimb . . . . . . . . . . . . . . . . . . . . . . . 110 4.3.4 Hindlimb . . . . . . . . . . . . . . . . . . . . . . 113 4.3.5 Skeletal allometry . . . . . . . . . . . . . . . . . . 115 4.4 Movement . . . . . . . . . . . . . . . . . . . . . . . . . . 118 4.4.1 Gait patterns . . . . . . . . . . . . . . . . . . . . 118 4.4.2 Equine natural gaits . . . . . . . . . . . . . . . . 120 iv 4.4.3 Neck and back . . . . . . . . . . . . . . . . . . . 124 4.4.4 Transitions . . . . . . . . . . . . . . . . . . . . . 125 4.5 Dynamic similarity . . . . . . . . . . . . . . . . . . . . . 127 4.5.1 Predictions from dynamic similarity . . . . . . . . 129 4.5.2 Discussion and applications . . . . . . . . . . . . 131 4.6 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 132 4.7 Part I summary . . . . . . . . . . . . . . . . . . . . . . . 134 II Model creation and manual gait generation 136 5 Horse model 138 5.1 Data and animation type . . . . . . . . . . . . . . . . . . 139 5.1.1 Origins of data . . . . . . . . . . . . . . . . . . . 140 5.1.2 Skeletal simplifications for animation . . . . . . . 142 5.2 Kinematic model . . . . . . . . . . . . . . . . . . . . . . 145 5.2.1 OpenGL . . . . . . . . . . . . . . . . . . . . . . . 145 5.2.2 Model construction . . . . . . . . . . . . . . . . . 147 5.3 Physics-based model . . . . . . . . . . . . . . . . . . . . 150 5.3.1 Model construction . . . . . . . . . . . . . . . . . 150 5.3.2 Motion . . . . . . . . . . . . . . . . . . . . . . . . 154 5.3.3 Spring-damper system . . . . . . . . . . . . . . . 156 5.4 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 160 6 Gait motion data and representations 161 6.1 Data origins . . . . . . . . . . . . . . . . . . . . . . . . . 162 6.1.1 Photographic . . . . . . . . . . . . . . . . . . . . 162 6.1.2 Motion capture . . . . . . . . . . . . . . . . . . . 165 v 6.1.3 Published . . . . . . . . . . . . . . . . . . . . . . 166 6.2 Representations . . . . . . . . . . . . . . . . . . . . . . . 168 6.2.1 Sinusoids for cyclical motion . . . . . . . . . . . . 170 6.2.2 Piecewise for transitional motion . . . . . . . . . 173 6.3 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 178 7 Manual motion data optimisation 180 7.1 Kinematic CMA . . . . . . . . . . . . . . . . . . . . . . . 181 7.1.1 Interaction . . . . . . . . . . . . . . . . . . . . . . 182 7.1.2 Visualisations . . . . . . . . . . . . . . . . . . . . 183 7.1.3 Applications . . . . . . . . . . . . . . . . . . . . . 186 7.2 Physics-based MDDE . . . . . . . . . . . . . . . . . . . . 186 7.2.1 Interface . . . . . . . . . . . . . . . . . . . . . . . 188 7.2.2 Animation and motion data editing . . . . . . . . 189 7.2.3 Visualisation and verification . . . . . . . . . . . 194 7.2.4 Applications . . . . . . . . . . . . . . . . . . . . . 196 7.3 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 201 7.4 Part II summary . . . . . . . . . . . . . . . . . . . . . . 202 III Experiments with GE 204 8 Automatic physics-based motion data optimisation 206 8.1 GE system overview . . . . . . . . . . . . . . . . . . . . 208 8.1.1 Grammars . . . . . . . . . . . . . . . . . . . . . . 210 8.1.2 Physics-based simulation fitness function . . . . . 213 8.2 Motion data optimisation experiments . . . . . . . . . . 220 8.2.1 Seed data grammar . . . . . . . . . . . . . . . . . 220 vi 8.2.2 Free grammar . . . . . . . . . . . . . . . . . . . . 224 8.2.3 Sinusoidal grammar . . . . . . . . . . . . . . . . . 227 8.2.4 Motion data optimisation conclusions . . . . . . . 231 8.3 Evolution rate experiments . . . . . . . . . . . . . . . . . 233 8.3.1 Dynamic fitness function . . . . . . . . . . . . . . 234 8.3.2 Generational joint freedom . . . . . . . . . . . . . 236 8.4 Uneven terrain experiment . . . . . . . . . . . . . . . . . 237 8.4.1 Results . . . . . . . . . . . . . . . . . . . . . . . . 241 8.5 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 243 9 Variable morphologies 244 9.1 Interspecies motion retargeting . . . . . . . . . . . . . . 245 9.1.1 Discrete model system . . . . . . . . . . . . . . . 247 9.1.2 Continuous model system . . . . . . . . . . . . . 251 9.1.3 Retargeting summary . . . . . . . . . . . . . . . . 254 9.2 Multiple models . . . . . . . . . . . . . . . . . . . . . . . 255 9.2.1 Allometric measurements . . . . . . . . . . . . . . 256 9.2.2 Variable Morphologies System overview . . . . . . 257 9.2.3 Spring-damper coefficient experiments . . . . . . 260 9.2.4 Comparison . . . . . . . . . . . . . . . . . . . . . 267 9.2.5 Animation results . . . . . . . . . . . . . . . . . . 268 9.3 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 270 10 Kinematic gait and transition animation system 272 10.1 Animation system overview . . . . . . . . . . . . . . . . 274 10.2 Gait adjusters . . . . . . . . . . . . . . . . . . . . . . . . 274 10.2.1 Extensions to the CMA . . . . . . . . . . . . . . 276 vii 10.2.2 GE system . . . . . . . . . . . . . . . . . . . . . . 278 10.3 Kinematic Gait Transition System . . . . . . . . . . . . . 281 10.3.1 Transitions . . . . . . . . . . . . . . . . . . . . . 283 10.3.2 MIDI control . . . . . . . . . . . . . . . . . . . . 285 10.4 Animation results . . . . . . . . . . . . . . . . . . . . . . 287 10.4.1 Transition phase data . . . . . . . . . . . . . . . . 288 10.4.2 Bone rotation data . . . . . . . . . . . . . . . . . 289 10.4.3 Aesthetic realism . . . . . . . . . . . . . . . . . . 290 10.5 Chapter summary . . . . . . . . . . . . . . . . . . . . . . 293 10.6 Part III summary . . . . . . . . . . . . . . . . . . . . . . 293 IV Conclusions 294 11 Conclusions and future work 295 11.1 Thesis summary . . . . . . . . . . . . . . . . . . . . . . . 295 11.1.1 Contributions . . . . . . . . . . . . . . . . . . . . 296 11.1.2 Research and implementation decisions . . . . . . 302 11.2 Future research directions . . . . . . . . . . . . . . . . . 308 Glossary 313 A 319 A.1 Genetics overview . . . . . . . . . . . . . . . . . . . . . . 320 A.1.1 Genetic terminology . . . . . . . . . . . . . . . . 320 A.1.2 Evolutionary processes . . . . . . . . . . . . . . . 326 A.2 Horse conformation . . . . . . . . . . . . . . . . . . . . . 332 A.3 Terminology for anatomical location . . . . . . . . . . . . 334 viii
Description: