Skip to content

Terrain cinematographer round — local-contrast de-light, material classes, tone shoulder#103

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/canyon-cinematographer
Jul 13, 2026
Merged

Terrain cinematographer round — local-contrast de-light, material classes, tone shoulder#103
AdaWorldAPI merged 1 commit into
mainfrom
claude/canyon-cinematographer

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Rescues the commit stranded when #102 merged (pushed to the branch after the merge). One commit, cockpit/src/GeoHelix.tsx only — decode + shader, no asset rebake (the same relight applies to canyon, havel, and iceland-grid automatically).

The operator's polish round: "the renderer is exposing renderer artifacts rather than data artifacts … the renderer should become a terrain cinematographer." Four findings, four fixes:

  1. White patches in distant mini-canyons — diagnosed against the source demgrid: they're REAL (0.85% near-white pixels concentrated 6–10% in the North Rim blocks = snow/clouds baked in the ESRI capture), amplified to paper-white by the WB stretch + warm key. Fix: a highlight shoulder (soft knee above 0.82 — nothing diffuse renders paper-white) + a snow material (cool neutral light response + a whisper of sheen — luminous but material, never key-painted orange).
  2. Palette blur / muddy colour transitions — the previous flat de-light divided by the pixel's own luma, flattening local contrast. Now: local-contrast albedo extraction at decode (divide by the neighbourhood's blurred luma, separable box blur r=6) — the satellite's large-scale baked lighting normalizes away while the strata contrast survives crisp.
  3. Satellite-noon lingering — key lowered (elevation 0.38→0.30) and warmed, shadow floor deepened, fill weakened: closer to gallery morning.
  4. Material separation — per-vertex classes from albedo + KIND: rock rough-matte · vegetation slightly-subsurface (wider diffuse wrap ≈ light through canopy) · snow high-albedo cool · water the only specular (glints post-shoulder so the sparkle stays hot).

Verified headless on the 643k proxy: snow patches read luminous-but-material, strata crisper, forest softer than rock, plateau still dry, river meanders + glints intact. npx tsc --noEmit ✓ · npm run build ✓.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • Enhancements
    • Improved satellite terrain coloring with more consistent lighting and stronger local contrast, making sandstone formations easier to distinguish.
    • Refined terrain material rendering for clearer differentiation between snow, vegetation, exposed ground, and water.
    • Updated museum-style lighting for more natural highlights, shading, and surface depth.
    • Enhanced river visuals with improved banks, reflections, and subtle water highlights.

…oulder

Art-direction round 2 (operator): "the renderer is exposing renderer
artifacts rather than data artifacts — the renderer should become a
terrain cinematographer rather than just a terrain renderer." Four
findings, four fixes (decode + shader only; assets untouched):

1. WHITE PATCHES (diagnosed, not guessed): 0.85% of the source imagery
   is near-white, concentrated on the high North Rim — REAL snow/cloud
   patches baked into the ESRI capture, pushed toward paper-white by the
   WB stretch + warm key. Fix: a soft HIGHLIGHT SHOULDER (knee at 0.82 —
   nothing diffuse renders pure white) + a SNOW material class
   (high-albedo, cool light response, whisper of sheen — snow is not
   painted orange by the morning key). They now read as geology/weather.

2. PALETTE BLUR: the flat de-light divided by the pixel's OWN luma,
   flattening local contrast into mud. Replaced with decode-side
   LOCAL-CONTRAST albedo extraction: divide by the NEIGHBOURHOOD's luma
   (separable box blur, radius 6 cells, running-sum O(nV)) — the
   satellite's large-scale baked lighting normalizes away while the
   local strata contrast SURVIVES. Crisp sandstone layers.

3. SATELLITE NOON -> MUSEUM MORNING: sun lowered (el 0.38->0.30),
   key warmed (1.22,1.04,0.80), shadow floor deepened
   (0.42,0.30,0.23 umber), fill weakened.

4. MATERIAL SEPARATION (BRDF, not colour): per-vertex classes from
   albedo + KIND — rock rough matte · vegetation slightly subsurface
   (wider diffuse wrap = light bleeding through canopy) · snow
   high-albedo cool + soft sheen · water the ONLY hard specular
   (glints added post-shoulder so the sparkle stays hot).

Verified headless (643k proxy): plateau drainage + wall strata crisp
where previously muddy, North Rim whites read as snow among trees,
golden morning cast, forest deep and soft, river segments blue-green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jEwwaT5JZ5x8qWvcnaMYC
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_53cf6e6f-3f3b-48b8-9caa-4a10a8d0d233)

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f9f083d-1a44-436c-9576-850f8e085c27

📥 Commits

Reviewing files that changed from the base of the PR and between 643884a and 663f86a.

📒 Files selected for processing (1)
  • cockpit/src/GeoHelix.tsx

📝 Walkthrough

Walkthrough

The photo-skin terrain path now applies local-contrast de-lighting during decoding. The SKIN shader adds luminance/chroma separation, snow and vegetation masks, revised museum lighting, and updated river, glint, and specular responses.

Changes

Photo-Skin Rendering

Layer / File(s) Summary
Local-contrast terrain color decoding
cockpit/src/GeoHelix.tsx
Satellite photo colors are converted through luminance extraction, two-pass box blurring, and bounded RGB gain rescaling.
SKIN material and river lighting
cockpit/src/GeoHelix.tsx
The shader derives material masks, recomputes wrap lighting, and updates river, bank, glint, sheen, and specular behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SkinPhoto
  participant decodeGrid
  participant SKINShader
  participant RiverLighting
  SkinPhoto->>decodeGrid: decode ver-9 photo colors
  decodeGrid->>decodeGrid: blur luminance grid and rescale RGB
  decodeGrid->>SKINShader: provide processed aColor
  SKINShader->>SKINShader: classify snow and vegetation
  SKINShader->>RiverLighting: apply channel, bank, and wetness response
  RiverLighting->>SKINShader: add glints and specular effects
Loading

Possibly related PRs

Suggested reviewers: claude

Poem

I’m a rabbit beneath the sandstone sun,
Watching blurred hues sharpen one by one.
Snow masks glow and rivers gleam,
Chroma dances through the dream.
New shader paths hop into view—
“A polished burrow!” I cheer, “well done!”

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI AdaWorldAPI merged commit 2ef0649 into main Jul 13, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants