Drawing each ship's own textured model

What we wanted
Our ships start as concept art we make. A 3D generator, Meshy, turns the art into a model, and our asset studio turns the model into a ship the game can fly. Until now the studio rebuilt each part out of convex pieces, shapes with no dents or hollows, which the engine was built around. That kept the outline and lost the detail. Panel lines, intakes, the shape of a canopy frame and the paint all went. The result looked closer to Virtua Racer than to Halo. The game now draws the model’s own surface, with its own painted texture, part by part.
How
A ship that loses a wing needs to know which triangles are the wing. Meshy can split a model into parts or paint it, but not both in one result. So we generate both from one model, and the studio carries the split over to the painted version:
- It lines the two models up, scaling, turning and moving one until their surfaces meet. On the Sniper they ended up a median of 0.2% of the ship’s length apart.
- It gives each painted triangle the part of the nearest point on the split model.
- It cleans up the edges between parts.
The game then needed a new way to draw. Everything else it shows is made of the engine’s own shapes, colored by materials worked out in the shader. A painted model is a mesh of triangles with pictures stretched over it: a color map, a map of small bumps the light catches, and a map of which spots are metal and how rough they are. The new code draws a ship this way in each pass the game makes for a frame: the shadows, a pass that records only depth, and the pass that records each pixel’s color and surface for the lighting.
The second and third passes have to agree on the depth of every pixel to the last bit, or the third throws pixels away and holes show through the ship. The test renders a closed shape at four angles and counts pixels the shape surrounds that are not the shape. It finds zero at all four.
LOOP 0:10What it costs
The Sniper’s model has 303,458 triangles. The ship it replaces had about 8,800. We measured six Snipers at 3840 × 2160 in a test city of six buildings, drawn the way the game draws at its High setting, and timed each pass on the graphics chip.

| Six Snipers | Frame | Added |
|---|---|---|
| none | 7.16 ms | |
| all at full detail | 10.39 ms | 3.23 ms |
| full detail near, a 30,000-triangle version far off and for every shadow | 8.43 ms | 1.27 ms |
| full detail only for the ship next to the camera | 8.19 ms | 1.03 ms |
- Size on screen: six ships filling the screen cost the same as six spread from 8 to 200 m away. The cost follows the number of triangles, and the number of pixels they cover makes little difference.
- Shadows: most of the cost was shadows. The sun’s view of the scene is drawn several times, at several scales, for shadows near and far from the camera, so every ship’s triangles were drawn over and over.
- Levels of detail: each ship now picks a version by how large it is on screen, full detail near and a lighter one far off. Shadows always come from the lighter version, since a fighter’s shadow at 30,000 triangles looks the same as at 300,000. That took the shadows from 1.9 ms to 0.2 ms.
Its own ship
Until this point the Sniper was a skin. The game flew the old gunship and drew the Sniper over it, so a hit that took off the gunship’s left engine took off nothing you could see, since the Sniper has one engine, in its tail.
Now the Sniper is a ship of its own. The asset studio writes a ship file that names the model and, for each of the model’s parts, an outline the game uses to tell which part a round hit and what shape it falls as. The outline is a convex hull, the smallest shape with no dents or hollows that wraps the part. A first try cut each part into many small hulls, 308 in all, the way the studio does for ships it draws itself. The game reads only each part’s overall outline, so one hull per part does the same job with 9.
When a part is shot off, the game hides that part of the model on the ship, and the piece that falls is drawn as the same part of the same model, paint and all. The engine’s glow and exhaust come from the ship’s own engine, so they go out with it when it is shot off.
LOOP 0:05Next
- How much detail: where full detail ends is still to be decided.
- Damage: scorch where a part came away, and soot on a burning ship.
- Handling: the Sniper is meant to be fast in a straight line, slower to turn than the other ships, and to slide off walls it brushes instead of smashing through them.
- Measuring on the M1 and in Low Power Mode, which the game is tuned against.
How this post was made
- Drafted by
- A Claude Code session in the game's repository, October 10, 2026, edited for the site by a session in the trilithon.games repository.
- What it did
- Built the textured-ship pipeline and renderer path, measured them, and drafted this entry for the dev journal. The site session checked it against the changelog and edited it for the site.
- Reviewed by
- Alex van Rossum,
On the roadmap: The run: a ladder of cities
Linear MIP2-476, MIP2-700, MIP2-743, MIP2-745commits f08bbd3, ab6b76e, d39e23f, 06efa2b, f9a6dd2, ab2c9c2