Skip to content
me, working

CSCE450/689 Computer Animation (Fall 2023) Final Project Report


The appearance of a dancing SMPL [3] model. The clothes being worn are swaying realistically

Abstract

Modeling the behavior of the real world using computers is truly exhilarating. One aspect is using the magic of light in rendering to give objects a sense of realism, and another is giving a sense of reality through simulations of lively movements. Among these, simulating moving objects offers a very special kind of joy. It's often very hard, but when successful, it produces a very beautiful result. Today, I will briefly introduce one of the real-time animation techniques, the Position-Based Dynamics (PBD) [1], and we will explore the collision detection and handling techniques [2] used in it.

Introduction

In computer animation, 'Collision' is essential for realistic interactions between objects, while 'Self-Collision' ensures parts of the same object don't intersect, providing natural movements. These techniques are crucial for making animations more lifelike and physically accurate.

The Position-Based Dynamics (PBD) is a technique used in computer graphics and animation to simulate physical interactions and movements by directly manipulating the positions of objects. It's fast, stable, and effective in realistically rendering the behavior of complex structures or soft bodies. PBD is particularly popular in real-time applications, video games, and in movie production where visual effects are required.

In computer animation, 'Collision Detection' is about identifying when and where two or more objects intersect or come into contact. This step is crucial for creating realistic interactions in a virtual environment. 'Collision Response', on the other hand, deals with defining how these objects behave after the collision – like bouncing, shattering, or deforming.

It's about simulating the physical reactions to ensure animations look and feel authentic. Both detection and response are key to bringing animations to life with believable physics.

Methods

The researchers [2] developed a method to implicitly subdivide 3D space into small, axis-aligned bounding boxes or AABBs​​. No need for a global bounding box or complex 3D data structures, just straight to the point spatial hashing.

The algorithm works in two passes:

  • First, it classifies each vertex of these deformable tetrahedrons with respect to these small 3D cells.
  • Then, in the second pass, it classifies the tetrahedrons themselves. If a tetrahedron intersects a cell, all associated vertices are checked for collisions​​.

The grid cell size is pivotal. It influences the number of object primitives mapped to the same hash index. Too large, and the collision detection slows down. Too small, and the tetrahedron covers more cells, increasing the computational load​​.

Each 3D cell is mapped to a 1D hash table index using a hash function. This means every hash table index contains a manageable number of object primitives that are checked for collisions. It's a clever way to reduce the computational chaos of detecting collisions and self-collisions​​.

Demos

The demo scenes provided can be directly experienced through mouse or touch manipulation. The green border indicates that it is currently playing.

  1. It's cloth.

Cloth simulation. I've always wondered how it's done in movies. Fortunately, as covered in class, we can simulate cloth movement using several types of constraints.

  1. A bad cloth.

What was that? A cloth dropped on the floor no longer looks natural. This is because, although we have informed the computer about the spacing between particles, we haven't told it what to do when particles overlap. This overlapping phenomenon, detecting and handling collisions, is a broad and deep field of study in itself.

  1. A good cloth.

The cloth looks more natural now. In the final stage of the standard PBD routine, we added a step to handle vertex collisions, as suggested in [2]. The special thing about [2] is that it allows for 'detecting' collisions within time through spatial hashing, without using complex data structures, which is otherwise a daunting task taking time for collision detection between primitives.

These 'detected' collisions are then processed through an appropriate 'response'. After the system is stabilized in the most efficient way through the constraints projection of the standard PBD routine for each particle, we calculate and apply a 'response' once more to resolve the 'detected' collisions.

  1. So, what can we do with this?

Collision detection and handling through spatial hashing are not constrained by topology. It works flawlessly even with structures like the t-shirt on the screen, which are interconnected and form holes. Anyone who can tell me about The Euler-Poincaré Formula for this t-shirt, please email me.

  1. More shirts?

What if we add more t-shirts? The floor is very messy. It's not unlike the real look of my room. Interaction between different objects is not an issue. All components of the scene are eventually generalized through spatial hashing, so we can try various interactions.

Discussions

Although it's not directly related to the report, I feel I should write a brief impression. As always, I am lazy and short on time. There wasn't much that went as planned, and I was busy catching up with my insufficient studies. However, an important point is that I really enjoyed this class.

I think my life would have changed a lot if I had known about this class a bit earlier, as it opened my eyes to many things. If someone, years from now, is reading this project introduction page and is contemplating whether to take a computer animation class, and if they really like computers, I would recommend this class. Thank you for looking at my project. Sending tender regards from Texas in the winter of 2023. Minseo.

References

  1. Position Based Dynamics
  2. Optimized Spatial Hashing for Collision Detection of Deformable Objects
  3. SMPL: A Skinned Multi-Person Linear Model

Last updated: