Build a Real-Time Draped-Cloth Simulator for an Online Fashion Showroom
The situation
Maison Lévrier sells direct-to-consumer womenswear built around fluid, draped fabrics whose appeal is hard to convey in flat product photos. The in-house fashion-technology team wants an interactive showroom that lets shoppers see how a garment actually falls and moves before they buy.
Your task
Build a real-time cloth simulator inside a Three.js showroom that drapes five tuned garments on a digital mannequin at 30 frames per second on mid-range laptop hardware.
The brief
What you do
- Build a position-based-dynamics cloth solver and wrap it in a Three.js viewer.
- Starting from the provided cloth-solver starter module, implement a triangulated cloth mesh with distance constraints (to hold the fabric together), bending constraints (to control how stiff or soft it folds), gravity, a simple adjustable wind force, and collision against a sphere-approximated mannequin.
- Run four substeps per frame with eight constraint-solving passes per substep.
- Add on-screen controls for wind strength and mannequin pose.
- Load the garment and mannequin geometry from the provided public glTF sample assets, and tune each of the five garments to match the drape behavior and parameter ranges described in the provided artist tuning brief.
Success looks like
Success means: five garments that hang and sway without exploding or stretching unnaturally, a viewer an artist can re-tune unaided, and a steady 30 frames per second on a mid-range laptop graphics chip (Intel Iris Xe class).
What you will practice
- Implement a stable position-based-dynamics cloth solver with distance and bending constraints
- Integrate a physics solver cleanly with a Three.js rendering pipeline
- Profile and optimize a real-time WebGL scene to hold a target frame rate on modest hardware
- Translate an artist's qualitative drape goals into concrete numerical simulation parameters
- Document technical parameters clearly enough for a non-engineer to re-tune them
A suggested way in
- Use the substep + constraint-iteration structure (4 substeps, 8 iterations) to keep the simulation stable without small time steps
- Profile with Chrome DevTools and RenderDoc to find frame-time bottlenecks before optimizing
- Keep solver state in flat typed arrays to reduce per-frame allocation and garbage collection
- Approximate the mannequin with a few spheres for collision rather than testing against the full mesh
Skills you will practice
Physically based simulation, 3D rendering, Webgl, Math for graphics, Shading and lighting, Performance optimization
Where it leads
Graphics / Simulation Engineer, WebGL / Frontend 3D Engineer, Technical Artist
How it is assessed
- Simulation quality30%
Each of the five garments drapes believably and matches the behavior described in the artist tuning brief, with no explosions or visible over-stretching.
- Performance25%
All five tuned scenes hold 30 frames per second on Intel Iris Xe-class hardware, demonstrated in the screen recordings and DevTools traces.
- Artist usability25%
Using only the handoff document, an artist can re-tune any parameter for any garment in the provided scenes without engineer help.
- Code organization20%
The solver from the starter module is cleanly separated from rendering code so it can be reused, as shown in the submitted source.
Resources
- Three.jsTool
Provides the WebGL scene graph and viewer the simulator renders into.
- TypeScriptTool
Adds type safety to the solver and viewer for a maintainable, reusable codebase.
- Chrome DevToolsTool
Profiles frame time and memory to confirm the 30fps target is met.
- RenderDocTool
Inspects GPU draw calls to debug rendering artifacts and performance.
- GitTool
Version-controls the solver, scenes, and documentation deliverables.
Finish it. Earn this.
A verified certificate with your name. Anyone can check it.
Time to practice.
Solve this challengeMore like this.
- Software EngineerBuild a Multi-Level Feedback Queue Scheduler in xv6
- Software EngineerReverse-Engineer a Stripped Binary to Restore Linking Symbols
- Software EngineerImplement a Distance-Vector Routing Algorithm
- AI EngineerEnd-to-End Lane Following on a Donkeycar Platform
-
Build a Multi-Level Feedback Queue Scheduler in xv6 Software Engineer Fork the xv6-riscv repository and implement MLFQ in proc.c with 3 priority queues, per-queue time slices (10ms / 20ms / 40ms), priority demotion on sl operating systemsschedulingc programming Open challenge → -
Reverse-Engineer a Stripped Binary to Restore Linking Symbols Software Engineer Receive the stripped shared object (Linux ELF, x86-64, ~280KB), a crash dump with 12 frames of indecipherable addresses, and 4 years of partial git hi reverse engineeringlinking and loadingmachine code Open challenge → -
Implement a Distance-Vector Routing Algorithm Software Engineer Implement distance-vector routing in Python: each simulated router maintains a distance vector, exchanges vectors with neighbors every 1 second of sim routingdistance vectornetwork simulation Open challenge → -
End-to-End Lane Following on a Donkeycar Platform AI Engineer Use the public Donkeycar Tub dataset (or collect about 30 minutes of driving on the simulator). Train a CNN-policy baseline (the Donkeycar default arc end to end learningimitation learningpytorch Open challenge →