AVBD 3D

AVBD 3D

A 3D implementation of Augmented Vertex Block Descent, extending Roblox and University of Utah's research into three-dimensional physics simulation.

Built with C++ and OpenGL, featuring advanced collision detection using GJK/EPA algorithms and designed for compatibility with Basilisk Engine.

Technical Features

3D Physics Simulation

Extension of Roblox and University of Utah's 2D AVBD algorithm into full 3D space with rigid body dynamics.

GJK/EPA Collision Detection

In-progress collision pipeline using Gilbert-Johnson-Keerthi and Expanding Polytope Algorithm for good-enough contact generation.

Configurable Debug Visualization

Built-in options to visualize normals, constraints, wireframes, EPA vertices, and contact points for development.

Basilisk Engine Compatible

Designed with compatibility in mind for the future C++ version of Basilisk Engine using modern rendering libraries.

About the Project

AVBD 3D is an ongoing implementation that extends the Augmented Vertex Block Descent algorithm from 2D to 3D. Based on the public 2D demo from the University of Utah and Roblox's collaborative research. The project is currently in active development as I work through understanding the intricacies of AVBD and debugging the 3D implementation.

Key Architectural Changes

The transition from 2D to 3D required fundamental changes to the data structures and algorithms. Some major differences include:

Rigid Bodies

  • Position expanded from float3 to vec3 position and quat rotation
  • Velocity changed from float3 to vec6 (linear and angular)
  • Scale updated from float2 to vec3
  • Moment of inertia replaced with full mat3x3 inertiaTensor

Forces and Constraints

  • Jacobian expanded from float3 to vec6
  • Hessian matrix grew from float6 to mat6x6

Contact Manifolds

  • Contact positions and normals upgraded from float2 to vec3
  • Maximum contacts increased from 2 to 4 points per manifold

Development and Debug Features

The project includes extensive debug visualization options configurable at build time to aid in development and understanding of the physics simulation:

  • Show Normals: Visualize surface normals for collision geometry
  • Show Constraints: Display active constraint relationships between bodies
  • Wireframe Rigids: Render rigid bodies as wireframes for internal structure visibility
  • Show EPA Vertices: Visualize the near-face polytope vertices from the EPA algorithm
  • Show Contact Points: Display generated contact points between colliding bodies