@wildshard/engine 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/budgets/shard-size-baseline.json +10 -4
- package/index.html +6 -4
- package/lint/engine-sides.json +14 -0
- package/lint/ratchet.json +0 -68
- package/lint/ratchet.mjs +1 -4
- package/package.json +17 -15
- package/scripts/agent-sync.mjs +27 -8
- package/scripts/app-build/appCook.ts +8 -2
- package/scripts/app-build/catalogue.ts +10 -7
- package/scripts/app-build/gen.ts +22 -2
- package/scripts/app-build/isolation.d.mts +10 -0
- package/scripts/app-build/isolation.mjs +47 -0
- package/scripts/app-build/outputProducts.mjs +4 -0
- package/scripts/app-build/previousDeploy.d.mts +2 -0
- package/scripts/app-build/previousDeploy.mjs +10 -1
- package/scripts/app-build/serviceWorker.ts +10 -3
- package/scripts/app-build/splitOutput.mjs +4 -2
- package/scripts/app-build/standaloneOutput.d.mts +1 -1
- package/scripts/app-build/standaloneOutput.mjs +5 -3
- package/scripts/app-build/titlePreloads.d.mts +8 -0
- package/scripts/app-build/titlePreloads.mjs +69 -0
- package/scripts/app-build/worldMapAtlas.ts +10 -6
- package/scripts/app-build-pipeline.mjs +31 -3
- package/scripts/built-product.mjs +1 -1
- package/scripts/cell-mem-bench.mjs +81 -23
- package/scripts/check-custom-sections-zero.mjs +1 -1
- package/scripts/check-devserver.mjs +2 -0
- package/scripts/check-models.mjs +2 -0
- package/scripts/check-paths.allow.json +0 -115
- package/scripts/check-paths.mjs +2 -2
- package/scripts/check-platform-ratchets.mjs +2 -3
- package/scripts/chromium-keychain.d.mts +1 -1
- package/scripts/ci-static.sh +1 -1
- package/scripts/committed-fast-checks.mjs +0 -2
- package/scripts/content-sw-proof.mjs +2 -1
- package/scripts/cook-worker.mjs +9 -3
- package/scripts/cook.mjs +18 -5
- package/scripts/docs-inputs-proof.mjs +6 -6
- package/scripts/e7-voice-staging-proof.mjs +1 -1
- package/scripts/gate-related-tests.mjs +1 -1
- package/scripts/git-source-view.mjs +1 -1
- package/scripts/goldens/capture.mjs +17 -5
- package/scripts/grid-crossing-nightly.mjs +59 -0
- package/scripts/grid-crossing-qa.mjs +44 -0
- package/scripts/grid-crossing-ratchet.d.mts +6 -0
- package/scripts/grid-crossing-ratchet.mjs +52 -0
- package/scripts/grid-crossing-report.mjs +122 -0
- package/scripts/grid-crossing-stages.mjs +47 -0
- package/scripts/grid-crossing-tour.mjs +277 -0
- package/scripts/grid-crossing-walk-proof.mjs +124 -17
- package/scripts/host-ruler/roots.mjs +2 -2
- package/scripts/host-ruler.d.mts +91 -0
- package/scripts/host-ruler.mjs +565 -0
- package/scripts/live-prepush.py +3 -5
- package/scripts/loading-flow/benchmax.mjs +3 -1
- package/scripts/look-loop/test_look_loop.py +1 -38
- package/scripts/memory-proof.mjs +61 -6
- package/scripts/mmo-bots.mjs +8 -2
- package/scripts/net-lag-proof.mjs +219 -0
- package/scripts/night-market-kit-budget.mjs +2 -2
- package/scripts/offline-proof-rules.d.mts +2 -2
- package/scripts/offline-proof-rules.mjs +15 -4
- package/scripts/offline-proof.mjs +74 -13
- package/scripts/{shard-platform-output.mjs → output-reader.mjs} +1 -1
- package/scripts/page-release/content.d.mts +9 -1
- package/scripts/page-release/content.mjs +131 -17
- package/scripts/page-release/flow.mjs +36 -10
- package/scripts/page-release/stamp-content.mjs +24 -0
- package/scripts/page-release.mjs +28 -6
- package/scripts/page-size.mjs +2 -1
- package/scripts/pin-packs.ts +1 -1
- package/scripts/pins.ts +4 -4
- package/scripts/precommit-checks.mjs +1 -7
- package/scripts/precommit-jobs.mjs +0 -1
- package/scripts/precommit-source.py +1 -9
- package/scripts/program-discovery.mjs +1 -1
- package/scripts/ring-cook.mjs +2 -1
- package/scripts/ring-step.ts +1 -1
- package/scripts/script-scenario-metrics.mjs +1 -1
- package/scripts/shard-output-content.d.mts +1 -1
- package/scripts/shard-output-content.mjs +2 -2
- package/scripts/shard-outputs.mjs +1 -1
- package/scripts/shard-public.mjs +1 -1
- package/scripts/shard-wire-meter.mjs +24 -9
- package/scripts/side-parity.mjs +4 -2
- package/scripts/standalone-smoke.mjs +8 -3
- package/scripts/tier-textures.mjs +22 -4
- package/scripts/tile-bake-report.mjs +1 -1
- package/scripts/tile-bakes.mjs +1 -1
- package/scripts/title-assets.generated.json +2 -0
- package/scripts/tsconfig.json +0 -2
- package/scripts/vendor/basisu/LICENSE +201 -0
- package/scripts/vendor/basisu/basis_encoder.cjs +2 -0
- package/scripts/vendor/basisu/basis_encoder.wasm +0 -0
- package/scripts/vitest-push-guards.config.ts +1 -1
- package/scripts/vps/harden-apply.sh +4 -1
- package/scripts/vps/harden-prometheus.sh +176 -0
- package/scripts/vps/harden.sh +16 -0
- package/scripts/vps/rebuild.sh +18 -0
- package/scripts/vps/wildshard-config +6 -2
- package/scripts/worker-client-play.mjs +6 -2
- package/scripts/worktree-reap.mjs +5 -5
- package/src/.oxlintrc.json +3 -182
- package/src/client/app/entry.ts +10 -2
- package/src/client/engine/boot/bootCache.ts +2 -2
- package/src/client/engine/boot/bootTrace.ts +12 -4
- package/src/client/engine/boot/browserChunkRecovery.ts +4 -0
- package/src/client/engine/boot/clearDownloads.ts +5 -2
- package/src/client/engine/boot/contentRead.ts +11 -0
- package/src/client/engine/boot/gpuFiles.ts +4 -2
- package/src/client/engine/boot/lastEnd.ts +99 -12
- package/src/client/engine/boot/texturePack.ts +2 -2
- package/src/client/engine/net/netPlayer.ts +19 -2
- package/src/client/engine/net/otherPlayers.ts +55 -8
- package/src/client/engine/net/predictor.ts +33 -9
- package/src/client/engine/net/redial.ts +29 -6
- package/src/client/engine/pwa/cacheNames.ts +58 -1
- package/src/client/engine/pwa/sw.js +41 -11
- package/src/client/engine/render/dataLook.ts +152 -40
- package/src/client/engine/render/families/detail.ts +89 -0
- package/src/client/engine/render/families/pbr.ts +7 -1
- package/src/client/engine/render/look.ts +6 -0
- package/src/client/engine/render/lookLight.ts +103 -11
- package/src/client/engine/render/lookRender.ts +105 -0
- package/src/client/engine/saves/indexed.ts +2 -2
- package/src/client/engine/telemetry/browserErrors.ts +24 -3
- package/src/client/engine/telemetry/staleBuildReport.ts +22 -1
- package/src/client/engine/ui/debugOptions.ts +1 -1
- package/src/client/engine/ui/lookLightOption.ts +10 -6
- package/src/client/engine/ui/namePrompt.ts +7 -0
- package/src/client/game/boot/audio.generated.ts +114 -114
- package/src/client/game/boot/bytes.generated.ts +118 -220
- package/src/client/game/boot/placedSpawn.ts +35 -0
- package/src/client/game/boot/spawnDownload.ts +25 -6
- package/src/client/game/boot/versions.generated.ts +7 -5
- package/src/client/game/devScene/hook.ts +291 -0
- package/src/client/game/grid/cellLoading.ts +12 -2
- package/src/client/game/grid/live.ts +112 -16
- package/src/client/game/grid/liveSession.ts +33 -2
- package/src/client/game/grid/mapAtlas.ts +18 -4
- package/src/client/game/grid/minimapBlend.ts +15 -5
- package/src/client/game/grid/oneWayIn.ts +5 -1
- package/src/client/game/grid/placedCells.ts +114 -12
- package/src/client/game/grid/placedContent.ts +85 -0
- package/src/client/game/grid/prefetch.ts +9 -1
- package/src/client/game/grid/productInputs.ts +3 -1
- package/src/client/game/grid/productLeases.ts +4 -1
- package/src/client/game/grid/products.ts +8 -4
- package/src/client/game/grid/roadLook.ts +24 -15
- package/src/client/game/grid/roadLookPlatform.ts +4 -2
- package/src/client/game/grid/roadResources.ts +24 -0
- package/src/client/game/grid/roadSign.worker.ts +4 -3
- package/src/client/game/grid/roadSignPaint.ts +16 -5
- package/src/client/game/grid/roadSignPreparation.ts +4 -3
- package/src/client/game/grid/roadSignScale.ts +8 -0
- package/src/client/game/grid/roadTileCapture.worker.ts +3 -1
- package/src/client/game/grid/roadTileCaptureWorker.ts +2 -1
- package/src/client/game/grid/roadTileWrite.worker.ts +4 -2
- package/src/client/game/grid/roadTileWriter.ts +2 -1
- package/src/client/game/grid/screenReports.ts +39 -0
- package/src/client/game/grid/session.ts +20 -4
- package/src/client/game/grid/softWallLook.ts +25 -8
- package/src/client/game/mainMenu.ts +6 -2
- package/src/client/game/plugin/context.ts +2 -1
- package/src/client/game/plugin/followedMovers.ts +7 -1
- package/src/client/game/quest/figures.ts +2 -0
- package/src/client/game/session/finish.ts +6 -0
- package/src/client/game/shardfile/assetCache.ts +4 -4
- package/src/client/game/shardfile/client.ts +4 -1
- package/src/client/game/shardfile/clientAssets.ts +9 -5
- package/src/client/game/shardfile/clientLibrary.ts +1 -1
- package/src/client/game/shardfile/clientWater.ts +51 -9
- package/src/client/game/shardfile/clientWorker.ts +19 -7
- package/src/client/game/shardfile/look.ts +8 -3
- package/src/client/game/shardfile/product.ts +34 -7
- package/src/client/game/shardfile/productChecks.ts +2 -2
- package/src/client/game/shardfile/productCost.ts +2 -2
- package/src/client/game/shardfile/readAsset.ts +2 -2
- package/src/client/game/shardfile/reflectingWater.ts +73 -0
- package/src/client/game/shardfile/seatGrace.ts +9 -0
- package/src/client/game/shardfile/skinPlayback.ts +1 -1
- package/src/client/game/systems/npc/figureRows.ts +9 -0
- package/src/client/host/online/doctor.ts +2 -0
- package/src/client/host/online/linkScreens.ts +30 -4
- package/src/client/host/standalone/shell.ts +4 -0
- package/src/cook/game/astc6Encode.ts +55 -0
- package/src/cook/game/astc6Wasm.ts +176 -0
- package/src/cook/game/cookJob.ts +30 -6
- package/src/cook/game/cookWorker.ts +38 -11
- package/src/cook/game/entryTotals.ts +51 -24
- package/src/cook/game/shardCook.ts +35 -7
- package/src/cook/game/spawnParts.ts +33 -8
- package/src/cook/game/tierTextures.ts +87 -14
- package/src/server/engine/ai/bossContenders.ts +27 -3
- package/src/server/engine/ai/phases.ts +1 -1
- package/src/server/engine/entities/creatureRefill.ts +9 -2
- package/src/server/engine/net/ledgerBook.ts +2 -0
- package/src/server/engine/net/room.ts +15 -0
- package/src/server/engine/sim/respawn.ts +8 -0
- package/src/server/game/boss/arenaRoomEntry.ts +5 -1
- package/src/server/game/boss/arenaRoomNative.ts +2 -0
- package/src/server/game/boss/native.ts +2 -1
- package/src/server/game/boss/nativeWake.ts +9 -5
- package/src/server/game/boss/openArenaNative.ts +2 -2
- package/src/server/game/boss/openArenaRoom.ts +3 -1
- package/src/server/game/grid/room.ts +44 -3
- package/src/server/game/grid/simulation.ts +23 -0
- package/src/server/game/population/mixedRoster.ts +11 -3
- package/src/server/game/population/nativeBake.ts +8 -3
- package/src/server/game/population/nativeReturns.ts +6 -3
- package/src/server/game/population/roster.ts +5 -3
- package/src/server/game/quest/eliteDrops.ts +15 -4
- package/src/server/game/quest/nativeChapter.ts +1 -1
- package/src/server/game/quest/nativeComposition.ts +5 -1
- package/src/server/game/riding/nativeTaming.ts +10 -6
- package/src/server/game/riding/wildRefill.ts +3 -2
- package/src/server/game/shardfile/bossRow.ts +4 -2
- package/src/server/game/shardfile/homeKeeper.ts +4 -2
- package/src/server/host/bake/headlessWorker.ts +1 -1
- package/src/server/host/dedicated/cellHost.ts +98 -16
- package/src/server/host/dedicated/cellProtocol.ts +16 -1
- package/src/server/host/dedicated/cellWorker.ts +8 -5
- package/src/server/host/dedicated/dedicatedRoom.ts +16 -6
- package/src/server/host/dedicated/gridCells.ts +15 -6
- package/src/server/host/dedicated/loopLag.ts +21 -0
- package/src/server/host/dedicated/main.ts +13 -5
- package/src/server/host/dedicated/packReader.ts +3 -3
- package/src/server/host/dedicated/placementFile.ts +3 -2
- package/src/server/host/dedicated/roadRoom.ts +34 -4
- package/src/server/host/dedicated/serverMetrics.ts +126 -0
- package/src/server/host/dedicated/socketPump.ts +21 -4
- package/src/server/host/dedicated/workerTable.ts +15 -4
- package/src/server/host/dedicated/world.ts +65 -7
- package/src/server/host/headless.ts +1 -1
- package/src/server/host/headlessRuntime.ts +1 -1
- package/src/server/host/standalone/roadWorld.ts +15 -3
- package/src/server/host/standalone/serverHost.ts +4 -1
- package/src/server/host/standalone/serverProduct.ts +41 -11
- package/src/shared/engine/ai/BossBrain.ts +8 -0
- package/src/shared/game/boss/wake.ts +6 -0
- package/src/shared/game/devColliders.ts +47 -0
- package/src/shared/game/eliteSystem.ts +8 -0
- package/src/shared/game/grid/allocator.ts +3 -0
- package/src/shared/game/grid/placementRows.ts +5 -2
- package/src/shared/game/plugin/bossRecord.ts +3 -2
- package/src/shared/game/shardfile/ktx2Targets.ts +23 -3
- package/src/shared/game/shardfile/outputDescriptor.ts +9 -5
- package/src/shared/game/shardfile/packReads.ts +28 -3
- package/src/shared/game/shardfile/serverPack.ts +9 -0
- package/src/shared/game/systems/looks/trampleField.ts +2 -0
- package/src/shared/host/formatJsonSchema.ts +2 -2
- package/src/tsconfig.json +1 -27
- package/lint/host-reviews.json +0 -14
- package/lint/listed-view-code.json +0 -13
- package/lint/platform-pending-users.json +0 -2520
- package/lint/platform-pending-users.md +0 -18
- package/scripts/cell-mem/metrics-preload.mjs +0 -65
- package/scripts/check-closed-components.d.mts +0 -7
- package/scripts/check-closed-components.mjs +0 -87
- package/scripts/g571-hosts.d.mts +0 -3
- package/scripts/g571-hosts.mjs +0 -54
- package/scripts/host-ruler/register-migrate.mjs +0 -242
- package/scripts/listed-view-code.d.mts +0 -7
- package/scripts/listed-view-code.mjs +0 -93
- package/scripts/look-loop/fit-lut.py +0 -142
- package/scripts/look-loop/palette-delta.py +0 -183
- package/scripts/look-loop/regions/driftwood-isle.json +0 -25
- package/scripts/look-loop/regions/far-reach.json +0 -225
- package/scripts/look-loop/regions/open-plot-night-market.json +0 -855
- package/scripts/look-loop/regions/pine-hollow.json +0 -22
- package/scripts/look-loop/regions/sunscar-dunes.json +0 -281
- package/scripts/platform-chargebacks.d.mts +0 -9
- package/scripts/platform-chargebacks.mjs +0 -135
- package/scripts/shard-component-spans.d.mts +0 -15
- package/scripts/shard-component-spans.mjs +0 -18
- package/scripts/shard-components.d.mts +0 -16
- package/scripts/shard-components.mjs +0 -363
- package/scripts/shard-platform-hosts.d.mts +0 -2
- package/scripts/shard-platform-hosts.mjs +0 -93
- package/scripts/shard-platform-sections.d.mts +0 -2
- package/scripts/shard-platform-sections.mjs +0 -9
- package/scripts/shard-platform.d.mts +0 -76
- package/scripts/shard-platform.mjs +0 -1072
- package/src/.oxfmtrc.json +0 -48
- package/src/scripts/ask-new.sh +0 -29
- package/src/scripts/asks.mjs +0 -142
- package/src/scripts/herdr-prompt.sh +0 -34
- package/src/scripts/herdr-question-open.sh +0 -67
- package/src/scripts/md-wrap.mjs +0 -229
- /package/scripts/{shard-platform-format.d.mts → node-format.d.mts} +0 -0
- /package/scripts/{shard-platform-format.mjs → node-format.mjs} +0 -0
- /package/scripts/{shard-platform-output.d.mts → output-reader.d.mts} +0 -0
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""fit-lut.py: fit a shard's learned 33³ colour LUT from its look loop's frames (docs/look-loop.md, step 6).
|
|
3
|
-
|
|
4
|
-
python3 scripts/look-loop/fit-lut.py --shard <slug> <mockup dir> '<no-LUT dir>/nolut-capture-{n}-*.jpg' [out.bin] [pred dir]
|
|
5
|
-
python3 scripts/look-loop/fit-lut.py --regions <json> <mockup dir> '<pattern>' public/assets/lut/<slug>.bin
|
|
6
|
-
|
|
7
|
-
Regions as palette-delta.py (--regions, else scripts/look-loop/regions/<slug>.json). out.bin defaults to engine's
|
|
8
|
-
public/assets/lut/<shard>.bin, which src/client/engine/world/lut.ts loads for that shard (a shard with no file gets no
|
|
9
|
-
LUT pass); the predicted frames go to ./tmp/look-loop/pred unless a pred dir is given.
|
|
10
|
-
|
|
11
|
-
The input captures must be frames shot with the LUT off, from the loop cameras. Mockups and captures are not
|
|
12
|
-
pixel-aligned (the mockups are recompositions), so the fit is per material, not per pixel:
|
|
13
|
-
1. for every region of the regions JSON (same rectangles, same material filters) each capture pixel gets a
|
|
14
|
-
target by Reinhard transfer in CIELAB — its offset from the capture's mean, scaled by the ratio of the spreads
|
|
15
|
-
(clamped 0.7–1.4), re-centred on the mockup's mean — giving (source, target) colour pairs;
|
|
16
|
-
2. a coarse identity lattice (7³, low weight) and the grey axis (weight `greyAnchor`, default 3) anchor every colour the regions never see (the sword,
|
|
17
|
-
the hands, the HUD-free rest of the frame) to "leave it alone";
|
|
18
|
-
3. each of the 33³ nodes moves by the kernel-weighted mean displacement of the pairs near it (Gaussian, σ = 0.08 in
|
|
19
|
-
display sRGB) shrunk toward zero where the pairs are sparse (λ), then the displacement field is smoothed
|
|
20
|
-
(3D Gaussian, σ = 1 node) and the move capped at 0.22 — a smooth, non-posterizing warp;
|
|
21
|
-
4. it prints the predicted per-region ΔE00 after applying the LUT to the captures, then writes the table as RGBA8
|
|
22
|
-
(index (b·33 + g)·33 + r) for src/client/engine/world/lut.ts.
|
|
23
|
-
"""
|
|
24
|
-
import importlib.util
|
|
25
|
-
from pathlib import Path
|
|
26
|
-
|
|
27
|
-
import numpy as np
|
|
28
|
-
from PIL import Image
|
|
29
|
-
|
|
30
|
-
HERE = Path(__file__).resolve().parent
|
|
31
|
-
spec = importlib.util.spec_from_file_location('palette_delta', HERE / 'palette-delta.py')
|
|
32
|
-
PD = importlib.util.module_from_spec(spec)
|
|
33
|
-
assert spec.loader is not None
|
|
34
|
-
spec.loader.exec_module(PD)
|
|
35
|
-
|
|
36
|
-
N = 33
|
|
37
|
-
SIGMA = 0.08
|
|
38
|
-
LAMBDA = 2.0
|
|
39
|
-
MAX_MOVE = 0.22
|
|
40
|
-
ROOT = HERE.parent.parent
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def srgb_to_lab_arr(rgb):
|
|
44
|
-
c = rgb / 255.0
|
|
45
|
-
c = np.where(c <= 0.04045, c / 12.92, ((c + 0.055) / 1.055) ** 2.4)
|
|
46
|
-
M = np.array([[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]])
|
|
47
|
-
xyz = c @ M.T / np.array([0.95047, 1.0, 1.08883])
|
|
48
|
-
f = np.where(xyz > 0.008856, np.cbrt(xyz), 7.787 * xyz + 16 / 116)
|
|
49
|
-
return np.stack([116 * f[:, 1] - 16, 500 * (f[:, 0] - f[:, 1]), 200 * (f[:, 1] - f[:, 2])], 1)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def lab_to_srgb_arr(lab):
|
|
53
|
-
fy = (lab[:, 0] + 16) / 116
|
|
54
|
-
fx, fz = fy + lab[:, 1] / 500, fy - lab[:, 2] / 200
|
|
55
|
-
inv = lambda f: np.where(f ** 3 > 0.008856, f ** 3, (f - 16 / 116) / 7.787)
|
|
56
|
-
xyz = np.stack([inv(fx), inv(fy), inv(fz)], 1) * np.array([0.95047, 1.0, 1.08883])
|
|
57
|
-
Mi = np.linalg.inv(np.array([[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]]))
|
|
58
|
-
c = np.clip(xyz @ Mi.T, 0, 1)
|
|
59
|
-
c = np.where(c <= 0.0031308, c * 12.92, 1.055 * c ** (1 / 2.4) - 0.055)
|
|
60
|
-
return np.clip(c * 255, 0, 255)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def pairs(mock_dir, game_pat, rng, cfg):
|
|
64
|
-
mocks = {n: Image.open(next(mock_dir.glob(f'mockup-{n}-*.jpg'))) for n in PD.frames(cfg)}
|
|
65
|
-
games = {n: Image.open(f) for n in PD.frames(cfg) if (f := PD.frame_path(game_pat, n))}
|
|
66
|
-
src, dst, wt = [], [], []
|
|
67
|
-
for mat, regs in cfg['regions'].items():
|
|
68
|
-
m_all = [PD.select(mat, PD.pixels(mocks[n], r), cfg) for n, r in regs if n in games]
|
|
69
|
-
g_all = [PD.select(mat, PD.pixels(games[n], r), cfg) for n, r in regs if n in games]
|
|
70
|
-
m = np.concatenate(m_all) if m_all else np.zeros((0, 3))
|
|
71
|
-
g = np.concatenate(g_all) if g_all else np.zeros((0, 3))
|
|
72
|
-
if len(m) < 50 or len(g) < 50: continue
|
|
73
|
-
lm, lg = srgb_to_lab_arr(m), srgb_to_lab_arr(g)
|
|
74
|
-
k = np.clip(lm.std(0) / np.maximum(lg.std(0), 1e-3), 0.7, 1.4)
|
|
75
|
-
pick = g[rng.choice(len(g), size=min(len(g), 2500), replace=False)]
|
|
76
|
-
tgt = lab_to_srgb_arr((srgb_to_lab_arr(pick) - lg.mean(0)) * k + lm.mean(0))
|
|
77
|
-
src.append(pick / 255); dst.append(tgt / 255); wt.append(np.full(len(pick), cfg['weights'].get(mat, 1.0)))
|
|
78
|
-
# identity anchors: a coarse lattice + the grey axis
|
|
79
|
-
lat = np.stack(np.meshgrid(*[np.linspace(0, 1, 7)] * 3, indexing='ij'), -1).reshape(-1, 3)
|
|
80
|
-
grey = np.repeat(np.linspace(0, 1, 33)[:, None], 3, 1)
|
|
81
|
-
for a, w in ((lat, 0.6), (grey, cfg['greyAnchor'])):
|
|
82
|
-
src.append(a); dst.append(a); wt.append(np.full(len(a), w))
|
|
83
|
-
return np.concatenate(src), np.concatenate(dst), np.concatenate(wt)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
def fit(src, dst, wt):
|
|
87
|
-
g = np.linspace(0, 1, N)
|
|
88
|
-
nodes = np.stack(np.meshgrid(g, g, g, indexing='ij'), -1).reshape(-1, 3) # [r][g][b]
|
|
89
|
-
disp = dst - src
|
|
90
|
-
out = np.zeros_like(nodes)
|
|
91
|
-
for i in range(0, len(nodes), 1500):
|
|
92
|
-
d2 = ((nodes[i:i + 1500, None, :] - src[None, :, :]) ** 2).sum(-1)
|
|
93
|
-
w = np.exp(-d2 / (2 * SIGMA ** 2)) * wt[None, :]
|
|
94
|
-
out[i:i + 1500] = (w @ disp) / (w.sum(1, keepdims=True) + LAMBDA)
|
|
95
|
-
field = out.reshape(N, N, N, 3)
|
|
96
|
-
k = np.exp(-0.5 * np.arange(-2, 3) ** 2); k /= k.sum()
|
|
97
|
-
for ax in range(3):
|
|
98
|
-
field = np.apply_along_axis(lambda v: np.convolve(np.pad(v, 2, mode='edge'), k, mode='valid'), ax, field)
|
|
99
|
-
mag = np.linalg.norm(field, axis=-1, keepdims=True)
|
|
100
|
-
field = field * np.minimum(1, MAX_MOVE / np.maximum(mag, 1e-6))
|
|
101
|
-
return np.clip(nodes.reshape(N, N, N, 3) + field, 0, 1) # [r][g][b] → rgb
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
def apply(lut, img):
|
|
105
|
-
a = np.asarray(img.convert('RGB'), dtype=np.float64) / 255 * (N - 1)
|
|
106
|
-
i0 = np.floor(a).astype(int).clip(0, N - 2); f = a - i0
|
|
107
|
-
out = np.zeros_like(a)
|
|
108
|
-
for dr in (0, 1):
|
|
109
|
-
for dg in (0, 1):
|
|
110
|
-
for db in (0, 1):
|
|
111
|
-
w = (f[..., 0] if dr else 1 - f[..., 0]) * (f[..., 1] if dg else 1 - f[..., 1]) * (f[..., 2] if db else 1 - f[..., 2])
|
|
112
|
-
out += w[..., None] * lut[i0[..., 0] + dr, i0[..., 1] + dg, i0[..., 2] + db]
|
|
113
|
-
return Image.fromarray((out * 255).round().clip(0, 255).astype(np.uint8))
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
def main(argv=None):
|
|
117
|
-
ap = PD.arg_parser("fit a shard's 33³ colour LUT from its mockup loop")
|
|
118
|
-
ap.add_argument('out', nargs='?', default=None, help='the LUT (default public/assets/lut/<shard>.bin)')
|
|
119
|
-
ap.add_argument('pred_dir', nargs='?', default='tmp/look-loop/pred', help='where the predicted frames go (default ./tmp/look-loop/pred)')
|
|
120
|
-
a = ap.parse_args(argv)
|
|
121
|
-
cfg = PD.load_config(a.shard, a.regions)
|
|
122
|
-
mock_dir, game_pat = Path(a.mock_dir), a.game_pat
|
|
123
|
-
if not a.out and not a.shard: ap.error('pass out.bin, or --shard <slug> for public/assets/lut/<slug>.bin')
|
|
124
|
-
out_path = Path(a.out) if a.out else ROOT / 'public' / 'assets' / 'lut' / f'{a.shard}.bin'
|
|
125
|
-
rng = np.random.default_rng(7)
|
|
126
|
-
src, dst, wt = pairs(mock_dir, game_pat, rng, cfg)
|
|
127
|
-
lut = fit(src, dst, wt)
|
|
128
|
-
# predicted table: the captures through the LUT
|
|
129
|
-
pred_dir = Path(a.pred_dir)
|
|
130
|
-
pred_dir.mkdir(parents=True, exist_ok=True)
|
|
131
|
-
for n in PD.frames(cfg):
|
|
132
|
-
p = PD.frame_path(game_pat, n)
|
|
133
|
-
if p: apply(lut, Image.open(p)).save(pred_dir / f'pred-{n}.png')
|
|
134
|
-
print('predicted after the LUT:'); PD.report(mock_dir, str(pred_dir / 'pred-{n}.png'), cfg)
|
|
135
|
-
rgba = np.concatenate([np.transpose(lut, (2, 1, 0, 3)).reshape(-1, 3), np.ones((N ** 3, 1))], 1) # → [b][g][r]
|
|
136
|
-
out_path.parent.mkdir(parents=True, exist_ok=True)
|
|
137
|
-
out_path.write_bytes((rgba * 255).round().clip(0, 255).astype(np.uint8).tobytes())
|
|
138
|
-
print(f'wrote {out_path} ({N}³ RGBA8, {N ** 3 * 4} bytes)')
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if __name__ == '__main__':
|
|
142
|
-
main()
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""palette-delta.py: the look loop's colour check (docs/look-loop.md, step 5). Any shard.
|
|
3
|
-
|
|
4
|
-
Samples the MEAN colour of the same regions in each mockup frame and its in-game capture and prints mockup vs game per
|
|
5
|
-
region with CIEDE2000 ΔE. It is information, not a pass bar: it shows which region is furthest from the target and
|
|
6
|
-
whether a round moved it.
|
|
7
|
-
|
|
8
|
-
python3 scripts/look-loop/palette-delta.py --shard <slug> <mockup dir> '<captures>/capture-{n}-*.jpg'
|
|
9
|
-
python3 scripts/look-loop/palette-delta.py --regions <shard repo>/art/look/regions.json <mockup dir> '<dir>/r2-capture-{n}-*.jpg'
|
|
10
|
-
|
|
11
|
-
--regions names a regions JSON; else --shard <slug> reads scripts/look-loop/regions/<slug>.json. Mockups are
|
|
12
|
-
<mockup dir>/mockup-<n>-*.jpg (targets.py's names), n = the frames the regions name (1..9 per zone; zones concatenate,
|
|
13
|
-
1-9, 10-18, ...). The capture pattern takes {n} and may hold one `*` (views.mjs names frames capture-<n>-<id>.jpg).
|
|
14
|
-
|
|
15
|
-
Regions are fixed rectangles in normalised image coordinates per frame, the same for the mockup and the capture;
|
|
16
|
-
inside each rectangle only the pixels that belong to the material count (a hue / saturation / value filter), so a
|
|
17
|
-
palm or a HUD panel crossing the rectangle does not pollute the sand's mean. A material's mean is over every rectangle
|
|
18
|
-
it has, in every frame. A shadow material is its rectangles' pixels darker than a share (`below`, e.g. 0.72) of the lit
|
|
19
|
-
material's median.
|
|
20
|
-
"""
|
|
21
|
-
import argparse
|
|
22
|
-
import json
|
|
23
|
-
import math
|
|
24
|
-
import sys
|
|
25
|
-
from pathlib import Path
|
|
26
|
-
|
|
27
|
-
import numpy as np
|
|
28
|
-
from PIL import Image
|
|
29
|
-
|
|
30
|
-
HERE = Path(__file__).resolve().parent
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def regions_path(shard=None, path=None):
|
|
34
|
-
"""`path` when given, else scripts/look-loop/regions/<shard>.json"""
|
|
35
|
-
if path: return Path(path)
|
|
36
|
-
if not shard: sys.exit('palette-delta: pass --regions <json> or --shard <slug>')
|
|
37
|
-
return HERE / 'regions' / f'{shard}.json'
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def load_config(shard=None, path=None):
|
|
41
|
-
"""a shard's regions / filters / fit weights"""
|
|
42
|
-
p = regions_path(shard, path)
|
|
43
|
-
if not p.exists():
|
|
44
|
-
sys.exit(f'palette-delta: no regions at {p}; write one for the loop cameras (docs/look-loop.md, step 5)')
|
|
45
|
-
cfg = json.loads(p.read_text())
|
|
46
|
-
return {'regions': {m: [(n, tuple(r)) for n, r in regs] for m, regs in cfg['regions'].items()},
|
|
47
|
-
'filters': cfg['filters'], 'weights': cfg.get('fitWeights', {}), 'greyAnchor': cfg.get('greyAnchor', 3.0)}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def arg_parser(desc):
|
|
51
|
-
ap = argparse.ArgumentParser(description=desc)
|
|
52
|
-
ap.add_argument('--shard', default=None, help='the shard slug: reads scripts/look-loop/regions/<slug>.json')
|
|
53
|
-
ap.add_argument('--regions', default=None, help='a regions JSON (overrides --shard)')
|
|
54
|
-
ap.add_argument('mock_dir', help='the mockup folder (mockup-<n>-*.jpg)')
|
|
55
|
-
ap.add_argument('game_pat', help='the captures, a path with {n} and at most one * (capture-{n}-*.jpg)')
|
|
56
|
-
return ap
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def hsv(px):
|
|
60
|
-
a = px / 255.0
|
|
61
|
-
mx, mn = a.max(1), a.min(1)
|
|
62
|
-
d = mx - mn
|
|
63
|
-
s = np.where(mx > 0, d / np.maximum(mx, 1e-6), 0)
|
|
64
|
-
r, g, b = a[:, 0], a[:, 1], a[:, 2]
|
|
65
|
-
h = np.zeros_like(mx)
|
|
66
|
-
m = d > 1e-6
|
|
67
|
-
rm = m & (mx == r); gm = m & (mx == g) & ~rm; bm = m & ~rm & ~gm
|
|
68
|
-
h[rm] = ((g - b)[rm] / d[rm]) % 6
|
|
69
|
-
h[gm] = (b - r)[gm] / d[gm] + 2
|
|
70
|
-
h[bm] = (r - g)[bm] / d[bm] + 4
|
|
71
|
-
return h * 60, s, mx
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
def pixels(img, rect):
|
|
75
|
-
w, h = img.size
|
|
76
|
-
x0, y0, x1, y1 = rect
|
|
77
|
-
return np.asarray(img.crop((int(x0 * w), int(y0 * h), int(x1 * w), int(y1 * h))).convert('RGB'), dtype=np.float64).reshape(-1, 3)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
def select(mat, px, cfg):
|
|
81
|
-
H, S, V = hsv(px)
|
|
82
|
-
lum = px @ np.array([0.299, 0.587, 0.114])
|
|
83
|
-
f = cfg['filters'][mat]
|
|
84
|
-
if isinstance(f, dict): # a shadow material: darker than a share of the lit material's median
|
|
85
|
-
lo, hi, smin, vmin, vmax = cfg['filters'][f['shadowOf']][:5]
|
|
86
|
-
lit = (H >= lo) & (H <= hi) & (S >= smin) & (V >= vmin)
|
|
87
|
-
if lit.sum() < 20: return px[:0]
|
|
88
|
-
med = np.median(lum[lit])
|
|
89
|
-
elo, ehi, esat = f['excludeHue']
|
|
90
|
-
excluded = (H >= elo) & (H <= ehi) & (S > esat)
|
|
91
|
-
return px[(lum < f['below'] * med) & (V > f['vmin']) & ~excluded]
|
|
92
|
-
lo, hi, smin, vmin, vmax = f[:5]
|
|
93
|
-
smax = f[5] if len(f) > 5 else 1.0 # an optional 6th: max saturation (a grey material, e.g. rock)
|
|
94
|
-
return px[(H >= lo) & (H <= hi) & (S >= smin) & (S <= smax) & (V >= vmin) & (V <= vmax)]
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
def srgb_to_lab(rgb):
|
|
98
|
-
c = np.array(rgb) / 255.0
|
|
99
|
-
c = np.where(c <= 0.04045, c / 12.92, ((c + 0.055) / 1.055) ** 2.4)
|
|
100
|
-
M = np.array([[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]])
|
|
101
|
-
x, y, z = M @ c / np.array([0.95047, 1.0, 1.08883])
|
|
102
|
-
f = lambda t: t ** (1 / 3) if t > 0.008856 else 7.787 * t + 16 / 116
|
|
103
|
-
fx, fy, fz = f(x), f(y), f(z)
|
|
104
|
-
return 116 * fy - 16, 500 * (fx - fy), 200 * (fy - fz)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
def ciede2000(l1, l2):
|
|
108
|
-
L1, a1, b1 = l1; L2, a2, b2 = l2
|
|
109
|
-
C1, C2 = math.hypot(a1, b1), math.hypot(a2, b2)
|
|
110
|
-
Cb = (C1 + C2) / 2
|
|
111
|
-
G = 0.5 * (1 - math.sqrt(Cb ** 7 / (Cb ** 7 + 25 ** 7)))
|
|
112
|
-
a1p, a2p = (1 + G) * a1, (1 + G) * a2
|
|
113
|
-
C1p, C2p = math.hypot(a1p, b1), math.hypot(a2p, b2)
|
|
114
|
-
h1p = math.degrees(math.atan2(b1, a1p)) % 360
|
|
115
|
-
h2p = math.degrees(math.atan2(b2, a2p)) % 360
|
|
116
|
-
dLp, dCp = L2 - L1, C2p - C1p
|
|
117
|
-
dh = h2p - h1p
|
|
118
|
-
if C1p * C2p == 0: dh = 0
|
|
119
|
-
elif dh > 180: dh -= 360
|
|
120
|
-
elif dh < -180: dh += 360
|
|
121
|
-
dHp = 2 * math.sqrt(C1p * C2p) * math.sin(math.radians(dh / 2))
|
|
122
|
-
Lbp, Cbp = (L1 + L2) / 2, (C1p + C2p) / 2
|
|
123
|
-
if C1p * C2p == 0: hbp = h1p + h2p
|
|
124
|
-
elif abs(h1p - h2p) <= 180: hbp = (h1p + h2p) / 2
|
|
125
|
-
else: hbp = (h1p + h2p + 360) / 2 if h1p + h2p < 360 else (h1p + h2p - 360) / 2
|
|
126
|
-
T = 1 - 0.17 * math.cos(math.radians(hbp - 30)) + 0.24 * math.cos(math.radians(2 * hbp)) + 0.32 * math.cos(math.radians(3 * hbp + 6)) - 0.2 * math.cos(math.radians(4 * hbp - 63))
|
|
127
|
-
dth = 30 * math.exp(-(((hbp - 275) / 25) ** 2))
|
|
128
|
-
Rc = 2 * math.sqrt(Cbp ** 7 / (Cbp ** 7 + 25 ** 7))
|
|
129
|
-
Sl = 1 + 0.015 * (Lbp - 50) ** 2 / math.sqrt(20 + (Lbp - 50) ** 2)
|
|
130
|
-
Sc, Sh = 1 + 0.045 * Cbp, 1 + 0.015 * Cbp * T
|
|
131
|
-
Rt = -math.sin(math.radians(2 * dth)) * Rc
|
|
132
|
-
return math.sqrt((dLp / Sl) ** 2 + (dCp / Sc) ** 2 + (dHp / Sh) ** 2 + Rt * (dCp / Sc) * (dHp / Sh))
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
def frame_path(pat, n):
|
|
136
|
-
"""the file a capture pattern names for frame n, or None. One `*` in the file name globs; two matches refuse"""
|
|
137
|
-
p = Path(pat.format(n=n))
|
|
138
|
-
if '*' not in p.name: return p if p.exists() else None
|
|
139
|
-
hits = sorted(p.parent.glob(p.name))
|
|
140
|
-
if len(hits) > 1: sys.exit(f'palette-delta: {len(hits)} files match {p}; make the pattern unique (a --tag prefix)')
|
|
141
|
-
return hits[0] if hits else None
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
def frames(cfg):
|
|
145
|
-
"""the frame numbers the regions use (one zone: 1..9; a three-zone loop: 1..27)"""
|
|
146
|
-
return sorted({n for regs in cfg['regions'].values() for n, _ in regs})
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
def report(mock_dir, game_pat, cfg):
|
|
150
|
-
mock_dir = Path(mock_dir)
|
|
151
|
-
mocks = {n: Image.open(next(mock_dir.glob(f'mockup-{n}-*.jpg'))) for n in frames(cfg)}
|
|
152
|
-
games = {n: Image.open(f) for n in frames(cfg) if (f := frame_path(game_pat, n))}
|
|
153
|
-
rows, worst = [], 0.0
|
|
154
|
-
for mat, regs in cfg['regions'].items():
|
|
155
|
-
acc = {'m': [], 'g': []}
|
|
156
|
-
for n, rect in regs:
|
|
157
|
-
if n not in games: continue
|
|
158
|
-
acc['m'].append(select(mat, pixels(mocks[n], rect), cfg))
|
|
159
|
-
acc['g'].append(select(mat, pixels(games[n], rect), cfg))
|
|
160
|
-
m = np.concatenate(acc['m']) if acc['m'] else np.zeros((0, 3))
|
|
161
|
-
g = np.concatenate(acc['g']) if acc['g'] else np.zeros((0, 3))
|
|
162
|
-
if len(m) < 20 or len(g) < 20:
|
|
163
|
-
rows.append((mat, None, None, None, len(m), len(g))); continue
|
|
164
|
-
mm, gm = m.mean(0), g.mean(0)
|
|
165
|
-
de = ciede2000(srgb_to_lab(mm), srgb_to_lab(gm))
|
|
166
|
-
worst = max(worst, de)
|
|
167
|
-
rows.append((mat, mm, gm, de, len(m), len(g)))
|
|
168
|
-
hexc = lambda c: '#%02x%02x%02x' % tuple(int(round(v)) for v in c)
|
|
169
|
-
print(f"{'region':14} {'mockup':8} {'game':8} {'ΔE00':>6} (pixels mock / game)")
|
|
170
|
-
for mat, mm, gm, de, nm, ng in rows:
|
|
171
|
-
if de is None: print(f'{mat:14} {"—":8} {"—":8} {"n/a":>6} ({nm} / {ng})'); continue
|
|
172
|
-
flag = '' if de < 10 else ' <-- over 10'
|
|
173
|
-
print(f'{mat:14} {hexc(mm):8} {hexc(gm):8} {de:6.1f} ({nm} / {ng}){flag}')
|
|
174
|
-
print(f'worst ΔE00 = {worst:.1f}')
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
def main(argv=None):
|
|
178
|
-
a = arg_parser('mockup vs capture colour per region (CIEDE2000)').parse_args(argv)
|
|
179
|
-
report(a.mock_dir, a.game_pat, load_config(a.shard, a.regions))
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if __name__ == '__main__':
|
|
183
|
-
main()
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"shard": "driftwood-isle",
|
|
3
|
-
"about": "The E43 loop's colour regions: the 9 spawn-cove cameras of art/driftwood-isle/round-4-remaster/README.md. regions: material -> [[frame, [x0, y0, x1, y1]]] in normalised image coordinates, the same for the mockup and the capture. filters: material -> [hue lo, hue hi (deg), min sat, min value, max value], or a shadow of another material: its lit pixels' median luma x below, value over vmin, excluding the excludeHue [lo, hi, min sat] band. fitWeights: fit-lut.py's per-material pair weight (default 1).",
|
|
4
|
-
"regions": {
|
|
5
|
-
"shallow water": [[5, [0.1, 0.62, 0.9, 0.95]], [6, [0.05, 0.62, 0.95, 0.95]], [7, [0.55, 0.35, 0.95, 0.95]], [9, [0.05, 0.12, 0.95, 0.3]]],
|
|
6
|
-
"deep water": [[7, [0.45, 0.0, 1.0, 0.07]], [8, [0.0, 0.0, 0.55, 0.07]], [9, [0.0, 0.0, 1.0, 0.07]]],
|
|
7
|
-
"sand": [[5, [0.05, 0.05, 0.95, 0.45]], [7, [0.1, 0.45, 0.5, 0.95]], [9, [0.1, 0.45, 0.9, 0.95]]],
|
|
8
|
-
"sand shadow": [[5, [0.05, 0.05, 0.95, 0.45]], [7, [0.1, 0.45, 0.5, 0.95]], [9, [0.1, 0.45, 0.9, 0.95]]],
|
|
9
|
-
"grass": [[6, [0.05, 0.12, 0.95, 0.38]]],
|
|
10
|
-
"foliage": [[7, [0.0, 0.45, 0.2, 0.95]], [9, [0.25, 0.55, 0.6, 0.95]]],
|
|
11
|
-
"sky zenith": [[2, [0.02, 0.12, 0.35, 0.2]], [3, [0.02, 0.12, 0.35, 0.2]]],
|
|
12
|
-
"sky horizon": [[2, [0.02, 0.4, 0.35, 0.46]], [3, [0.02, 0.4, 0.35, 0.46]]]
|
|
13
|
-
},
|
|
14
|
-
"filters": {
|
|
15
|
-
"shallow water": [160, 205, 0.25, 0.35, 1.0],
|
|
16
|
-
"deep water": [195, 245, 0.35, 0.15, 1.0],
|
|
17
|
-
"sand": [18, 55, 0.15, 0.5, 1.0],
|
|
18
|
-
"sand shadow": {"shadowOf": "sand", "below": 0.72, "vmin": 0.12, "excludeHue": [65, 160, 0.25]},
|
|
19
|
-
"grass": [65, 160, 0.3, 0.35, 1.0],
|
|
20
|
-
"foliage": [65, 160, 0.35, 0.12, 1.0],
|
|
21
|
-
"sky zenith": [190, 240, 0.3, 0.3, 1.0],
|
|
22
|
-
"sky horizon": [185, 235, 0.12, 0.4, 1.0]
|
|
23
|
-
},
|
|
24
|
-
"fitWeights": {"sand shadow": 0.6, "sky zenith": 0.5, "sky horizon": 0.5}
|
|
25
|
-
}
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"shard": "far-reach",
|
|
3
|
-
"about": "E374 Sky Reach loop 3 (P2), the look loop's colour regions for two hero scenes, iPhone portrait 390x844 phone tier. Frames: H1 the spawn (Sunrest north rim) 1 FP front, 2 left, 3 right, 4 back, 6 diag-front; H4 the storm crown 11 FP front, 14 back, 16 diag-front (art/far-reach/round-13-loop-3/targets/). regions: material -> [[frame, [x0, y0, x1, y1]]] normalised, the same for the target and the capture; the FP band is between the top HUD (~0.16) and the touch controls (~0.68). Frame 16 (H4 diag-front) is out of the storm and cloud-sea regions: its capture sat inside the storm discs (the god camera at +32 m), so its target painted a storm the game now thins out at camera height.",
|
|
4
|
-
"regions": {
|
|
5
|
-
"sky": [
|
|
6
|
-
[
|
|
7
|
-
1,
|
|
8
|
-
[
|
|
9
|
-
0.04,
|
|
10
|
-
0.17,
|
|
11
|
-
0.6,
|
|
12
|
-
0.36
|
|
13
|
-
]
|
|
14
|
-
],
|
|
15
|
-
[
|
|
16
|
-
2,
|
|
17
|
-
[
|
|
18
|
-
0.3,
|
|
19
|
-
0.17,
|
|
20
|
-
0.96,
|
|
21
|
-
0.36
|
|
22
|
-
]
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
3,
|
|
26
|
-
[
|
|
27
|
-
0.04,
|
|
28
|
-
0.17,
|
|
29
|
-
0.96,
|
|
30
|
-
0.32
|
|
31
|
-
]
|
|
32
|
-
],
|
|
33
|
-
[
|
|
34
|
-
4,
|
|
35
|
-
[
|
|
36
|
-
0.04,
|
|
37
|
-
0.17,
|
|
38
|
-
0.96,
|
|
39
|
-
0.32
|
|
40
|
-
]
|
|
41
|
-
],
|
|
42
|
-
[
|
|
43
|
-
14,
|
|
44
|
-
[
|
|
45
|
-
0.04,
|
|
46
|
-
0.17,
|
|
47
|
-
0.96,
|
|
48
|
-
0.32
|
|
49
|
-
]
|
|
50
|
-
]
|
|
51
|
-
],
|
|
52
|
-
"sun glow": [
|
|
53
|
-
[
|
|
54
|
-
1,
|
|
55
|
-
[
|
|
56
|
-
0.04,
|
|
57
|
-
0.38,
|
|
58
|
-
0.5,
|
|
59
|
-
0.5
|
|
60
|
-
]
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
6,
|
|
64
|
-
[
|
|
65
|
-
0.1,
|
|
66
|
-
0.05,
|
|
67
|
-
0.9,
|
|
68
|
-
0.2
|
|
69
|
-
]
|
|
70
|
-
],
|
|
71
|
-
[
|
|
72
|
-
16,
|
|
73
|
-
[
|
|
74
|
-
0.1,
|
|
75
|
-
0.4,
|
|
76
|
-
0.9,
|
|
77
|
-
0.55
|
|
78
|
-
]
|
|
79
|
-
]
|
|
80
|
-
],
|
|
81
|
-
"grass": [
|
|
82
|
-
[
|
|
83
|
-
1,
|
|
84
|
-
[
|
|
85
|
-
0.02,
|
|
86
|
-
0.56,
|
|
87
|
-
0.55,
|
|
88
|
-
0.67
|
|
89
|
-
]
|
|
90
|
-
],
|
|
91
|
-
[
|
|
92
|
-
2,
|
|
93
|
-
[
|
|
94
|
-
0.02,
|
|
95
|
-
0.5,
|
|
96
|
-
0.55,
|
|
97
|
-
0.67
|
|
98
|
-
]
|
|
99
|
-
],
|
|
100
|
-
[
|
|
101
|
-
3,
|
|
102
|
-
[
|
|
103
|
-
0.02,
|
|
104
|
-
0.5,
|
|
105
|
-
0.55,
|
|
106
|
-
0.67
|
|
107
|
-
]
|
|
108
|
-
],
|
|
109
|
-
[
|
|
110
|
-
4,
|
|
111
|
-
[
|
|
112
|
-
0.02,
|
|
113
|
-
0.5,
|
|
114
|
-
0.55,
|
|
115
|
-
0.67
|
|
116
|
-
]
|
|
117
|
-
],
|
|
118
|
-
[
|
|
119
|
-
11,
|
|
120
|
-
[
|
|
121
|
-
0.02,
|
|
122
|
-
0.6,
|
|
123
|
-
0.6,
|
|
124
|
-
0.67
|
|
125
|
-
]
|
|
126
|
-
],
|
|
127
|
-
[
|
|
128
|
-
14,
|
|
129
|
-
[
|
|
130
|
-
0.02,
|
|
131
|
-
0.58,
|
|
132
|
-
0.55,
|
|
133
|
-
0.67
|
|
134
|
-
]
|
|
135
|
-
]
|
|
136
|
-
],
|
|
137
|
-
"isle tops (aerial)": [
|
|
138
|
-
[
|
|
139
|
-
6,
|
|
140
|
-
[
|
|
141
|
-
0.15,
|
|
142
|
-
0.6,
|
|
143
|
-
0.85,
|
|
144
|
-
0.85
|
|
145
|
-
]
|
|
146
|
-
],
|
|
147
|
-
[
|
|
148
|
-
16,
|
|
149
|
-
[
|
|
150
|
-
0.2,
|
|
151
|
-
0.62,
|
|
152
|
-
0.8,
|
|
153
|
-
0.75
|
|
154
|
-
]
|
|
155
|
-
]
|
|
156
|
-
],
|
|
157
|
-
"cloud sea": [
|
|
158
|
-
[
|
|
159
|
-
6,
|
|
160
|
-
[
|
|
161
|
-
0.0,
|
|
162
|
-
0.22,
|
|
163
|
-
1.0,
|
|
164
|
-
0.42
|
|
165
|
-
]
|
|
166
|
-
]
|
|
167
|
-
],
|
|
168
|
-
"storm": [
|
|
169
|
-
[
|
|
170
|
-
11,
|
|
171
|
-
[
|
|
172
|
-
0.04,
|
|
173
|
-
0.17,
|
|
174
|
-
0.96,
|
|
175
|
-
0.42
|
|
176
|
-
]
|
|
177
|
-
]
|
|
178
|
-
]
|
|
179
|
-
},
|
|
180
|
-
"filters": {
|
|
181
|
-
"sky": [
|
|
182
|
-
0,
|
|
183
|
-
360,
|
|
184
|
-
0.0,
|
|
185
|
-
0.45,
|
|
186
|
-
1.0
|
|
187
|
-
],
|
|
188
|
-
"sun glow": [
|
|
189
|
-
0,
|
|
190
|
-
70,
|
|
191
|
-
0.05,
|
|
192
|
-
0.55,
|
|
193
|
-
1.0
|
|
194
|
-
],
|
|
195
|
-
"grass": [
|
|
196
|
-
35,
|
|
197
|
-
110,
|
|
198
|
-
0.2,
|
|
199
|
-
0.18,
|
|
200
|
-
1.0
|
|
201
|
-
],
|
|
202
|
-
"isle tops (aerial)": [
|
|
203
|
-
35,
|
|
204
|
-
110,
|
|
205
|
-
0.2,
|
|
206
|
-
0.18,
|
|
207
|
-
1.0
|
|
208
|
-
],
|
|
209
|
-
"cloud sea": [
|
|
210
|
-
0,
|
|
211
|
-
360,
|
|
212
|
-
0.0,
|
|
213
|
-
0.55,
|
|
214
|
-
1.0,
|
|
215
|
-
0.5
|
|
216
|
-
],
|
|
217
|
-
"storm": [
|
|
218
|
-
0,
|
|
219
|
-
360,
|
|
220
|
-
0.0,
|
|
221
|
-
0.0,
|
|
222
|
-
1.0
|
|
223
|
-
]
|
|
224
|
-
}
|
|
225
|
-
}
|