Worldstart

Weathering the boat

The boat has no painted textures of its own. Its shader works out where the salt, the damp and the weed go from the hull's shape. Here's how, what we got wrong, and how we tuned it.

The boat at rest on the open sea, from 15 m

Every raid in Worldstart starts at sea. Your party is on its own boat, and you sail it to a beach. You look at that boat for the first minute of every game, so it has to look like it has been at sea for years.

The boat is one mesh with one material, about 21,400 triangles. Our code builds it plank by plank, the same way every time. The mesh has no UVs, so we can't paint a texture onto it in a 3D tool. All the wear has to come from somewhere else.

Here is the boat four days ago, before its materials, its detail passes and this weathering, and the boat now, from the same camera:

Before: four days ago, flat colours, painted stripes, no wear
After: the boat now, planks, iron bands, rivets, rope and weathering

The reference pictures

Before we changed the boat, we generated pictures of the boat we wanted. We made hull and stem pictures with gpt-image-2 and FLUX.2 Pro, and tried Gemini's image model and Qwen-Image 2.0 Pro too. These pictures set the shape and the details: a deep, rounded belly, planks banded with iron and riveted, rope lashings, and a carved scroll stem with a lantern hanging from it. We then rebuilt the hull's shape and added those details in the code that builds the boat.

Generated reference pictures of the hull and the stem, from gpt-image-2 and FLUX.2 Pro

We also tried the route from our head post. Pixal3D turned four views of the hull into a heavy model of 969,000 triangles, and we baked it into a normal map for the game hull. We didn't ship it. The heavy hull's planks and ribs didn't line up with the game hull's, and the baked detail barely showed at 15 m. It also added 11 MiB of textures. So the boat's detail is real geometry, and the wear is all in its shader.

Weathering from the shape

In gamedev this is called procedural texturing. Tools like Substance Painter do it with masks: a gradient from bottom to top, the edges of a model, the cavities. We do the same thing, but live, in the boat's shader, from what the shader knows about the boat.

The shader knows four things:

  1. What each surface is. Every vertex carries a role: a hull plank, the team's painted plank, iron, rope, the sail. Each role gets its own tiling texture for wood, paint, iron, rope or canvas.
  2. Which plank a point is on. The shader has the same hull formula as the code that built the boat. It runs it backwards from the pixel's position, so it knows each plank's lap, its nails and its worn edge.
  3. Where the waterline is, in the boat's own coordinates. The sea moves the boat, but the waterline stays put on the hull.
  4. Where the iron is. The code passes the straps, nails and the two long iron bands to the shader as a short list. Rust and salt run down from them.

Where the textures come from

The wood grain, the chipped paint, the iron and the rope are tiling textures we generated ourselves. We started from our own maritime atlas, a sheet of generated texture tiles that set the look. Then we made each texture with Qwen-Image 2.1, run locally on a MacBook Air at about 25 to 30 minutes a picture. Most are edits with one tile of the atlas as the reference.

Each texture tiles without a seam, and we keep the prompt, the seed and the model for each one, so a rerun makes the same picture. Two textures are CC0 scans: the paler planks and the sail's weave. Our generated canvas kept coming out with folds in it.

These textures carry only the grain. The colour is the boat's own, so a player's paint choice stays. The weathering is all in the shader.

The layers

From those four things, the shader paints the weather in layers:

Before: the hull at the waterline is the same dark iron and planks all the way down
After: a damp band, a broken white salt line and salt streaks under the iron bands

Each layer has its own roughness too. Damp wood is 0.5, salt and barnacles are 0.95 and weed is 0.45, so the light tells you what is wet before the colour does. The team's plank gets only a fifth of the streaks, because your team's colour has to stay the clearest thing on the boat.

What we got wrong first

Our first version of this weathering never showed up in the game. We looked at the code and it was all there. Then we rendered the hull with each surface in a flat colour by role, and the answer was obvious. Two long iron bands cover most of the hull at the waterline, and the weathering only ran on the wooden planks. It painted the one strip of hull you couldn't see.

Now it is one pass over everything on the hull's outside: planks, iron bands, straps, rivets and the keel. Anything above the deck, and the anchor, stays out of it.

Tuning it by eye

Every layer has a strength setting. We rendered the same cameras at half, normal, 1.5, 2 and 3 times the strength. Here is the waterline from 6 m:

The waterline from 6 m at 0.5, 1, 1.5, 2 and 3 times the weathering

At 2 and 3 times, the damp band turns into a black stripe, and the salt streaks start to look like rain drips. At 15 m, where you usually see the boat, all five look almost the same. So the strength only matters close up.

We picked the look with one rule: the hull should look "kind of fresh on the bottom" and have "streaks above, where the water splashes but doesnt soak." That is also how a real hull weathers. Wood that stays wet stays dark and clean. Salt only dries where spray lands and then dries again. So the salt and the streaks went up to 1.5, the damp band stayed at 1, and the weed and barnacles went down to half.

Top: the first version. Bottom: salt and streaks at 1.5 times, weed at half, from 6 m off the bow

What it costs

It adds no triangles, no textures and no draw calls, so it costs no video memory. Each pixel of the hull does about nine more texture reads and a little maths. Everything that isn't the hull skips the pass. We haven't timed it on its own yet. On a boat at 15 m, it is a small share of the screen.

If you want to try this

Drafted with our agents, checked and edited by us. More on the devlog.