Repository navigation
Fulgora: terrain matches a real surface through tile correction (#454) - #564
Merged
Merged
Conversation
At one tile per pixel the Fulgora render runs tile correction after the raw argmax through correct_window (lazy raw reads, no-op walks skipped), in columns order over the window's chunks plus one, as Gleba and Aquilo do. Against get_tile on a real Fulgora surface (map seed 123456, -128..127, radius-10 spawn request) it differs at 0 of 65,536 tiles, from 1,703 by name (1,003 by map colour) for the raw argmax. - FulgoraTile gains Shallow2 and Deep2. The -2 oil-ocean tiles share a map colour with their base tile but not a layer (147/148, 67/66), so correction sees a boundary between them. folded() keeps the land mask, the tier-2 checksum and the old get_tile grade unchanged. - The twelve scores are visited in tile-name order (Gleba's rule). No exact tie at the maximum exists in the window or a 16,384-point sweep. - correction.rs, in a separate block after correct_window: correct_chunks_in_order (lazy reads, any order, and Nauvis's optional Neighbours rule; Fulgora passes None) and requested_correction_order, the order MapGenerationManager::request queues correction tasks. Inside a generated area it gives the same tiles as columns order; near the requested area's edge it does not. With lazy reads it reproduces the radius-6, radius-10 and rows-order Fulgora captures at every tile, and Gleba's rows capture. Test model only. - Probe: FMW_PLANET=fulgora and FMW_MARGIN_CHUNKS; three fixtures with provenance. - Tier 3: 11 rows at 1 tile/px re-recorded (every moved pixel is terrain). The preview PNG is a reference: 1,003 in the window, exactly where the real surface differs, 22,288 of the full 1024. - Cost (Node, median of 7 interleaved): app default 4.95 s raw, 9.29 s corrected (1.9x; eager correction was 13.76 s, 2.8x). 256 px terrain 170 / 301 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 26 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fulgora's terrain now matches a real Fulgora surface at every tile of the 256 x 256 window around spawn, where before it matched only the game's map preview. Tile correction does it, once the
-2ocean twins are modelled as tiles of their own.Against a real surface
The target is
oracle-fulgora-real-surface-radius10.seed123456.json(2.1.23, seed 123456, a radius-10 spawn request, terrain-only mod). Two more captures sit beside it, all with PROVENANCE entries: radius 6 (the probe's default) and a rows-order capture.-2ocean tiles.oil-ocean-shallow-2andoil-ocean-deep-2share a map colour with their base tiles but not a layer (147 vs 148, 67 vs 66), so correction sees a boundary between twins.FulgoraTilegainsShallow2andDeep2. A newfolded()keeps the land mask, the tier-2 checksum and the oldget_tilegrade where they were.allowed_neighborson any Fulgora tile, so Fulgora passesNonetocorrect_window.The game's chunk order, decoded
Correction writes into neighbouring chunks, so the order chunks are corrected in changes the map. Against the radius-6 capture, columns order leaves 5 tiles in one cluster near the request edge; against the rows capture, 10.
MapGenerationManager::request(from the 2.1.23 decompile) asks for each chunk's 3x3 neighbours one stage lower before it queues the chunk itself. That walk is ported asrequested_correction_orderand reproduces the radius-6, radius-10 and rows captures at every tile. It also reproduces Gleba's rows capture, the 16 tiles the earlier note left undecoded.The renderer keeps columns order. Inside a generated area the two orders give the same tiles. The walk depends on a request edge no preview can know, and it would make tiled renders differ from whole ones. The walk is used only in tests.
correct_chunks_in_ordercomposes with Nauvis's neighbour rule, which a test checks.Planted breaks
-shallow-2folded back into-shallow: 0 -> 18,564.POISONED_TESTS.What moved
Cost and what users see
The app renders Fulgora at 1 tile per pixel, so every user gets the corrected terrain.
all, 64 tiles of 128, Node, serial, median of 7)correct_window, lazy)Not covered yet: scrap placement still tests the raw tile for oil ocean.
Gate
pnpm run verify:lint, the fullpnpm vp test(1,368 passed) andscripts/verify-rust.shpass locally.cargo denyis not installed on hammond; CI runs it. Rebased onto #563 with no content change.Refs #454.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