Baking the island, and what broke

Plants and rocks are now saved into 41 of 47 map tiles. A build with one baked tile ran at 1.6 fps. What broke, what I fixed and what still looks wrong.

4 min read

The game has been placing its grass, trees and rocks around the player while it runs. This week I baked them instead: every sub-biome on the map generated once in the editor and saved into the map itself.

It does not look right yet, and a packaged build with one baked tile in it ran at 1.6 frames a second. Here is what happened.

The bake

The map is cut into tiles 1,344 m a side. 47 of them have something to dress: 36 on the main island and 11 on the far land to the east. A script walks the tiles one at a time. On each one, Unreal's PCG graphs scatter the plants, rocks and ground cover for every sub-biome there, and the result is saved as one commit. There are 536 of those graphs, built from the sub-biome tables.

The first two tries placed nothing. Zero instances, twice. The graphs were fine. The fault was in how my script drove the editor: PCG's editor budgets, and not waiting for each graph to say it had finished.

After that it ran through the night, working outward from the tile you start on. It stopped twice when the drive ran low on space. As I write this, 41 of 47 tiles are done and hold 94.5 million instances. Six tiles hold more than 5 million each. The six still to bake are all on the far land.

Instances saved into each map tile

41 of 47 tiles baked, 94.5 million instances, read from the bake log on 29 November 2026. Each tile is 1,344 m a side. North is up.

c4r29,950,144 instances, 97% land

Main island

Far land, to the east

  • Over 5 million 6 tiles
  • 2 to 5 million 10 tiles
  • 500,000 to 2 million 12 tiles
  • 100,000 to 500,000 11 tiles
  • Under 100,000 2 tiles
  • Not baked yet 6 tiles
All 47 tiles as a table
TileInstancesLand
c4r29,950,14497%
c4r17,936,12196%
c4r37,874,68588%
c4r46,411,20067%
c5r55,316,02441%
c9r25,141,219No data
c1r24,729,43698%
c0r54,712,98536%
c0r34,438,32435%
c0r03,647,75726%
c5r33,498,58740%
c5r23,245,75339%
c9r33,113,960No data
c4r52,654,20224%
c3r22,495,778100%
c3r42,488,978100%
c3r31,878,481100%
c3r11,846,45068%
c8r31,623,485No data
c5r11,268,75036%
c2r41,130,39686%
c2r1972,39788%
c8r4966,507No data
c3r5810,29837%
c1r1708,83417%
c1r3619,18565%
c5r4578,81024%
c2r0504,86939%
c2r5484,96629%
c0r1483,9815%
c1r4476,09046%
c1r0408,6825%
c4r0407,19712%
c5r0392,89510%
c3r0336,34913%
c8r2281,082No data
c2r3250,915100%
c2r2233,820100%
c1r5150,7323%
c0r247,3763%
c0r420,7980%
c9r4Not baked yetNo data
c10r2Not baked yetNo data
c10r3Not baked yetNo data
c10r4Not baked yetNo data
c11r3Not baked yetNo data
c11r4Not baked yetNo data

1.6 frames a second

The packaged build had one baked tile in it and launched at 1.6 fps. It was drawing 19.6 million static instances and 6.8 million skinned ones. Skinned means the mesh has bones, so it can sway in the wind.

5.4 million of the skinned ones were four reed meshes. The bake set a draw distance on static plants and none on skinned ones, so every reed on the tile was drawn, shadowed and ray traced however far away it was.

The game's own tables class those reeds as grass: stop drawing at 48 to 60 m, no shadow. The bake now gives skinned plants their class row the same as static ones.

Three faults after that

These numbers come from running the game uncooked, from the editor's files. I have not measured them in a packaged build, so expect them to move.

The game would not start. Unreal keeps the bone data for skinned meshes in one buffer with room for 4,194,303 values. Every skinned plant group asked for its own piece of it, and some of the trees have 7,684 bones. With the baked world loaded, the buffer ran out and the engine stopped on an assert. Plants that share a skeleton can share a piece if the wind system knows about them before they register. Now it does.

The ground cost 735 ms a frame. Nanite tessellation builds extra geometry on the ground from a height texture. The ground material asked for a displacement of 12. The landscape is scaled by 363 on its height axis, so the engine read that as about 21.8 m, with no fade by distance. It drew spikes at the spawn and tessellated to the horizon.

The ground under a raised bach drawn as tall dark spikes

In engine, 29 November 2026. A fault, not a look: the ground at the spawn drawn as spikes. The camera is under the bach floor, which was its own bug and is fixed too.

I turned the distance fade on for five master materials and set the displacement to 12 cm. The same view went from 735 ms to 53 ms.

The same view with flat dark ground, grass, fence posts and a cabbage tree

In engine, 29 November 2026, work in progress. The same view after the fix.

One hitch slowed every frame after it. Some particle systems run on a fixed tick. When a frame runs long they run extra ticks to catch up, as many as 100 in one frame, and that makes the next frame long too. After one screenshot the game sat at 678 ms a frame. One line of config caps the catch-up at 2 ticks. With the cap, the same screenshot left it at 45 ms.

At the spawn, uncooked Before After
Ground tessellation 735 ms 53 ms
After one screenshot 678 ms 45 ms

The bake and these fixes went in as five pull requests, 908 to 912, all merged on 29 November.

Still wrong

A later run showed the cap is only part of it. After a hitch the spawn still often drops to between 500 and 790 ms a frame: 6 times out of 8 in my tests. The cost is the landscape tessellation again. I do not know the cause yet.

A view from high above a bay and a small town, with sheets of terrain hanging in the sky

In engine, 29 November 2026. A fault, not a look: sheets of terrain hanging in the sky, shot from 80 m up while the game was in that slow state.

None of this looks right yet either. From a distance the trees are green blobs. The target is the concept art for the opening and photos of real New Zealand coast and bush, and these frames are a long way from both.

I have not packaged again. The last package used about 69 GB and the drive had 46.8 GB free.

Next is the last six tiles, then a packaged build I can measure, then the look.

The name WHEKO and our explanation of it have not been reviewed by te reo speakers yet. What's in a name?

Filed under Dev logs, Making of, World