Procedural Locomotion of Multi-Legged Characters in Dynamic Environments
Total Page:16
File Type:pdf, Size:1020Kb
Procedural Locomotion of Multi-Legged Characters in Dynamic Environments Ahmad Abdul Karim1 2, Thibaut Gaudin2, Alexandre Meyer1, Axel Buendia2 3, Saida Bouakaz1 1 Universite´ de Lyon, CNRS 1 Universite´ Lyon 1, LIRIS, UMR5205, F-69622, France 2 Spir.Ops Artificial Intelligence, Paris, France 3 CNAM−CEDRIC, 292, rue St Martin, 75003 Paris, France Abstract (a) We present a fully procedural method capable of generating in real-time a wide range of locomotion for multi-legged characters in a dynamic environment, without using any motion data. The system consists of several independent blocks: a Character Controller, a Gait/Tempo Manager, a 3D Path Constructor (b) and a Footprints Planner. The four modules work cooperatively to calculate in real-time the footprints and the 3D trajectories of the feet and the pelvis. Our system can animate dozens of creatures using dedicated level of details (LOD) techniques, and is totally controllable (c) allowing the user to design a multitude of locomotion styles through a user-friendly interface. The result is a complete lower body animation which is sufficient for most of the chosen multi-legged characters: arachnids, insects, imaginary n-legged robots, etc. Keywords: Procedural Animation, Level Of Details, Multi-Legged Characters, Dynamic Figure 1: (a) Spider model avoids crates flagged as forbid- Environments. den and steps on others flagged as safe (b) Ant model on a height map (c) Imaginary 5-legged Robot. 1 Introduction Real or imaginary animals make frequent ap- pearances in video games, films and virtual that these virtual multi-legged characters per- world simulations. In this context, animated form is locomotion: the ability to move in virtual multi-legged characters like arachnids, these virtual worlds toward the points of in- insects, crustaceans or any imaginary n-legged terest. These locomotion animations are quite robots/creatures make these virtual worlds be- rich due to the variety of morphologies, gaits, lievable and life like. The most common task body sizes/proportions and due to the complex- ity of the environment where these multi-legged presented approaches were dedicated or tested characters move: overcoming objects, cross- on the family of animals and creatures presented ing uneven terrain, avoiding moving obstacles, in this paper, and to our knowledge, none ad- etc. The challenge of modeling such motions dresses the performance issues with level of arises from the lack of motion capture data details techniques introduced in our system. inherent to the difficulty to obtain them and Data-driven techniques use input data to by the fact that existing animation techniques produce the animation (like Motion Capture mostly address human-like characters [1]. Data). These techniques, although the most We propose a system (See Figure1) that natural looking, are fixed for a specific mor- procedurally generates locomotion animations phology and a specific context. Physics-based for dozens of multi-legged characters, without techniques are more generic and adapt better any motion data, in real-time using dedicated to the environment. They do so by simulating level of details (LOD) techniques, and with a the actual physical forces/torques that act on the reactive adaptation to a dynamic environment. articulated body. But they are computationally We focused on generating plausible movements expensive due to the number of equations to [2] that are, at the same time, believable and solve, which limits the number of characters fully controllable. Our technique produces a simulated at the same time. Several works multitude of locomotion styles, generated out were proposed to overcome the problems of of many input parameters like the creature the previous techniques or to mix them, like: morphology, gait/tempo, the overall locomo- Adapting the motion data to different morpholo- tion speed, etc. These input parameters can gies (Motion Retargeting) using inverse kine- be edited through a user-friendly interface in matics in [4,5] or mesh based techniques in real-time. We propose a foot path planning [6]. Using inverted pendulum model (IPM) system that assign to each foot the best cou- [7] to avoid complex kinematics and dynam- ple (footprint-trajectory), where the footprint ics calculations on the original multi-segments is selected among several candidates, and the skeleton. In [8] they animate the upper body of trajectory is the 3D path that reach this footprint. the character using Motion Capture data while Our system generates plausible locomotion an- the lower body is animated using an IPM. In imation at different level of details (LOD): the [9] they optimize their IPM controller using evaluation of the possible couples (footprint- Motion Capture data. In [10] they animate a trajectory) may be adapted according to the quadruped in real-time using forward dynamics, desired LOD, typically depending on quality using forces data extracted out of real quadruped criteria such as the on-screen importance, vis- Motion Capture data. Finally, several papers ibility, etc. These footprints and trajectories introduce a specific offline optimization pass, may change in real-time in a reactive manner to accommodate for predefined environmental according to the dynamic of the environment topologies and changes [11, 12]. The lack of and the obstacles. Finally, our system generates motion data and the difficulties to obtain them the pelvis trajectory according to the overall for the family of animals and creatures that desired direction, speed, the actual context of we simulate has led us to avoid data-driven the environment and the feet positions and feed- techniques. In our system we concentrated more backs. Thus, our procedural approach provides on generating plausible movements [2], making two important features for interactive applica- it more adapted (performance wise) to real-time tions: reactivity and control. applications than the physics-based ones. Procedural techniques use mathematical formulas and algorithms to generate the loco- 2 Related Work motion without any real motion data. They There are several techniques for generating lo- do so using empirical and biomechanics con- comotion, Multon et al. in [3] and Van Welber- cepts. These techniques offer high level of gen et al. in [1] identified in their surveys the controllability over data-driven ones: practically three major techniques: data-driven, physics- no morphological constraints, good adaptability based and procedural. Notice that few of the to the environment, etc. These techniques take less computation time per character, making it its movement based on the feet feedback, but at possible of animating several characters at the the same time it imposes the overall trajectory. same time in real-time. However, they may When considering locomotion of multi- suffer from the lack of naturality in the move- legged animals, the possibility of using real ment, a disadvantage that we try to overcome data are strongly limited due to difficulties to in this paper by integrating basic biomechanics capture the motion of real creatures like dogs, principles. We took inspiration from the work of horses, insects, spiders, etc. and is sometime Boulic et al. in [13] on a human walking model impossible like for an imaginary 5-legged char- and the work of Singh et al. [14] that show how acter. Thus, Girard et al. in [24, 25] propose a avoidance in dynamic crowds can be improved fully procedural system to animate multi-legged using biomechanics-based footstep planning. characters with visually plausible locomotion. In parallel to the locomotion animation, a path Their system is limited to planner terrains. Our and footprints planning are needed in order to work can be considered as an extension into navigate through the environment. In [15] they dynamic environments. Johansen in [26] adapts search valid footprints using probabilistic nav- existing motion data (biped and quadruped) to igation graphs that take into account posture the environment using inverse kinematics and transition. Then, these footprints are substituted footprints prediction. In [27] they animate a six- with corresponding motion clips. Lamarche legged character (a cockroach) using reduced- in [16] generates navigation graphs and ceiling linear articulated body dynamics and gait pat- information and uses these information to cal- terns observed in biology. Wampler et al. in [28] culate the best footprints around the optimized present a fully automatic method for generating trajectory, and to generate the final motion using locomotion and gaits for legged animals based motion data, allowing for 3D navigation in com- on their shape and by the use of an off-line op- plex environments. Path planning techniques are timization pass that results in believable anima- also largely studied in robotics. In [17, 18, 19] tions. In [29] they use intelligent retargetting of (H7 Humanoid Robot™ and Boston BigDog™) 2-4-6-legged Motion Capture data without any their planner produce the footprints using feed- morphological constraint (the user can design forward loops, correcting itself after each step their own creature). The objective of our system for adaptation. In [20] (Honda ASIMO™) is to achieve similar results with the procedural they plans a sequence of footstep positions to techniques in real-time without using any off- navigate toward a goal location while avoiding line components, and with much more control static and dynamic obstacles, their method uses in a dynamic complex environment. a time-limited planning horizon. Comparing Finally, as our method tries to generate plau- to our purpose of computer animation, robotics sible and believable locomotion, we created our have to deal with the complexity related to the controllers in a way that reflects many studies: mobile robot mechanical constraints and with the effect of limb length and running speed on the real world physics that we do not fully have. time of contact and step length in [30], the Most of previously cited techniques are Foot relationship between speed and step length in placement driven locomotion, where the feet humans in [31], and animal gaits: galloping, drive the locomotion and the overall trajectory trotting, pacing, etc.