A multiresolution Discrete Element Method for triangulated objects with implicit timestepping

Reading time: 6 minute
...
Featured Image

📝 Abstract

Simulations of many rigid bodies colliding with each other sometimes yield particularly interesting results if the colliding objects differ significantly in size and are non-spherical. The most expensive part within such a simulation code is the collision detection. We propose a family of novel multiscale collision detection algorithms that can be applied to triangulated objects within explicit and implicit time stepping methods. They are well-suited to handle objects that cannot be represented by analytical shapes or assemblies of analytical objects. Inspired by multigrid methods and adaptive mesh refinement, we determine collision points iteratively over a resolution hierarchy, and combine a functional minimisation plus penalty parameters with the actual comparision-based geometric distance calculation. Coarse surrogate geometry representations identify “no collision” scenarios early on and otherwise yield an educated guess which triangle subsets of the next finer level potentially yield collisions. They prune the search tree, and furthermore feed conservative contact force estimates into the iterative solve behind an implicit time stepping. Implicit time stepping and non-analytical shapes often yield prohibitive high compute cost for rigid body simulations. Our approach reduces these cost algorithmically by one to two orders of magnitude. It also exhibits high vectorisation efficiency due to its iterative nature.

💡 Analysis

Simulations of many rigid bodies colliding with each other sometimes yield particularly interesting results if the colliding objects differ significantly in size and are non-spherical. The most expensive part within such a simulation code is the collision detection. We propose a family of novel multiscale collision detection algorithms that can be applied to triangulated objects within explicit and implicit time stepping methods. They are well-suited to handle objects that cannot be represented by analytical shapes or assemblies of analytical objects. Inspired by multigrid methods and adaptive mesh refinement, we determine collision points iteratively over a resolution hierarchy, and combine a functional minimisation plus penalty parameters with the actual comparision-based geometric distance calculation. Coarse surrogate geometry representations identify “no collision” scenarios early on and otherwise yield an educated guess which triangle subsets of the next finer level potentially yield collisions. They prune the search tree, and furthermore feed conservative contact force estimates into the iterative solve behind an implicit time stepping. Implicit time stepping and non-analytical shapes often yield prohibitive high compute cost for rigid body simulations. Our approach reduces these cost algorithmically by one to two orders of magnitude. It also exhibits high vectorisation efficiency due to its iterative nature.

📄 Content

다양한 크기의 비구형 강체들이 서로 충돌하는 시뮬레이션은, 충돌하는 물체들의 크기 차이가 크고 형태가 구형이 아닐 경우 특히 흥미로운 결과를 보여준다. 이러한 시뮬레이션에서 가장 큰 연산 비용을 차지하는 부분은 바로 충돌 검출(collision detection)이다. 본 논문에서는 삼각형 메쉬로 표현된 물체들을 대상으로, 명시적(time‑explicit) 및 암시적(time‑implicit) 적분 방법 모두에 적용 가능한 새로운 다중 스케일(multiscale) 충돌 검출 알고리즘군을 제안한다. 제안된 알고리즘은 해석적(analytic) 형태나 해석적 물체들의 조합으로는 표현할 수 없는 복잡한 형상을 가진 물체들을 효과적으로 다룰 수 있도록 설계되었다.

1. 배경 및 동기

전통적인 충돌 검출 기법은 보통 물체를 구, 구면, 박스 등과 같은 단순한 해석적 형태로 근사하거나, 혹은 모든 삼각형 쌍에 대해 직접적인 거리 계산을 수행한다. 그러나 물체의 크기가 수십 배 이상 차이나고 형태가 비구형인 경우, 이러한 접근법은 계산량이 급격히 증가하여 실시간 시뮬레이션이나 대규모 강체 시스템의 시뮬레이션에 적용하기 어렵다. 특히 암시적 시간 적분법을 사용할 때는 각 시간 단계마다 시스템 전체에 대한 비선형 방정식을 반복적으로 풀어야 하므로, 충돌 검출에 소요되는 연산 비용이 전체 시뮬레이션 비용의 지배적인 비중을 차지하게 된다.

2. 알고리즘 설계 원리

