Commit graph

3 commits

Author SHA1 Message Date
34b0e1c9e3 feat: scene lighting — angled sun, procedural sky, ambient (terrain-water task 16)
The debug scene had one DirectionalLight3D at identity rotation (shining
horizontally along -Z), no sky, and ambient sourced from the background,
which with no sky is the flat clear colour. Terrain read flat, shadowed
faces crushed, nothing to reflect. We have been judging terrain and water
against that -- a bad-evidence trap.

Minimal and standard, nothing else:
  * sun angled to 52 deg elevation, shadows ENABLED, shadow max distance
    2500 m (the default 100 m is useless at this world scale)
  * WorldEnvironment gains a ProceduralSkyMaterial sky, background_mode Sky
  * ambient sourced from that sky at 0.45 energy, so shadow sides read
No post-fx, no volumetrics, no SSAO, no tonemap change -- renderer-chat work.

MEASURED on seed 1280587109, identical camera, before vs after (mean region
colour off the rendered frames):

  land      luma  36 -> 122
  mountain  luma  76 -> 188, blue-excess -0.3 -> +49.7  (snow now reads as
            lit snow catching sky, not flat grey)

TERRAIN JUDGEABILITY IS THE WIN, and it is large.

BUT THE TASK'S PREMISE DID NOT HOLD, and it should not be quietly buried:
"the sky is what fixes the [water] grey, not re-tuning the water" -- it
does not. Same measurement, water region:

  water     luma  61 -> 116, blue-excess -3.7 -> -6.2   (BRIGHTER, and
            LESS blue -- it reads as bright grey-brown, not as water)

Mechanism: the water material is non-metallic at roughness 0.35 with
VertexColorUseAsAlbedo and alpha 0.62 in the shallows. A rough dielectric
barely shows a sky reflection; what you actually see is ~62 % water tint
over ~38 % seabed, and the seabed is exactly what the new ambient just
brightened. Lighting the world lights what shows THROUGH the water more
than it lights the water.

The fix is a water-material dial -- WATER_ALPHA_SHALLOW/DEEP, or giving the
surface enough specular to return the new sky -- and this task is forbidden
from touching task 13's material, correctly, since that is a separate
judgement. Left for the developer; reported rather than silently worked
around.

The camera's colinear LookAt warning is UNCHANGED and still present. It
comes from cam.LookAt() pointing straight down in ServerChunkManager, not
from the light, so angling the sun could never have cleared it. Verified.

Scene file only -- no code changed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 02:10:03 -04:00
d72ffc0183 docs: bring all READMEs current with actual code (post-sweep-10 truth pass)
Every README was read first, checked against the code in its directory, then
rewritten to describe what the code actually does now.

Corrected throughout: map size is config-driven (8192 default) not a fixed
4096; chunks are 24x24x256 not 32x32; road carving is implemented for all four
tiers, not a 'next step'; Data/ and Resources/ are empty, not populated.

Also fixed MATH_MARCHING_CUBES.md, which documented the density sign convention
exactly backwards — it claimed positive was underground, where the code treats
positive as above the surface and counts a corner inside when density < iso.
Getting that backwards inverts every normal, a bug this project has hit before.

The root README now carries accurate run steps: F5 runs the map generator (not
the game), F6 on Scenes/Main.tscn runs the 3D world, and ChunkRadius is a load
radius that should be dropped to 4-8 while iterating.

Docs only. No code changed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 05:23:58 -04:00
7f0f43b5fb baseline: working salvaged prototype on Godot 4.7.1 (pre-F1)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 01:45:41 -04:00