Near Optimal Synthesis of Digital Animation from Multiple Motion Capture Clips
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSITA’ DEGLI STUDI DI MILANO Facoltà di Scienze Matematiche, Fisiche e Naturali Near Optimal Synthesis of Digital Animation from Multiple Motion Capture Clips Corso di Laurea Magistrale in: Tecnologie dell’Informazione e della Comunicazione Marco Alamia Matricola n. 736779 Relatore: Prof. Ing. Alberto N. BORGHESE Correlatore: Dott. Iuri FROSIO Anno Accademico 2008/2009 ABSTRACT The present work discusses theory and practice of a powerful animation method designed to generate walk animations for digital characters. Our system permits to interact with the animation, allowing the user to change at run-time several animation’s parameters, such as the motion direction or the gait style, influencing the final animation. Our work starts presenting the skeleton animation system and the motion capture system; then we explain how we can, thanks to these two techniques, generate a database of walk animation clips. The so obtained animations are provided to the animation system which links them together in a sequence. Linking is obtained generating a smooth transition from one clip to the next one through the use of the animation blending technique. Since we want to interact with the animation at run-time, the clip’s sequence is not given a priori, instead it is generated in real-time in respect to the user’s desires. To this aim we create a controller in charge of choosing the next clip in respect to the task that it is given, which can be simulating a walk along a line, or simulating a walk where motion direction and character’s orientation are required by the user. The controller leans on a selection policy in order to choose the next clip; in our work we propose two possible policies, a greedy one and a near-optimal one. The former goes through every animation contained in the database and evaluates the direct cost of adding the clip in exam to the sequence. The latter policy, instead, chooses the next clip evaluating an approximation of the optimal choice, which is obtained through the implementation of a reinforcement learning algorithm. The optimal choice estimates both the direct cost of choosing a clip as well as all the future costs that the system will pay for that choice. Unfortunately we can’t effectively implement the optimal policy, therefore we content ourselves with an approximation that leads to the near- optimal policy. We lastly show how both these policies produce controllers capable of responding, in real- time, to the change of several animation parameters due to the user’s interaction as well as the environmental constraints. iii iv ACKNOWLEDGMENTS I want to thank my thesis supervisor associate professor Alberto N. Borghese for his contribution during the development of this thesis. I am grateful to him for passing on to me appreciation for accurate work and method. This thesis is the fruit of a close collaboration and would certainly not have been the same without his contribution. In addition I thank my co-supervisor dott. Iuri Frosio for his help with the motion capture system. I also wish to thank my family, who always supported me and encouraged me. I am grateful to you because you have always supported me with no hesitation. Thank you. v A mio padre per aver posto le basi di tutto ciò che so A mia madre per avermi sempre cresciuto con infinito amore, nel bene e nel male ed in ogni momento della mia vita A mio fratello, inestimabile compagno di viaggio verso Itaca A Flora per aver saputo recuperare vi vii CONTENTS ABSTRACT ................................................................................................................... III ACKNOWLEDGMENTS .............................................................................................. V CONTENTS................................................................................................................ VIII INTRODUCTION............................................................................................................ 1 1: Introduction ..........................................................................................................................................2 1.1 Introduction ....................................................................................................................................2 1.2 Animation framework ....................................................................................................................2 1.3 Blending system .............................................................................................................................3 1.3.1 Animation blending................................................................................................................3 1.3.2 Linear interpolation ................................................................................................................3 1.3.3 Clip blending system in the motion model .............................................................................4 1.4 Control System...............................................................................................................................5 1.5 Software implementation ...............................................................................................................6 MOTION MODEL .......................................................................................................... 8 2: Animation Framework ........................................................................................................................9 2.1 Introduction ....................................................................................................................................9 2.2 Skeletal Animation .........................................................................................................................9 2.3 The avatar model ............................................................................................................................9 2.3.1 Skeleton ............................................................................................................................... 11 2.3.2 Skinning ............................................................................................................................... 12 2.4 Key frames ................................................................................................................................... 14 2.5 Motion Capture ............................................................................................................................ 15 2.5.1 Motion Capture .................................................................................................................... 15 2.5.2 SMART – Motion Capture System ...................................................................................... 16 2.5.3 Noise and Missing Data ....................................................................................................... 18 2.5.4 Mapping ............................................................................................................................... 20 2.5.5 Skeleton’s Frenet frames ...................................................................................................... 20 2.5.6 Head’s Frenet frame ............................................................................................................. 22 2.6 Software implementation ............................................................................................................. 24 2.7 Conclusion summary ................................................................................................................... 25 3: Blending System ................................................................................................................................. 26 3.1 Introduction .................................................................................................................................. 26 3.2 Animation blending ..................................................................................................................... 26 3.3 Gait cycles .................................................................................................................................... 27 3.4 Motion model clips ...................................................................................................................... 28 3.4.1 Clips definition ..................................................................................................................... 28 3.4.2 Clips Constraints System ..................................................................................................... 29 3.4.3 Mirroring animations ........................................................................................................... 31 viii 3.5 Clip blending ................................................................................................................................ 34 3.5.1 Blending process .................................................................................................................. 34 3.6 Conclusion summary ................................................................................................................... 36 CONTROL SYSTEM .................................................................................................... 37 4: Control system .................................................................................................................................... 38 4.1 Introduction .................................................................................................................................