Simulation, Animation and Rendering of Crowds in Real-Time
Total Page:16
File Type:pdf, Size:1020Kb
ADVERTIMENT . La consulta d’aquesta tesi queda condicionada a l’acceptació de les següents condicions d'ús: La difusió d’aquesta tesi per mitjà del servei TDX ( www.tesisenxarxa.net ) ha estat autoritzada pels titulars dels drets de propietat intel·lectual únicament per a usos privats emmarcats en activitats d’investigació i docència. No s’autoritza la seva reproducció amb finalitats de lucre ni la seva difusió i posada a disposició des d’un lloc aliè al servei TDX. No s’autoritza la presentació del seu contingut en una finestra o marc aliè a TDX (framing). Aquesta reserva de drets afecta tant al resum de presentació de la tesi com als seus continguts. En la utilització o cita de parts de la tesi és obligat indicar el nom de la persona autora. ADVERTENCIA . La consulta de esta tesis queda condicionada a la aceptación de las siguientes condiciones de uso: La difusión de esta tesis por medio del servicio TDR ( www.tesisenred.net ) ha sido autorizada por los titulares de los derechos de propiedad intelectual únicamente para usos privados enmarcados en actividades de investigación y docencia. No se autoriza su reproducción con finalidades de lucro ni su difusión y puesta a disposición desde un sitio ajeno al servicio TDR. No se autoriza la presentación de su contenido en una ventana o marco ajeno a TDR (framing). Esta reserva de derechos afecta tanto al resumen de presentación de la tesis como a sus contenidos. En la utilización o cita de partes de la tesis es obligado indicar el nombre de la persona autora. WARNING . On having consulted this thesis you’re accepting the following use conditions: Spreading this thesis by the TDX ( www.tesisenxarxa.net ) service has been authorized by the titular of the intellectual property rights only for private uses placed in investigation and teaching activities. Reproduction with lucrative aims is not authorized neither its spreading and availability from a site foreign to the TDX service. Introducing its content in a window or frame foreign to the TDX service is not authorized (framing). This rights affect to the presentation summary of the thesis as well as to its contents. In the using or citation of parts of the thesis it’s obliged to indicate the name of the author Universitat Politecnica` de Catalunya (UPC) Doctoral Thesis Simulation, Animation and Rendering of Crowds in Real-Time Author: Supervisor: Alejandro Beacco Dr. Nuria Pelechano A thesis submitted in fulfilment of the requirements for the degree of Doctor of Philosophy in the Research Center for Visualization, Virtual Reality and Graphics Interaction (ViRVIG) Departament de Ciencies` de la Computacio´ (CS) October 15, 2014 Declaration of Authorship I, Alejandro Beacco, declare that this thesis titled, ’Simulation, Animation and Ren- dering of Crowds in Real-Time’ and the work presented in it are my own. I confirm that: This work was done wholly or mainly while in candidature for a research degree at this University. Where any part of this thesis has previously been submitted for a degree or any other qualification at this University or any other institution, this has been clearly stated. Where I have consulted the published work of others, this is always clearly at- tributed. Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work. I have acknowledged all main sources of help. Where the thesis is based on work done by myself jointly with others, I have made clear exactly what was done by others and what I have contributed myself. Signed: Date: i PROXIMO – I was the best because the crowd loved me. Win the crowd, win your freedom. MAXIMUS – I will win the crowd. I will give them something they have never seen before. Gladiator (2000) movie script by D. Franzoni, revised by J. Logan. UNIVERSITAT POLITECNICA` DE CATALUNYA Abstract Facultat d’Informatica` de Barcelona (FIB) Departament de Ciencies` de la Computacio´ (CS) Doctor of Philosophy Simulation, Animation and Rendering of Crowds in Real-Time by Alejandro Beacco Nowadays crowd simulation is becoming more important in computer applications such as building evacuation planning, training, videogames, etc., presenting hundreds or thousands of agents navigating in virtual environments. Some of these applications need to run in real time in order to offer complete interaction with the user. Sim- ulated crowds should seem natural and give a good looking impression to the user. The goal should be to produce both the best motion and animation, while minimizing the awkwardness of movements and eliminating or hiding visual artifacts. Achieving simulation, animation and rendering of crowds in real-time becomes thus a major chal- lenge. Although each of these areas has been studied individually and improvements have been made in the literature, its integration in one real-time system is not straight forward. In the process of integrating animation, simulation and rendering of real time crowds, we need to assume some trade-offs between accuracy and quality of results. The main goal of this thesis is to work on those three aspects of a real-time crowd vi- sualization (simulation, animation and rendering) seeking for possible speed-ups and optimizations allowing us to further increase the number of agents in the simulation, to then integrate them in a real-time system, with the maximum number possible of high quality and natural looking animated agents. In order to accomplish our goal we present new techniques to achieve improvements in each one of these areas: In crowd simulation we work on a multi-domain planning approach and on planning us- ing footsteps instead of just root velocities and positions; in animation we focus on a framework to eliminate foot sliding artifacts and on synthesizing motions of characters to follow footsteps; in rendering we provide novel techniques based on per joint impos- tors. Finally we present a novel framework to progressively integrate different methods for crowd simulation, animation and rendering. The framework offers level-of-detail for each of these areas, so that as new methods are integrated they can be combined efficiently to improve performance. Acknowledgements This PhD. Thesis would not have been possible without the great supervision of my advisor, Dr. Nuria Pelechano, to whom I ought being where I am now. She has been the perfect guide to a work she envisioned from the first moment, and she has been able to push me in those moments when you think your work is stuck. She has almost as much credit as I have in all the work I have done. I also have to thank Dr. Carlos Andujar´ for his guidance and collaboration in all my work on rendering, as well as Dr. Bernhard Spanlang for the same reasons and for assisting me in the use of his animation library. Also, I need to thank Dr. Mubbasir Kapadia and Professor Norman I. Badler, for supervising me during my stay at the University of Pennsylvania, which has lead us to more than one collaboration. And of course I also want to give thanks to my girlfriend, Teresa, who has supported me and my work all these years; to my parents, my sister, and the rest of my family for the same reason, and because they have always been there even when they did not really know what I was doing at a PhD.; and to all my friends and colleagues who have accompanied me during this journey. To my friends from university days: Albert, Carlos, Ignasi, Marc, Oscar,´ V´ıctor, Leti, and Gloria. To my friends from work, colleagues or excolleagues: Adri, Carles, Dani, Eva, Ferran,´ Gen´ıs, Hector,´ Imanol, Isaac, Jesus´ D., Jesus´ O., Jesus´ R., Jordi M., Jordi S., Jose, Lazaro,´ M. Angels,` Marc, Marcos, Mar´ıa, Miguel-Angel,´ Oriol, Oscar,´ Pedro, Prithiviraj, Ramon,´ Roger, Sergi, V´ıctor and Xavi. And to other friends I have made or maintained during the PhD. like: Alba, Atia, Enric, Eva, Gerard, Henar, Javi, Jorge, Mariela, Miguel, Nico, Sergio, Sof´ıa, and Xavi. I also want to give special thanks to other Doctors and Professors who have helped me or guided me at some point in all my years of research: Isabel Navazo, Pere Brunet, Alvar` Vinacua,` Pere-Pau Vazquex,´ Marta Fairen,´ Toni Chica, Toni Sus´ın, Alex Rios and Gustavo Patowe. Finally, this thesis has also been possible thanks to the grant FPUAP2009-2195 (Span- ish Ministry of Education). The different works presented in this document have also been partially funded by the Spanish Ministry of Science and Innovation under Grant TIN2010-20590-C02-01. vii . Contents Declaration of Authorship i Abstract v Acknowledgements vii Contents ix 1 Introduction 1 1.1 Motivations .................................... 2 1.2 Problems ..................................... 4 1.3 Goals ....................................... 6 1.4 Contributions .................................. 7 1.5 Document Organization ............................ 9 2 Concepts 11 2.1 Simulation .................................... 12 2.1.1 Crowd Model .............................. 12 2.1.2 Crowd Simulation ............................ 12 2.2 Agent Complexity ................................ 14 2.2.1 Representation ............................. 14 2.2.2 Static Parameters ............................ 15 2.2.3 Variable Data .............................. 15 2.3 Control Granularity ............................... 16 2.3.1 Reactive and Local Motion ....................... 16 ix CONTENTS 2.3.2 Planning and Global Motion ...................... 16 2.3.2.1 Navigation Meshes ...................... 17 2.3.2.2 Planner ............................ 17 2.3.2.3 Prediction ........................... 18 2.3.3 Behavior ................................. 19 2.3.4 Complete Control ............................ 19 2.4 Environment Complexity ............................ 20 2.4.1 Static ................................... 20 2.4.2 Dynamic ................................. 20 2.5 Time Discretization ............................... 21 2.6 Animation .................................... 22 2.6.1 Frames and Keyframes ......................... 22 2.6.2 Blending Between Keyframes ..................... 22 2.6.3 Character Animation .......................... 23 2.6.3.1 Skeleton ...........................