Analysis updated 2026-05-18
Simulate soft body deformation with explicit FEM and elastic or plastic materials.
Simulate rigid body collisions and joints like revolute or prismatic connections.
Mix rigid and soft body contact against ground, height field, or voxel terrain.
Regenerate the rendered scene gallery to visually check simulation behavior.
| swaggyliu/flatworld | 1038lab/comfyui-agnes-ai | andyuneducated/resolve-ai | |
|---|---|---|---|
| Stars | 18 | 18 | 18 |
| Language | Python | Python | Python |
| Setup difficulty | moderate | easy | hard |
| Complexity | 4/5 | 2/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Uses NVIDIA Warp for GPU acceleration, so a compatible GPU setup helps get the full performance benefit.
FlatWorld is a physics simulation engine for two dimensional, and to some extent three dimensional, rigid and soft body dynamics, accelerated using NVIDIA's Warp library. The README describes it as combining explicit finite element simulation for soft bodies with impulse-based rigid body physics, plus batched contact handling across mixed types of surfaces such as flat ground, height fields, and voxel grids. On the soft body side, it supports explicit dynamics with linear elastic, Neo-Hookean, and J2 plasticity material models. On the rigid body side, it handles balls, boxes, capsules, and mesh shapes, using standard collision detection algorithms called SAT and GJK, combined with a constraint solver known as PGS. It also implements several joint types: revolute, weld, prismatic, and spherical. A unified manager batches the finite element and mixed contact calculations together so they can run efficiently on the GPU. Getting started involves cloning the repository, installing the Python dependencies from a requirements file, and installing the package itself in editable mode. A short code example in the README shows building a small triangular mesh, attaching gravity and elastic material properties to it, adding a ground plane, and stepping the simulation forward sixty times using an explicit time stepping loop. The project ships 51 test files covering finite element behavior, rigid body contact, joints, friction, and every supported ground type, runnable headlessly for continuous integration or with a graphical display when one is available. A gallery of 35 rendered scenes, including a domino chain, a two dimensional robot arm, stacked boxes, and a pendulum, is included and can be regenerated locally with a capture script. FlatWorld depends on NVIDIA Warp, along with numpy, scipy, meshio, and a few other libraries for mesh and geometry handling. It is released under the Apache License 2.0, and the README notes this is an early step toward eventually building a two dimensional world model on top of the engine.
A GPU-accelerated 2D and 3D physics engine combining finite element soft bodies, impulse-based rigid bodies, and batched contact across ground, height field, and voxel terrain.
Mainly Python. The stack also includes Python, NVIDIA Warp, NumPy.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.