Skip to content

Adds PhysX style SDF collisions#1150

Merged
eric-heiden merged 91 commits into
newton-physics:mainfrom
nvtw:dev/tw/contact_reduction_experiment
Dec 5, 2025
Merged

Adds PhysX style SDF collisions#1150
eric-heiden merged 91 commits into
newton-physics:mainfrom
nvtw:dev/tw/contact_reduction_experiment

Conversation

@nvtw

@nvtw nvtw commented Nov 28, 2025

Copy link
Copy Markdown
Member

Description

Add SDF-based mesh-mesh collision detection with contact reduction.

  • Mesh-mesh collisions: New SDF-based collision detection between mesh shapes. Each mesh gets a sparse (narrow-band) + coarse SDF volume computed at model finalization.
  • Contact reduction: Shared-memory GPU algorithm reduces contacts per shape pair using icosahedron-based normal binning (20 bins × 6 spatial directions × configurable beta weights). Applies to mesh-plane and mesh-mesh collisions.
  • SDF extrapolation: Handles queries outside the narrow band (fallback to coarse grid) and outside the extent (linear extrapolation from boundary).
  • Performance: Uses tile scans and atomic operations to minimize synchronization overhead. Configurable via reduce_contacts parameter in CollisionPipelineUnified.

Newton Migration Guide

Please ensure the migration guide for warp.sim users is up-to-date with the changes made in this PR.

  • The migration guide in docs/migration.rst is up-to date

Before your PR is "Ready for review"

  • Necessary tests have been added and new examples are tested (see newton/tests/test_examples.py)
  • Documentation is up-to-date
  • Code passes formatting and linting checks with pre-commit run -a

Summary by CodeRabbit

  • New Features

    • Optional contact‑reduction pipeline and SDF‑driven narrow‑phase for mesh–mesh and mesh–plane collisions; per‑shape SDF data, model/build flags to enable mesh‑SDF collisions, and runtime toggle to reduce contacts.
  • Refactor

    • More consistent geometry type handling and per‑thread buffering for robust collision routing and triangle collection.
  • Tests

    • Comprehensive SDF, mesh‑SDF compute, and contact‑reduction test suites (CPU/CUDA).
  • Chores

    • Relaxed bunny rest‑state tolerance; improved handling for structured arrays and recorder serialization.

✏️ Tip: You can customize this high-level summary in your review settings.

nvtw and others added 30 commits November 17, 2025 17:26
…robably too many syncthreads calls but it's a start
…ds to a nice speed up since the register usage is quite low
@eric-heiden eric-heiden added this pull request to the merge queue Dec 5, 2025
Merged via the queue into newton-physics:main with commit 1e7f969 Dec 5, 2025
20 checks passed
eric-heiden pushed a commit to eric-heiden/newton that referenced this pull request Jan 28, 2026
Co-authored-by: Lennart Roestel <lroestel@nvidia.com>
mmacklin pushed a commit to mmacklin/newton that referenced this pull request Apr 7, 2026
Co-authored-by: Lennart Roestel <lroestel@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants