Monday, 30 November 2026

Trusted News Discovery โ€“ Powered by AI and Verified by Humans

Advertisement

Drie, a two-week-old 3D game engine, simulates cloth that keeps its creases and runs in a web browser

Drie, a new hobby 3D game engine, uses an XPBD cloth solver on the GPU so handkerchiefs and curtains collide and keep their creases in a browser.

Produced with AI assistance and reviewed by the Badiyaa Editorial Desk. How we work.

Grok Fact CheckCheck it yourself in one tapVerify with Grok ↗Ask @grok on X ↗
Lengths of cotton silk fabric hanging up to dry, shown as an illustration of simulated cloth.
Image: Sopyaylynn, CC BY-SA 4.0 via Wikimedia Commons

Grab a virtual handkerchief, fling it onto another one, and watch the two crumple into a heap without melting into each other. That is the party trick of drie, a small 3D game engine whose developer has published playable cloth demos that run straight in a web browser.

The engine is barely a couple of weeks old, according to the developer's own write-up on cloth simulation with XPBD, posted in November 2026. That speed has a confession attached.

The demos are written in the C3 language and compiled for the web through WebGPU. The author also admits that Claude Code wrote most of the demo code, "but not to write any part of this post."

Advertisement

Tangles, rips and jello

Cloth is notoriously hard to fake. Points in the coarse mesh sit roughly 1.7 centimeters apart in these demos, and individual points can slip through gaps, folding the fabric onto itself for good. Two sheets laid on top of each other could merge, so drie uses a spatial hash to push nearby points from different cloths apart.

Sharp table corners are the other villain. Cloth can rip straight through them, partly because dragging is done with a tether. Letting the force ripple through every point would be more correct, but the developer says it makes everything feel like jello. Signed distance fields, which round off corners, are the next experiment.

Cloth that remembers its creases

The feature list reads like a game artist's wish list:

  • A deterministic solver, so a game scene can be replayed exactly.
  • Crease memory, so pleated curtains keep their shape.
  • A coarse simulation under a finer display mesh, to save work.
  • Two-way collision with objects and with other cloth.
  • Aerodynamic drag, plus a sleep mode that stops computing when nothing moves.

The developer calls the two-way collision "pretty sweet." As far as the developer's research goes, very few engines offer it without add-ons.

Advertisement

Why the GPU

XPBD, short for extended position-based dynamics, is the method behind the solver, and it now runs in GPU compute shaders.

The solver first ran on the CPU. Moving it to the graphics chip did not buy as much raw speed as expected, the author writes, but it made the simulation less prone to stutter.

Forty years of digital fabric

Simulated cloth is an old puzzle. Wikipedia's overview of cloth modeling credits Jerry Weil with an early geometric method in 1986 that hung curves between support points and relaxed them into folds. Later models treat fabric as particles joined by springs, adding a repelling force so the cloth cannot pass through itself.

Count from Weil's 1986 method to 2026 and that is 40 years, long enough for draped fabric to go from a research paper to a browser tab. The browser part is new, too. Wikipedia's WebGPU article notes that Chrome shipped WebGPU in May 2023, Firefox in July 2025 and Safari in September 2025, so the demos only became possible on all major browsers about a year ago.

Badiyaa has tracked other games pushed into unlikely places, from Unreal Tournament 2004's browser version to Doom running on a lawnmower and a satellite.

The drie demos include a handkerchief pile, a furniture drape with two bend models and a set of banners that can be cut down with a press of the C key.

Advertisement

Sources

Image: Sopyaylynn, CC BY-SA 4.0 via Wikimedia Commons

This article was produced with AI assistance and reviewed by our Editorial Desk. How we work.

Grok Fact CheckCheck it yourself in one tapVerify with Grok ↗Ask @grok on X ↗