RealitySDFPhysics
Rigid bodies made of signed distance fields for RealityKit, so concave shapes collide as they are.
Real-Time Collision Handling for Signed Distance Fields via Caching and Importance Sampling is Chris Giles and Sheldon Andrews' PG 2026 paper: every rigid body is a signed distance field (SDF), so gears, spikes, chairs, and concave objects collide with much more precision without being cut into convex pieces. RealityKit's physics only lets moving bodies have convex shapes (mesh colliders are static only), so we ported the reference implementation to see it running in RealityKit.
In the RealityKit Outline Selection article, bounding volumes were mentioned, from sphere to convex hull. Physics engines collide that same family of convex shapes. A shape is convex when the straight line between any two of its points stays inside it, and two convex shapes touch in a single region, which keeps contacts cheap and stable. A torus, a gear, or a chair isn't convex, so for that type of mesh, RealityKit gives a moving body its convex hull, which closes the hole of the torus, for example. The alternative is a compound of boxes and capsules built by hand.

The paper also measures cost (as in processing). Stacking voxelized gears, its collision detection takes 0.1 ms per step, against 1.36 ms for the separating axis theorem and 2.39 ms for GJK+EPA, which need the gears cut into convex pieces; for plain boxes, those classic methods are the faster ones (0.09 and 0.18 ms, against 0.46 ms). Both are single-threaded runs on an Intel Core i9-13900H (Tables 3 and 4).
The paper provides the collision detection, which we kept unmodified. The solver on top of it is ours, with techniques from Erin Catto's Box2D and Box3D (soft joints and graph coloring to solve contacts on several threads), and bounces taken pair by pair as in Guendelman, Bridson and Fedkiw (2003).
What is inside the RealitySDFPhysics package
- The paper's 11 demo scenes were rebuilt using the package's API.
- Components named after RealityKit's own physics API:
SDFPhysicsSimulationComponent,SDFPhysicsBodyComponent,SDFPhysicsMotionComponent, andentity.sdffor forces and impulses, plus collision events, triggers, filters, raycasts, and an overlap query to ask whether a shape fits. - Revolute and prismatic joints, with limits, motors, and springs.
- A real-time preset with sleeping, and bodies that move smoothly between steps at 60, 90, or 120 Hz.
- Deterministic, even on several threads, so
forecast()knows where a throw lands before it does. - Three of Apple's physics samples ported with their own values: Simulating physics with collisions, with tori instead of spheres, TabletopKit's dice, whose "Max score toss" now comes from a forecast, and Simulating physics joints, whose pendulums make a Newton's cradle that behaves more realistically (in RealityKit, it just upsets me thinking about how that sample behaves).
A reel of the paper's demo scenes rendered in RealityKit: a wheel covered in spikes rolling over a pile of capsules, cows dropped onto a bed of spikes, a pile of chairs whose legs hook into each other, a stack of gears with their contact points drawn as green and red dots, and bent planks falling on each other. A panel in the top left reads "physics: SDF engine (RealityKit physics off)" with the bodies, contacts and milliseconds per step of each scene.
Apple's physics sample ported to the package, in a dark window with the edges of a cube drawn in thin gray lines. Sixteen shiny tori in magenta, green, blue, red and yellow appear one at a time and are pulled toward each other until they hang together in a tight clump at the center of the cube, resting against and inside each other's rings. A panel in the top left counts the tori, the contacts and the milliseconds per step.
Apple's seven dice on a green round table: a D4, a D6, two D8s, a D10, a D12 and a D20 are lifted together in a ring, swung to the right and thrown. While they tumble, the panel in the top left shows the forecast "D4 4 · D6 6 · D8 8 · D8 (1–35) 35 · D10 10 · D12 12 · D20 20 = 95"; once they rest, it reads "rolled", with the same values and "as forecast". The highest number is on top of every die.
Apple's joints sample ported to the package: five chrome balls hang by thin lines from a pale green bar on a dark gray background. The rightmost ball swings in, and only the leftmost swings out; later two balls swing in from the left and two swing out on the right. A panel in the top left reads "Newton's cradle on revolute joints: one ball in, one ball out" and "RealityKit's physics, in Apple's sample: one ball in sends four out"; a footer credits the bounces "resolved pair by pair (Guendelman, Bridson & Fedkiw 2003)".
Towers, or when to use which
While measuring, we stacked 1 m boxes in every engine at hand: RealitySDFPhysics with its default settings and with the paper's, RealityKit's own physics, and Box3D through RealityBox3D. 10 s at 60 Hz, on an Apple M1.
Four views of the same tower of 1 m boxes on a gray floor, side by side, labeled "SDF · normal" (RealitySDFPhysics, default settings), "SDF · careful" (RealitySDFPhysics, the paper's settings, about 4× slower), "RealityKit" (RealityKit's own physics, PhysX) and "Box3D" (RealityBox3D). The towers grow from 10 to 20 and then 80 boxes. At 80, the orange, yellow and blue towers collapse into scattered cubes, marked "fell" after 3.1, 2.9 and 3.5 s, while the green and white Box3D column stays up, marked "standing".
| Tower of 10 | Tower of 20 | Tower of 40 | Pyramid of 820 boxes | |
|---|---|---|---|---|
RealitySDFPhysics, .realTime | falls | falls | falls | 710 fall |
RealitySDFPhysics, .paper | stands | stands | falls | stands, 29 ms a step |
| RealityKit's physics | stands | stands | falls | stands, 0.8 ms |
| Box3D | stands | stands | stands (80 too) | stands, 0.8 ms on one thread |
Tall stacks are where it is weakest. In traces of a buckling tower, the contact points between two boxes bunch on one side of the face, and we think the column buckles where its support is one-sided. Soft contacts, and the shock propagation of Guendelman, Bridson and Fedkiw (section 7), made towers of 20 stand, but piles of tori settled slower and overlapped deeper, so neither made it into the package.
Where it fits, the cost stays within 2× of RealityKit's: while a pile of tori falls, the default preset takes 1.1–2× its time, up to 400 tori (RealityKit with each torus made of 12 capsules, and its time estimated, since it doesn't report it). So: Box3D for stacks and RealitySDFPhysics for shapes that hook, mesh and interlock, and both run side by side in one scene.

Chris Giles and Sheldon Andrews. 2026. Real-Time Collision Handling for Signed Distance Fields via Caching and Importance Sampling. Computer Graphics Forum 45(7), Pacific Graphics 2026. PDF
Christer Ericson. 2004. Real-Time Collision Detection. CRC Press. doi:10.1201/b14581
Eran Guendelman, Robert Bridson and Ronald Fedkiw. 2003. Nonconvex Rigid Bodies with Stacking. ACM Transactions on Graphics 22(3). doi:10.1145/882262.882358




