Skip to content

Supercars modelled in Blender: a Lambo wedge and a curvy Ferrari, with real wheels and a cockpit - #281

Open
muguetdev wants to merge 2 commits into
AgentSystemLabs:mainfrom
muguetdev:better-cars
Open

muguetdev wants to merge 2 commits into
AgentSystemLabs:mainfrom
muguetdev:better-cars

Conversation

@muguetdev

@muguetdev muguetdev commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

The garage's cars were extruded side profiles with boxes on top, so they read as bricks: no wheel arches, flat disc wheels, and no curve anywhere. This replaces them with models made in Blender by a script, the way the dog, the plants, the kitchen and the lounge already are.

Before After
Lambo before after
Ferrari before after
Out front before after
Ferrari, from behind before after

Driving, with the roof off:

Third person From the driver's seat
third person from the driver's seat

The cars

  • Lambo: a low, sharp wedge. The hood drops between the fenders, it has a big intake up each flank, slit headlights, Y taillights, a grille over the engine deck, the wing on two struts, and a diffuser with exhausts.
  • Ferrari: curves, with a long hood and wide rear haunches. It has two round taillights a side in chrome rings, the yellow badge on the nose and flanks, and a scoop ahead of each rear wheel.
  • Both: wheels cut into proper arches, each with a tire, a five-spoke rim (gold on the Lambo, silver on the Ferrari) and a red caliper. The fenders stand up as ridges over the arches, with the hood lower between them. They also have a glass cabin with a painted roof, mirrors and black sills. With the roof off you sit down in a cockpit sunk into the body, with two bucket seats, a dashboard, the steering wheel and a see-through windshield in a frame.

How it plugs in

  • blender/scripts/build_cars.py writes src/client/models/cars.glb. Each car is five roots: <kind>, <kind>_top, <kind>_open, <kind>_wheel_l and <kind>_wheel_r. The front wheels have their origins at their hubs, so steering turns them as before.
  • The body is lofted from cross-sections at stations nose to tail, splined between. The wheel arches and the cockpit are cut in with booleans, the cockpit's floor and walls in Dark.
  • supercar() in features/cars/world.ts builds a car from those pieces with piece(), painting Paint in each car's own colour. Lamp and Tail are the same glowing materials as before, Glass is double-sided, and Screen (the windshield left with the roof off) is see-through.
  • The CarModel it returns is unchanged (root, top, open, wheels). Driving, colliders, seats, the camera and sound are untouched, and so are the colours and spots in shared/garage.ts.
  • If cars.glb doesn't load, it falls back to the old code-built car, so the garage never comes up empty.
  • cars.glb is 575 KB and preloaded with the other world models, about a dog's size. A car is about 15k triangles, wheels and cockpit included.
  • tests/cars-model.test.ts checks what the code counts on:
    • the root names, and the materials the code paints;
    • the old footprint (CAR's length and width) and the roof height;
    • nose to +z, and the seats at SEATS with a steering wheel in front of the driver;
    • the front wheels' hubs, size, and rims facing out;
    • a triangle budget.
  • The test loader (tests/support/css-loader.mjs) now gives a .glb import an empty URL, as it gives a stylesheet an empty module, since features/cars/world.ts now imports world/models.ts. tests/driving.test.ts imports it and runs with the code-built fallback.
  • blender/README.md lists the new script.

Typecheck, the 612 tests and the build pass. Checked in a headless browser:

  • the garage and the street;
  • getting in, where the roof comes off and the seats, wheel and wing show, in third person and from the driver's seat;
  • the Ferrari's rings and lights.

… wheel arches, five-spoke rims and calipers, a glass cabin and a roof-off cockpit, from build_cars.py
@O-Q

O-Q commented Oct 2, 2026

Copy link
Copy Markdown

@muguetdev Images are broken

@webdevcody webdevcody added user facing A feature change people see or use in the office world The building: rooms, furniture, games, looks and sound screenshots requested A visual change that needs screenshots in the PR labels Oct 2, 2026
@webdevcody

Copy link
Copy Markdown
Contributor

could you fix images so I can checkout the models before merging?

…the hood, no arch lining poking out), a cockpit sunk into the body with a dashboard, and a see-through windshield with the roof off
@muguetdev

Copy link
Copy Markdown
Contributor Author

Sorry about that: the screenshots never made it up. They're fixed now, and the description shows the current models.

I've also pushed an update (d1eb581) since the first version:

  • The fenders stand up as ridges over the wheel arches. Before, the arch cut went through the edge of the hood, and the arch lining stuck out above it.
  • With the roof off you now sit in a cockpit sunk into the body (dark floor and walls) with a dashboard. Before, you sat on top of a flat deck.
  • That windshield is see-through, so from the driver's seat you see the hood and the road.

There are two new shots of driving with the roof off, in third person and from the driver's seat. Typecheck, the tests and the build pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

screenshots requested A visual change that needs screenshots in the PR user facing A feature change people see or use in the office world The building: rooms, furniture, games, looks and sound

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants