From paintings to models
Until this week, every building in Steel Tide was a painting. Each headquarters, factory, power plant and gun pad was one picture, drawn as if you were looking down at it from the south, at 45 degrees, and the game placed that picture on the map.
Now every building is a 3D model. We build it in Blender, light it, and render it from the same angle into the picture the game draws. The paintings are still here. They are the design: what each building should look like, its shapes and its colours. The model is how we make that design stand up.
Drag the line across to compare. Painted on the left, the model on the right.


Why we changed
A painting is a picture of one moment from one place. For a building that never moves, that is fine. Most of ours move.
Guns turn. A painted gun was one picture of the gun seen from straight above, and the game turned that picture to face its target. But the camera does not look straight down. It looks at 45 degrees. A gun seen at an angle shows a different side as it turns: you see its front, then its flank, then its back. A turned picture shows the same side all the way round. Its light turns with it, too, so a gun facing south is lit from the south-east even though the sun is in the north-west.
Buildings upgrade. A factory has three levels, and each level is its own picture. Painted one at a time, the three never quite agreed: a roof a little lower here, a shadow pointing a slightly different way there.
Paintings bend space. A painting can fix whatever looks wrong from its one point of view. Measure the result, and a wall leans or a roof is wider than the wall under it. Nobody notices until something has to sit on it: a gun on a roof, a door that opens, a crane that moves.
A model fixes all three at once. It has a back, so a gun can show it. Every building shares one sun, from the north-west, 45 degrees west of north and 50 degrees up. And if a model is wrong, it is wrong in a way you can measure and correct.


How a building is made now
There are three steps: we generate the design, build the model, and bake the pictures.
flowchart LR W["A written brief<br/>and reference pictures"] --> I["Generate<br/>the design image"] I --> M["Blender<br/>the model, built to the image"] M --> K["Bake<br/>45° camera, one sun"] K --> B["The building<br/>and its animation"] K --> G["Its gun<br/>96 views, one every 3.75°"] K --> N["The numbers<br/>where the gun, lamps and muzzles are"] B --> S["The game"] G --> S N --> S
Generate. Each building starts as a written brief: what it is, what it is made of, how it fits with the rest of its family, with pictures of its neighbours for reference. An image model paints candidates from it. We compare them, pick one, and clean it up. Until now, that picture was the building in the game. Now it is the design the model is built to.
Build the model. Each model is a short program that places the building's parts: this wall so many pixels wide, this roof so high, these pipes from here to there. We read the numbers off the design image and correct them where the image's space does not hold together. Every roof level gets one height. Paired parts are mirrored. Rails close, and stairs reach what they serve. Colours are sampled from the image, so the model wears the design's paint. There are 39 of these programs now, sharing 12 sets of common parts, about 15,800 lines in all. A level-two building reuses most of its level-one parts, so the levels finally agree.
Bake. Blender renders the model through the game's camera under the one sun: the building and the frames of its animation, and its gun from 96 directions. A building takes one to four minutes on a Mac's graphics chip, and a gun six to nine. The bake also measures what the game needs to know about the picture: where the gun sits, where the lamps are, how high the muzzles stand. It writes those numbers down for the game, so they always match the picture.
We considered one more step: having the image model repaint each render, to bring back the softer look of the paintings. We decided against it. Every repaint comes out a little different, so the 96 views of a gun would stop agreeing with each other, and every change to a model would mean another round of repainting. The render is the picture.


The guns, and the tries that failed
A gun is where the change mattered most, and where we got it wrong more than once.
A model gun cannot be turned as a picture either. So we render it from every direction: the gun rotated a step at a time, and a picture of each step. The game shows whichever picture is closest to where the gun is pointing.
Our first try used 48 directions, one every 7.5 degrees. A gun sweeping slowly at rest visibly ticked from one to the next. We tried two ways to smooth the step.
The first was to blend: fade from one picture into the next as the gun turns between them. In the middle of a step you see two guns at once, and a launcher with raised tubes shows a double set of tubes.
The second was to turn the nearest picture by the bit left over. It works for a flat gun. For a tall one it does not: turning a picture of a raised launcher swings its tubes sideways, away from where the next picture has them, so the launcher seems to nod and change shape at every step.
What worked was the simplest thing: more directions, and no tricks. We render 96, one every 3.75 degrees, and show the nearest one exactly as it was rendered. At that spacing the steps read as turning.
flowchart TD A["48 views<br/>steps you can see"] --> B["Blend two views<br/>the gun doubles"] A --> C["Turn the nearest view<br/>tall guns nod"] B --> D["96 views, nearest one only<br/>reads as turning"] C --> D
The gun towers show it best, three of them turning together.
96 pictures of every gun cost memory, so there is a setting for it. Turret angles, under Graphics, keeps all 96, every second one or every fourth. On a phone that is short of memory, fewer angles still look like a gun turning, just a little less smoothly.
Other things we got wrong
The outlines came out like a comic. Every building has a thin dark outline, as the paintings did. Some buildings are rendered at half size, and the first renders drew the outline at the same width anyway, so it came out twice as heavy. The airbase and the naval yard read like a comic book. The outline now thins with the size the building is rendered at.


A gun rendered the whole building. One morning the level-two headquarters had a strange shape on its roof where the launcher should be. An update to Blender had quietly changed how it walks through a scene's objects, and the step that hides the building before the gun is rendered stopped halfway. The gun's 96 pictures each had the whole headquarters in them, shrunk into the gun's square.
The pictures got too big. 96 views of a gun side by side make a picture 23,808 pixels wide, and the image format we ship stops at 16,383. Unpacked in memory, each gun took 45 to 90 MB, too much for a phone. The views now ship as a grid, and each one is trimmed to the gun itself before it is kept, so a gun takes 11 to 23 MB while it loads and much less after. All of the game's pictures together went from 27 MB to 31 MB to download.
Shots left from under the gun. The game works out where a shot starts on a flat map. A missile launcher on a roof stands high above that map, so its missiles left 16 pixels below the tubes you could see. Every gun now knows how high its muzzles are, and shots leave where the picture shows them.
Camouflage flickered on turning guns. A camouflage skin lays its pattern by where each pixel sits in the picture. That worked when every gun was one picture. With 96 views, each view got a different slice of the pattern, and a turning gun flickered. The pattern is now laid on the gun itself, so it turns with it.
What we brought back
A few things the painted guns had did not survive the first version, and we are bringing them back the model's way. The Flame Thrower's pilot light glows at night again, and it goes dark behind the gun when the gun turns away from you. The Cannon Turret's barrel kicks back when it fires: we render the gun with its barrel pulled back, at half and full stroke, in each of its 96 directions, and show that for an instant after each shot.
What is not done yet
The shadows on the ground are not the model's. The render has the real shadows on the building itself: a crane on its deck, a stack on its roof. The shadow a building throws on the ground is still the game's own. It reads each column of the picture as a wall of the building's height and sweeps it across the ground. That is a good guess for a box, and only a guess for anything else: a crane, a mast, the curve of a hangar. We have not baked the model's own shadow onto the ground yet. A shadow baked into the building's picture would end at the edge of that picture. A real shadow has to fall across whatever stands beside the building, a road, a unit, the next building, and agree with the houses and trees of the map. It has to be its own layer, made from the model, and that is the next piece of work.
The Gatling does not spin. The painted Gatling Turret had its barrels turning as it fired. The model Gatling turns to its target but its barrels stand still. Spinning them means rendering the barrels at several points of their turn in every one of the 96 directions, as we did for the Cannon Turret's recoil, and that is still to do. So are the recoil of the twin cannon, whose two barrels fire close enough together that each needs its own pictures; the kill rings painted on a gun's barrel; and the recoil of a Cannon Turret wearing a camouflage skin.
Units stay straight down. Tanks, ships and aircraft are still seen from straight above, and that is a choice we expect to keep. A building stands still and only its gun turns. A unit turns all the time, to any angle, and so does its turret. From straight above, a turned picture is still a true picture of the vehicle, so one picture of a hull serves every heading. At 45 degrees, every unit would need its hull, its turret and each frame of its animation rendered from dozens of directions: the cost of one gun's 96 views, times every unit in the roster. And seen from straight above, a unit covers exactly the ground it stands on. What you see is where it is, where you click it and where it gets hit, even in a crowd. We do model some units, but we render them straight down.


The paintings did their job. They decided what Steel Tide's buildings look like, and they still do. What changed is that the pictures you see are now made from something solid, so they agree with each other, turn the way solid things turn, and can be fixed when they are wrong.