A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
visual: darker olive crowns with pale sunlit tops (L2, refs #34) (#697)
Eyal Golan838d0794638e
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a55b9cb19..ba1b82c75 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -25,6 +25,9 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIBR-MONEY-001; spec §1.2, owner, 15 October 2026, Q-MONEY-4 and Q-HUD-3). Debt and foreign currency stay in the sim(D-C3). No upkeep yet: per Q-MONEY-2 it waits for Phase 3. No golden moves; the content hash does (the name is in`content/model.yaml`), so an older save loads with the "different game content" warning.+- The olive crowns are darker, with pale tops (visual gap L2, refs #34; owner, 15 October 2026: "Darker, with pale+ sunlit tops"). At gameplay03 their body is luma 0.29 (main 0.50, promo 03 0.30) and their sunlit top stands 0.18 above+ it (main 0.14, promo 0.18). Vertex colours only: no tree count, size, shader or grade change.- The surf reaches further out to sea (refs #690, #388): the breakers' zone widens from 1.8 to 2.4 km, so south of Jaffathe white foam band reads 30.8 px at the gameplay zoom, inside promo 03's 25-55 px band (20.3 before; the promo reads44), and the northern frontage reads 25.0 px (18.3 before), inside its 6-30 px band. Presentation only.diff --git a/unity/Assets/Scripts/Map/Kits/KitMesh.cs b/unity/Assets/Scripts/Map/Kits/KitMesh.csindex b2cb4c2fe..ac253af19 100644--- a/unity/Assets/Scripts/Map/Kits/KitMesh.cs+++ b/unity/Assets/Scripts/Map/Kits/KitMesh.cs@@ -210,11 +210,13 @@ namespace Statecraft.Game.Map.Kits/// <summary>A soft, lumpy crown: a sphere of radius (rx, ry, rz) around <paramref name="centre"/> whose vertices are/// pushed in and out by <paramref name="lumps"/> (seeded), with spherical normals so the light rolls over it like/// foliage, not facets. <paramref name="speck"/> is the share of faces tinted <paramref name="speckColour"/> (citrus- /// fruit).</summary>+ /// fruit). With <paramref name="topFrom"/> under 1, the crown's top pales towards <paramref name="topColour"/>: from none+ /// where the normal's up component is <paramref name="topFrom"/> to all of it at the crown's peak (the sunlit top;+ /// up, not towards the sun, so a tree's random yaw cannot turn it away; the shader's sun then lights its sunward side).</summary>public void Crown(Vector3 centre, Vector3 radius, Color32 colour, ref KitRandom rnd, float lumps = 0.12f, int segments = 9, int rings = 6,- float speck = 0f, Color32 speckColour = default, float flatBottom = 0.35f)+ float speck = 0f, Color32 speckColour = default, float flatBottom = 0.35f, Color32 topColour = default, float topFrom = 1f){- colour.a = 0; speckColour.a = 0;+ colour.a = 0; speckColour.a = 0; topColour.a = 0;int first = pos.Count;var cols = new Color32[(rings + 1) * (segments + 1)];for (int j = 0; j <= rings; j++)@@ -228,6 +230,7 @@ namespace Statecraft.Game.Map.Kitsvar p = Vector3.Scale(n, radius) * k;if (p.y < -radius.y * flatBottom) p.y = -radius.y * flatBottom; // a flatter underside, as clipped trees havevar c = speck > 0f && rnd.Chance(speck) ? speckColour : colour;+ if (topFrom < 1f) c = Color32.Lerp(c, topColour, Mathf.SmoothStep(0f, 1f, (n.y - topFrom) / (1f - topFrom)));// Light the underside less: foliage self-shadows.float shade = Mathf.Lerp(0.72f, 1.06f, (n.y + 1f) * 0.5f);c = new Color32((byte)Mathf.Min(255, c.r * shade), (byte)Mathf.Min(255, c.g * shade), (byte)Mathf.Min(255, c.b * shade), 0);diff --git a/unity/Assets/Scripts/Map/Kits/Vegetation.cs b/unity/Assets/Scripts/Map/Kits/Vegetation.csindex c0287254f..f2ebc631c 100644--- a/unity/Assets/Scripts/Map/Kits/Vegetation.cs+++ b/unity/Assets/Scripts/Map/Kits/Vegetation.cs@@ -38,11 +38,16 @@ namespace Statecraft.Game.Map.Kits}break;case TreeKind.Olive:+ {+ // Visual gap L2 (issue #34; owner, 15 Oct 2026: "Darker, with pale sunlit tops"): dark olive-brown lobes whose+ // tops pale to OliveTop, to promo 03's crowns (KitTests.TheHillOliveCrownsAreDarkWithPaleSunlitTops).+ var top = C(OliveTop.r, OliveTop.g, OliveTop.b);km.Shaft(new Vector3(0, -0.6f, 0), new Vector3(0.15f, 1.7f, 0.1f), 0.32f, 0.22f, C(0.36f, 0.31f, 0.25f), 4);- km.Crown(new Vector3(0.5f, 2.9f, 0.2f), new Vector3(2.0f, 1.5f, 1.9f), C(0.55f, 0.53f, 0.39f), ref rnd, 0.16f, 7, 4);- km.Crown(new Vector3(-0.8f, 2.6f, -0.4f), new Vector3(1.6f, 1.3f, 1.5f), C(0.52f, 0.50f, 0.37f), ref rnd, 0.18f, 6, 4);- km.Crown(new Vector3(-0.1f, 3.5f, 0.6f), new Vector3(1.3f, 1.0f, 1.3f), C(0.60f, 0.58f, 0.44f), ref rnd, 0.15f, 6, 3);+ km.Crown(new Vector3(0.5f, 2.9f, 0.2f), new Vector3(2.0f, 1.5f, 1.9f), C(0.28f, 0.255f, 0.225f), ref rnd, 0.16f, 7, 4, 0f, default, 0.35f, top, OliveTopFrom);+ km.Crown(new Vector3(-0.8f, 2.6f, -0.4f), new Vector3(1.6f, 1.3f, 1.5f), C(0.265f, 0.24f, 0.21f), ref rnd, 0.18f, 6, 4, 0f, default, 0.35f, top, OliveTopFrom);+ km.Crown(new Vector3(-0.1f, 3.5f, 0.6f), new Vector3(1.3f, 1.0f, 1.3f), C(0.30f, 0.275f, 0.24f), ref rnd, 0.15f, 6, 3, 0f, default, 0.35f, top, OliveTopFrom);break;+ }case TreeKind.Palm:{var trunk = C(0.48f, 0.40f, 0.30f);@@ -82,6 +87,10 @@ namespace Statecraft.Game.Map.Kits/// ground between the crowns and the instance count falls. CrownRadiusM, the mesh and every other tree are unchanged;/// the keep-outs (lots, routes, footprints, groves, grid marks) and the tree holes under units read the size.</summary>public const float HillOliveSize = 1.7f, HillOliveShare = 0.6f;+ /// <summary>Visual gap L2 (issue #34): the olive crown's sunlit top colour, and the up component of the normal from which+ /// a lobe starts to pale towards it (all of it at the lobe's peak).</summary>+ public static readonly Color OliveTop = new Color(0.57f, 0.52f, 0.46f);+ public const float OliveTopFrom = 0.5f;/// <summary>The widest crown (m) the grove index is asked about (its query reach past a grove's disc).</summary>const float ScatterKeepM = 1500f;diff --git a/unity/Assets/Tests/EditMode/KitTests.cs b/unity/Assets/Tests/EditMode/KitTests.csindex ede1a3418..6512572b6 100644--- a/unity/Assets/Tests/EditMode/KitTests.cs+++ b/unity/Assets/Tests/EditMode/KitTests.cs@@ -1151,6 +1151,55 @@ public class KitTestsAssert.That(crowns.cover, Is.InRange(PromoCrownCover.x, PromoCrownCover.y), "hill olive crown cover against promo 03");}+ /// <summary>Visual gap L2 (issue #34; owner, 15 Oct 2026: crown tone "Darker, with pale sunlit tops"): promo 03's hill+ /// olives are dark crowns with pale, sunlit tops. At gameplay03 (tilt-shift and top inset off, shadows on), the crown+ /// pixels are those of the plan's windows OW1 and OW2 that the trees change by more than 3/255 in luma with shadows off+ /// (TheHillOlivesCoverPromo03sShareOfTheHills: the crowns, not their cast shadows), less a pixel at every edge (a pixel+ /// counts only if its four neighbours do), so the ground blended into a crown's rim is left out. Their median luma (the+ /// body) and their 90th percentile less the median (the sunlit top against the body) must fall in promo 03's bands.</summary>+ /// <remarks>Promo 03's numbers are from the 53 hand-marked crowns of TheHillOlivesMatchPromo03sCrownSize, each circle's+ /// inner 0.8 of the radius (again leaving out the rim), 22,849 pixels, measured 16 Oct 2026: body (median luma) 0.302,+ /// 90th percentile 0.484, top against body 0.181; hue median 28 degrees, saturation 0.32; lit from the upper left (the+ /// crowns' upper halves 0.351 against lower 0.279, left 0.354 against right 0.277). Each band is the promo's value ±15%.+ /// </remarks>+ public static readonly Vector2 PromoCrownBodyLuma = new Vector2(0.257f, 0.347f), PromoCrownTopContrast = new Vector2(0.154f, 0.208f);++ [UnityTest]+ public IEnumerator TheHillOliveCrownsAreDarkWithPaleSunlitTops()+ {+ var map = OpenMap();+ yield return null;+ var cam = Camera.main; var rig = cam.GetComponent<CameraRig>();+ PromoPose.Gameplay03.Apply(rig, map.Frame); rig.TopInset = 0; rig.Apply();+ RenderSample.TiltShift(false);+ var windows = new[] { new RectInt(1530, 290, 200, 100), new RectInt(1540, 520, 200, 150) };+ VisualToggles.Set("shadows", false);+ VisualToggles.Set("trees", true); var on = RenderSample.Render(cam, 1920, 1080);+ VisualToggles.Set("trees", false); var off = RenderSample.Render(cam, 1920, 1080);+ VisualToggles.Set("trees", true); VisualToggles.Set("shadows", true);+ var look = RenderSample.Render(cam, 1920, 1080);+ bool Crown(int x, int row) => Mathf.Abs(RenderSample.Luma(on.At(x, row)) - RenderSample.Luma(off.At(x, row))) > 3f / 255f;+ var luma = new List<float>(); var hue = new List<float>(); var sat = new List<float>();+ foreach (var w in windows)+ for (int y = w.yMin; y < w.yMax; y++)+ for (int x = w.xMin; x < w.xMax; x++)+ {+ int row = 1079 - y; // RenderSample's row 0 is the bottom+ if (!(Crown(x, row) && Crown(x - 1, row) && Crown(x + 1, row) && Crown(x, row - 1) && Crown(x, row + 1))) continue;+ var c = look.At(x, row);+ luma.Add(RenderSample.Luma(c));+ Color.RGBToHSV(c, out float h, out float s, out _); hue.Add(h * 360f); sat.Add(s);+ }+ static float Pct(List<float> l, float p) { l.Sort(); return l.Count == 0 ? float.NaN : l[Mathf.Clamp(Mathf.RoundToInt(p * (l.Count - 1)), 0, l.Count - 1)]; }+ float body = Pct(luma, 0.5f), top = Pct(luma, 0.9f), contrast = top - body;+ TestContext.WriteLine($"gameplay03 OW1+OW2 olive crowns: {luma.Count} pixels; body (median luma) {body:0.000} (promo {PromoCrownBodyLuma.x:0.000}-{PromoCrownBodyLuma.y:0.000}), " ++ $"90th percentile {top:0.000}, top against body {contrast:0.000} (promo {PromoCrownTopContrast.x:0.000}-{PromoCrownTopContrast.y:0.000}); " ++ $"hue median {Pct(hue, 0.5f):0.0} (IQR {Pct(hue, 0.25f):0.0}-{Pct(hue, 0.75f):0.0}; promo 28.2), saturation median {Pct(sat, 0.5f):0.000} (promo 0.322)");+ Assert.Greater(luma.Count, 2000, "enough crown pixels in the windows");+ Assert.That(body, Is.InRange(PromoCrownBodyLuma.x, PromoCrownBodyLuma.y), "olive crown body luma against promo 03");+ Assert.That(contrast, Is.InRange(PromoCrownTopContrast.x, PromoCrownTopContrast.y), "olive crown sunlit top against its body, against promo 03");+ }+/// <summary>The WebGL checkpoint drew every palm black: a frond's tip quad collapsed to a point, its edge-based normal was/// zero and normalize(0) is NaN on WebGL 2 (the tilt-shift then smeared it into black blocks). No part may have one.</summary>[Test]