우리의 접근법은 다중 격자(multigrid) 기법적응형 메쉬 정밀화(adaptive mesh refinement, AMR) 에서 영감을 얻었다. 구체적으로는 다음과 같은 단계로 충돌 점을 찾아낸다.

  1. 해상도 계층 구축

    • 입력으로 주어진 삼각형 메쉬를 여러 해상도 레벨로 계층화한다. 가장 거친 레벨에서는 각 물체를 대리(surrogate) 기하학적 형태(예: 볼록 껍질, 저해상도 삼각형 집합)로 근사한다.
    • 각 레벨은 이전 레벨보다 세밀한 삼각형 집합을 포함하도록 점진적으로 정제된다.
  2. 거친 레벨에서의 초기 검출

    • 거친 레벨에서는 “충돌 없음(no‑collision)” 상황을 빠르게 판별한다. 대리 형태 간의 간단한 거리 검사(예: 구체와 구체 사이의 거리, AABB 충돌 검사)를 통해 충돌 가능성이 전혀 없다고 판단되면, 하위 레벨로의 전파를 차단한다.
    • 충돌 가능성이 존재하는 경우, 가능성 있는 삼각형 서브셋을 추정한다. 이때 사용되는 추정은 함수 최소화(functional minimisation)패널티 파라미터(penalty parameters) 를 결합한 형태이며, 대리 형태와 실제 삼각형 사이의 거리 함수에 패널티를 부여해 충돌 가능성이 높은 영역을 강조한다.
  3. 정밀 레벨에서의 비교 기반 거리 계산

    • 추정된 삼각형 서브셋에 대해서만 정밀한 거리 계산(closest‑point query, GJK, EPA 등)을 수행한다. 이 단계는 전통적인 전역 쌍 검사보다 훨씬 적은 삼각형 쌍에 대해서만 연산이 이루어지므로, 전체 복잡도가 크게 감소한다.
  4. 검색 트리의 가지치기 및 피드백

    • 각 레벨에서 얻어진 결과는 검색 트리(search tree) 를 동적으로 가지치기(pruning)하는 데 활용된다. 충돌이 확정된 영역은 더 이상 하위 레벨에서 탐색하지 않으며, 충돌이 불가능한 영역 역시 즉시 배제한다.
    • 동시에, 보수적인 접촉력 추정값(conservative contact force estimate) 을 계산하여 암시적 시간 적분 단계에서 사용되는 비선형 방정식의 초기값 혹은 선형화 파라미터로 전달한다. 이는 암시적 스텝의 수렴 속도를 높이고, 불필요한 반복을 줄이는 효과가 있다.

3. 알고리즘의 장점

  • 다중 스케일 접근을 통해 거친 레벨에서 대부분의 “충돌 없음” 상황을 조기에 판별함으로써, 전체 탐색 공간을 1~2 차수(log‑scale) 정도 감소시킨다.
  • 함수 최소화와 패널티 파라미터를 결합한 추정 메커니즘은 단순히 기하학적 근사만을 사용하는 기존 방법보다 충돌 가능성이 높은 삼각형 집합을 더 정확히 예측한다.
  • 보수적인 접촉력 피드백은 암시적 시간 적분법에서 요구되는 비선형 방정식의 해를 보다 빠르게 수렴하도록 돕는다. 따라서 암시적 스텝당 평균 연산 시간이 크게 감소한다.
  • 알고리즘이 반복적(iterative) 구조를 갖기 때문에, 현대 CPU·GPU의 벡터화(vectorisation) 및 SIMD 명령어 활용도가 높다. 실제 구현에서는 8~16배 수준의 벡터화 효율을 확인하였다.

4. 성능 평가

다양한 실험 시나리오(예: 10 000개의 비구형 강체가 포함된 대규모 충돌, 크기 비율이 1:100인 구형‑비구형 혼합 시스템 등)를 통해 기존의 전역 삼각형 쌍 검사 기반 방법과 비교하였다. 그 결과는 다음과 같다.

실험 설정기존 방법 평균 연산 시간제안 방법 평균 연산 시간감소 비율
1 000개 비구형 물체 (명시적 적분)1.84 s0.12 s≈ 15×
5 000개 물체 (암시적 적분)9.73 s0.45 s≈ 22×
크기 비율 1:100, 2 000개 물체4.31 s0.19 s≈ 23×

위 표에서 알 수 있듯이, 알고리즘적 비용이 12 차수(10배100배) 수준으로 감소했으며, 특히 암시적 적분과 결합했을 때 그 효과가 더욱 두드러졌다.

5. 결론 및 향후 연구

우리는 삼각형 메쉬로 표현된 복잡한 비구형 강체들에 대해 다중 스케일 충돌 검출을 수행하는 새로운 프레임워크를 제시하였다. 이 프레임워크는 거친 대리 형태를 이용한 초기 배제, 함수 최소화 기반의 충돌 가능성 추정, 그리고 정밀 레벨에서의 비교 기반 거리 계산을 순차적으로 결합함으로써, 기존 방법에 비해 연산 비용을 한두 차수(10배~100배) 정도 감소시킨다. 또한, 반복적인 구조와 보수적인 접촉력 피드백 덕분에 벡터화 효율이 높고, 암시적 시간 적분 단계와 자연스럽게 연계될 수 있다.

향후 연구에서는 다음과 같은 방향을 고려하고 있다.

  1. GPU‑특화 구현: 현재 CPU 기반 구현을 GPU의 대규모 병렬 처리에 최적화하여, 실시간 시뮬레이션에 적용한다.
  2. 동적 메쉬 정밀화: 충돌이 발생한 영역에 대해서만 메쉬를 동적으로 세분화(refine)하고, 충돌이 사라진 영역은 다시 coarse‑grained 형태로 복구하는 적응형 전략을 도입한다.
  3. 다물리 현상 연계: 유체‑강체 상호작용, 마찰·탄성·점착력 등 복합 물리 현상을 포함한 통합 시뮬레이션 프레임워크와의 연계를 연구한다.
  4. 수학적 이론화: 함수 최소화와 패널티 파라미터가 충돌 가능성 추정에 미치는 정량적 영향을 이론적으로 분석하고, 최적의 패널티 스케일링 규칙을 도출한다.

본 연구가 제시하는 다중 스케일 충돌 검출 알고리즘은 복잡하고 규모가 큰 강체 시뮬레이션에서 발생하는 계산 병목을 효과적으로 해소함으로써, 엔지니어링 설계, 물리 기반 애니메이션, 로봇 시뮬레이션 등 다양한 분야에 실용적인 이점을 제공할 것으로 기대한다.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut