{"id":46551767,"url":"https://github.com/alxspiker/avbd-demo3d","last_synced_at":"2026-03-07T03:33:01.922Z","repository":{"id":306239320,"uuid":"1025486604","full_name":"alxspiker/avbd-demo3d","owner":"alxspiker","description":"It implements the Augmented Vertex Block Descendent (AVBD) algorithm, bringing the concepts from the original 2D demo into a fully 3D environment.","archived":false,"fork":false,"pushed_at":"2026-03-06T06:52:19.000Z","size":235,"stargazers_count":31,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T10:55:08.539Z","etag":null,"topics":["3d-physics","avbd-algorithm","cmake","collision-detection","computer-graphics","constraint-solver","cpp","cross-platform","educational","emscripten","game-physics","imgui","opengl","physics-engine","quaternions","real-time-physics","rigid-body-dynamics","sdl2","simulation","webassembly"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alxspiker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-24T10:23:45.000Z","updated_at":"2026-03-06T06:50:22.000Z","dependencies_parsed_at":"2025-07-24T14:53:45.412Z","dependency_job_id":"c68aba45-3815-4d7f-9a81-5b86086f2606","html_url":"https://github.com/alxspiker/avbd-demo3d","commit_stats":null,"previous_names":["alxspiker/avbd-demo3d"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/alxspiker/avbd-demo3d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxspiker%2Favbd-demo3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxspiker%2Favbd-demo3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxspiker%2Favbd-demo3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxspiker%2Favbd-demo3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alxspiker","download_url":"https://codeload.github.com/alxspiker/avbd-demo3d/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxspiker%2Favbd-demo3d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T03:24:23.086Z","status":"ssl_error","status_checked_at":"2026-03-07T03:23:11.444Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-physics","avbd-algorithm","cmake","collision-detection","computer-graphics","constraint-solver","cpp","cross-platform","educational","emscripten","game-physics","imgui","opengl","physics-engine","quaternions","real-time-physics","rigid-body-dynamics","sdl2","simulation","webassembly"],"created_at":"2026-03-07T03:32:58.355Z","updated_at":"2026-03-07T03:33:01.907Z","avatar_url":"https://github.com/alxspiker.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AVBD Demo 3D\n\n3D rigid-body AVBD-style sandbox in C++17 with SDL2 + OpenGL + ImGui.\n\nThis repository is a practical 3D adaptation of the AVBD demo style used in\n`savant117/avbd-demo2d`, focused on box-on-box contact behavior, solver\nstability experiments, and stress testing.\n\n## Project Lineage\n\n- Started as a 3D conversion of `savant117/avbd-demo2d`\n- Now actively aligned with the 3D reference repository:\n  `https://github.com/savant117/avbd-demo3d`\n- Recent updates in this repo were made to better reflect that 3D reference,\n  while keeping project-specific behavior and tuning goals\n\n## Alignment vs Upstream 3D\n\nRecent areas brought closer to `savant117/avbd-demo3d`:\n\n- SAT OBB collision flow with face/edge axis selection\n- Contact manifold generation and warmstart feature matching behavior\n- AVBD-style iterative solve structure and broadphase manifold creation logic\n- OBB picking/raycast support used for interaction\n\nIntentional differences in this repository:\n\n- Row-based force API (`getRowCount`, `computeConstraint`,\n  `computeDerivatives`) instead of upstream `updatePrimal/updateDual`\n- Custom solver behavior for stability tuning (6x6 body solve, damping,\n  diagnostics, manifold penalty cap)\n- Contact manifold capped at 4 contacts here (upstream uses up to 8)\n- Focused scene set plus stress diagnostics (`TwoBlockDrop`, `Stress1000`)\n  instead of the full upstream demo scene catalog (rope/bridge/breakable/etc.)\n- Headless/CLI simulation mode in `main.cpp` (`--nogfx`, `--scene`, `--steps`)\n- Extra build automation scripts for Windows/Linux/macOS/Web\n- Simpler desktop-first rendering/input path (no touch/mobile gesture path or\n  projected shadow pipeline from upstream main loop)\n\n## Current Status\n\nImplemented and active in the current code:\n\n- 3D rigid boxes with quaternion orientation and full 6-DOF state\n- SAT-based OBB collision detection (face and edge axes)\n- Contact manifold generation with up to 4 contacts\n- Normal + two tangent rows per contact with friction cone clamping\n- Iterative AVBD-style solve with warmstarting and penalty ramping\n- Solver diagnostics in GUI and headless modes\n- Scene presets including a 1000-block stress scene\n\nPresent in code but not fully wired into gameplay scenes:\n\n- `Joint`, `Spring`, and `IgnoreCollision` force types\n- `Rod (WIP)` and `Soft Body (WIP)` scenes are placeholders\n\n## Scene List\n\nScene names are case-sensitive when passed through `--scene`:\n\n- `Empty`\n- `Ground`\n- `Stack`\n- `Pyramid`\n- `Wall`\n- `TwoBlockDrop`\n- `Stress1000`\n- `Rod (WIP)`\n- `Soft Body (WIP)`\n\n## Build\n\nClone with submodules:\n\n```bash\ngit clone --recurse-submodules https://github.com/alxspiker/avbd-demo3d.git\ncd avbd-demo3d\n```\n\nPlatform scripts:\n\n- Windows: `build-windows.bat`\n- Linux: `./build-linux.sh`\n- macOS: `./build-macos.sh`\n- Web (Emscripten): `./build-web.sh`\n\nManual desktop build:\n\n```bash\ncmake -S . -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build --config Release --verbose\n```\n\nIncremental rebuild from the build directory:\n\n```bash\ncd build\ncmake --build . --config Release --verbose\n```\n\n## Run\n\nGUI:\n\n- Windows: `build\\\\Release\\\\avbd_demo3d.exe`\n- Linux/macOS: `./build/avbd_demo3d`\n\nHeadless examples:\n\n```bash\n./build/avbd_demo3d --nogfx --scene Stack --steps 300\n./build/avbd_demo3d --headless --scene Stress1000 --steps 600\n```\n\nCommand-line options:\n\n- `--nogfx` or `--headless`: disable graphics and run simulation only\n- `--scene \u003cname\u003e` or `-s \u003cname\u003e`: choose initial scene\n- `--steps \u003cn\u003e` or `-n \u003cn\u003e`: number of steps in headless mode (default `300`)\n\nNotes:\n\n- In headless mode, diagnostics are forced on every step.\n- Headless output is intentionally verbose and prints body state each step.\n\n## Controls (GUI)\n\n- Middle mouse drag: orbit camera\n- Shift + middle mouse drag: pan camera\n- Mouse wheel: zoom camera\n- Right click: spawn a box near the camera target\n- ImGui panel: change scene and solver parameters\n\n## Stress Testing\n\nUse `Stress1000` for high-load behavior:\n\n- Spawns `10 x 10 x 10 = 1000` dynamic cubes\n- Applies scene-specific solver tuning (`iterations=20`, `beta=30000`,\n  `gamma=0.995`) to reduce immediate blow-ups during mass contact events\n\n## Project Layout\n\n```text\nsource/\n  main.cpp         App entry point, UI, camera, CLI, loop\n  solver.h/.cpp    Core solver, constraints, diagnostics\n  rigid.cpp        Rigid body representation and rendering\n  collision.cpp    SAT OBB collision + contact generation\n  manifold.cpp     Contact constraint rows and friction handling\n  joint.h/.cpp     6-DOF weld-like joint (available, limited scene usage)\n  spring.h/.cpp    Distance constraint spring (available, limited scene usage)\n  scenes.h         Scene definitions and stress test presets\n  maths.h          vec3/quat/mat3 math utilities\n```\n\n## Known Limitations\n\n- Collision shapes are OBB boxes only.\n- Broadphase is pairwise `O(n^2)`.\n- Very dense impact clusters can still destabilize and require tuning.\n- WIP scenes are scaffolded but not feature-complete.\n\n## Credits\n\n- Chris Giles (`savant117`) for the original AVBD demo lineage\n- University of Utah Graphics Lab for AVBD research context\n- SDL2 and Dear ImGui for platform/window/UI support\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falxspiker%2Favbd-demo3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falxspiker%2Favbd-demo3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falxspiker%2Favbd-demo3d/lists"}