Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

feat(tools): bake terrain AO, curvature, sky-view and the signed coast distance from the heightmap

eyalgolana5145367c385
diff --git a/ASSETS.yaml b/ASSETS.yaml
index 9713de872..2f2118ccc 100644
--- a/ASSETS.yaml
+++ b/ASSETS.yaml
@@ -83,10 +83,9 @@ rules:
licence: CC-BY-SA-4.0
source: "Coordinates from the Wikipedia API (prop=coordinates) and tools/settlement_hexes.py; per-settlement URLs and check dates in settlements_1948.yaml"
status: verified
- # --- Reserved for the visual-v1 plan's baked textures (derived from the heightmap) ---
+ # --- Baked map textures (derived from the heightmap) ---
- glob: "unity/Assets/Textures/*"
licence: Copernicus-DEM
- source: "tools/terrain_bake.py from the Copernicus-derived heightmap (visual-v1 plan)"
+ source: "tools/terrain_bake.py from the Copernicus DEM GLO-30-derived heightmap (unity/Assets/StreamingAssets/map/heightmap.*): AO, curvature, sky-view (Map/terrain_bake.png) and coast distance (Map/coast.png); attribution in NOTICE"
status: verified
- allow_empty: true
removed: []
diff --git a/tools/README.md b/tools/README.md
index 9cc0badf7..e45d20558 100644
--- a/tools/README.md
+++ b/tools/README.md
@@ -16,6 +16,8 @@ Offline data tools (uv inline-script Python). Run from the repo root.
- `package_release.py` zips a Brotli WebGL build for sharing (`unity/Builds/statecraft-m3-web.zip`) and refuses
(exit 1) until every sensitive event is `sensitivity-reviewed` (docs/m3-release.md).
- `preview_map.py` renders the geography check image `tools/.cache/map-preview.png`.
+- `terrain_bake.py` writes `unity/Assets/Textures/Map/terrain_bake.png` (AO, curvature, sky-view) and `coast.png`
+ (signed distance to the shoreline) from the committed heightmap (no network). Re-run it whenever the heightmap changes.
- `art_compare.py` puts screenshots next to the promo image of their pose, writes deuteranopia and protanopia copies and
logs rough colour numbers; `art_checkpoint.sh [--no-build] <name>` builds WebGL, takes the screenshots
(`web_check.py --shots`) and runs it (docs/visual-v1.md).
@@ -34,7 +36,7 @@ Run from the repo root; this installs every pinned dependency (rasterio included
uv run --with pytest==9.1.1 --with rasterio==1.5.2 --with numpy==2.5.3 --with pyyaml==6.0.3 --with pillow==12.3.0 --with requests==2.32.5 pytest tools/tests -q
```
-Expected: `143 passed, 1 skipped` (the skipped one is the headed browser check; add `--headed` and `--with websockets==15.0.1` to run it). Omitting a dependency (e.g. rasterio) silently drops tests or fails collection.
+Expected: `153 passed, 1 skipped` (the skipped one is the headed browser check; add `--headed` and `--with websockets==15.0.1` to run it). Omitting a dependency (e.g. rasterio) silently drops tests or fails collection.
## Required attribution (Copernicus DEM licence, modified data)
diff --git a/tools/terrain_bake.py b/tools/terrain_bake.py
new file mode 100644
index 000000000..b33dd0667
--- /dev/null
+++ b/tools/terrain_bake.py
@@ -0,0 +1,181 @@
+# /// script
+# requires-python = ">=3.11"
+# dependencies = ["numpy==2.5.3", "pillow==12.3.0"]
+# ///
+"""Heightmap -> the baked shading textures of the terrain and sea shaders (no network: reads only the committed heightmap).
+
+Usage: uv run tools/terrain_bake.py (about 45 seconds)
+Reads unity/Assets/StreamingAssets/map/heightmap.r16 + heightmap.json; writes, 2048 x 2048, row 0 = north:
+ unity/Assets/Textures/Map/terrain_bake.png RGB8: R ambient occlusion (horizon search to AO_RADIUS_M; 1 = open),
+ G curvature (0.5 flat, > 0.5 convex), B sky-view factor (horizon search to SKY_RADIUS_M)
+ unity/Assets/Textures/Map/coast.png L8: 0.5 + d / (2 COAST_RANGE_M), clamped; d = signed distance (m) to the
+ nearest shoreline, < 0 in water (open sea: |elevation| <= SEA_EPS_M and connected to the map's border; lakes: flat
+ water below LAKE_BELOW_M), the rules tools/hexgrid.py uses for its sea and lake biomes
+Heights are multiplied by VERTICAL_EXAGGERATION (MapBuilder.VerticalExaggeration) so the shading matches the relief the
+game draws. Texel (j, i) is the mean of heightmap samples j..j+1, i..i+1, so its centre sits at terrain UV (j + 0.5) / 2048.
+Distances use each axis' own sample spacing (about 79 m east-west, 211 m north-south)."""
+import json
+import math
+from pathlib import Path
+
+import numpy as np
+from PIL import Image
+
+ROOT = Path(__file__).resolve().parents[1]
+MAP_DIR = ROOT / "unity" / "Assets" / "StreamingAssets" / "map"
+OUT_DIR = ROOT / "unity" / "Assets" / "Textures" / "Map"
+VERTICAL_EXAGGERATION = 3.0
+AO_RADIUS_M = 2000.0
+SKY_RADIUS_M = 12000.0
+DIRECTIONS = 16
+STEPS = 16
+CURVATURE_RADIUS_M = 600.0
+CURVATURE_SCALE_M = 150.0 # exaggerated metres above or below the local mean that reach 1 or 0
+SEA_EPS_M = 0.5
+LAKE_BELOW_M = -150.0
+LAKE_FLAT_M = 0.25 # largest height range in a 3x3 window that is still a water surface
+COAST_RANGE_M = 12000.0 # StatecraftMap.hlsl ScCoastRangeM
+
+
+def load_heightmap(map_dir: Path) -> tuple[np.ndarray, dict]:
+ meta = json.loads((map_dir / "heightmap.json").read_text())
+ raw = np.fromfile(map_dir / "heightmap.r16", dtype="<u2").reshape(meta["height"], meta["width"])
+ elev = meta["elev_min_m"] + raw.astype(np.float64) / 65535.0 * (meta["elev_max_m"] - meta["elev_min_m"])
+ return elev.astype(np.float32), meta
+
+
+def spacing_m(meta: dict) -> tuple[float, float]:
+ return meta["width_km"] * 1000 / (meta["width"] - 1), meta["length_km"] * 1000 / (meta["height"] - 1)
+
+
+def shifted(a: np.ndarray, oy: int, ox: int) -> np.ndarray:
+ """out[y, x] = a[y + oy, x + ox], the border's values repeated beyond it."""
+ h, w = a.shape
+ ys = np.clip(np.arange(h) + oy, 0, h - 1)
+ xs = np.clip(np.arange(w) + ox, 0, w - 1)
+ return a[ys[:, None], xs[None, :]]
+
+
+def openness(z: np.ndarray, dx: float, dy: float, radius_m: float, directions: int = DIRECTIONS, steps: int = STEPS) -> np.ndarray:
+ """Sky-view factor: 1 - the mean over directions of sin(horizon elevation), the horizon searched out to radius_m and
+ never below 0 (a peak sees the whole upper hemisphere: 1)."""
+ acc = np.zeros(z.shape, dtype=np.float32)
+ for k in range(directions):
+ theta = 2 * math.pi * k / directions
+ best = np.zeros(z.shape, dtype=np.float32) # tan of the highest horizon so far
+ seen: set[tuple[int, int]] = set()
+ for s in range(1, steps + 1):
+ r = radius_m * (s / steps) ** 1.5 # denser near the point
+ ox, oy = int(round(r * math.cos(theta) / dx)), int(round(-r * math.sin(theta) / dy))
+ if (ox, oy) == (0, 0) or (ox, oy) in seen:
+ continue
+ seen.add((ox, oy))
+ np.maximum(best, (shifted(z, oy, ox) - z) / math.hypot(ox * dx, oy * dy), out=best)
+ acc += np.sin(np.arctan(best))
+ return (1.0 - acc / directions).astype(np.float32)
+
+
+def box_mean(a: np.ndarray, ry: int, rx: int) -> np.ndarray:
+ """Mean over the (2 ry + 1) x (2 rx + 1) window, the border repeated (integral image)."""
+ p = np.pad(a.astype(np.float64), ((ry, ry), (rx, rx)), mode="edge")
+ c = np.zeros((p.shape[0] + 1, p.shape[1] + 1))
+ c[1:, 1:] = p.cumsum(0).cumsum(1)
+ h, w = a.shape
+ ky, kx = 2 * ry + 1, 2 * rx + 1
+ s = c[ky:ky + h, kx:kx + w] - c[0:h, kx:kx + w] - c[ky:ky + h, 0:w] + c[0:h, 0:w]
+ return (s / (ky * kx)).astype(np.float32)
+
+
+def curvature(z: np.ndarray, dx: float, dy: float) -> np.ndarray:
+ """0.5 + (z - local mean) / (2 CURVATURE_SCALE_M), clamped to [0, 1]; the local mean is two box passes (a tent)."""
+ rx, ry = max(1, round(CURVATURE_RADIUS_M / dx)), max(1, round(CURVATURE_RADIUS_M / dy))
+ mean = box_mean(box_mean(z, ry, rx), ry, rx)
+ return np.clip(0.5 + (z - mean) / (2 * CURVATURE_SCALE_M), 0.0, 1.0).astype(np.float32)
+
+
+def grow(mask: np.ndarray) -> np.ndarray:
+ out = mask.copy()
+ out[1:, :] |= mask[:-1, :]; out[:-1, :] |= mask[1:, :]
+ out[:, 1:] |= mask[:, :-1]; out[:, :-1] |= mask[:, 1:]
+ return out
+
+
+def shrink(mask: np.ndarray) -> np.ndarray:
+ return ~grow(~mask)
+
+
+def border_connected(candidate: np.ndarray) -> np.ndarray:
+ """The pixels of candidate connected (4-neighbour) to the map's border through candidate pixels."""
+ reached = np.zeros_like(candidate)
+ for edge in (np.s_[0, :], np.s_[-1, :], np.s_[:, 0], np.s_[:, -1]):
+ reached[edge] = candidate[edge]
+ while True:
+ before = reached
+ for _ in range(16): # 16 growth steps per convergence check
+ reached = grow(reached) & candidate
+ if np.array_equal(before, reached):
+ return reached
+
+
+def lake_mask(elev: np.ndarray) -> np.ndarray:
+ hi, lo = elev.copy(), elev.copy()
+ for oy in (-1, 0, 1):
+ for ox in (-1, 0, 1):
+ s = shifted(elev, oy, ox)
+ np.maximum(hi, s, out=hi); np.minimum(lo, s, out=lo)
+ flat = (elev < LAKE_BELOW_M) & (hi - lo <= LAKE_FLAT_M)
+ return grow(grow(shrink(shrink(flat)))) & flat # an opening: specks of flat rift floor drop out
+
+
+def water_mask(elev: np.ndarray) -> np.ndarray:
+ return border_connected(np.abs(elev) <= SEA_EPS_M) | lake_mask(elev)
+
+
+def distance_to(target: np.ndarray, dx: float, dy: float, cap: float) -> np.ndarray:
+ """Chamfer distance (m, 8 neighbours, each axis its own spacing) to the nearest target pixel, capped at cap."""
+ d = np.where(target, 0.0, cap).astype(np.float32)
+ diag = math.hypot(dx, dy)
+ moves = [(0, 1, dx), (0, -1, dx), (1, 0, dy), (-1, 0, dy), (1, 1, diag), (1, -1, diag), (-1, 1, diag), (-1, -1, diag)]
+ while True:
+ new = d.copy()
+ for oy, ox, step in moves:
+ np.minimum(new, shifted(d, oy, ox) + np.float32(step), out=new)
+ if np.array_equal(new, d):
+ return d
+ d = new
+
+
+def to_texels(a: np.ndarray) -> np.ndarray:
+ return (0.25 * (a[:-1, :-1] + a[1:, :-1] + a[:-1, 1:] + a[1:, 1:])).astype(np.float32)
+
+
+def to_u8(a: np.ndarray) -> np.ndarray:
+ return np.clip(np.round(a * 255), 0, 255).astype(np.uint8)
+
+
+def encode_coast(signed_m: np.ndarray, range_m: float = COAST_RANGE_M) -> np.ndarray:
+ return to_u8(0.5 + signed_m / (2 * range_m))
+
+
+def bake(elev: np.ndarray, meta: dict) -> tuple[np.ndarray, np.ndarray]:
+ dx, dy = spacing_m(meta)
+ z = elev * np.float32(VERTICAL_EXAGGERATION)
+ ao, sky, curv = openness(z, dx, dy, AO_RADIUS_M), openness(z, dx, dy, SKY_RADIUS_M), curvature(z, dx, dy)
+ water = water_mask(elev)
+ signed = np.where(water, -distance_to(~water, dx, dy, COAST_RANGE_M), distance_to(water, dx, dy, COAST_RANGE_M))
+ rgb = np.stack([to_u8(to_texels(ao)), to_u8(to_texels(curv)), to_u8(to_texels(sky))], axis=-1)
+ return rgb, encode_coast(to_texels(signed.astype(np.float32)))
+
+
+def main(map_dir: Path = MAP_DIR, out_dir: Path = OUT_DIR) -> None:
+ elev, meta = load_heightmap(map_dir)
+ rgb, coast = bake(elev, meta)
+ out_dir.mkdir(parents=True, exist_ok=True)
+ Image.fromarray(rgb, "RGB").save(out_dir / "terrain_bake.png")
+ Image.fromarray(coast, "L").save(out_dir / "coast.png")
+ print(f"wrote {out_dir / 'terrain_bake.png'} and {out_dir / 'coast.png'} ({coast.shape[1]} x {coast.shape[0]}): "
+ f"water {np.mean(coast < 128):.1%} of texels; AO mean {rgb[..., 0].mean() / 255:.3f}, sky-view mean {rgb[..., 2].mean() / 255:.3f}")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tools/tests/test_terrain_bake.py b/tools/tests/test_terrain_bake.py
new file mode 100644
index 000000000..5fe6c0861
--- /dev/null
+++ b/tools/tests/test_terrain_bake.py
@@ -0,0 +1,117 @@
+import json
+from pathlib import Path
+
+import numpy as np
+import pytest
+from PIL import Image
+
+import terrain_bake as tb
+
+ROOT = Path(__file__).resolve().parents[2]
+
+
+def meta_for(h: int, w: int, dx: float, dy: float) -> dict:
+ return {"width": w, "height": h, "width_km": (w - 1) * dx / 1000, "length_km": (h - 1) * dy / 1000,
+ "lon0": 34.2, "lon1": 35.9, "lat0": 29.45, "lat1": 33.35}
+
+
+def test_flat_land_is_open_and_has_no_curvature():
+ z = np.full((41, 41), 300.0, dtype=np.float32)
+ assert np.allclose(tb.openness(z, 100, 100, 2000), 1.0)
+ assert np.allclose(tb.curvature(z, 100, 100), 0.5)
+
+
+def test_a_pit_sees_less_sky_than_its_rim():
+ y, x = np.mgrid[0:65, 0:65]
+ z = (100 + 2.0 * ((x - 32) ** 2 + (y - 32) ** 2)).astype(np.float32) # a bowl: 0 at the centre, ~2 km at the corners
+ sky = tb.openness(z, 100, 100, 2000)
+ assert sky[32, 32] < 0.9
+ assert sky[32, 32] < sky[0, 0]
+
+
+def test_ridges_are_convex_and_valleys_concave():
+ x = np.arange(65)
+ z = np.tile(500 + 300 * np.cos(2 * np.pi * x / 32), (65, 1)).astype(np.float32) # crests at x = 0, 32, 64
+ c = tb.curvature(z, 100, 100)
+ assert c[32, 32] > 0.55 and c[32, 16] < 0.45
+
+
+def test_sea_is_border_connected_zero_and_an_inland_zero_pocket_is_land():
+ elev = np.full((40, 40), 50.0, dtype=np.float32)
+ elev[:, :10] = 0.0 # the sea along the west border
+ elev[19:22, 29:32] = 0.0 # an enclosed 0 m pocket
+ water = tb.water_mask(elev)
+ assert water[:, :10].all()
+ assert not water[19:22, 29:32].any()
+ assert not water[:, 10:].any()
+
+
+def test_flat_water_below_minus_150_is_a_lake_and_a_slope_is_not():
+ elev = np.full((40, 40), 300.0, dtype=np.float32)
+ elev[5:17, 5:17] = -420.0 # the Dead Sea's surface: flat
+ elev[22:34, 5:17] = (-200.0 - 10.0 * np.arange(12))[None, :] # the rift floor: sloping
+ water = tb.water_mask(elev)
+ assert water[8:14, 8:14].all()
+ assert not water[22:34, 5:17].any()
+
+
+def test_coast_distance_is_signed_metres_across_a_straight_coast():
+ elev = np.full((30, 60), 50.0, dtype=np.float32)
+ elev[:, :20] = 0.0 # sea columns 0..19
+ water = tb.water_mask(elev)
+ to_water = tb.distance_to(water, 100, 100, 12000)
+ to_land = tb.distance_to(~water, 100, 100, 12000)
+ assert to_water[15, 30] == pytest.approx(1100) # 11 columns east of the last sea column
+ assert to_land[15, 9] == pytest.approx(1100) # 11 columns west of the first land column
+ assert to_water[15, 59] == pytest.approx(4000)
+
+
+def test_distance_uses_each_axis_own_spacing():
+ elev = np.full((40, 30), 50.0, dtype=np.float32)
+ elev[:20, :] = 0.0 # sea in the north rows (row 0 = north)
+ d = tb.distance_to(tb.water_mask(elev), 79.0, 211.0, 12000)
+ assert d[25, 15] == pytest.approx(6 * 211.0)
+
+
+def test_texels_average_four_samples_and_coast_encoding_is_centred():
+ a = np.arange(9, dtype=np.float32).reshape(3, 3)
+ assert np.array_equal(tb.to_texels(a), np.array([[2, 3], [5, 6]], dtype=np.float32))
+ enc = tb.encode_coast(np.array([0.0, -12000.0, 12000.0, -50000.0, 120.0], dtype=np.float32))
+ assert enc.tolist() == [128, 0, 255, 0, 129]
+
+
+def test_main_writes_both_textures_one_texel_smaller_and_deterministically(tmp_path):
+ n = 33
+ y, x = np.mgrid[0:n, 0:n]
+ elev = np.where(x < 8, 0.0, 40.0 + 30.0 * np.sin(y / 3.0) + 20.0 * x).astype(np.float32)
+ lo, hi = float(elev.min()), float(elev.max())
+ map_dir = tmp_path / "map"; map_dir.mkdir()
+ np.round((elev - lo) / (hi - lo) * 65535).astype("<u2").tofile(map_dir / "heightmap.r16")
+ (map_dir / "heightmap.json").write_text(json.dumps({**meta_for(n, n, 79.0, 211.0), "elev_min_m": lo, "elev_max_m": hi}))
+ tb.main(map_dir, tmp_path / "a"); tb.main(map_dir, tmp_path / "b")
+ bake = Image.open(tmp_path / "a" / "terrain_bake.png"); coast = Image.open(tmp_path / "a" / "coast.png")
+ assert (bake.mode, bake.size) == ("RGB", (n - 1, n - 1))
+ assert (coast.mode, coast.size) == ("L", (n - 1, n - 1))
+ for name in ("terrain_bake.png", "coast.png"):
+ assert (tmp_path / "a" / name).read_bytes() == (tmp_path / "b" / name).read_bytes()
+ c = np.asarray(coast)
+ assert c[:, :5].max() < 128 and c[:, 12:].min() > 128 # water west, land east
+
+
+def texel(lon: float, lat: float) -> tuple[int, int]:
+ meta = json.loads((ROOT / "unity/Assets/StreamingAssets/map/heightmap.json").read_text())
+ col = int((lon - meta["lon0"]) / (meta["lon1"] - meta["lon0"]) * 2048)
+ row = int((meta["lat1"] - lat) / (meta["lat1"] - meta["lat0"]) * 2048)
+ return row, col
+
+
+def test_the_committed_coast_texture_marks_the_seas_and_lakes():
+ c = np.asarray(Image.open(ROOT / "unity/Assets/Textures/Map/coast.png"))
+ assert c.shape == (2048, 2048)
+ assert c[texel(34.40, 32.00)] < 64, "the Mediterranean off Tel Aviv, well offshore"
+ assert c[texel(35.59, 32.82)] < 128, "the Sea of Galilee"
+ assert c[texel(35.50, 31.50)] < 128, "the Dead Sea"
+ assert c[texel(34.95, 29.50)] < 128, "the Gulf of Aqaba off Eilat"
+ assert c[texel(35.21, 31.78)] > 192, "Jerusalem, far inland"
+ b = np.asarray(Image.open(ROOT / "unity/Assets/Textures/Map/terrain_bake.png"))
+ assert b.shape == (2048, 2048, 3)
diff --git a/unity/Assets/Textures.meta b/unity/Assets/Textures.meta
new file mode 100644
index 000000000..2514de4af
--- /dev/null
+++ b/unity/Assets/Textures.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ac7f1dd7646b84a1cb60d0799274b9a1
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/unity/Assets/Textures/Map.meta b/unity/Assets/Textures/Map.meta
new file mode 100644
index 000000000..dd1fefaae
--- /dev/null
+++ b/unity/Assets/Textures/Map.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e837a87af3f044ff58d8157f7a0e5aa5
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/unity/Assets/Textures/Map/coast.png b/unity/Assets/Textures/Map/coast.png
new file mode 100644
index 000000000..04f5b3f0a
Binary files /dev/null and b/unity/Assets/Textures/Map/coast.png differ
diff --git a/unity/Assets/Textures/Map/coast.png.meta b/unity/Assets/Textures/Map/coast.png.meta
new file mode 100644
index 000000000..44b654e11
--- /dev/null
+++ b/unity/Assets/Textures/Map/coast.png.meta
@@ -0,0 +1,130 @@
+fileFormatVersion: 2
+guid: ac04311e70bde4db0a5e4129f5d58af1
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 0
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 10
+ textureShape: 1
+ singleChannelComponent: 1
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: WebGL
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID:
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/unity/Assets/Textures/Map/terrain_bake.png b/unity/Assets/Textures/Map/terrain_bake.png
new file mode 100644
index 000000000..bd0bdf39e
Binary files /dev/null and b/unity/Assets/Textures/Map/terrain_bake.png differ
diff --git a/unity/Assets/Textures/Map/terrain_bake.png.meta b/unity/Assets/Textures/Map/terrain_bake.png.meta
new file mode 100644
index 000000000..54fddeb0b
--- /dev/null
+++ b/unity/Assets/Textures/Map/terrain_bake.png.meta
@@ -0,0 +1,130 @@
+fileFormatVersion: 2
+guid: 2170c5371eef64cf0ae3a9de5631722c
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 0
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: WebGL
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID:
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant: