Henk, dressed layer by layer
The T-shirt pattern, drafted from the body's measuresThe people of the valley need clothes, and I did not want clothes that are sculpted as one stiff shell. So a garment here is made the way a tailor makes it: measure, draft a pattern, cut, sew, press.
This is part two of three behind-the-scenes devlogs. Part one was about running the game inside Blender.
Seven steps, like a tailor
- Measure. Bust, waist, hip, shoulder, neck and lengths come from the character's own body, never from a fixed size.
- Draft. Flat pattern pieces in centimetres. Darts are not cut out but closed in the cloth's rest shape, so the flat piece wants to take the body's curve.
- Cut. Each piece becomes a mesh of 0.75 cm cells, with an even ring of points along the outline so the edge is smooth.
- Pre-sew. The pieces are laid round the body, and the seams are pulled shut in 1,500 quick rounds before the real simulation starts.
- Sew. A cloth simulation lets it all fall and settle on the body.
- Press. Seams are welded, small holes filled, the seam line straightened and the cloth beside it smoothed, as an iron would.
- Finish. Stitches, buttons and zips go on.
The first garments were made in Blender: Python builds the pattern and the mesh, Blender's cloth simulation sews, and Cycles renders the result. Every try is kept, so you can see how it went.
Try 1, try 21
T-shirt, try 1: crumpled and twisted
T-shirt, try 21
Dress, try 5: puckered
Dress, try 23What went wrong, and what fixed it
- A sleeve that flew off. On the shirt, a seam had to snap shut across 14 cm in the first frame, tore the armpit corner, and threw the sleeve off. Pre-sewing pulls every seam closed gently before the simulation starts.
- A home-made T-pose stripped the sleeves off the arms. The body stays in an A-pose while it is dressed.
- Straps that slid off. Even with high friction, straps crept off the shoulders. Now they are cut about 12% shorter than their path over the body and meet in a V at the back, so sliding outward would make them longer. Just like real ones, they stay up by tension.
- Nothing is pinned. A garment hangs by its fit, by elastic, or by tension. A pin would hide a bad pattern and make the cloth look stiff.

- Saw-tooth seams. Folds along the armholes looked like a saw. It was not the sewing: the pieces were made of square cells, so their edges were tiny staircases. Now an even ring of points follows the real outline, joined to the grid by a band of triangles.
- Skin poking through. In renders, white spots appeared on the shoulders: skin coming through the cloth after thickening and smoothing. A last step moves the cloth out along the skin until zero points of the final surface sit inside the body.
Stitches, buttons and zips

- The UV map is the pattern. Because every piece starts flat, its texture space is the pattern sheet itself. Stitch rows are drawn flat, like on the paper, and baked into a texture at a quarter of a millimetre per pixel: one channel for the dip in the cloth, one for the needle holes, one for the thread.
- Buttons find their place by the pattern. Pressing welds vertices together, so vertex numbers change. Buttons, zip teeth and sliders are placed by their spot on the pattern instead, a few tenths of a millimetre proud of the cloth.
- Thread that twists along itself. Close up, the stitches are real plied thread whose twist follows the thread round every corner of a zigzag.
- Light enough for a headset. A button is about 100 triangles. The zip is 5,626 triangles for close-ups and 642 in the game. A T-shirt's game texture is 1024 pixels and 86 kB.


From Blender to my own solver
Blender's cloth simulation is good, but slow for trying things: one T-shirt took minutes, and six simulations at once filled the Mac's memory until it had to be force-quit. So I wrote a cloth solver of my own that runs on the graphics card (Rust and wgpu, position-based, 60 small steps per frame, with the body as a 2 mm distance field). It sews a T-shirt in about 5 seconds on an old GTX 1080.

- Live. Drag a pattern slider, draw a new piece on the body, or pull a seam, and the cloth settles again in one to three seconds.
- Its own app. The solver now lives in a small design app where an outfit goes on from the skin out: shoes, underwear, trousers, shirt, and whatever goes over it all. Each layer starts outside the one below, gets its contact first, and only then falls.
- Blender still finishes. Pattern sheets, stitch bakes and the final look are still made in Blender.
Dressing the men of chapter 1
Henk, the old mechanic from chapter 1, is the first to be dressed this way: trousers, a shirt and ankle boots, sewn on his own body. A work jacket over the shirt is what I am fighting with now.
The work jacket: seams too far apart to sew
A hoodie, with the shirt poking throughThe jacket's cause is found: its front and back started 507 mm apart, just over the 500 mm the pre-sewing allows, so its side seams were never sewn. With that fixed the body of the jacket hangs; the sleeves are next.
Clothes are not in the game yet. They come with the people of the valley, Mac and PC first, then the Quest.
Feedback welcome
- What should Henk wear on a cold morning at the field?
- Would you want to choose your own pilot's clothes?
Behind the scenes, in three parts: 1. The game runs inside Blender · 2. Clothes cut from real patterns · 3. Hair, from a comb to a game
Come say hi on Discord. The game also streams live on Twitch, every night at 20:00 CET.