fix(tools): steep/downhill river water renders light, not dark (sf-map-renderer)#262
Merged
Conversation
… dark (sf-map-renderer) Water flowing downhill (BP_River channels, waterfalls) rendered near-black. Two causes in the river pass: - StampRivers skipped any cell already marked ocean, so an FGWaterVolume's inflated surface Z (a tall waterfall box top, or a mispaired upstream plane — e.g. 24265 where the local water is ~12000) was never corrected. The river carries the true terrain-following surface, so it now lowers such inland water to its own level (genuine ocean-band sea is still left alone). - A river cell over void seabed (a fall lip) fell back to surface-8000 → darkest. New `IsRiver` flag marks flowing cells; the shader renders them as a thin 200 cm sheet (light) regardless of the slope or a void floor beneath. Verified at three reported spots (surface 24265→12026 etc.; depth 1.00→0.22). Refs #246 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
StuartMeeks
added a commit
that referenced
this pull request
Jul 13, 2026
… level (sf-map-renderer) The river fix in #262 lowered only the narrow river ribbon to a shallow sheet, so the wider FGWaterVolume water on the channel banks kept its inflated surface (a waterfall box-top or mispaired plane) and rendered dark — and where the river continued into adjacent cells its banks stayed dark right up to the land. `SpreadFlowingWater` flood-fills from the river across the connected inland water and lowers any cell whose surface sits above the local river level down to it, so the bank's depth follows the terrain and fades to light at the shoreline. It stops where terrain rises above the water level (the bank top) and at water already at its own level (real lakes) — and never touches the ocean. ~8500 cells corrected; the rivers now read light bank-to-bank across every cell they pass through, while deep lakes keep their depth shading. Refs #246 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
StuartMeeks
added a commit
that referenced
this pull request
Jul 13, 2026
…map-renderer) The river fix in #262 drew only the narrow river ribbon as a flat shallow (light) sheet, so the wider FGWaterVolume water on the banks kept its inflated surface and read darker than the ribbon beside it — including where a river continued into adjacent cells. `SpreadFlowingWater` now flood-fills the flowing flag from the river across the connected deep channel water (depth > FlowingBankDepthCm 250), so the banks render as flowing like the mid-river ribbon. Shallow water is already ~ribbon-light, so it is skipped and blocks the spread; the fill reaches at most ChannelReachCm (5000) from a river centreline, so a deep lake merely touched by a river keeps its interior depth shading; the ocean is never touched. ~15k cells; rivers now read uniformly light bank-to-bank across every cell, lakes keep their gradient. Refs #246 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
StuartMeeks
added a commit
that referenced
this pull request
Jul 13, 2026
…-renderer) (#263) * chore(tools): add `probe waterfall` diagnostic for BP_WaterFallTool (sf-map-renderer) Diagnostic only (not wired into rendering). Dumps the nearest BP_WaterFallTool actors to a coordinate: property tags, Width, and the Top/Bottom Center component offsets. Findings so far: a fall is a vertical drop (Top and Bottom Center share XY), so it is a point, not a downhill path; the reported spot 57900,-148900 is dry terrain ~50 m from an already-rendered river, not at a fall. Kept to resume the coord-4 investigation once its in-game nature is confirmed. Refs #246 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(tools): flood below-sea-level ocean-connected channels (--flood-sub-sea) (sf-map-renderer) The U10 cascade outflow (and similar) is a channel the game flattens the landscape under (pixel-flat floor ~1 m below sea level, banks above) but whose water body carries no actor we parse — no river spline, volume, or fall along it (verified by an exhaustive actor census: `probe actorsat`). So the only way to render it is to infer water from the terrain. `FloodSubSeaConnected` flood-fills from the open ocean into 4-neighbour land cells whose landscape floor sits below sea level, marking them water at the sea surface. Self-limiting: banks at/above sea level stop the fill. `--no-flood-sub-sea` disables it (RenderOptions.FloodSubSea, default on). Filled ~823k cells; the U10 channel now carries water through the two confirmed coordinates. Also adds diagnostics used to pin this down: `probe actorsat` (unfiltered actor census + spline/brush/volume list), `probe waterfall` (BP_WaterFallTool top/bottom centres), and raw h16 in PointProbe. Refs #246 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(tools): cap the sub-sea flood to shallow inlets, not deep dry basins (sf-map-renderer) The first sub-sea flood filled everything below sea level connected to the ocean, which over-flooded the deep dry southern basins (Grass Fields, Southern Forest, Blue Crater, Paradise Island) — the game leaves those unflooded despite their floor sitting well below sea level. The U10 inlet floor is only ~1 m below sea; those basins are 5–21 m below. So the flood now only fills cells within SubSeaMaxDepthCm (default 300) of sea level — shallow coastal inlets/channels — and stops where the floor drops into a deep basin. Fill dropped 823k → 54k cells; U10 keeps its water, the southern basins are dry again. Refs #246 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(tools): render river channels uniformly light, banks and all (sf-map-renderer) The river fix in #262 drew only the narrow river ribbon as a flat shallow (light) sheet, so the wider FGWaterVolume water on the banks kept its inflated surface and read darker than the ribbon beside it — including where a river continued into adjacent cells. `SpreadFlowingWater` now flood-fills the flowing flag from the river across the connected deep channel water (depth > FlowingBankDepthCm 250), so the banks render as flowing like the mid-river ribbon. Shallow water is already ~ribbon-light, so it is skipped and blocks the spread; the fill reaches at most ChannelReachCm (5000) from a river centreline, so a deep lake merely touched by a river keeps its interior depth shading; the ocean is never touched. ~15k cells; rivers now read uniformly light bank-to-bank across every cell, lakes keep their gradient. Refs #246 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(tools): smooth east-coast fade to deep ocean blue (localized) (sf-map-renderer) East of the swamp and the dune desert, the shallow coastal water met the flat deep-sea void at a hard line, and where captured seabed (visible detail) met the void it left a blocky rectangular staircase. `EastCoastFade` recolours the sea in two configured regions by distance to the coast (chamfer distance transform), so it deepens smoothly from the shore to deep ocean blue and extends east, following the coastline, with feathered edges and low-frequency noise: - `EastFade` fades the deep-sea VOID east of the dune desert + swamp. - `CapturedFade` (the SE only, kept south of the north void) also fades the captured seabed there, dissolving the visible-seabed-vs-void staircase. Everything outside those regions — the north/south/west voids, the captured coastal shallows north of the Spire Coast, and the void's own extent — is left exactly as v17. Refs #246 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Refs #246. Fixes 3 of the 4 reported water spots (all "dark water flowing downhill / heading to waterfall").
Cause
Water flowing down steep terrain (BP_River channels + waterfalls) rendered near-black:
StampRiversskipped any cell already marked ocean, so an FGWaterVolume's inflated surface Z — a tall waterfall box-top, or a mis-paired upstream plane (e.g. 24265 where the local water is ~12000) — was never corrected. The narrow light ribbons you saw were only the gaps the volume missed.surface − 8000→ darkest blue.Fix
waterZ = min(existing, riverZ)); genuine ocean-band sea is left untouched.IsRiverflag marks flowing cells; the shader renders them as a thin 200 cm sheet (light) regardless of slope or a void floor beneath.Verified (probe)
54 tests pass; full-map render shows no regression (Titan River Valley, Crater Lakes, Swamp intact).
Not fixed here: 57900,-148900 ("no water after waterfall")
Investigated thoroughly: there is no BP_River spline or water volume anywhere near that spot (confirmed at 80 m tolerance and across an 8-point cluster). Its flowing water exists in-game only as
BP_WaterFallToolgeometry, which the renderer doesn't collect yet (the separately-deferred waterfall item on #246). That needs its own change — flagged for a follow-up decision.Interactive artifact: https://claude.ai/code/artifact/f71233b1-c70a-49f4-b1bd-7448244ee8c7