A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Units: Tal's 1948 soldier rigged to C07's skeleton, so the Yiftach and Negev third figure walks and fires (#2401)
Eyal Golanf292788fe3bd
diff --git a/ASSETS.yaml b/ASSETS.yamlindex c39003fb3..494affc6a 100644--- a/ASSETS.yaml+++ b/ASSETS.yaml@@ -3357,6 +3357,25 @@ rules:credit: "Tal Heuberger · CC BY-NC-ND 4.0"note: "Public derivative/export distribution authorized 31 October 2026; own paid generation account confirmed. In the game: one still frame (37 of 97) of its byte-identical Unity copy is held by an attacking token's C06 figures (UnitFigurePointFire; owner, 2 November 2026, #2084: \"Yes, for firing units (Recommended)\"); every other figure keeps its existing fire take, and C06 keeps it when the pose source does not arrive. This folder's README is Tal's as delivered on 31 October 2026 and describes the files before that. Cheek/sight/contact limitations remain. Provider/input restrictions remain. Landed in the project's own PR, crediting Tal Heuberger, under the owner's ruling of 2 November 2026 (\"Yes, #1177 covers them\") and the #1177 ruling of 20 and 22 October 2026 (CC BY-NC-ND 4.0 for Tal's new models, confirmed by Tal as the owner reported)."+ # The 1948 soldier's rigged copy (#2384): Tal Heuberger's #336 soldier skinned to the skeleton of their C07 with its takes,+ # by tools/rig_soldier_1948.py; the colour map is Tal's byte for byte. Tal's delivered files in figure-soldier-1948-v1/ are+ # unchanged (their rows above).+ - glob: "unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.fbx"+ licence: CC-BY-NC-ND-4.0+ ai_generated: true+ source: "Rigged copy of Tal Heuberger's figure-soldier-1948-v1 (#336, a static mesh): Tal's mesh (4,187 vertices, 8,054 triangles, no decimation) re-posed into the rest pose of their figure-c07-veteran-fighter-v2 (#507) and skinned to C07's 67-bone skeleton with bone-heat weights, with C07's idle, walk and fire takes, every frame keyed, by tools/rig_soldier_1948.py (Blender 5.2.2). Input SHA-256 in this folder's provenance.json (tools/rig_soldier_1948.py --verify). SHA-256 39545588027f0eb77462a955228dc5d813ff5ec4ed1a5d276d954d0212e9269d."+ status: verified+ artist: "Tal Heuberger"+ credit: "Tal Heuberger · CC BY-NC-ND 4.0"+ note: "Issue #2384 (owner, 3 November 2026: \"Ship C07 now, rig Tal's later\"; the owner confirmed Tal's OK for adapted versions the same day, as the issue records): the Yiftach and Negev tokens' third figure walks, idles and fires with this copy (UnitFigures, UnitWeapons). An adapted version of Tal's model under their permission as the owner reported it; no change to the delivered files' rows or to any other model's licence."+ - glob: "unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged_basecolor.jpg"+ licence: CC-BY-NC-ND-4.0+ ai_generated: true+ source: "Byte-for-byte copy of Tal Heuberger's figure-soldier-1948-v1_basecolor.jpg (#336; its row above), 2048x2048, beside the rigged copy so its bundle carries its own map. SHA-256 cb30823ff65a23c418986741e4ef88f680d6dd594909d4dd6b68d1ca412d6945."+ status: verified+ artist: "Tal Heuberger"+ credit: "Tal Heuberger · CC BY-NC-ND 4.0"+ note: "Issue #2384 (owner, 3 November 2026: \"Ship C07 now, rig Tal's later\"): the same map Tal delivered, beside the rigged copy, under the same terms as its row above."# Tal Heuberger's #2083 weapons and #2084 C06 point-fire in the game's Collection: lossless FBX compatibility exports, the# delivered colour maps and the byte-for-byte point-fire export.- glob: "unity/Assets/Art/Collection/weapon-k98k-v1/weapon-k98k-v1.fbx"diff --git a/LICENSING.md b/LICENSING.mdindex 64a0801aa..b55823598 100644--- a/LICENSING.md+++ b/LICENSING.md@@ -29,6 +29,7 @@ Different parts of this repository are under different licences. Where a file is| Tal Heuberger's recovered papyrus and tamarisk (from #2082) | `asset-sources/recovered-vegetation-20261031/**/*.obj`, `asset-sources/recovered-vegetation-20261031/**/*.jpg` (six files only; hashes in its `provenance.json`) | [CC BY-NC-ND 4.0](LICENSES/CC-BY-NC-ND-4.0.txt), credit "Tal Heuberger", https://creativecommons.org/licenses/by-nc-nd/4.0/, under the owner's ruling of 2 November 2026 that #1177 covers them ("Yes, #1177 covers them") and the #1177 ruling of 20 and 22 October 2026 ("CC BY-NC-ND 4.0 for Tal's new models", with Tal's confirmation as the owner reported); Tal's scoped permission of 31 October 2026. The game's copies are in the hex-tile props row; provider/input restrictions remain. Per-file records in `ASSETS.yaml` || Tal Heuberger's prepared K98k, MG34 and Sten (from #2083) | `asset-sources/prepared-weapons-20261031/**/*.glb`, `asset-sources/prepared-weapons-20261031/**/*.jpg` (six exact files in its `provenance.json`); and in the game, only `unity/Assets/Art/Collection/weapon-k98k-v1/` and `weapon-sten-v1/` `*.fbx` (documented full-geometry compatibility exports, `tools/prepared_weapons.py`) and `*_basecolor.jpg` (byte-for-byte copies of the delivered maps). Materials, prefabs and the folders' `provenance.json` stay under their path rows | [CC BY-NC-ND 4.0](LICENSES/CC-BY-NC-ND-4.0.txt), credit "Tal Heuberger", https://creativecommons.org/licenses/by-nc-nd/4.0/, under the owner's ruling of 2 November 2026 that #1177 covers them ("Yes, #1177 covers them") and the #1177 ruling of 20 and 22 October 2026 ("CC BY-NC-ND 4.0 for Tal's new models", with Tal's confirmation as the owner reported); Tal's scoped permission of 31 October 2026. The K98k and the Sten are held by the Israeli soldier figures (owner, 2 November 2026, #2083: "Yes, on the soldier figures (Recommended)"); the MG34 stays a stored source. Period and army use follow the sourced rows in `UnitWeapons` (agent-read). Per-file records in `ASSETS.yaml` || Tal Heuberger's C06 point-fire reference derivative (from #2084) | `asset-sources/c06-point-fire-reference-20261031/*.fbx`, `*.mp4`, `*.png` only (three exact files in its `provenance.json`); and in the game, its FBX byte for byte at `unity/Assets/Art/Collection/c06-point-fire-v1/C06-POINT-FIRE-PROVISIONAL-PUBLIC.fbx` (the pose source prefab beside it stays under its path row) | [CC BY-NC-ND 4.0](LICENSES/CC-BY-NC-ND-4.0.txt), credit "Tal Heuberger", https://creativecommons.org/licenses/by-nc-nd/4.0/, under the owner's ruling of 2 November 2026 that #1177 covers them ("Yes, #1177 covers them") and the #1177 ruling of 20 and 22 October 2026 ("CC BY-NC-ND 4.0 for Tal's new models", with Tal's confirmation as the owner reported); Tal's scoped permission of 31 October 2026. One still frame is held by an attacking token's C06 figures (owner, 2 November 2026, #2084: "Yes, for firing units (Recommended)"); Tal's provisional labels and known limits stand. Its reports, provenance and README are under the docs/JSON row. Per-file records in `ASSETS.yaml` |+| Tal Heuberger's 1948 soldier, rigged (#2384) | `unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/` `*.fbx` (Tal's #336 soldier, `figure-soldier-1948-v1`, skinned to the skeleton of their C07 with its idle, walk and fire takes by `tools/rig_soldier_1948.py`; the delivered files are unchanged) and `*_basecolor.jpg` (Tal's map byte for byte). The material, prefab, controller, import metadata and `provenance.json` beside them stay under the code row | [CC BY-NC-ND 4.0](LICENSES/CC-BY-NC-ND-4.0.txt), credit "Tal Heuberger", https://creativecommons.org/licenses/by-nc-nd/4.0/, as the original-model row above; an adapted version under Tal's permission as the owner reported it (#2384, 3 November 2026: the owner confirmed Tal's OK for adapted versions). Per-file records in `ASSETS.yaml` || Fonts | `unity/Assets/UI/Fonts/` | EB Garamond, [SIL Open Font License 1.1](unity/Assets/UI/Fonts/OFL.txt); Frank Ruhl Libre (`FrankRuhlLibre/`), [SIL Open Font License 1.1](unity/Assets/UI/Fonts/FrankRuhlLibre/OFL.txt) || Terrain heightmap | `unity/Assets/StreamingAssets/map/heightmap.*`, `content/map/hexes.json` (elevations) | Derived from Copernicus GLO-30 under the Copernicus DEM licence. Required notice: "produced using Copernicus WorldDEM-30 (c) DLR e.V. 2010-2014 and (c) Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved" || Derived map bakes | `unity/Assets/Resources/Map/BiomeColours.bytes` (biome colours, #529), `unity/Assets/Resources/Routes/RouteRibbons.bytes` (route ribbons, #436), `unity/Assets/Textures/Map/landuse.png` (land-use texture, `tools/land_bake.py`, #33), `unity/Assets/Resources/Map/MinimapRelief.png` (the minimap's painted relief, `tools/minimap_bake.py`, #398) | Made by the bakes from the map content (`content/map/`, CC BY-SA 4.0) and the Copernicus-derived heightmap. The hexes' biomes come from the Copernicus DEM, CHELSA V2.1 and the IMS station normals. [CC BY-SA 4.0](LICENSES/CC-BY-SA-4.0.txt), the most restrictive input, by the owner's decision D13 (`docs/oss/DECISIONS.md`); per-file records in `ASSETS.yaml` |diff --git a/changelog.d/rig-tal-soldier.md b/changelog.d/rig-tal-soldier.mdnew file mode 100644index 000000000..f1f471617--- /dev/null+++ b/changelog.d/rig-tal-soldier.md@@ -0,0 +1,4 @@+### Changed+- The Yiftach and Negev tokens' third figure, Tal Heuberger's 1948 soldier, now walks, stands and fires with the others+ (#2384): a rigged copy of the soldier on the skeleton C06 and C07 share, playing C07's idle, walk and fire takes and+ holding the K98k. Tal's delivered file is unchanged.diff --git a/docs/ai-disclosure.md b/docs/ai-disclosure.mdindex 9c94632e6..ca3b4ce98 100644--- a/docs/ai-disclosure.md+++ b/docs/ai-disclosure.md@@ -57,6 +57,7 @@ This is not a licence clearance or a completed store content survey. owner-verif| unity/Assets/Art/Collection/figure-nubian-ibex-1948-v1/figure-nubian-ibex-1948-v1_basecolor.jpg | ASSETS.yaml | Tal Heuberger original offered in PR #507 at 3ef0a7a5a36887aee7a24fd11ddf722507695f3c, unity/Assets/Art/Settlements/Prototype/Models/figure-nubian-ibex-1948-v1/figure-nubian-ibex-1948-v1_basecolor.jpg. Raw and shipped SHA-256 in docs/original-models.json. Copied source byte for byte, including original geometry/clips or JPEG bytes. | verified || unity/Assets/Art/Collection/figure-pioneer-farmer-v1-tpose/figure-pioneer-farmer-v1-tpose_basecolor.jpg | ASSETS.yaml | Tal Heuberger original offered in PR #336 at 1a5482a5864e812c1f5afdf0b31464ac92cbc7fa, unity/Assets/Art/CommandModels/Models/figure-pioneer-farmer-v1-tpose/figure-pioneer-farmer-v1-tpose_basecolor.jpg. Raw and shipped SHA-256 in docs/original-models.json. Copied source byte for byte, including original geometry/clips or JPEG bytes. | verified || unity/Assets/Art/Collection/figure-sheep-idle-1948-v1/figure-sheep-idle-1948-v1_basecolor.jpg | ASSETS.yaml | Tal Heuberger original offered in PR #507 at 3ef0a7a5a36887aee7a24fd11ddf722507695f3c, unity/Assets/Art/Settlements/Prototype/Models/figure-sheep-idle-1948-v1/figure-sheep-idle-1948-v1_basecolor.jpg. Raw and shipped SHA-256 in docs/original-models.json. Copied source byte for byte, including original geometry/clips or JPEG bytes. | verified |+| unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged_basecolor.jpg | ASSETS.yaml | Byte-for-byte copy of Tal Heuberger's figure-soldier-1948-v1_basecolor.jpg (#336; its row above), 2048x2048, beside the rigged copy so its bundle carries its own map. SHA-256 cb30823ff65a23c418986741e4ef88f680d6dd594909d4dd6b68d1ca412d6945. | verified || unity/Assets/Art/Collection/figure-soldier-1948-v1/figure-soldier-1948-v1_basecolor.jpg | ASSETS.yaml | Tal Heuberger original offered in PR #336 at 1a5482a5864e812c1f5afdf0b31464ac92cbc7fa, unity/Assets/Art/CommandModels/Models/figure-soldier-1948-v1/figure-soldier-1948-v1_basecolor.jpg. Raw and shipped SHA-256 in docs/original-models.json. Copied source byte for byte, including original geometry/clips or JPEG bytes. | verified || unity/Assets/Art/Collection/figure-striped-hyena-1948-v1/figure-striped-hyena-1948-v1_basecolor.jpg | ASSETS.yaml | Tal Heuberger original offered in PR #507 at 3ef0a7a5a36887aee7a24fd11ddf722507695f3c, unity/Assets/Art/Settlements/Prototype/Models/figure-striped-hyena-1948-v1/figure-striped-hyena-1948-v1_basecolor.jpg. Raw and shipped SHA-256 in docs/original-models.json. Copied source byte for byte, including original geometry/clips or JPEG bytes. | verified || unity/Assets/Art/Collection/figure-syrian-infantry-1948-v1/*_basecolor.jpg | ASSETS.yaml | Tripo Studio Smart Mesh P2.0, generated 22 October 2026 by Tal Heuberger. Exact provider GLB and embedded 4096px JPEG are retained byte-identical in asset-sources/generated-1948/<id>/. Unity FBX is a documented full-geometry compatibility export, not a provider FBX. Source rigged GLBs contain zero animation clips; both existing locally retargeted idle/walk actions are exported at every frame with no simplification. No decimated copy, texture resize, Crunch or Unity mesh/animation compression. Per-character provenance records source and export hashes. | verified |@@ -292,6 +293,7 @@ This is not a licence clearance or a completed store content survey. owner-verif| unity/Assets/Art/Collection/figure-sheep-idle-1948-v1/figure-sheep-idle-1948-v1-far.fbx | ASSETS.yaml | Historical slim-derivative record (retained files only; current full-original provenance is docs/original-models.json): Tripo Studio (tripo3d.ai), paid Max plan, made 10-13 October 2026 from concept images generated in the same studio, by Tal Heuberger (PR #507 at 3ef0a7a5a36887aee7a24fd11ddf722507695f3c): the 31 non-building models of The 1948 Collection (12 people, 9 road and rail vehicles, 4 ships and aircraft, 6 animals), and its nine whole-town models (issue #663: tel-aviv-white-city-v1, jerusalem-stone-city-v1, haifa-port-city-v1, moshava-town-v1, nahalal-moshav-v1, kibbutz-compound-v2, stone-village-v1, maabara-camp-v1, shikun-housing-v1; byte-identical to the same files in #336). Slimmed for the repository by tools/slim_collection.py (Blender 5.2.2, issue #664): a far mesh of at most 1,500 triangles (4,500 for vehicles, ships, aircraft and whole towns) and a near mesh of at most 8,000 per model, the near mesh keeping its rig and only the idle clip on the 13 models that have one, every other clip dropped (C05, which has no idle clip, has both static meshes posed at the first frame of his walk instead of his T-pose rest, issue #665); colour maps 1024 px resized to 512 px. The masters, #507's full-detail FBX files and the per-model records (prompts, task ids, credits) were kept outside the repository at the time of the historical import; current originals and their raw/shipped hashes are now recorded in docs/original-models.json. | verified || unity/Assets/Art/Collection/figure-sheep-idle-1948-v1/figure-sheep-idle-1948-v1-near.fbx | ASSETS.yaml | Historical slim-derivative record (retained files only; current full-original provenance is docs/original-models.json): Tripo Studio (tripo3d.ai), paid Max plan, made 10-13 October 2026 from concept images generated in the same studio, by Tal Heuberger (PR #507 at 3ef0a7a5a36887aee7a24fd11ddf722507695f3c): the 31 non-building models of The 1948 Collection (12 people, 9 road and rail vehicles, 4 ships and aircraft, 6 animals), and its nine whole-town models (issue #663: tel-aviv-white-city-v1, jerusalem-stone-city-v1, haifa-port-city-v1, moshava-town-v1, nahalal-moshav-v1, kibbutz-compound-v2, stone-village-v1, maabara-camp-v1, shikun-housing-v1; byte-identical to the same files in #336). Slimmed for the repository by tools/slim_collection.py (Blender 5.2.2, issue #664): a far mesh of at most 1,500 triangles (4,500 for vehicles, ships, aircraft and whole towns) and a near mesh of at most 8,000 per model, the near mesh keeping its rig and only the idle clip on the 13 models that have one, every other clip dropped (C05, which has no idle clip, has both static meshes posed at the first frame of his walk instead of his T-pose rest, issue #665); colour maps 1024 px resized to 512 px. The masters, #507's full-detail FBX files and the per-model records (prompts, task ids, credits) were kept outside the repository at the time of the historical import; current originals and their raw/shipped hashes are now recorded in docs/original-models.json. | verified || unity/Assets/Art/Collection/figure-sheep-idle-1948-v1/figure-sheep-idle-1948-v1.fbx | ASSETS.yaml | Tal Heuberger original offered in PR #507 at 3ef0a7a5a36887aee7a24fd11ddf722507695f3c, unity/Assets/Art/Settlements/Prototype/Models/figure-sheep-idle-1948-v1/figure-sheep-idle-1948-v1.fbx. Raw and shipped SHA-256 in docs/original-models.json. Only same-length author-path text blanking, per #1273 owner decisions1-2; geometry, clips and all other bytes unchanged. | verified |+| unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.fbx | ASSETS.yaml | Rigged copy of Tal Heuberger's figure-soldier-1948-v1 (#336, a static mesh): Tal's mesh (4,187 vertices, 8,054 triangles, no decimation) re-posed into the rest pose of their figure-c07-veteran-fighter-v2 (#507) and skinned to C07's 67-bone skeleton with bone-heat weights, with C07's idle, walk and fire takes, every frame keyed, by tools/rig_soldier_1948.py (Blender 5.2.2). Input SHA-256 in this folder's provenance.json (tools/rig_soldier_1948.py --verify). SHA-256 39545588027f0eb77462a955228dc5d813ff5ec4ed1a5d276d954d0212e9269d. | verified || unity/Assets/Art/Collection/figure-soldier-1948-v1/figure-soldier-1948-v1-far.fbx | ASSETS.yaml | Historical slim-derivative record (retained files only; current full-original provenance is docs/original-models.json): Tripo Studio (tripo3d.ai), Smart Mesh P2.0, paid plan, made 11 October 2026 from an AI-generated concept image (not in the repository), by Tal Heuberger; offered only in PR #336 at 1a5482a5864e812c1f5afdf0b31464ac92cbc7fa, whose docs/command-models.json records the generator, date and plan. One of the eight figures of issue #708. Slimmed for the repository by tools/slim_collection.py (Blender 5.2.2) with the settings of the 1948 Collection's people: a far mesh of at most 1,500 triangles and a near mesh of at most 8,000, both static, as #336 ships this figure with no rig; colour map 2048 px resized to 512 px. #336's full-detail FBX files were kept outside the repository at the time of the historical import; current originals and their raw/shipped hashes are now recorded in docs/original-models.json. Imported, not yet placed (#665). | verified || unity/Assets/Art/Collection/figure-soldier-1948-v1/figure-soldier-1948-v1-near.fbx | ASSETS.yaml | Historical slim-derivative record (retained files only; current full-original provenance is docs/original-models.json): Tripo Studio (tripo3d.ai), Smart Mesh P2.0, paid plan, made 11 October 2026 from an AI-generated concept image (not in the repository), by Tal Heuberger; offered only in PR #336 at 1a5482a5864e812c1f5afdf0b31464ac92cbc7fa, whose docs/command-models.json records the generator, date and plan. One of the eight figures of issue #708. Slimmed for the repository by tools/slim_collection.py (Blender 5.2.2) with the settings of the 1948 Collection's people: a far mesh of at most 1,500 triangles and a near mesh of at most 8,000, both static, as #336 ships this figure with no rig; colour map 2048 px resized to 512 px. #336's full-detail FBX files were kept outside the repository at the time of the historical import; current originals and their raw/shipped hashes are now recorded in docs/original-models.json. Imported, not yet placed (#665). | verified || unity/Assets/Art/Collection/figure-soldier-1948-v1/figure-soldier-1948-v1.fbx | ASSETS.yaml | Tal Heuberger original offered in PR #336 at 1a5482a5864e812c1f5afdf0b31464ac92cbc7fa, unity/Assets/Art/CommandModels/Models/figure-soldier-1948-v1/figure-soldier-1948-v1.fbx. Raw and shipped SHA-256 in docs/original-models.json. Copied source byte for byte, including original geometry/clips or JPEG bytes. | verified |diff --git a/docs/units.md b/docs/units.mdindex b530c20b7..595d4d25c 100644--- a/docs/units.md+++ b/docs/units.md@@ -266,7 +266,7 @@ own root rotation kept (the FBX axis turn, -90 degrees about X), so the camera's| C06 young recruit | an Israeli rifleman in the Mk II steel helmet (every token's second figure) | #507's pairing | always || C07 veteran fighter | an Israeli rifleman in the knitted stocking cap: the Negev Brigade's first, the showcase's third | the Negev headgear photographs (Sources) | always || C05 pioneer veteran | the third figure of every Israeli brigade with the uniform default, except Harel and Yiftach | a presentation choice: the default's third figure is not sourced | always |-| #336's 1948 soldier | the third figure of Yiftach and Negev, the Palmach brigades other than Harel: a rifleman in khaki in the Palmach's knitted stocking cap, so Negev's token shows C07, C06 and him and keeps its sourced caps | owner, 21 October 2026 (#708, through the coordinator): "a third figure on some brigade unit tokens, next to C06 and C07"; the rows' numbers (11th and 12th Brigade (Palmach)) | always |+| #336's 1948 soldier | the third figure of Yiftach and Negev, the Palmach brigades other than Harel: a rifleman in khaki in the Palmach's knitted stocking cap, so Negev's token shows C07, C06 and him and keeps its sourced caps. Drawn as his rigged copy, `figure-soldier-1948-v1-rigged` (#2384): Tal's mesh on the skeleton C06 and C07 share, with C07's idle, walk and fire takes (`tools/rig_soldier_1948.py`), so he walks and fires with the others; Tal's delivered file is unchanged and drawn nowhere | owner, 21 October 2026 (#708, through the coordinator): "a third figure on some brigade unit tokens, next to C06 and C07"; the rows' numbers (11th and 12th Brigade (Palmach)) | always || C12F Palmach scout | Harel's third figure, at Sha'ar HaGai on the convoy road | Harel's row (a Palmach brigade escorting the convoys, Izkor); en.wiki Netiva Ben-Yehuda (a Palmach woman's duties included "escorting convoys") | always || C08 Arab Legion | the Arab Legion's three figures | the row; owner, #756 (Tal Heuberger's models approved) | the row's windows || C09 irregular | the Arab Liberation Army's first two figures | en.wiki Arab Liberation Army: "an irregular army" of volunteers | the row's windows |@@ -286,8 +286,8 @@ own root rotation kept (the FBX axis turn, -90 degrees about X), so the camera's45 km), each figure whose model has an idle clip (`CollectionCatalog.Animated`) shows its skinned near model playing theclip, as tall as its far model and under the same holder (`UnitFigureDetail`). The near models are asked for only once acamera first comes close; until one arrives, and for good if it is missing, the far mesh stays. C05 has no idle clip- (walk and run only) and keeps his still far model (owner, 18 October 2026, #665: "Keep its still model"); #336's soldier- has no rig and keeps his still far model too. The vehicles stay far.+ (walk and run only) and keeps his still far model (owner, 18 October 2026, #665: "Keep its still model"); #336's soldier,+ drawn as his rigged copy (#2384), plays C07's idle. The vehicles stay far.- **Fail open:** an Israeli figure keeps its code-built mesh until its model arrives, and for good if the bundle ismissing or damaged; a vehicle and an Arab force's token are not drawn until their model arrives.- Tests: `UnitFiguresTests` (every one of the nine is placed on some day of the war; the table; the swap; arms down;@@ -301,7 +301,7 @@ the unit-token soldier figures (sourced per army and date), measured for load"),| Weapon | Army | From | Figures | Sources (agent-read; a person's check is pending) ||---|---|---|---|---|-| K98k (Tal's `weapon-k98k-v1`) | Israel (Haganah, IDF) | 2 April 1948: the Nora's 4,500 Czechoslovak P-18 (K98k) rifles at Tel Aviv; the first air shipment landed the night of 31 March to 1 April | C04, C05, C06, C07 | en.wiki Arms shipments from Czechoslovakia to Israel 1947–1949; Palyam, "Nora" (Ben-Tzur); en.wiki Karabiner 98k |+| K98k (Tal's `weapon-k98k-v1`) | Israel (Haganah, IDF) | 2 April 1948: the Nora's 4,500 Czechoslovak P-18 (K98k) rifles at Tel Aviv; the first air shipment landed the night of 31 March to 1 April | C04, C05, C06, C07, the 1948 soldier's rigged copy (#2384) | en.wiki Arms shipments from Czechoslovakia to Israel 1947–1949; Palyam, "Nora" (Ben-Tzur); en.wiki Karabiner 98k || Sten (Tal's `weapon-sten-v1`) | Israel (the Palmach) | in use 1945–1948 | C12F, the Palmach scout (Harel's third figure) | en.wiki Ayalon Institute ("the personal weapon of the Palmach"); en.wiki Sten ("clandestinely manufactured in Tel Aviv and on various kibbutzim in 1945–1948") |Every token's first day is 15 May 1948 or later (`units_1948.yaml`), after both rows' dates, so no figure is dated by@@ -310,7 +310,8 @@ hand (`UnitWeaponsTests` keeps that true). The rows live in `UnitWeapons.Rows`.- **[GAP] The Arab forces.** No source found places a K98k, an MG34 or a Sten with the Arab Legion, Egypt, Iraq, Syria,Lebanon, the ALA or local irregulars in 1948 (Syria's Czech rifles for the ALA sank in the Lino at Bari and were latercaptured). Their armies' British Lee-Enfield and Bren are not among Tal's models, so their figures stay as they are.-- **[GAP] #336's 1948 soldier** (Yiftach's and Negev's third figure) has no rig and no hand bone; he stays as he is.+- **#336's 1948 soldier** (Yiftach's and Negev's third figure) is drawn as his rigged copy (#2384), which has C07's 67 bones+ and hand bone and holds the K98k like the others; Tal's delivered file, with no rig, is drawn nowhere.- **The MG34** stays a stored source. The "200 MG34s" is not one fact (`research_notes/Map/mg34-1948-2288.md`, #2310):for the January 1948 contract, one source names the MG34 for its 200 machine guns (Wikipedia, a sentence with no footnoteof its own), Ben-Gurion's diary of 1 February 1948 gives 200 with no type, and a Russian magazine gives 20. The *Nora*'sdiff --git a/scripts/oss/tests/test_licensing.py b/scripts/oss/tests/test_licensing.pyindex 9a935e32e..aa805feff 100644--- a/scripts/oss/tests/test_licensing.py+++ b/scripts/oss/tests/test_licensing.py@@ -154,13 +154,17 @@ def test_tal_original_licensing_matches_manifest_exactly():# the C06 point-fire export byte for byte.weapons = {f"unity/Assets/Art/Collection/weapon-{w}-v1/weapon-{w}-v1{x}" for w in ("k98k", "sten") for x in (".fbx", "_basecolor.jpg")} | {"unity/Assets/Art/Collection/c06-point-fire-v1/C06-POINT-FIRE-PROVISIONAL-PUBLIC.fbx"}- added = sources | towns | plants | weapons- assert len(sources) == 24 and len(towns) == 8 and len(plants) == 6 and len(weapons) == 5+ # #2384 in the game (owner, 3 November 2026): the 1948 soldier's rigged copy, Tal's #336 mesh on their C07's skeleton, and+ # its colour map, Tal's byte for byte.+ rigged = {f"unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged{x}" for x in (".fbx", "_basecolor.jpg")}+ added = sources | towns | plants | weapons | rigged+ assert len(sources) == 24 and len(towns) == 8 and len(plants) == 6 and len(weapons) == 5 and len(rigged) == 2added_rows = [r for r in independent if r["glob"] in added]- assert {r["glob"] for r in added_rows} == added and len(added_rows) == 43+ assert {r["glob"] for r in added_rows} == added and len(added_rows) == 45assert all("Hula + Arava, map and boards" in r["note"] for r in added_rows if r["glob"] in plants)assert all(r["artist"] == "Tal Heuberger" and r["ai_generated"] is True for r in added_rows)- assert all("#1177" in r["note"] and "2 November 2026" in r["note"] for r in added_rows)+ assert all("#1177" in r["note"] and "2 November 2026" in r["note"] for r in added_rows if r["glob"] not in rigged)+ assert all("#2384" in r["note"] and "3 November 2026" in r["note"] for r in added_rows if r["glob"] in rigged)import hashlibfor r in added_rows: # each row records its file's SHA-256assert hashlib.sha256((ROOT / r["glob"]).read_bytes()).hexdigest() in r["source"], r["glob"]@@ -168,7 +172,7 @@ def test_tal_original_licensing_matches_manifest_exactly():music = [r for r in independent if r["glob"] == "unity/Assets/StreamingAssets/audio/music/Main_1.3.ogg"]assert len(music) == 1 and music[0]["artist"] == "Afik Faerman" and music[0]["ai_generated"] is Falseassert len([r for r in independent if r["glob"] not in added and r not in music]) == 50 # the hex-tile props row and the #1901 -light meshes among them- assert len(independent) == 94 # 146 originals + 94 independent grants = 240 total+ assert len(independent) == 96 # 146 originals + 96 independent grants = 242 totalfor row in selected:assert row["licence"] == "CC-BY-NC-ND-4.0"assert row["artist"] == "Tal Heuberger"diff --git a/tools/rig_soldier_1948.py b/tools/rig_soldier_1948.pynew file mode 100644index 000000000..debb772ad--- /dev/null+++ b/tools/rig_soldier_1948.py@@ -0,0 +1,697 @@+"""Rigs Tal Heuberger's 1948 soldier (#336's figure-soldier-1948-v1, a static A-pose mesh with no rig) to the 67-bone skeleton+their animated C-series Israeli figures share, so the Yiftach and Negev tokens' third figure walks, idles and fires as C06 and+C07 do (#2384; owner, 3 November 2026: "rig Tal's later"; Tal's OK for adapted versions confirmed by the owner the same day).+The original files are never written: the rigged copy is a new model, figure-soldier-1948-v1-rigged, beside them.++How (all in Blender's bpy module, no paid tool):+ 1. The soldier's mesh is measured by horizontal cross-sections (one closed ring per limb every centimetre): the crotch,+ armpit, collar and neck heights, the fingertip, and each limb's centre line give the joint positions. The rules are the+ donor's own: C07's joints are read against C07's mesh the same way (where its hip sits above its crotch, where the knee+ divides the leg, where the elbow and wrist divide the arm), and the soldier's joints take the same ratios.+ 2. A copy of C07's armature (the same 67 bones, names and hierarchy) is fitted to those joints. Each bone keeps C07's+ roll convention: its axes are C07's turned by the smallest rotation from C07's bone direction to the soldier's.+ 3. The mesh is skinned to the fitted armature with Blender's bone-heat weights, in the soldier's own A-pose, so the+ weights are solved on the mesh as Tal made it.+ 4. The fitted armature is then posed so every bone has exactly C07's rest orientation, the mesh is baked into that pose,+ and the pose is applied as the new rest pose. The soldier's rig now has C07's bone orientations with the soldier's+ own bone lengths, which is what lets C07's takes (bone-local rotations, plus the hips' small translation) play on+ it unchanged.+ 5. C07's idle, walk and fire takes are assigned to the rig and exported with it as one FBX, every frame keyed, no+ keyframe reduction; the other six takes the game never plays are left out.++The result is verified by re-importing the FBX in a second process (--check), which records bones, takes and weight+coverage in provenance.json beside the model, and renders stills of the rest pose and of frames of each take for review.++ uv run --no-project --python 3.13 --with bpy==5.2.2 python -I tools/rig_soldier_1948.py --rig # writes the FBX and the map copy+ uv run --no-project --python 3.13 --with bpy==5.2.2 python -I tools/rig_soldier_1948.py --check # re-imports; writes provenance.json and stills+ python3 tools/rig_soldier_1948.py --verify # stdlib: hashes against provenance.json++One bpy import per process: --rig and --check run separately. Tal's original folders are only read.+"""+from __future__ import annotations++import argparse+import hashlib+import json+import math+from pathlib import Path+import shutil+import sys++ROOT = Path(__file__).resolve().parents[1]+sys.path.insert(0, str(ROOT / "tools"))++COLLECTION = Path("unity/Assets/Art/Collection")+SOURCE = "figure-soldier-1948-v1" # Tal's static soldier (#336)+DONOR = "figure-c07-veteran-fighter-v2" # the animated figure whose skeleton and takes the copy uses (#507)+OUT = "figure-soldier-1948-v1-rigged"+TAKES = ("idle", "walk", "fire") # the three the token plays (UnitFigureMotion); C07's other six are left out+STEP = 0.01 # metres between cross-sections+COLLAR_HALF_WIDTH = 0.09 # the torso ring narrower than this above the shoulders is the neck's base+BONES = 67+++def sha(data: bytes) -> str:+ return hashlib.sha256(data).hexdigest()+++def check(condition: bool, message: str) -> None:+ """A verification failure; unlike a bare assert it also holds under python -O."""+ if not condition:+ raise AssertionError(message)+++# ---- cross-sections (pure Python, so the rules are testable without Blender) ----++class Ring:+ """One closed cross-section of the mesh at a height: its extent and centre."""+ __slots__ = ("xmin", "xmax", "ymin", "ymax", "xc", "yc", "n")++ def __init__(self, points):+ xs = [p[0] for p in points]+ ys = [p[1] for p in points]+ self.xmin, self.xmax, self.ymin, self.ymax = min(xs), max(xs), min(ys), max(ys)+ self.xc, self.yc, self.n = sum(xs) / len(xs), sum(ys) / len(ys), len(points)++ @property+ def spans_centre(self) -> bool:+ return self.xmin < 0.0 < self.xmax++ @property+ def half_width(self) -> float:+ return max(-self.xmin, self.xmax)+++def welded(verts, polys):+ """The polygons over one index per position: Tripo's meshes are split at every UV and normal seam, and rings chained+ over the split indices would break there."""+ canon: dict[tuple[float, float, float], int] = {}+ index = [canon.setdefault((round(v[0], 5), round(v[1], 5), round(v[2], 5)), i) for i, v in enumerate(verts)]+ return [tuple(index[i] for i in poly) for poly in polys]+++def rings_at(verts, polys, z: float) -> list[Ring]:+ """The closed rings where the plane at height z cuts the mesh: every polygon edge crossing the plane gives a point, and+ the two crossings of one polygon are joined, so points chain into one ring per limb (union-find over the edges).+ polys are over welded indices (welded)."""+ points: dict[tuple[int, int], tuple[float, float]] = {}+ parent: dict[tuple[int, int], tuple[int, int]] = {}++ def find(k):+ while parent[k] != k:+ parent[k] = parent[parent[k]]+ k = parent[k]+ return k++ for poly in polys:+ crossing = []+ n = len(poly)+ for i in range(n):+ a, b = poly[i], poly[(i + 1) % n]+ za, zb = verts[a][2], verts[b][2]+ if (za - z) * (zb - z) >= 0.0:+ continue+ key = (a, b) if a < b else (b, a)+ if key not in points:+ t = (z - za) / (zb - za)+ points[key] = (verts[a][0] + t * (verts[b][0] - verts[a][0]), verts[a][1] + t * (verts[b][1] - verts[a][1]))+ parent[key] = key+ crossing.append(key)+ for k in crossing[1:]:+ ra, rb = find(crossing[0]), find(k)+ if ra != rb:+ parent[rb] = ra+ groups: dict[tuple[int, int], list[tuple[float, float]]] = {}+ for k, p in points.items():+ groups.setdefault(find(k), []).append(p)+ return [Ring(g) for g in groups.values()]+++class Sections:+ """A standing figure's rings every STEP metres (z up, metres, the figure facing -y as Tal's FBX files import), and the+ landmarks read from them. The figure faces -y, so its left side is +x."""++ def __init__(self, verts, polys):+ self.top = max(v[2] for v in verts)+ self.rows: dict[float, list[Ring]] = {}+ polys = welded(verts, polys)+ z = STEP / 2+ while z < self.top:+ self.rows[round(z, 4)] = rings_at(verts, polys, z)+ z += STEP++ def key(self, z: float) -> float:+ return round(math.floor(z / STEP) * STEP + STEP / 2, 4)++ def torso(self, z: float) -> Ring | None:+ """The ring across the centre line (the torso, or the pelvis above the crotch), or none."""+ rings = [r for r in self.rows.get(self.key(z), []) if r.spans_centre]+ return max(rings, key=lambda r: r.n) if rings else None++ def right(self, z: float) -> list[Ring]:+ """The rings wholly on the +x side (the figure's left), innermost first."""+ return sorted((r for r in self.rows.get(self.key(z), []) if not r.spans_centre and r.xc > 0.0), key=lambda r: r.xc)++ @property+ def arm_x(self) -> float:+ """Below the crotch, a ring beyond this is the hand's: clear of the pelvis's width (the boot straps never reach it)."""+ return self.torso(self.crotch).half_width + 0.05++ def arm(self, z: float) -> Ring | None:+ """The left arm's ring (+x): beside the torso, the outermost ring wholly outside it (belt pouches sit inside its width);+ below the crotch, the outermost ring clear of the legs. None where the arm has merged into the shoulder."""+ torso = self.torso(z)+ def outside(r: Ring) -> bool:+ return r.xmin > torso.xmax - 0.01 if torso is not None else r.xc > self.arm_x+ rings = [r for r in self.right(z) if outside(r)]+ return rings[-1] if rings else None++ def leg(self, z: float) -> Ring | None:+ """The left leg's ring (+x) below the crotch (the largest ring inside the arm's line)."""+ rings = [r for r in self.right(z) if r.xc <= self.arm_x]+ return max(rings, key=lambda r: r.n) if rings and self.torso(z) is None else None++ def heights(self):+ return sorted(self.rows)++ @property+ def crotch(self) -> float:+ return next(z for z in self.heights() if z >= 0.2 and self.torso(z) is not None)++ @property+ def fingertip(self) -> float:+ return next(z for z in self.heights() if z >= 0.1 and self.arm(z) is not None)++ @property+ def armpit(self) -> float:+ return next(z for z in reversed(self.heights()) if self.arm(z) is not None)++ @property+ def collar(self) -> float:+ armpit = self.armpit+ return next(z for z in self.heights() if z > armpit and self.torso(z) is not None and self.torso(z).half_width < COLLAR_HALF_WIDTH)++ @property+ def neck(self) -> float:+ collar = self.collar+ rows = [z for z in self.heights() if collar <= z <= self.top - 0.06 and self.torso(z) is not None]+ return min(rows, key=lambda z: self.torso(z).half_width)++ def foot_length(self) -> float:+ ring = self.leg(0.02)+ return ring.ymax - ring.ymin+++# ---- joints ----++def v3(a, b, op):+ return (op(a[0], b[0]), op(a[1], b[1]), op(a[2], b[2]))+++def sub(a, b): return v3(a, b, lambda x, y: x - y)+def length(a): return math.sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2])+++def frac(value, lo, hi):+ return (value - lo) / (hi - lo)+++def derive_joints(fig: Sections, donor: Sections, donor_bones: dict[str, tuple[tuple, tuple]]) -> dict[str, tuple]:+ """The left-side (+x: the figure faces -y) and centre joints of the figure, by the donor's own ratios (its bones read against its sections):+ the torso chain divides crotch-to-collar as the donor's does; the hip sits above the crotch in the donor's proportion+ of the leg; the knee and the ankle divide the leg as the donor's; the shoulder sits below the collar as the donor's+ does; the elbow and the wrist divide shoulder-to-fingertip as the donor's. Where a donor joint is off its+ ring's centre (its hip, knee and ankle, its spine against the torso's depth), the figure's joint keeps that offset.+ Returns armature-space points, metres."""+ d = {name: head for name, (head, _) in donor_bones.items()}+ dc, dk = donor.crotch, donor.collar+ fc, fk = fig.crotch, fig.collar+ out = {}++ def torso_point(name, z_d, z_f):+ """A centre-line joint: the donor's depth offset from its torso ring, at the mapped height."""+ yd = donor.torso(z_d).yc if donor.torso(z_d) else 0.0+ yf = fig.torso(z_f).yc if fig.torso(z_f) else 0.0+ out[name] = (0.0, yf + (d[name][1] - yd), z_f)++ for name in ("Hips", "Spine", "Chest", "UpperChest"):+ torso_point(name, d[name][2], fc + frac(d[name][2], dc, dk) * (fk - fc))+ torso_point("Neck", d["Neck"][2], fk + (d["Neck"][2] - dk))+ torso_point("Head", d["Head"][2], fig.neck + (d["Head"][2] - donor.neck))+ out["HeadTop"] = (0.0, out["Head"][1] + (donor_bones["Head"][1][1] - d["Head"][1]),+ fig.neck + frac(donor_bones["Head"][1][2], donor.neck, donor.top) * (fig.top - fig.neck))+ # The clavicle root: the donor's distance below its collar, its own x, the torso's depth.+ z_sh = fk + (d["Left_Shoulder"][2] - dk)+ torso_point("Left_Shoulder", d["Left_Shoulder"][2], z_sh)+ out["Left_Shoulder"] = (d["Left_Shoulder"][0], out["Left_Shoulder"][1], z_sh)++ # The shoulder joint: the donor's depth below its collar (the armpit moves with the arm's angle, the collar does not),+ # its share of the shoulders' half-width (read at the ring just above the joint) and the torso's depth with the donor's+ # offset; then the elbow and the wrist divide the drop to the fingertip as the donor's do, each at the centre of the+ # arm's ring there.+ z_sd = d["Left_UpperArm"][2]+ z_sh = fk + (z_sd - dk)+ shoulder = (d["Left_UpperArm"][0] * fig.torso(z_sh + 0.02).half_width / donor.torso(z_sd + 0.02).half_width,+ fig.torso(z_sh).yc + (d["Left_UpperArm"][1] - donor.torso(z_sd).yc), z_sh)+ out["Left_UpperArm"] = shoulder+ tip_ring = fig.arm(fig.fingertip)+ tip = (tip_ring.xc, tip_ring.yc, fig.fingertip)+ donor_tip_z = donor.fingertip+ for name in ("Left_LowerArm", "Left_Hand"):+ t = frac(d[name][2], z_sd, donor_tip_z)+ z = shoulder[2] + t * (tip[2] - shoulder[2])+ ring = fig.arm(z)+ out[name] = (ring.xc, ring.yc, z)+ out["Fingertip"] = tip+ donor_tip_ring = donor.arm(donor_tip_z)+ out["DonorFingertip"] = (donor_tip_ring.xc, donor_tip_ring.yc, donor_tip_z)++ # The leg: the hip above the crotch in the donor's proportion of its crotch height, the knee and ankle dividing it.+ z_hip = fc + (d["Left_UpperLeg"][2] - dc) * (fc / dc)+ z_ankle = d["Left_Foot"][2]+ z_knee = z_ankle + frac(d["Left_LowerLeg"][2], z_ankle, d["Left_UpperLeg"][2]) * (z_hip - z_ankle)+ for name, z, zd in (("Left_UpperLeg", z_hip, dc - STEP), ("Left_LowerLeg", z_knee, d["Left_LowerLeg"][2]), ("Left_Foot", z_ankle, z_ankle)):+ rf = fig.leg(fc - STEP if name == "Left_UpperLeg" else z)+ rd = donor.leg(zd)+ out[name] = (rf.xc * (d[name][0] / rd.xc), rf.yc + (d[name][1] - rd.yc), z)+ return out+++def mirror(p):+ return (-p[0], p[1], p[2])+++# ---- Blender ----++def mesh_arrays(bpy, obj):+ """The object's evaluated mesh (rest position) as plain vertex and polygon lists in world space."""+ dg = bpy.context.evaluated_depsgraph_get()+ ev = obj.evaluated_get(dg)+ me = ev.to_mesh()+ verts = [tuple(ev.matrix_world @ v.co) for v in me.vertices]+ polys = [tuple(p.vertices) for p in me.polygons]+ ev.to_mesh_clear()+ return verts, polys+++def load(bpy, path: Path):+ bpy.ops.wm.read_factory_settings(use_empty=True)+ bpy.ops.import_scene.fbx(filepath=str(path))+ meshes = [o for o in bpy.data.objects if o.type == "MESH"]+ arms = [o for o in bpy.data.objects if o.type == "ARMATURE"]+ return meshes, arms+++def bone_table(arm) -> dict[str, tuple[tuple, tuple]]:+ """Each bone's rest head and tail in armature space."""+ return {b.name: (tuple(arm.matrix_world @ b.head_local), tuple(arm.matrix_world @ b.tail_local)) for b in arm.data.bones}+++def depth(bone) -> int:+ n = 0+ while bone.parent is not None:+ bone = bone.parent+ n += 1+ return n+++def rig(repo: Path, out_dir: Path | None = None, keep_blend: Path | None = None) -> dict:+ """Builds the rigged copy; writes <OUT>.fbx and the colour map into out_dir (the Collection folder by default)."""+ import bpy+ from mathutils import Matrix, Vector+ import slim_collection as privacy # its scrub blanks machine paths Blender's FBX writer leaves in a file++ src_dir, donor_dir = repo / COLLECTION / SOURCE, repo / COLLECTION / DONOR+ dest = out_dir or repo / COLLECTION / OUT+ dest.mkdir(parents=True, exist_ok=True)++ # The donor: its rig, takes and mesh (for the joint rules); then the soldier into the same scene.+ (donor_mesh,), (donor_arm,) = load(bpy, donor_dir / f"{DONOR}.fbx")+ donor_arm.data.pose_position = "REST"+ bpy.context.view_layer.update()+ donor_sections = Sections(*mesh_arrays(bpy, donor_mesh))+ donor_bones = bone_table(donor_arm)+ donor_axes = {b.name: (donor_arm.matrix_world @ b.matrix_local).to_3x3() for b in donor_arm.data.bones}+ check(len(donor_bones) == BONES, f"{DONOR}: {len(donor_bones)} bones, expected {BONES}")+ bpy.ops.import_scene.fbx(filepath=str(src_dir / f"{SOURCE}.fbx"))+ soldier = next(o for o in bpy.data.objects if o.type == "MESH" and o is not donor_mesh)+ check(not soldier.vertex_groups and not soldier.modifiers and soldier.parent is None, f"{SOURCE}: expected a static mesh with no rig")+ sections = Sections(*mesh_arrays(bpy, soldier))+ report = {"source_height_m": sections.top, "donor_height_m": donor_sections.top,+ "landmarks": {k: getattr(sections, k) for k in ("crotch", "fingertip", "armpit", "collar", "neck")},+ "donor_landmarks": {k: getattr(donor_sections, k) for k in ("crotch", "fingertip", "armpit", "collar", "neck")}}+ check(abs(sections.top - donor_sections.top) < 0.02, "the soldier and C07 are not the same height; the K98k socket assumes they are")++ # 1. Joints. The rules read against C07's own mesh must give back C07's own joints (the pose-independent ones; its+ # shoulder and arm joints are placed by its wider A-pose), so that is logged as a check on the rules.+ own = derive_joints(donor_sections, donor_sections, donor_bones)+ report["donor_self_check_m"] = {k: round(length(sub(own[k], donor_bones[k][0])), 4) for k in own if k in donor_bones}+ joints = derive_joints(sections, donor_sections, donor_bones)+ for name in list(joints):+ if name.startswith("Left_"):+ joints["Right_" + name[5:]] = mirror(joints[name])+ report["joints"] = {k: [round(c, 4) for c in v] for k, v in joints.items()}++ # 2. The armature: a copy of C07's, fitted. Frames per bone: C07's axes turned by the least rotation between directions.+ arm = donor_arm.copy()+ arm.data = donor_arm.data.copy()+ arm.data.pose_position = "POSE"+ arm.animation_data_clear()+ bpy.context.scene.collection.objects.link(arm)+ for o in (donor_mesh, donor_arm):+ bpy.data.objects.remove(o, do_unlink=True)+ for block in (bpy.data.armatures, bpy.data.meshes):+ for item in list(block):+ if item.users == 0:+ block.remove(item)+ arm.name = arm.data.name = "Armature" # the takes export as "Armature|idle", "Armature|walk", "Armature|fire", as C07's are named+ check(arm.name == "Armature", f"the armature is {arm.name!r}")+ bpy.context.view_layer.objects.active = arm+ arm.select_set(True)+ bpy.ops.object.mode_set(mode="EDIT")+ eb = arm.data.edit_bones+ for b in eb:+ b.use_connect = False+ # Wrist-to-fingertip, the figure's against the donor's: the hand bone and the fingers scale by it.+ hand_ratio = {}+ for side in ("Right", "Left"):+ flip = (lambda p: p) if side == "Left" else mirror # the fingertip landmarks are the left hand's+ hand_ratio[side] = (length(sub(flip(joints["Fingertip"]), joints[f"{side}_Hand"]))+ / length(sub(flip(joints["DonorFingertip"]), donor_bones[f"{side}_Hand"][0])))+ report["hand_ratio"] = hand_ratio++ def place(name, head, tail):+ b = eb[name]+ d_head, d_tail = donor_bones[name]+ d_dir = (Vector(d_tail) - Vector(d_head)).normalized()+ n_dir = (Vector(tail) - Vector(head)).normalized()+ turn = d_dir.rotation_difference(n_dir)+ b.head, b.tail = Vector(head), Vector(tail)+ b.align_roll(turn @ (donor_axes[name] @ Vector((0.0, 0.0, 1.0))))++ def relative(name, parent, scale):+ """A bone placed as the donor's is in its parent's frame, scaled: the fingers in the hand, the eyes in the head."""+ frame = Matrix.Translation(eb[parent].head.copy()) @ eb[parent].matrix.to_3x3().to_4x4()+ d_frame = Matrix.Translation(Vector(donor_bones[parent][0])) @ donor_axes[parent].to_4x4()+ d_head, d_tail = (d_frame.inverted() @ Vector(donor_bones[name][0])) * scale, (d_frame.inverted() @ Vector(donor_bones[name][1])) * scale+ place(name, frame @ d_head, frame @ d_tail)++ chain = ("Hips", "Spine", "Chest", "UpperChest", "Neck", "Head", "HeadTop")+ for a, b in zip(chain, chain[1:]):+ place(a, joints[a], joints[b])+ for side in ("Right", "Left"):+ def S(n, side=side):+ return f"{side}_{n}"+ place(S("Shoulder"), joints[S("Shoulder")], joints[S("UpperArm")])+ place(S("UpperArm"), joints[S("UpperArm")], joints[S("LowerArm")])+ place(S("LowerArm"), joints[S("LowerArm")], joints[S("Hand")])+ wrist = Vector(joints[S("Hand")])+ tip = Vector(joints["Fingertip"] if side == "Left" else mirror(joints["Fingertip"]))+ d_hand = donor_bones[S("Hand")]+ place(S("Hand"), wrist, wrist + (tip - wrist).normalized() * (Vector(d_hand[1]) - Vector(d_hand[0])).length * hand_ratio[side])+ place(S("UpperLeg"), joints[S("UpperLeg")], joints[S("LowerLeg")])+ place(S("LowerLeg"), joints[S("LowerLeg")], joints[S("Foot")])+ foot_scale = sections.foot_length() / donor_sections.foot_length()+ ankle = Vector(joints[S("Foot")])+ d_ankle = Vector(donor_bones[S("Foot")][0])+ foot = {n: tuple(ankle + (Vector(p) - d_ankle) * foot_scale) for n, p in+ ((S("Foot"), donor_bones[S("Foot")][1]), (S("Toes"), donor_bones[S("Toes")][1]), (S("ToesEnd"), donor_bones[S("ToesEnd")][1]))}+ place(S("Foot"), ankle, foot[S("Foot")])+ place(S("Toes"), foot[S("Foot")], foot[S("Toes")])+ place(S("ToesEnd"), foot[S("Toes")], foot[S("ToesEnd")])+ # Bones the rules do not name follow their parent's frame as C07's do (the fingers, the eyes, the neck twist).+ head_scale = (Vector(joints["HeadTop"]) - Vector(joints["Head"])).length / (Vector(donor_bones["Head"][1]) - Vector(donor_bones["Head"][0])).length+ for b in sorted(eb, key=depth):+ if b.name in chain or any(b.name == f"{s}_{n}" for s in ("Right", "Left") for n in ("Shoulder", "UpperArm", "LowerArm", "Hand", "UpperLeg", "LowerLeg", "Foot", "Toes", "ToesEnd")):+ continue+ parent = b.parent.name+ relative(b.name, parent, hand_ratio[parent.split("_")[0]] if parent.endswith("Hand") or "Thumb" in b.name or "Index" in b.name or "Middle" in b.name or "Ring" in b.name or "Pinky" in b.name else head_scale if parent == "Head" else 1.0)+ bpy.ops.object.mode_set(mode="OBJECT")+ fitted = bone_table(arm)+ report["fitted_bones"] = {k: [[round(c, 4) for c in p] for p in v] for k, v in fitted.items()}++ # 3. Weights: bone heat on the mesh as Tal made it.+ bpy.ops.object.select_all(action="DESELECT")+ soldier.select_set(True)+ arm.select_set(True)+ bpy.context.view_layer.objects.active = arm+ with bpy.context.temp_override(object=arm, active_object=arm, selected_objects=[soldier, arm], selected_editable_objects=[soldier, arm]):+ bpy.ops.object.parent_set(type="ARMATURE_AUTO")+ check(soldier.parent is arm and any(m.type == "ARMATURE" for m in soldier.modifiers), "the heat skinning did not bind the mesh")+ # Bone heat sees no bone from the small separate shells (the belt pouches, boot straps and buttons are their own+ # closed pieces): each vertex it left without weight takes the weights of the nearest weighted vertex, so a pouch+ # follows the belt beside it. Logged, as a check on how much of the mesh that is.+ unweighted = [v for v in soldier.data.vertices if not any(g.weight > 0.0 for g in v.groups)]+ report["vertices"] = len(soldier.data.vertices)+ report["unweighted_vertices_after_heat"] = len(unweighted)+ check(len(unweighted) < 0.05 * len(soldier.data.vertices), f"{len(unweighted)} vertices got no weight from bone heat")+ if unweighted:+ from mathutils import kdtree+ tree = kdtree.KDTree(len(soldier.data.vertices) - len(unweighted))+ for v in soldier.data.vertices:+ if any(g.weight > 0.0 for g in v.groups):+ tree.insert(v.co, v.index)+ tree.balance()+ for v in unweighted:+ _, nearest, _ = tree.find(v.co)+ for g in soldier.data.vertices[nearest].groups:+ soldier.vertex_groups[g.group].add([v.index], g.weight, "REPLACE")+ report["unweighted_filled_from_nearest_m"] = round(max(tree.find(v.co)[2] for v in unweighted), 4)+ check(not any(not any(g.weight > 0.0 for g in v.groups) for v in soldier.data.vertices), "vertices still without weight")+ # At most four bones per vertex, normalised: what Unity's import keeps (maxBonesPerVertex 4), so the stills show what+ # the game shows.+ bpy.context.view_layer.objects.active = soldier+ bpy.ops.object.vertex_group_limit_total(group_select_mode="ALL", limit=4)+ bpy.ops.object.vertex_group_normalize_all(group_select_mode="ALL", lock_active=False)+ report["max_influences"] = max(sum(1 for g in v.groups if g.weight > 0.0) for v in soldier.data.vertices)++ # 4. Re-pose into C07's rest orientation, bake, apply as rest.+ bpy.ops.object.select_all(action="DESELECT")+ arm.select_set(True)+ bpy.context.view_layer.objects.active = arm+ bpy.ops.object.mode_set(mode="POSE")+ for pb in sorted(arm.pose.bones, key=lambda p: depth(p.bone)):+ bpy.context.view_layer.update()+ pb.matrix = Matrix.Translation(pb.head) @ donor_axes[pb.name].to_4x4()+ bpy.context.view_layer.update()+ def miss(pb) -> float:+ a = donor_axes[pb.name].to_quaternion().rotation_difference(pb.matrix.to_quaternion()).angle+ return min(a, 2 * math.pi - a)+ errors = {pb.name: math.degrees(miss(pb)) for pb in arm.pose.bones}+ worst = max(errors.values())+ report["rest_orientation_error_deg"] = worst+ check(worst < 0.01, "bones missed C07's orientation (degrees): " + ", ".join(f"{k} {v:.2f}" for k, v in errors.items() if v > 0.01))+ bpy.ops.object.mode_set(mode="OBJECT")+ bpy.context.view_layer.objects.active = soldier+ bpy.ops.object.modifier_apply(modifier=next(m.name for m in soldier.modifiers if m.type == "ARMATURE"))+ bpy.context.view_layer.objects.active = arm+ bpy.ops.object.mode_set(mode="POSE")+ bpy.ops.pose.armature_apply(selected=False)+ bpy.ops.object.mode_set(mode="OBJECT")+ mod = soldier.modifiers.new("Armature", "ARMATURE")+ mod.object = arm+ rest = bone_table(arm)+ for name, (head, tail) in rest.items():+ d_head, d_tail = donor_bones[name]+ a = (Vector(tail) - Vector(head)).normalized().angle((Vector(d_tail) - Vector(d_head)).normalized())+ check(a < math.radians(0.05), f"{name}: rest direction differs from C07's by {math.degrees(a):.3f} degrees")+ report["rest_bones"] = {k: [[round(c, 4) for c in p] for p in v] for k, v in rest.items()}++ # 5. The takes: C07's idle, walk and fire, by name, on the new rig.+ keep = {}+ for act in list(bpy.data.actions):+ take = act.name.split("|")[-1]+ if take in TAKES and take not in keep:+ act.name = take+ keep[take] = act+ else:+ bpy.data.actions.remove(act)+ check(set(keep) == set(TAKES), f"takes found: {sorted(keep)}")+ arm.animation_data_create()+ arm.animation_data.action = keep["idle"]+ arm.animation_data.action_slot = keep["idle"].slots[0]+ report["takes"] = {t: [int(f) for f in keep[t].frame_range] for t in TAKES}+ scene = bpy.context.scene+ scene.frame_start, scene.frame_end = 1, max(int(a.frame_range[1]) for a in keep.values())+ if keep_blend is not None:+ bpy.ops.wm.save_as_mainfile(filepath=str(keep_blend))++ # Export: no material or image (the prefab uses the .mat beside the model), every bone, every frame keyed.+ soldier.data.materials.clear()+ for m in list(bpy.data.materials):+ bpy.data.materials.remove(m)+ for im in list(bpy.data.images):+ bpy.data.images.remove(im)+ fbx = dest / f"{OUT}.fbx"+ bpy.ops.object.select_all(action="DESELECT")+ soldier.select_set(True)+ arm.select_set(True)+ bpy.ops.export_scene.fbx(+ filepath=str(fbx), use_selection=True, object_types={"MESH", "ARMATURE"}, add_leaf_bones=False,+ mesh_smooth_type="FACE", use_mesh_modifiers=True, use_tspace=False, use_custom_props=False,+ path_mode="STRIP", embed_textures=False, use_armature_deform_only=False,+ # The metres-to-centimetres unit factor goes into the data, not onto the nodes: with the default (FBX_SCALE_NONE)+ # Unity reads the bones at scale 100 under a root at 0.01, and a weapon parented under the hand bone (UnitWeapons)+ # comes out a hundred times too big and too far. C07's bones are at scale 1.+ apply_scale_options="FBX_SCALE_ALL",+ bake_anim=True, bake_anim_use_all_actions=True, bake_anim_use_nla_strips=False,+ bake_anim_step=1.0, bake_anim_simplify_factor=0.0, bake_anim_force_startend_keying=True)+ privacy.scrub(fbx, repo)+ shutil.copyfile(src_dir / f"{SOURCE}_basecolor.jpg", dest / f"{OUT}_basecolor.jpg")+ report["fbx_sha256"] = sha(fbx.read_bytes())+ (dest / "rig-report.json").write_text(json.dumps(report, indent=1) + "\n", encoding="utf-8")+ print("RIGGED", fbx, report["fbx_sha256"])+ return report+++def inspect(repo: Path, fbx: Path, stills: Path | None, colour: Path | None) -> dict:+ """Re-imports the rigged FBX (a fresh process) and reports its rig, takes and weights; renders stills when asked."""+ import bpy+ from mathutils import Vector++ (mesh,), (arm,) = load(bpy, fbx)+ bones = bone_table(arm)+ takes = {a.name.split("|")[-1]: [int(f) for f in a.frame_range] for a in bpy.data.actions}+ take_names = sorted(a.name for a in bpy.data.actions)+ groups = {g.name for g in mesh.vertex_groups}+ unweighted = sum(1 for v in mesh.data.vertices if not any(g.weight > 0.001 for g in v.groups))+ influences = [sum(1 for g in v.groups if g.weight > 0.001) for v in mesh.data.vertices]+ weighted_bones = sorted({mesh.vertex_groups[g.group].name for v in mesh.data.vertices for g in v.groups if g.weight > 0.001})+ report = {+ "bones": len(bones), "bone_names": sorted(bones), "hierarchy": {b.name: (b.parent.name if b.parent else None) for b in arm.data.bones},+ "takes": takes, "take_names": take_names, "fps": bpy.context.scene.render.fps, "vertices": len(mesh.data.vertices),+ "triangles": sum(len(p.vertices) - 2 for p in mesh.data.polygons), "vertex_groups": len(groups),+ "unweighted_vertices": unweighted, "max_influences": max(influences), "bones_with_weight": len(weighted_bones),+ "height_m": max((mesh.matrix_world @ Vector(c)).z for c in mesh.bound_box),+ "mesh_object": mesh.name, "armature_object": arm.name,+ }+ if stills is not None:+ stills.mkdir(parents=True, exist_ok=True)+ render_stills(bpy, mesh, arm, stills, colour)+ return report+++def render_stills(bpy, mesh, arm, out: Path, colour: Path | None) -> None:+ """Workbench stills: the rest pose and frames of each take, front and three-quarter views, textured when the map is given."""+ import math as m+ scene = bpy.context.scene+ if colour is not None:+ img = bpy.data.images.load(str(colour))+ mat = bpy.data.materials.new("map")+ mat.use_nodes = True+ tex = mat.node_tree.nodes.new("ShaderNodeTexImage")+ tex.image = img+ mat.node_tree.links.new(tex.outputs["Color"], mat.node_tree.nodes["Principled BSDF"].inputs["Base Color"])+ mesh.data.materials.clear()+ mesh.data.materials.append(mat)+ scene.render.engine = "BLENDER_WORKBENCH"+ scene.display.shading.light = "STUDIO"+ scene.display.shading.color_type = "TEXTURE" if colour is not None else "MATERIAL"+ scene.render.resolution_x, scene.render.resolution_y = 700, 1000+ scene.world = bpy.data.worlds.new("w")+ scene.world.color = (0.5, 0.5, 0.55)+ cam_data = bpy.data.cameras.new("cam")+ cam_data.type = "ORTHO"+ cam_data.ortho_scale = 1.2+ cam = bpy.data.objects.new("cam", cam_data)+ scene.collection.objects.link(cam)+ scene.camera = cam+ views = {"front": (0, -5, 0), "left": (-3.5, -3.5, -45), "right": (3.5, -3.5, 45), "side": (5, 0, 90)}++ def shoot(tag):+ for name, (x, y, rz) in views.items():+ cam.location = (x, y, 0.5)+ cam.rotation_euler = (m.radians(90), 0, m.radians(rz))+ scene.render.filepath = str(out / f"{tag}-{name}.png")+ bpy.ops.render.render(write_still=True)++ arm.data.pose_position = "REST"+ shoot("rest")+ arm.data.pose_position = "POSE"+ arm.animation_data_create()+ for act in bpy.data.actions:+ take = act.name.split("|")[-1]+ arm.animation_data.action = act+ arm.animation_data.action_slot = act.slots[0]+ first, last = (int(f) for f in act.frame_range)+ frames = {"idle": (first, (first + last) // 2), "walk": (first, first + (last - first) // 4, first + (last - first) // 2, first + 3 * (last - first) // 4),+ "fire": (first, first + (last - first) // 3, first + 2 * (last - first) // 3, last)}.get(take, (first, last))+ for f in frames:+ scene.frame_set(f)+ shoot(f"{take}-f{f:03d}")+++def verify(repo: Path) -> dict:+ """Stdlib: the shipped files are the ones provenance.json records, from the recorded originals."""+ dest = repo / COLLECTION / OUT+ record = json.loads((dest / "provenance.json").read_text(encoding="utf-8"))+ src, donor = repo / COLLECTION / SOURCE, repo / COLLECTION / DONOR+ check(record["inputs"][f"{SOURCE}.fbx"] == sha((src / f"{SOURCE}.fbx").read_bytes()), "the soldier's original FBX is not the recorded input")+ check(record["inputs"][f"{DONOR}.fbx"] == sha((donor / f"{DONOR}.fbx").read_bytes()), "C07's FBX is not the recorded input")+ check(record["files"][f"{OUT}.fbx"] == sha((dest / f"{OUT}.fbx").read_bytes()), "the rigged FBX is not the recorded one")+ check((dest / f"{OUT}_basecolor.jpg").read_bytes() == (src / f"{SOURCE}_basecolor.jpg").read_bytes(), "the colour map is not Tal's byte for byte")+ check(record["files"][f"{OUT}_basecolor.jpg"] == sha((src / f"{SOURCE}_basecolor.jpg").read_bytes()), "the colour map's recorded hash")+ check(record["bones"] == BONES and record["unweighted_vertices"] == 0 and set(record["takes"]) == set(TAKES), "the rig record")+ check(record["creator_credit"] == "Tal Heuberger" and record["licence"] == "CC-BY-NC-ND-4.0", "credit")+ return record+++def write_provenance(repo: Path, inspected: dict) -> None:+ dest = repo / COLLECTION / OUT+ report = json.loads((dest / "rig-report.json").read_text(encoding="utf-8"))+ record = {+ "asset": OUT, "creator_credit": "Tal Heuberger", "licence": "CC-BY-NC-ND-4.0",+ "what": f"Tal Heuberger's {SOURCE} (#336, a static mesh) skinned to the 67-bone skeleton of their {DONOR} (#507) and given its "+ f"idle, walk and fire takes, by tools/rig_soldier_1948.py (Blender {inspected['blender']}); the mesh is Tal's, re-posed into C07's rest pose; the colour map is Tal's byte for byte. "+ "Adapted version by the owner's report of Tal's OK (#2384, 3 November 2026). The originals are unchanged.",+ "inputs": {f"{SOURCE}.fbx": sha((repo / COLLECTION / SOURCE / f"{SOURCE}.fbx").read_bytes()),+ f"{DONOR}.fbx": sha((repo / COLLECTION / DONOR / f"{DONOR}.fbx").read_bytes())},+ "files": {f"{OUT}.fbx": sha((dest / f"{OUT}.fbx").read_bytes()),+ f"{OUT}_basecolor.jpg": sha((dest / f"{OUT}_basecolor.jpg").read_bytes())},+ "bones": inspected["bones"], "takes": inspected["takes"], "take_names": inspected["take_names"], "fps": inspected["fps"],+ "vertices": inspected["vertices"], "triangles": inspected["triangles"], "height_m": round(inspected["height_m"], 4),+ "unweighted_vertices": inspected["unweighted_vertices"], "max_influences": inspected["max_influences"],+ "bones_with_weight": inspected["bones_with_weight"],+ "landmarks_m": report["landmarks"], "donor_landmarks_m": report["donor_landmarks"],+ "joints_m": {k: v for k, v in report["joints"].items() if not k.startswith("Right_")},+ "donor_self_check_m": report["donor_self_check_m"], "hand_ratio": report["hand_ratio"],+ "unweighted_vertices_after_heat": report["unweighted_vertices_after_heat"],+ "unweighted_filled_from_nearest_m": report.get("unweighted_filled_from_nearest_m", 0.0),+ "rest_orientation_error_deg": report["rest_orientation_error_deg"],+ }+ (dest / "provenance.json").write_text(json.dumps(record, indent=2) + "\n", encoding="utf-8")+ (dest / "rig-report.json").unlink() # its figures are in the record; the Collection folder holds only the runtime files+++def main(argv=None) -> int:+ p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)+ p.add_argument("--repo", type=Path, default=ROOT)+ p.add_argument("--rig", action="store_true", help="build the rigged FBX (needs bpy)")+ p.add_argument("--check", action="store_true", help="re-import the rigged FBX, write provenance.json (needs bpy)")+ p.add_argument("--verify", action="store_true", help="hashes against provenance.json (stdlib)")+ p.add_argument("--out", type=Path, help="--rig: write into this folder instead of the Collection; --check: read the FBX there")+ p.add_argument("--stills", type=Path, help="--check: also render stills into this folder")+ p.add_argument("--blend", type=Path, help="--rig: also save the working .blend here")+ a = p.parse_args(argv)+ repo = a.repo.resolve()+ if a.rig:+ rig(repo, a.out, a.blend)+ elif a.check:+ folder = a.out or repo / COLLECTION / OUT+ import bpy+ report = inspect(repo, folder / f"{OUT}.fbx", a.stills, folder / f"{OUT}_basecolor.jpg")+ report["blender"] = bpy.app.version_string+ check(report["bones"] == BONES, f"{report['bones']} bones, expected {BONES}")+ check(set(report["takes"]) == set(TAKES), f"takes: {report['takes']}")+ check(report["unweighted_vertices"] == 0, f"{report['unweighted_vertices']} unweighted vertices")+ print(json.dumps({k: v for k, v in report.items() if k not in ("bone_names", "hierarchy")}, indent=1))+ if a.out is None:+ write_provenance(repo, report)+ else:+ verify(repo)+ print("VERIFIED", OUT)+ return 0+++if __name__ == "__main__":+ sys.exit(main())diff --git a/tools/tests/test_rig_soldier_1948.py b/tools/tests/test_rig_soldier_1948.pynew file mode 100644index 000000000..c0ec0ced4--- /dev/null+++ b/tools/tests/test_rig_soldier_1948.py@@ -0,0 +1,100 @@+"""tools/rig_soldier_1948.py: the 1948 soldier's rigged copy (#2384) ships as its record says, and the cross-section rules+that place its joints read a figure the way they should.++The shipped FBX and colour map match provenance.json, which names Tal Heuberger's two unchanged originals as the inputs; the+record has C07's 67 bones, the three takes the token plays and no unweighted vertex; the catalog streams and animates the copy.+The ring and landmark rules are checked on a box figure built here (two legs, a torso, two hanging arms, a neck and a head)+without Blender.+"""+import importlib.util+import json+import re+from pathlib import Path++ROOT = Path(__file__).resolve().parents[2]+CATALOG = ROOT / "unity/Assets/Scripts/Map/Collection/CollectionCatalog.cs"+++def tool():+ spec = importlib.util.spec_from_file_location("rig_soldier_1948", ROOT / "tools/rig_soldier_1948.py")+ mod = importlib.util.module_from_spec(spec)+ spec.loader.exec_module(mod)+ return mod+++def box(verts, polys, x0, x1, y0, y1, z0, z1):+ """A closed box's six quads, appended to verts and polys."""+ base = len(verts)+ verts += [(x, y, z) for z in (z0, z1) for y in (y0, y1) for x in (x0, x1)]+ for a, b, c, d in ((0, 1, 3, 2), (4, 6, 7, 5), (0, 4, 5, 1), (2, 3, 7, 6), (0, 2, 6, 4), (1, 5, 7, 3)):+ polys.append((base + a, base + b, base + c, base + d))+++def box_figure():+ """A metre-tall figure: legs 0 to 0.45, a torso 0.45 to 0.80 half a width of 0.15, arms beside it from 0.42 to 0.70 (x 0.18 to 0.26),+ a neck 0.80 to 0.86 half a width of 0.04 and a head 0.86 to 1.0 half a width of 0.08."""+ verts, polys = [], []+ for sign in (-1, 1):+ box(verts, polys, min(sign * 0.02, sign * 0.13), max(sign * 0.02, sign * 0.13), -0.06, 0.06, 0.0, 0.45) # legs+ box(verts, polys, min(sign * 0.18, sign * 0.26), max(sign * 0.18, sign * 0.26), -0.04, 0.04, 0.42, 0.70) # arms+ box(verts, polys, -0.15, 0.15, -0.08, 0.08, 0.45, 0.80) # torso+ box(verts, polys, -0.04, 0.04, -0.04, 0.04, 0.80, 0.86) # neck+ box(verts, polys, -0.08, 0.08, -0.08, 0.08, 0.86, 1.0) # head+ return verts, polys+++def test_verify_passes_on_the_shipped_files():+ record = tool().verify(ROOT)+ assert record["bones"] == 67 and sorted(record["takes"]) == ["fire", "idle", "walk"]+ assert record["take_names"] == ["Armature|Armature|fire", "Armature|Armature|idle", "Armature|Armature|walk"]+ assert record["unweighted_vertices"] == 0 and record["max_influences"] <= 4+ assert record["creator_credit"] == "Tal Heuberger" and record["licence"] == "CC-BY-NC-ND-4.0"+++def test_the_originals_are_the_recorded_inputs_and_untouched_by_the_tool():+ mod = tool()+ record = json.loads((ROOT / mod.COLLECTION / mod.OUT / "provenance.json").read_text(encoding="utf-8"))+ manifest = json.loads((ROOT / "docs/original-models.json").read_text(encoding="utf-8"))+ pinned = {Path(f["path"]).name: f["shipped_sha256"] for f in manifest["files"] if f["source"] in ("507", "336")}+ for name, digest in record["inputs"].items():+ assert pinned[name] == digest, f"{name}: the tool's input is the original docs/original-models.json pins"+++def test_the_catalog_streams_and_animates_the_rigged_copy_and_keeps_the_original():+ mod = tool()+ text = CATALOG.read_text(encoding="utf-8")+ assert f'Soldier1948Rigged = "{mod.OUT}"' in text+ people = re.search(r"\(People, new\[\]\s*\{(.*?)\}", text, re.S).group(1)+ assert f'"{mod.SOURCE}"' in people and "Soldier1948Rigged" in people+ animated = re.search(r"Animated = new HashSet<string>\(StringComparer\.Ordinal\)\s*\{(.*?)\};", text, re.S).group(1)+ assert "Soldier1948Rigged" in animated and f'"{mod.SOURCE}"' not in animated+++def test_rings_follow_the_mesh_across_uv_seams():+ mod = tool()+ verts, polys = [], []+ box(verts, polys, -0.1, 0.1, -0.1, 0.1, 0.0, 0.5)+ rings = mod.rings_at(verts, mod.welded(verts, polys), 0.25)+ assert len(rings) == 1 and rings[0].n == 4 and rings[0].spans_centre, "the four vertical edges, one ring"+ # The same box with every face on its own vertices (as Tripo's seam-split meshes are) chains into one ring once welded.+ split_verts, split_polys = [], []+ for poly in polys:+ base = len(split_verts)+ split_verts += [verts[i] for i in poly]+ split_polys.append(tuple(range(base, base + 4)))+ assert len(mod.rings_at(split_verts, split_polys, 0.25)) == 4, "unwelded, each side's crossings stay apart"+ assert len(mod.rings_at(split_verts, mod.welded(split_verts, split_polys), 0.25)) == 1+++def test_landmarks_read_a_box_figure():+ mod = tool()+ sections = mod.Sections(*box_figure())+ assert abs(sections.top - 1.0) < 1e-9+ assert abs(sections.crotch - 0.455) < 1e-6, "the first ring across the centre line, just above the legs"+ assert abs(sections.fingertip - 0.425) < 1e-6, "the arms' lowest ring"+ assert abs(sections.armpit - 0.695) < 1e-6, "the arms' highest ring"+ assert abs(sections.collar - 0.805) < 1e-6, "the first ring above the arms narrower than the collar width"+ assert 0.80 < sections.neck < 0.86, "the narrowest ring between the collar and the head"+ assert abs(sections.arm(0.6).xc - 0.22) < 1e-6 and abs(sections.leg(0.2).xc - 0.075) < 1e-6+ assert sections.arm(0.2) is None and sections.leg(0.6) is None and sections.torso(0.2) is None+ assert abs(sections.foot_length() - 0.12) < 1e-6diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged.meta b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged.metanew file mode 100644index 000000000..4cce8ba8b--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged.meta@@ -0,0 +1,8 @@+fileFormatVersion: 2+guid: 0b9352f408bb84274a33c07560e64d14+folderAsset: yes+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-near.controller b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-near.controllernew file mode 100644index 000000000..4c894a33a--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-near.controller@@ -0,0 +1,130 @@+%YAML 1.1+%TAG !u! tag:unity3d.com,2011:+--- !u!1107 &-6205954105268310907+AnimatorStateMachine:+ serializedVersion: 6+ m_ObjectHideFlags: 1+ m_CorrespondingSourceObject: {fileID: 0}+ m_PrefabInstance: {fileID: 0}+ m_PrefabAsset: {fileID: 0}+ m_Name: Base Layer+ m_ChildStates:+ - serializedVersion: 1+ m_State: {fileID: -107208723492738520}+ m_Position: {x: 200, y: 0, z: 0}+ - serializedVersion: 1+ m_State: {fileID: -465483617926518752}+ m_Position: {x: 235, y: 65, z: 0}+ - serializedVersion: 1+ m_State: {fileID: 7309039801374550861}+ m_Position: {x: 270, y: 130, z: 0}+ m_ChildStateMachines: []+ m_AnyStateTransitions: []+ m_EntryTransitions: []+ m_StateMachineTransitions: {}+ m_StateMachineBehaviours: []+ m_AnyStatePosition: {x: 50, y: 20, z: 0}+ m_EntryPosition: {x: 50, y: 120, z: 0}+ m_ExitPosition: {x: 800, y: 120, z: 0}+ m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}+ m_DefaultState: {fileID: -107208723492738520}+--- !u!1102 &-465483617926518752+AnimatorState:+ serializedVersion: 6+ m_ObjectHideFlags: 1+ m_CorrespondingSourceObject: {fileID: 0}+ m_PrefabInstance: {fileID: 0}+ m_PrefabAsset: {fileID: 0}+ m_Name: walk+ m_Speed: 1+ m_CycleOffset: 0+ m_Transitions: []+ m_StateMachineBehaviours: []+ m_Position: {x: 50, y: 50, z: 0}+ m_IKOnFeet: 0+ m_WriteDefaultValues: 1+ m_Mirror: 0+ m_SpeedParameterActive: 0+ m_MirrorParameterActive: 0+ m_CycleOffsetParameterActive: 0+ m_TimeParameterActive: 0+ m_Motion: {fileID: -4799524434163024911, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ m_Tag:+ m_SpeedParameter:+ m_MirrorParameter:+ m_CycleOffsetParameter:+ m_TimeParameter:+--- !u!1102 &-107208723492738520+AnimatorState:+ serializedVersion: 6+ m_ObjectHideFlags: 1+ m_CorrespondingSourceObject: {fileID: 0}+ m_PrefabInstance: {fileID: 0}+ m_PrefabAsset: {fileID: 0}+ m_Name: idle+ m_Speed: 1+ m_CycleOffset: 0+ m_Transitions: []+ m_StateMachineBehaviours: []+ m_Position: {x: 50, y: 50, z: 0}+ m_IKOnFeet: 0+ m_WriteDefaultValues: 1+ m_Mirror: 0+ m_SpeedParameterActive: 0+ m_MirrorParameterActive: 0+ m_CycleOffsetParameterActive: 0+ m_TimeParameterActive: 0+ m_Motion: {fileID: -1978303741906493279, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ m_Tag:+ m_SpeedParameter:+ m_MirrorParameter:+ m_CycleOffsetParameter:+ m_TimeParameter:+--- !u!91 &9100000+AnimatorController:+ m_ObjectHideFlags: 0+ m_CorrespondingSourceObject: {fileID: 0}+ m_PrefabInstance: {fileID: 0}+ m_PrefabAsset: {fileID: 0}+ m_Name: figure-soldier-1948-v1-rigged-near+ serializedVersion: 5+ m_AnimatorParameters: []+ m_AnimatorLayers:+ - serializedVersion: 5+ m_Name: Base Layer+ m_StateMachine: {fileID: -6205954105268310907}+ m_Mask: {fileID: 0}+ m_Motions: []+ m_Behaviours: []+ m_BlendingMode: 0+ m_SyncedLayerIndex: -1+ m_DefaultWeight: 0+ m_IKPass: 0+ m_SyncedLayerAffectsTiming: 0+ m_Controller: {fileID: 9100000}+--- !u!1102 &7309039801374550861+AnimatorState:+ serializedVersion: 6+ m_ObjectHideFlags: 1+ m_CorrespondingSourceObject: {fileID: 0}+ m_PrefabInstance: {fileID: 0}+ m_PrefabAsset: {fileID: 0}+ m_Name: attack+ m_Speed: 1+ m_CycleOffset: 0+ m_Transitions: []+ m_StateMachineBehaviours: []+ m_Position: {x: 50, y: 50, z: 0}+ m_IKOnFeet: 0+ m_WriteDefaultValues: 1+ m_Mirror: 0+ m_SpeedParameterActive: 0+ m_MirrorParameterActive: 0+ m_CycleOffsetParameterActive: 0+ m_TimeParameterActive: 0+ m_Motion: {fileID: -3576926933002285359, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ m_Tag:+ m_SpeedParameter:+ m_MirrorParameter:+ m_CycleOffsetParameter:+ m_TimeParameter:diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-near.controller.meta b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-near.controller.metanew file mode 100644index 000000000..23d3d51a7--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-near.controller.meta@@ -0,0 +1,8 @@+fileFormatVersion: 2+guid: 727499115d4504d3db8a9292324da3fc+NativeFormatImporter:+ externalObjects: {}+ mainObjectFileID: 9100000+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-stream.prefab b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-stream.prefabnew file mode 100644index 000000000..a4eda4d7d--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-stream.prefab@@ -0,0 +1,91 @@+%YAML 1.1+%TAG !u! tag:unity3d.com,2011:+--- !u!1001 &6336624385384560874+PrefabInstance:+ m_ObjectHideFlags: 0+ serializedVersion: 2+ m_Modification:+ serializedVersion: 3+ m_TransformParent: {fileID: 0}+ m_Modifications:+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalPosition.x+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalPosition.y+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalPosition.z+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalRotation.w+ value: 1+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalRotation.x+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalRotation.y+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalRotation.z+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalEulerAnglesHint.x+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalEulerAnglesHint.y+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8679921383154817045, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_LocalEulerAnglesHint.z+ value: 0+ objectReference: {fileID: 0}+ - target: {fileID: -8183904423159538655, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: 'm_Materials.Array.data[0]'+ value:+ objectReference: {fileID: 2100000, guid: 1360de51769504b5ca001df6b5a4e2f7, type: 2}+ - target: {fileID: 919132149155446097, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_Name+ value: figure-soldier-1948-v1-rigged-stream+ objectReference: {fileID: 0}+ - target: {fileID: 5866666021909216657, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_Controller+ value:+ objectReference: {fileID: 9100000, guid: 727499115d4504d3db8a9292324da3fc, type: 2}+ - target: {fileID: 5866666021909216657, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ propertyPath: m_CullingMode+ value: 2+ objectReference: {fileID: 0}+ m_RemovedComponents: []+ m_RemovedGameObjects: []+ m_AddedGameObjects: []+ m_AddedComponents:+ - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ insertIndex: -1+ addedObject: {fileID: 3360402770516911730}+ m_SourcePrefab: {fileID: 100100000, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+--- !u!1 &6571138471470138811 stripped+GameObject:+ m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: a8e9513d56d6c4721a125e8a6b651797, type: 3}+ m_PrefabInstance: {fileID: 6336624385384560874}+ m_PrefabAsset: {fileID: 0}+--- !u!114 &3360402770516911730+MonoBehaviour:+ m_ObjectHideFlags: 0+ m_CorrespondingSourceObject: {fileID: 0}+ m_PrefabInstance: {fileID: 0}+ m_PrefabAsset: {fileID: 0}+ m_GameObject: {fileID: 6571138471470138811}+ m_Enabled: 1+ m_EditorHideFlags: 0+ m_Script: {fileID: 11500000, guid: e77a9d0471f794527b4c41799be6b978, type: 3}+ m_Name:+ m_EditorClassIdentifier: Statecraft.Game::Statecraft.Game.Map.Collection.OriginalModelDistancediff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-stream.prefab.meta b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-stream.prefab.metanew file mode 100644index 000000000..f4c956fc4--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged-stream.prefab.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 7788afa4a8ddf4d0c811a8d3f886c4bb+PrefabImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.fbx b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.fbxnew file mode 100644index 000000000..e605fa47cBinary files /dev/null and b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.fbx differdiff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.fbx.meta b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.fbx.metanew file mode 100644index 000000000..3f38feb75--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.fbx.meta@@ -0,0 +1,198 @@+fileFormatVersion: 2+guid: a8e9513d56d6c4721a125e8a6b651797+ModelImporter:+ serializedVersion: 24300+ internalIDToNameTable: []+ externalObjects: {}+ materials:+ materialImportMode: 0+ materialName: 0+ materialSearch: 1+ materialLocation: 1+ searchTexturesGlobally: 0+ animations:+ legacyGenerateAnimations: 4+ bakeSimulation: 0+ resampleCurves: 0+ optimizeGameObjects: 0+ removeConstantScaleCurves: 0+ motionNodeName:+ animationImportErrors:+ animationImportWarnings:+ animationRetargetingWarnings:+ animationDoRetargetingWarnings: 0+ importAnimatedCustomProperties: 0+ importConstraints: 0+ animationCompression: 0+ animationRotationError: 0.5+ animationPositionError: 0.5+ animationScaleError: 0.5+ animationWrapMode: 0+ extraExposedTransformPaths: []+ extraUserProperties: []+ clipAnimations:+ - serializedVersion: 16+ name: Armature|fire+ takeName: Armature|fire+ internalID: -3576926933002285359+ firstFrame: 0+ lastFrame: 36+ wrapMode: 0+ orientationOffsetY: 0+ level: 0+ cycleOffset: 0+ loop: 0+ hasAdditiveReferencePose: 0+ loopTime: 0+ loopBlend: 0+ loopBlendOrientation: 0+ loopBlendPositionY: 0+ loopBlendPositionXZ: 0+ keepOriginalOrientation: 0+ keepOriginalPositionY: 1+ keepOriginalPositionXZ: 0+ heightFromFeet: 0+ mirror: 0+ bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000+ curves: []+ events: []+ transformMask: []+ maskType: 3+ maskSource: {instanceID: 0}+ additiveReferencePoseFrame: 0+ - serializedVersion: 16+ name: Armature|idle+ takeName: Armature|idle+ internalID: -1978303741906493279+ firstFrame: 0+ lastFrame: 422+ wrapMode: 0+ orientationOffsetY: 0+ level: 0+ cycleOffset: 0+ loop: 0+ hasAdditiveReferencePose: 0+ loopTime: 0+ loopBlend: 0+ loopBlendOrientation: 0+ loopBlendPositionY: 0+ loopBlendPositionXZ: 0+ keepOriginalOrientation: 0+ keepOriginalPositionY: 1+ keepOriginalPositionXZ: 0+ heightFromFeet: 0+ mirror: 0+ bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000+ curves: []+ events: []+ transformMask: []+ maskType: 3+ maskSource: {instanceID: 0}+ additiveReferencePoseFrame: 0+ - serializedVersion: 16+ name: Armature|walk+ takeName: Armature|walk+ internalID: -4799524434163024911+ firstFrame: 0+ lastFrame: 56+ wrapMode: 0+ orientationOffsetY: 0+ level: 0+ cycleOffset: 0+ loop: 0+ hasAdditiveReferencePose: 0+ loopTime: 0+ loopBlend: 0+ loopBlendOrientation: 0+ loopBlendPositionY: 0+ loopBlendPositionXZ: 0+ keepOriginalOrientation: 0+ keepOriginalPositionY: 1+ keepOriginalPositionXZ: 0+ heightFromFeet: 0+ mirror: 0+ bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000+ curves: []+ events: []+ transformMask: []+ maskType: 3+ maskSource: {instanceID: 0}+ additiveReferencePoseFrame: 0+ isReadable: 0+ meshes:+ lODScreenPercentages: []+ globalScale: 1+ meshCompression: 0+ addColliders: 0+ useSRGBMaterialColor: 1+ sortHierarchyByName: 1+ importPhysicalCameras: 1+ importVisibility: 0+ importBlendShapes: 1+ importCameras: 0+ importLights: 0+ nodeNameCollisionStrategy: 1+ fileIdsGeneration: 2+ swapUVChannels: 0+ generateSecondaryUV: 0+ useFileUnits: 1+ keepQuads: 0+ weldVertices: 1+ bakeAxisConversion: 0+ preserveHierarchy: 0+ skinWeightsMode: 0+ maxBonesPerVertex: 4+ minBoneWeight: 0.001+ optimizeBones: 1+ generateMeshLods: 0+ meshLodGenerationFlags: 0+ maximumMeshLod: -1+ meshOptimizationFlags: -4+ indexFormat: 0+ secondaryUVAngleDistortion: 8+ secondaryUVAreaDistortion: 15.000001+ secondaryUVHardAngle: 88+ secondaryUVMarginMethod: 1+ secondaryUVMinLightmapResolution: 40+ secondaryUVMinObjectScale: 1+ secondaryUVPackMargin: 4+ useFileScale: 1+ strictVertexDataChecks: 0+ tangentSpace:+ normalSmoothAngle: 60+ normalImportMode: 0+ tangentImportMode: 2+ normalCalculationMode: 4+ legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0+ blendShapeNormalImportMode: 1+ normalSmoothingSource: 0+ referencedClips: []+ importAnimation: 1+ humanDescription:+ serializedVersion: 3+ human: []+ skeleton: []+ armTwist: 0.5+ foreArmTwist: 0.5+ upperLegTwist: 0.5+ legTwist: 0.5+ armStretch: 0.05+ legStretch: 0.05+ feetSpacing: 0+ globalScale: 1+ rootMotionBoneName:+ hasTranslationDoF: 0+ hasExtraRoot: 0+ skeletonHasParents: 1+ lastHumanDescriptionAvatarSource: {instanceID: 0}+ autoGenerateAvatarMappingIfUnspecified: 1+ animationType: 2+ humanoidOversampling: 1+ avatarSetup: 1+ addHumanoidExtraRootOnlyWhenUsingAvatar: 1+ importBlendShapeDeformPercent: 1+ remapMaterialsIfMaterialImportModeIsNone: 0+ additionalBone: 0+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.mat b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.matnew file mode 100644index 000000000..46caf7f35--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.mat@@ -0,0 +1,137 @@+%YAML 1.1+%TAG !u! tag:unity3d.com,2011:+--- !u!114 &-4440527573827283461+MonoBehaviour:+ m_ObjectHideFlags: 11+ m_CorrespondingSourceObject: {fileID: 0}+ m_PrefabInstance: {fileID: 0}+ m_PrefabAsset: {fileID: 0}+ m_GameObject: {fileID: 0}+ m_Enabled: 1+ m_EditorHideFlags: 0+ m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}+ m_Name:+ m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion+ version: 10+--- !u!21 &2100000+Material:+ serializedVersion: 8+ m_ObjectHideFlags: 0+ m_CorrespondingSourceObject: {fileID: 0}+ m_PrefabInstance: {fileID: 0}+ m_PrefabAsset: {fileID: 0}+ m_Name: figure-soldier-1948-v1-rigged+ m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}+ m_Parent: {fileID: 0}+ m_ModifiedSerializedProperties: 0+ m_ValidKeywords: []+ m_InvalidKeywords: []+ m_LightmapFlags: 4+ m_EnableInstancingVariants: 1+ m_DoubleSidedGI: 0+ m_CustomRenderQueue: -1+ stringTagMap:+ RenderType: Opaque+ disabledShaderPasses:+ - MOTIONVECTORS+ m_LockedProperties:+ m_SavedProperties:+ serializedVersion: 3+ m_TexEnvs:+ - _BaseMap:+ m_Texture: {fileID: 2800000, guid: b348cf0d1d6b401b88eb864eeb55d58c, type: 3}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _BumpMap:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _DetailAlbedoMap:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _DetailMask:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _DetailNormalMap:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _EmissionMap:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _MainTex:+ m_Texture: {fileID: 2800000, guid: b348cf0d1d6b401b88eb864eeb55d58c, type: 3}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _MetallicGlossMap:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _OcclusionMap:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _ParallaxMap:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - _SpecGlossMap:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - unity_Lightmaps:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - unity_LightmapsInd:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ - unity_ShadowMasks:+ m_Texture: {fileID: 0}+ m_Scale: {x: 1, y: 1}+ m_Offset: {x: 0, y: 0}+ m_Ints: []+ m_Floats:+ - _AddPrecomputedVelocity: 0+ - _AlphaClip: 0+ - _AlphaToMask: 0+ - _Blend: 0+ - _BlendModePreserveSpecular: 1+ - _BumpScale: 1+ - _ClearCoatMask: 0+ - _ClearCoatSmoothness: 0+ - _Cull: 2+ - _Cutoff: 0.5+ - _DetailAlbedoMapScale: 1+ - _DetailNormalMapScale: 1+ - _DstBlend: 0+ - _DstBlendAlpha: 0+ - _EnvironmentReflections: 1+ - _GlossMapScale: 0+ - _Glossiness: 0+ - _GlossyReflections: 0+ - _Metallic: 0+ - _OcclusionStrength: 1+ - _Parallax: 0.005+ - _QueueOffset: 0+ - _ReceiveShadows: 1+ - _Smoothness: 0+ - _SmoothnessTextureChannel: 0+ - _SpecularHighlights: 1+ - _SrcBlend: 1+ - _SrcBlendAlpha: 1+ - _Surface: 0+ - _WorkflowMode: 1+ - _XRMotionVectorsPass: 1+ - _ZWrite: 1+ m_Colors:+ - _BaseColor: {r: 1, g: 1, b: 1, a: 1}+ - _Color: {r: 1, g: 1, b: 1, a: 1}+ - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}+ - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}+ m_BuildTextureStacks: []+ m_AllowLocking: 1diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.mat.meta b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.mat.metanew file mode 100644index 000000000..5e78a20fa--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged.mat.meta@@ -0,0 +1,8 @@+fileFormatVersion: 2+guid: 1360de51769504b5ca001df6b5a4e2f7+NativeFormatImporter:+ externalObjects: {}+ mainObjectFileID: 0+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged_basecolor.jpg b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged_basecolor.jpgnew file mode 100644index 000000000..111cd4d6dBinary files /dev/null and b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged_basecolor.jpg differdiff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged_basecolor.jpg.meta b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged_basecolor.jpg.metanew file mode 100644index 000000000..5f338d918--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/figure-soldier-1948-v1-rigged_basecolor.jpg.meta@@ -0,0 +1,130 @@+fileFormatVersion: 2+guid: b348cf0d1d6b401b88eb864eeb55d58c+TextureImporter:+ internalIDToNameTable: []+ externalObjects: {}+ serializedVersion: 13+ mipmaps:+ mipMapMode: 0+ enableMipMap: 1+ sRGBTexture: 1+ 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: 0+ wrapV: 0+ wrapW: 0+ 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: 8192+ 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: 8192+ resizeAlgorithm: 0+ textureFormat: -1+ textureCompression: 1+ compressionQuality: 50+ crunchedCompression: 0+ allowsAlphaSplitting: 0+ overridden: 1+ ignorePlatformSupport: 0+ androidETC2FallbackOverride: 0+ forceMaximumCompressionQuality_BC6H_BC7: 0+ - serializedVersion: 4+ buildTarget: WebGL+ maxTextureSize: 8192+ resizeAlgorithm: 0+ textureFormat: -1+ textureCompression: 1+ compressionQuality: 50+ crunchedCompression: 0+ allowsAlphaSplitting: 0+ overridden: 1+ 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/Art/Collection/figure-soldier-1948-v1-rigged/provenance.json b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/provenance.jsonnew file mode 100644index 000000000..3a02150b8--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/provenance.json@@ -0,0 +1,159 @@+{+ "asset": "figure-soldier-1948-v1-rigged",+ "creator_credit": "Tal Heuberger",+ "licence": "CC-BY-NC-ND-4.0",+ "what": "Tal Heuberger's figure-soldier-1948-v1 (#336, a static mesh) skinned to the 67-bone skeleton of their figure-c07-veteran-fighter-v2 (#507) and given its idle, walk and fire takes, by tools/rig_soldier_1948.py (Blender 5.2.2 LTS); the mesh is Tal's, re-posed into C07's rest pose; the colour map is Tal's byte for byte. Adapted version by the owner's report of Tal's OK (#2384, 3 November 2026). The originals are unchanged.",+ "inputs": {+ "figure-soldier-1948-v1.fbx": "f13635851969c1bb6e4c0babb5283685159805dfba4a2912bf2bc88813861782",+ "figure-c07-veteran-fighter-v2.fbx": "7f839d2d37c6eff68e5dc3cb4f19f3bcb50a780ae9b31f90edda3e6f461b5ec3"+ },+ "files": {+ "figure-soldier-1948-v1-rigged.fbx": "39545588027f0eb77462a955228dc5d813ff5ec4ed1a5d276d954d0212e9269d",+ "figure-soldier-1948-v1-rigged_basecolor.jpg": "cb30823ff65a23c418986741e4ef88f680d6dd594909d4dd6b68d1ca412d6945"+ },+ "bones": 67,+ "takes": {+ "fire": [+ 1,+ 37+ ],+ "idle": [+ 1,+ 423+ ],+ "walk": [+ 1,+ 57+ ]+ },+ "take_names": [+ "Armature|Armature|fire",+ "Armature|Armature|idle",+ "Armature|Armature|walk"+ ],+ "fps": 24,+ "vertices": 4187,+ "triangles": 8054,+ "height_m": 0.9605,+ "unweighted_vertices": 0,+ "max_influences": 4,+ "bones_with_weight": 47,+ "landmarks_m": {+ "crotch": 0.445,+ "fingertip": 0.425,+ "armpit": 0.685,+ "collar": 0.825,+ "neck": 0.855+ },+ "donor_landmarks_m": {+ "crotch": 0.435,+ "fingertip": 0.545,+ "armpit": 0.715,+ "collar": 0.835,+ "neck": 0.885+ },+ "joints_m": {+ "Hips": [+ 0.0,+ 0.0005,+ 0.5529+ ],+ "Spine": [+ 0.0,+ 0.0143,+ 0.6048+ ],+ "Chest": [+ 0.0,+ -0.0093,+ 0.6642+ ],+ "UpperChest": [+ 0.0,+ 0.0518,+ 0.7087+ ],+ "Neck": [+ 0.0,+ 0.0279,+ 0.8275+ ],+ "Head": [+ 0.0,+ 0.0212,+ 0.8582+ ],+ "HeadTop": [+ 0.0,+ -0.0238,+ 0.9209+ ],+ "Left_Shoulder": [+ 0.0293,+ 0.0437,+ 0.7923+ ],+ "Left_UpperArm": [+ 0.1011,+ 0.0466,+ 0.7767+ ],+ "Left_LowerArm": [+ 0.1749,+ 0.0476,+ 0.6404+ ],+ "Left_Hand": [+ 0.2319,+ 0.0194,+ 0.5339+ ],+ "Fingertip": [+ 0.2573,+ 0.013,+ 0.425+ ],+ "DonorFingertip": [+ 0.3918,+ -0.0756,+ 0.545+ ],+ "Left_UpperLeg": [+ 0.0481,+ 0.0331,+ 0.5412+ ],+ "Left_LowerLeg": [+ 0.0856,+ 0.0175,+ 0.3048+ ],+ "Left_Foot": [+ 0.098,+ 0.017,+ 0.0644+ ]+ },+ "donor_self_check_m": {+ "Hips": 0.002,+ "Spine": 0.002,+ "Chest": 0.002,+ "UpperChest": 0.002,+ "Neck": 0.002,+ "Head": 0.002,+ "Left_Shoulder": 0.0,+ "Left_UpperArm": 0.0,+ "Left_LowerArm": 0.0248,+ "Left_Hand": 0.002,+ "Left_UpperLeg": 0.0,+ "Left_LowerLeg": 0.0,+ "Left_Foot": 0.0+ },+ "hand_ratio": {+ "Right": 0.9501577820046833,+ "Left": 0.963339840214032+ },+ "unweighted_vertices_after_heat": 72,+ "unweighted_filled_from_nearest_m": 0.0095,+ "rest_orientation_error_deg": 0.0+}diff --git a/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/provenance.json.meta b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/provenance.json.metanew file mode 100644index 000000000..ca95953a5--- /dev/null+++ b/unity/Assets/Art/Collection/figure-soldier-1948-v1-rigged/provenance.json.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 546e35f49301e407c94c39b80ebc1787+TextScriptImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Editor/CollectionImport.cs b/unity/Assets/Editor/CollectionImport.csindex 67223b3bb..6435e982d 100644--- a/unity/Assets/Editor/CollectionImport.cs+++ b/unity/Assets/Editor/CollectionImport.cs@@ -264,7 +264,7 @@ namespace Statecraft.Game.EditorToolspublic static readonly IReadOnlyCollection<string> TokenFigures = new HashSet<string>(StringComparer.Ordinal){UnitFigures.SabraPioneer, UnitFigures.PioneerVeteran, UnitFigures.YoungRecruit, UnitFigures.VeteranFighter,- UnitFigures.PalmachScout, UnitFigures.ArabLegion, UnitFigures.Irregular,+ UnitFigures.PalmachScout, UnitFigures.Soldier1948, UnitFigures.ArabLegion, UnitFigures.Irregular,UnitFigures.SyrianInfantry, UnitFigures.IraqiInfantry, UnitFigures.EgyptianInfantry, UnitFigures.AlaInfantry,UnitFigures.LebaneseRegular,};@@ -286,9 +286,18 @@ namespace Statecraft.Game.EditorTools}/// <summary>Sets <paramref name="controller"/>'s walk state to the model's walk take and its attack state to its- /// fire take, adding each state the first time; a take the model lacks adds no state (C04 has no fire).</summary>+ /// fire take, adding each state the first time; a take the model lacks adds no state (C04 has no fire). The default+ /// state, when it plays the idle take, is named idle, the state a token's figures return to after a move+ /// (UnitFigureMotion.IdleState): a controller made from an original's "Armature|idle" take is named after the take.</summary>internal static void AddMotionStates(AnimatorController controller, string model){+ var idle = controller.layers[0].stateMachine.defaultState;+ if (idle != null && idle.motion is AnimationClip take && idle.name != UnitFigureMotion.IdleState+ && (take.name == "idle" || take.name.EndsWith("|idle", StringComparison.OrdinalIgnoreCase)))+ {+ idle.name = UnitFigureMotion.IdleState;+ EditorUtility.SetDirty(controller);+ }var clips = AssetDatabase.LoadAllAssetsAtPath(model).OfType<AnimationClip>().Where(c => !c.name.StartsWith("__preview__", StringComparison.Ordinal)).ToList();SetState(controller, UnitFigureMotion.WalkState, WalkTake(clips));diff --git a/unity/Assets/Scripts/Map/Collection/CollectionCatalog.cs b/unity/Assets/Scripts/Map/Collection/CollectionCatalog.csindex 940f02ad3..8509c2fdd 100644--- a/unity/Assets/Scripts/Map/Collection/CollectionCatalog.cs+++ b/unity/Assets/Scripts/Map/Collection/CollectionCatalog.cs@@ -120,6 +120,12 @@ namespace Statecraft.Game.Map.Collection/// <summary>Tal Heuberger's khaki canvas tent, in place of a transit camp's khaki ridge tents up close (CampTentModels).</summary>public const string KhakiTent = "generated-1948-08-khaki-canvas-tent";+ /// <summary>The rigged copy of #336's 1948 soldier (#2384; owner, 3 November 2026: "rig Tal's later"): Tal Heuberger's+ /// static soldier skinned to the 67-bone skeleton their C06 and C07 share, with C07's idle, walk and fire takes+ /// (tools/rig_soldier_1948.py; its provenance.json beside it). The original, figure-soldier-1948-v1, stays catalogued+ /// and untouched; the Yiftach and Negev tokens draw this copy in its place (UnitFigures).</summary>+ public const string Soldier1948Rigged = "figure-soldier-1948-v1-rigged";+/// <summary>Every bundle, with its models in a fixed order.</summary>public static readonly IReadOnlyList<(string Bundle, string[] Ids)> Groups = new (string, string[])[]{@@ -133,6 +139,8 @@ namespace Statecraft.Game.Map.Collection"figure-arab-villager-v1", "figure-builder-1950-v1", "figure-elder-immigrant-v1", "figure-immigrant-child-v1","figure-immigrant-woman-v1", "figure-kibbutz-woman-v1", "figure-soldier-1948-v1", "figure-yemenite-immigrant-v1","figure-pioneer-farmer-v1-tpose",+ // the soldier's rigged copy (#2384), the model the Yiftach and Negev tokens draw+ Soldier1948Rigged,}),(Vehicles, new[]{@@ -209,7 +217,8 @@ namespace Statecraft.Game.Map.Collection};/// <summary>The models whose near prefab is skinned and plays its idle clip: every person but C05 (his only idle is- /// a walk; #507 has him stand still) and #336's soldier (no rig), the sheep and the draught horse.</summary>+ /// a walk; #507 has him stand still) and #336's soldier as delivered (no rig; his rigged copy plays C07's), the sheep+ /// and the draught horse.</summary>public static readonly IReadOnlyCollection<string> Animated = new HashSet<string>(StringComparer.Ordinal){"figure-c01-arriving-man-v2", "figure-c02-townsman-v2", "figure-c03-smith-carpenter-v2", "figure-c04-sabra-pioneer-v3",@@ -218,6 +227,7 @@ namespace Statecraft.Game.Map.Collection"figure-draught-horse-idle-1948-v2", "figure-sheep-idle-1948-v1","figure-arab-villager-v1", "figure-builder-1950-v1", "figure-elder-immigrant-v1", "figure-immigrant-child-v1","figure-immigrant-woman-v1", "figure-kibbutz-woman-v1", "figure-yemenite-immigrant-v1", "figure-pioneer-farmer-v1-tpose",+ Soldier1948Rigged,"figure-syrian-infantry-1948-v1","figure-iraqi-infantry-1948-v1",EgyptianInfantry,diff --git a/unity/Assets/Scripts/Map/Units/UnitFigures.cs b/unity/Assets/Scripts/Map/Units/UnitFigures.csindex a456d55eb..759515948 100644--- a/unity/Assets/Scripts/Map/Units/UnitFigures.cs+++ b/unity/Assets/Scripts/Map/Units/UnitFigures.cs@@ -29,7 +29,7 @@ namespace Statecraft.Game.Map.Unitspublic const string SabraPioneer = "figure-c04-sabra-pioneer-v3", PioneerVeteran = "figure-c05-pioneer-veteran-v2",YoungRecruit = "figure-c06-young-recruit-v2", VeteranFighter = "figure-c07-veteran-fighter-v2",- PalmachScout = "figure-c12f-palmach-scout-v2", Soldier1948 = "figure-soldier-1948-v1", ArabLegion = "figure-c08-arab-legion-v2", Irregular = "figure-c09-irregular-v2",+ PalmachScout = "figure-c12f-palmach-scout-v2", Soldier1948 = CollectionCatalog.Soldier1948Rigged, ArabLegion = "figure-c08-arab-legion-v2", Irregular = "figure-c09-irregular-v2",Napoleonchik = "figure-vehicle-napoleonchik-65mm-1948-v2", WillysJeep = "figure-vehicle-willys-jeep-1948-v2",SandwichArmouredCar = "figure-vehicle-sandwich-convoy-1948-v2";@@ -56,7 +56,9 @@ namespace Statecraft.Game.Map.Units/// figure on some brigade unit tokens, next to C06 and C07"): a rifleman in khaki wearing the knitted stocking cap, the/// Palmach's (as C07 wears it), so he stands third on the other two Palmach brigades, the 11th and 12th (their rows'/// numbers, palmach.org.il). On Negev's token he takes the third figure's sourced cap from C07- /// (<see cref="ThirdOverHeadgear"/>), so it shows C07, C06 and the soldier.</summary>+ /// (<see cref="ThirdOverHeadgear"/>), so it shows C07, C06 and the soldier. He is drawn as his rigged copy+ /// (<see cref="CollectionCatalog.Soldier1948Rigged"/>, #2384), which walks, idles and fires with C07's takes and+ /// holds the K98k (UnitWeapons); Tal's delivered file, with no rig, stays catalogued and is drawn nowhere.</summary>public static readonly IReadOnlyDictionary<string, string> ThirdFigure = new Dictionary<string, string>(StringComparer.Ordinal){["harel"] = PalmachScout, ["yiftach"] = Soldier1948, ["negev"] = Soldier1948,diff --git a/unity/Assets/Scripts/Map/Units/UnitWeapons.cs b/unity/Assets/Scripts/Map/Units/UnitWeapons.csindex ad046fe98..efc57bc22 100644--- a/unity/Assets/Scripts/Map/Units/UnitWeapons.cs+++ b/unity/Assets/Scripts/Map/Units/UnitWeapons.cs@@ -16,7 +16,8 @@ namespace Statecraft.Game.Map.Units/// <summary>The name of the weapon's object under the figure's hand bone (UnitFigures.BoxIn leaves it out, so a weapon/// never changes the figure's height or feet).</summary>public const string HeldName = "HeldWeapon";- /// <summary>The hand bone of Tal Heuberger's 67-bone figures (C04 to C07, C12F; C06's point-fire export binds its K98k to it).</summary>+ /// <summary>The hand bone of Tal Heuberger's 67-bone figures (C04 to C07, C12F, and the 1948 soldier's rigged copy; C06's+ /// point-fire export binds its K98k to it).</summary>public const string HandBone = "Right_Hand";/// <summary>One sourced row: which army carried the weapon, from when. The rows are agent-read: an AI agent read the@@ -60,12 +61,14 @@ namespace Statecraft.Game.Map.Units};/// <summary>The weapon each Israeli token figure holds: the Palmach scout (C12F, a Palmach woman on Harel's token,- /// UnitFigures.ThirdFigure) the Palmach's Sten; the other riflemen with Tal's rig the K98k. No Arab force has a row: no- /// source found places a K98k, an MG34 or a Sten with one in 1948, and Tal made no Lee-Enfield or Bren ([GAP]).</summary>+ /// UnitFigures.ThirdFigure) the Palmach's Sten; the other riflemen with Tal's rig the K98k, the 1948 soldier's rigged+ /// copy among them (#2384: it has C07's 67 bones and hand). No Arab force has a row: no source found places a K98k, an+ /// MG34 or a Sten with one in 1948, and Tal made no Lee-Enfield or Bren ([GAP]).</summary>public static readonly IReadOnlyDictionary<string, string> ByFigure = new Dictionary<string, string>(StringComparer.Ordinal){[UnitFigures.SabraPioneer] = CollectionCatalog.K98k, [UnitFigures.PioneerVeteran] = CollectionCatalog.K98k,[UnitFigures.YoungRecruit] = CollectionCatalog.K98k, [UnitFigures.VeteranFighter] = CollectionCatalog.K98k,+ [UnitFigures.Soldier1948] = CollectionCatalog.K98k,[UnitFigures.PalmachScout] = CollectionCatalog.Sten,};diff --git a/unity/Assets/Tests/EditMode/CivilianPeopleTests.cs b/unity/Assets/Tests/EditMode/CivilianPeopleTests.csindex 70e30fbb8..18cf9353f 100644--- a/unity/Assets/Tests/EditMode/CivilianPeopleTests.cs+++ b/unity/Assets/Tests/EditMode/CivilianPeopleTests.cs@@ -520,9 +520,11 @@ public sealed class CivilianPeopleTestsplaced.UnionWith(Statecraft.Game.Map.Kits.TownModels.Ids); // #1273: 18 originals and five generated houses are catalogued and requested by TownModelLayer// Tel Aviv's, Jerusalem's and Haifa's whole towns stay catalogued but unused: the four cities draw their buildings at// every zoom (owner, 2 November 2026, "Yes, small buildings at every zoom").- CollectionAssert.AreEquivalent(new[] { SpecialBuildingModels.Workshop, TownLandmarks.Jerusalem, TownLandmarks.TelAviv, TownLandmarks.Jerusalem3D, TownLandmarks.Haifa },+ // #336's soldier as delivered has no rig; the tokens draw his rigged copy in his place (#2384; owner, 3 November 2026:+ // "rig Tal's later"), and the delivered file stays catalogued, unchanged and unplaced.+ CollectionAssert.AreEquivalent(new[] { SpecialBuildingModels.Workshop, TownLandmarks.Jerusalem, TownLandmarks.TelAviv, TownLandmarks.Jerusalem3D, TownLandmarks.Haifa, "figure-soldier-1948-v1" },CollectionCatalog.Ids.Where(id => !placed.Contains(id)).ToList(),- "every catalogued model has a place but b21, the first Jerusalem and the three cities' whole towns, each held back by an owner ruling");+ "every catalogued model has a place but b21, the first Jerusalem, the three cities' whole towns and the unrigged soldier, each held back by an owner ruling");CollectionAssert.IsSubsetOf(placed.ToList(), CollectionCatalog.Ids.ToList(), "every placed id is a catalogued model");}diff --git a/unity/Assets/Tests/EditMode/CollectionImportTests.cs b/unity/Assets/Tests/EditMode/CollectionImportTests.csindex 473202eef..b87316db5 100644--- a/unity/Assets/Tests/EditMode/CollectionImportTests.cs+++ b/unity/Assets/Tests/EditMode/CollectionImportTests.cs@@ -62,15 +62,15 @@ public class CollectionImportTestspublic void TheCatalogKeeps73IndependentOriginalsAndTheGeneratedInfantryBundle(){var ids = CollectionCatalog.Ids.ToList();- Assert.AreEqual(95, ids.Count);+ Assert.AreEqual(96, ids.Count);Assert.AreEqual(ids.Count, ids.Distinct().Count(), "an id in two bundles");- Assert.AreEqual(94, CollectionCatalog.Bundles.Count,- "73 independent originals, #1763's shared generated bundle and one bundle for each later generated model (#2083's two weapons and #2084's pose source among them)");+ Assert.AreEqual(95, CollectionCatalog.Bundles.Count,+ "73 independent originals, the 1948 soldier's rigged copy (#2384), #1763's shared generated bundle and one bundle for each later generated model (#2083's two weapons and #2084's pose source among them)");Assert.IsTrue(CollectionCatalog.Bundles.Where(b => b.Bundle != CollectionCatalog.ArabArmies).All(b => b.Ids.Length == 1 && b.Bundle == "collection-" + b.Ids[0]));- CollectionAssert.AreEqual(new[] { 21, 13, 6, 10, 5, 2, 4, 4, 4, 2, 1 }, CollectionCatalog.Groups.Select(g => g.Ids.Length));+ CollectionAssert.AreEqual(new[] { 22, 13, 6, 10, 5, 2, 4, 4, 4, 2, 1 }, CollectionCatalog.Groups.Select(g => g.Ids.Length));CollectionAssert.AreEqual(GeneratedInfantry, CollectionCatalog.Bundles.Single(b => b.Bundle == CollectionCatalog.ArabArmies).Ids);- Assert.AreEqual(27, CollectionCatalog.Animated.Count);+ Assert.AreEqual(28, CollectionCatalog.Animated.Count);CollectionAssert.IsSubsetOf(CollectionCatalog.Animated, ids);CollectionAssert.DoesNotContain(CollectionCatalog.Animated, "figure-c05-pioneer-veteran-v2", "C05's only idle is a walk");Assert.AreEqual("collection-vehicle-altalena-lst-1948-v2wl", CollectionCatalog.BundleOf("vehicle-altalena-lst-1948-v2wl"));@@ -127,8 +127,9 @@ public class CollectionImportTests/// <summary>Issue #708, owner ruling of 18 October 2026: "the 8 figures in #708 can be merged without his license line";/// and #886, owner ruling of 19 October 2026: "Yes, both" (the pioneer farmer and the Jerusalem variant, on the same/// terms). The nine figures offered only in #336 are slimmed like #507's people and stream in the people bundle after its- /// twelve; eight keep their idle clip, and the soldier, which #336 ships with no rig, is static at both zooms. Placing- /// them is #666, #665, #200 and #886's work, not this import's.</summary>+ /// twelve; eight keep their idle clip, and the soldier, which #336 ships with no rig, is static at both zooms (his rigged+ /// copy, #2384, follows the nine as the group's last model). Placing them is #666, #665, #200 and #886's work, not this+ /// import's.</summary>[Test]public void TheNineFiguresOf336StreamInThePeopleBundleAfterThe12Of507(){@@ -139,7 +140,8 @@ public class CollectionImportTests"figure-pioneer-farmer-v1-tpose",};var people = CollectionCatalog.Groups.Single(b => b.Bundle == CollectionCatalog.People).Ids;- CollectionAssert.AreEqual(nine, people.Skip(12).ToArray());+ CollectionAssert.AreEqual(nine, people.Skip(12).Take(9).ToArray());+ CollectionAssert.AreEqual(new[] { CollectionCatalog.Soldier1948Rigged }, people.Skip(21).ToArray(), "the soldier's rigged copy, after #336's nine");CollectionAssert.AreEqual(nine.Where(id => id != "figure-soldier-1948-v1"), nine.Where(Animated));foreach (var id in nine)foreach (var d in new[] { CollectionDetail.Far, CollectionDetail.Near })@@ -167,6 +169,8 @@ public class CollectionImportTestsreturn new[] { CollectionCatalog.SourceModelPath(id), $"{Dir(id)}/{id}.mat", ColourMap(id), $"{Dir(id)}/{id}.prefab", $"{Dir(id)}/provenance.json" }.Concat(CollectionCatalog.IsGeneratedProp(id) || CollectionCatalog.IsGeneratedTown(id) || CollectionCatalog.IsGeneratedWeapon(id) ? Array.Empty<string>() : new[] { $"{Dir(id)}/{id}.controller" }).ToArray();if (Animated(id) || OriginalModelPose.Required(id)) files.Add($"{Dir(id)}/{id}-near.controller");+ // The 1948 soldier's rigged copy (#2384) records its derivation beside it, as the generated models do.+ if (id == CollectionCatalog.Soldier1948Rigged) files.Add($"{Dir(id)}/provenance.json");foreach (var suffix in new[] { "-far.fbx", "-near.fbx", "-far.prefab", "-near.prefab" }){var retained = $"{Dir(id)}/{id}{suffix}";diff --git a/unity/Assets/Tests/EditMode/OriginalModelsStreamingTests.cs b/unity/Assets/Tests/EditMode/OriginalModelsStreamingTests.csindex b1c0a4cef..b33c9b6f6 100644--- a/unity/Assets/Tests/EditMode/OriginalModelsStreamingTests.cs+++ b/unity/Assets/Tests/EditMode/OriginalModelsStreamingTests.cs@@ -14,7 +14,7 @@ public class OriginalModelsStreamingTestspublic void EveryOriginalHasItsOwnBundle(){var ids = CollectionCatalog.Ids.Where(id => !CollectionCatalog.IsGenerated(id) && !CollectionCatalog.IsGeneratedHouse(id)).ToArray();- Assert.AreEqual(73, ids.Length, "all 23 buildings and 50 collection models");+ Assert.AreEqual(74, ids.Length, "all 23 buildings and 51 collection models (#2384 adds the rigged 1948 soldier)");Assert.AreEqual(ids.Length, ids.Select(CollectionCatalog.BundleOf).Distinct().Count(), "one model per bundle");}diff --git a/unity/Assets/Tests/EditMode/TalSoldierRigShots.cs b/unity/Assets/Tests/EditMode/TalSoldierRigShots.csnew file mode 100644index 000000000..73213706f--- /dev/null+++ b/unity/Assets/Tests/EditMode/TalSoldierRigShots.cs@@ -0,0 +1,141 @@+#nullable enable+using System;+using System.Collections;+using System.IO;+using System.Linq;+using NUnit.Framework;+using Statecraft.Game.Map;+using Statecraft.Game.Map.Collection;+using Statecraft.Game.Map.Units;+using Statecraft.Game.UI;+using UnityEditor;+using UnityEditor.SceneManagement;+using UnityEngine;+using UnityEngine.TestTools;+using UnityEngine.UIElements;+using Object = UnityEngine.Object;++/// <summary>Before/after stills of #2384 in the real game scene: the game booted as TalModelsShots boots it (15 May 1948,+/// turn 0), the unit figures and weapons answered with the editor's prefabs as the player's stream answers them, on Negev's+/// token at Nir Am (C07, C06 and the third figure; Yiftach stands only from 11 July 1948, so it is not on the opening map).+/// "Before" answers the third figure's request with C07 (what #2382 draws there); "after" with Tal Heuberger's soldier, rigged.+/// Each frame is close zoom (1.25 x the closest the player can reach) on the token's centre raised by half a figure's height,+/// yaw 0, as TalWeaponsShots frames its stills. The walk frame begins a move and advances it to its middle, the attack frame+/// plays the attack as the game does and advances it to half its length; an Animator does not run in edit mode, so every+/// figure's Animator is advanced by hand by the same time. Explicit.</summary>+[Explicit("writes stills for a pull request, not a check")]+public class TalSoldierRigShots+{+ string saveDir = "";+ RenderTexture? rt; PanelSettings? ps;+ GameRoot root = null!;+ Action<string, CollectionDetail, Action<GameObject?>>? savedUnits;++ [SetUp]+ public void Prepare()+ {+ saveDir = Path.Combine(Path.GetTempPath(), "statecraft-soldier-rig-shots-" + Guid.NewGuid().ToString("N"));+ Directory.CreateDirectory(TalModelsShots.ShotDir); Directory.CreateDirectory(CivMovementShots.ShotDir);+ savedUnits = UnitFigures.Source;+ }++ [TearDown]+ public void DiscardScene()+ {+ UnitFigures.Source = savedUnits; UnitWeapons.Source = null; UnitFigurePointFire.Forget();+ EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);+ if (ps != null) Object.DestroyImmediate(ps);+ if (rt != null) { rt.Release(); Object.DestroyImmediate(rt); }+ if (Directory.Exists(saveDir)) Directory.Delete(saveDir, true);+ }++ static GameObject? Prefab(string id, CollectionDetail detail) => AssetDatabase.LoadAssetAtPath<GameObject>(CollectionCatalog.PrefabPath(id, detail));++ /// <summary>How far into the walk take the moving frame is taken: a mid-stride of C07's 57-frame (2.33 s) walk.</summary>+ const float WalkAt = 0.6f;++ IEnumerator Shot(bool after, string what)+ {+ UnitFigures.Source = (id, detail, done) => done(Prefab(!after && id == UnitFigures.Soldier1948 ? UnitFigures.VeteranFighter : id, detail));+ UnitWeapons.Source = (id, done) => done(Prefab(id, CollectionDetail.Far));+ yield return CivMovementShots.Boot(false, saveDir, (t, p, u, g) => { rt = t; ps = p; root = g; });+ Camera.main.aspect = (float)CivMovementShots.Width / CivMovementShots.Height;+ var map = Object.FindFirstObjectByType<MapScene>();+ var subject = root.Units!.Tokens.First(t => t.Token.Unit.Id == "negev");+ var token = map.Terrain.transform.Find(UnitLayer.RootName + "/Tokens/" + subject.Token.Unit.Id);+ Assert.IsNotNull(token, subject.Token.Unit.Id);+ var at = new Vector3((float)subject.Spot.X, 0f, (float)subject.Spot.Z);+ at.y = map.Terrain.SampleHeight(at) + map.Terrain.transform.position.y;+ float distance = CameraController.MinDistance * 1.25f;+ var aim = at + Vector3.up * (UnitBadge.FigureHeightM * UnitShowcase.FigureScale * 0.5f);+ TalModelsShots.Look(aim, distance);+ for (int i = 0; i < 5; i++) { Camera.main.Render(); yield return null; } // the near figures come in at close zoom+ string detail = "";+ var motion = token.GetComponent<UnitTokenMotion>() ?? token.gameObject.AddComponent<UnitTokenMotion>();+ if (what == "walk")+ {+ motion.Begin(new Vector3(UnitTokenMotion.MinMoveM * 4f, 0f, 0f));+ motion.Tick(UnitTokenMotion.Duration / 2f);+ foreach (var a in token.GetComponentsInChildren<Animator>()) if (a.isActiveAndEnabled) a.Update(WalkAt);+ detail = $" walk at {WalkAt:F2} s, moving={motion.Moving}";+ for (int i = 0; i < 2; i++) { Camera.main.Render(); yield return null; }+ }+ else if (what == "attack")+ {+ bool played = motion.PlayAttack();+ var fire = token.GetComponentInChildren<UnitFigurePointFire>();+ float half = 0f;+ foreach (var a in token.GetComponentsInChildren<Animator>())+ if (UnitFigureMotion.CanPlay(a, UnitFigureMotion.Attack)) half = Mathf.Max(half, UnitTokenMotion.FireLength(a) / 2f);+ if (fire != null && fire.Ready) half = Mathf.Max(half, fire.FireLength / 2f);+ motion.Tick(half);+ foreach (var a in token.GetComponentsInChildren<Animator>()) if (a.isActiveAndEnabled) a.Update(half);+ detail = $" attack played={played} at {half:F3} s, aim holding={(fire != null && fire.Holding)}";+ for (int i = 0; i < 2; i++) { Camera.main.Render(); yield return null; }+ }+ if (what == "idle")+ {+ // Every model instance of the token's figures: what is drawn, where its hand is and where its weapon is.+ foreach (var figure in token.GetComponentsInChildren<UnitFigureResidency>(true))+ {+ var holder = figure.transform.Find(UnitFigures.ModelName);+ if (holder == null) { Debug.Log($"DIAG {figure.ModelId}: no holder"); continue; }+ for (int i = 0; i < holder.childCount; i++)+ {+ var model = holder.GetChild(i);+ var skin = model.GetComponentInChildren<SkinnedMeshRenderer>(true);+ var hand = UnitWeapons.FindDeep(model, UnitWeapons.HandBone);+ var weapon = hand != null ? hand.Find(UnitWeapons.HeldName) : null;+ var wr = weapon != null ? weapon.GetComponentInChildren<Renderer>(true) : null;+ var animator = model.GetComponent<Animator>();+ Debug.Log($"DIAG {figure.ModelId} child {i} '{model.name}' active={model.gameObject.activeInHierarchy} scale={model.lossyScale.y:F4} "+ + $"skinOff={(skin != null ? skin.forceRenderingOff.ToString() : "none")} skinBounds={(skin != null ? skin.bounds.ToString() : "")} "+ + $"animator={(animator != null ? animator.enabled + "/" + (animator.runtimeAnimatorController != null) : "none")} "+ + $"hand={(hand != null ? hand.position.ToString("F3") : "none")} "+ + $"weapon={(weapon != null ? weapon.position.ToString("F3") + " scale " + weapon.lossyScale.ToString("F3") : "none")} "+ + $"weaponOff={(wr != null ? wr.forceRenderingOff.ToString() : "none")} weaponBounds={(wr != null ? wr.bounds.ToString() : "")} weaponActive={(wr != null ? wr.gameObject.activeInHierarchy.ToString() : "")}");+ }+ }+ var rig = Camera.main.GetComponent<CameraRig>();+ foreach (var yaw in new[] { 90f, 180f, 270f })+ {+ rig.Yaw = yaw; rig.Apply();+ for (int i = 0; i < 2; i++) { Camera.main.Render(); yield return null; }+ CivMovementShots.Shot(rt!, Path.Combine("..", "tal-models-shots", $"soldier-rig-idle-yaw{yaw:0}-{(after ? "after" : "before")}"));+ }+ rig.Yaw = 0f; rig.Apply();+ for (int i = 0; i < 2; i++) { Camera.main.Render(); yield return null; }+ }+ var held = token.GetComponentsInChildren<Transform>(true).Count(t => t.name == UnitWeapons.HeldName && t.GetComponentInChildren<Renderer>() is Renderer r && !r.forceRenderingOff);+ var figures = string.Join("/", token.GetComponentsInChildren<UnitFigureResidency>(true).Select(o => o.ModelId));+ CivMovementShots.Shot(rt!, Path.Combine("..", "tal-models-shots", $"soldier-rig-{what}-{(after ? "after" : "before")}"));+ Debug.Log($"SHOT soldier-rig {what} {(after ? "after" : "before")}: token {subject.Token.Unit.Id} ({figures}) at {aim} from {distance:F0} m, shown weapons {held}{detail}");+ }++ [UnityTest] public IEnumerator IdleBefore() { yield return Shot(false, "idle"); }+ [UnityTest] public IEnumerator IdleAfter() { yield return Shot(true, "idle"); }+ [UnityTest] public IEnumerator WalkBefore() { yield return Shot(false, "walk"); }+ [UnityTest] public IEnumerator WalkAfter() { yield return Shot(true, "walk"); }+ [UnityTest] public IEnumerator AttackBefore() { yield return Shot(false, "attack"); }+ [UnityTest] public IEnumerator AttackAfter() { yield return Shot(true, "attack"); }+}diff --git a/unity/Assets/Tests/EditMode/TalSoldierRigShots.cs.meta b/unity/Assets/Tests/EditMode/TalSoldierRigShots.cs.metanew file mode 100644index 000000000..acecac2f5--- /dev/null+++ b/unity/Assets/Tests/EditMode/TalSoldierRigShots.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: 9e0362fbc18d24e2192113b948bccc17\ No newline at end of filediff --git a/unity/Assets/Tests/EditMode/UnitFiguresTests.cs b/unity/Assets/Tests/EditMode/UnitFiguresTests.csindex 7c88bbe83..04c92a7cc 100644--- a/unity/Assets/Tests/EditMode/UnitFiguresTests.cs+++ b/unity/Assets/Tests/EditMode/UnitFiguresTests.cs@@ -31,9 +31,9 @@ public class UnitFiguresTestsstatic readonly DateTime May20 = new DateTime(1948, 5, 20), July12 = new DateTime(1948, 7, 12), LastArmistice = new DateTime(1949, 7, 20);/// <summary>The models on the existing war roster: the unit models of #665, #336's 1948 soldier (#708; owner, 21 October- /// 2026: "a third figure on some brigade unit tokens, next to C06 and C07"), H01, the sandwich armoured car on Givati's- /// token (#1536), and the Syrian and Iraqi figures. C09 retains its baseline ALA role; the new ALA candidate remains- /// review-only.</summary>+ /// 2026: "a third figure on some brigade unit tokens, next to C06 and C07"), drawn as his rigged copy (#2384), H01, the+ /// sandwich armoured car on Givati's token (#1536), and the Syrian and Iraqi figures. C09 retains its baseline ALA role;+ /// the new ALA candidate remains review-only.</summary>static readonly string[] WarModels ={"figure-c04-sabra-pioneer-v3", "figure-c05-pioneer-veteran-v2", "figure-c06-young-recruit-v2", "figure-c07-veteran-fighter-v2",@@ -42,7 +42,7 @@ public class UnitFiguresTests"figure-ala-infantry-1948-v1", "figure-lebanese-regular-1948-v1","figure-vehicle-napoleonchik-65mm-1948-v2", "figure-vehicle-willys-jeep-1948-v2","figure-vehicle-sandwich-convoy-1948-v2",- "figure-soldier-1948-v1",+ "figure-soldier-1948-v1-rigged",};[Test]@@ -257,7 +257,7 @@ public class UnitFiguresTests[Test]public void EveryFigureOnATokenStandsWithItsArmsDown(){- foreach (var id in WarModels.Where(i => i != UnitFigures.Soldier1948 && !i.StartsWith("figure-vehicle-", StringComparison.Ordinal)))+ foreach (var id in WarModels.Where(i => !i.StartsWith("figure-vehicle-", StringComparison.Ordinal))){var go = (GameObject)PrefabUtility.InstantiatePrefab(Prefab(id));try@@ -282,6 +282,63 @@ public class UnitFiguresTests}}+ /// <summary>#2384: the 1948 soldier's rigged copy, the model Yiftach and Negev draw, shares C07's skeleton: the same 67+ /// bones, names and parents, each at C07's rest orientation in the prefab's frame (so C07's takes, bone-local rotations,+ /// play on it unchanged, and it stands and faces as C07 does), with its own idle, walk and fire takes on its controller's+ /// idle, walk and attack states, each as long as C07's. Tal's delivered soldier, unrigged, stays catalogued.</summary>+ [Test]+ public void TheRiggedSoldierSharesC07sSkeletonAndTakes()+ {+ Assert.AreEqual(CollectionCatalog.Soldier1948Rigged, UnitFigures.Soldier1948);+ CollectionAssert.Contains(CollectionCatalog.Animated.ToList(), UnitFigures.Soldier1948);+ CollectionAssert.Contains(CollectionCatalog.Groups.Single(g => g.Bundle == CollectionCatalog.People).Ids, "figure-soldier-1948-v1");+ CollectionAssert.Contains(CollectionCatalog.Groups.Single(g => g.Bundle == CollectionCatalog.People).Ids, UnitFigures.Soldier1948);+ Assert.IsFalse(CollectionCatalog.Animated.Contains("figure-soldier-1948-v1"), "the delivered soldier has no rig");+ var soldier = Prefab(UnitFigures.Soldier1948).GetComponentInChildren<SkinnedMeshRenderer>(true);+ var c07 = Prefab(UnitFigures.VeteranFighter).GetComponentInChildren<SkinnedMeshRenderer>(true);+ Assert.IsNotNull(soldier, "the rigged soldier is skinned");+ Assert.AreEqual(67, c07.bones.Length);+ Assert.AreEqual(67, soldier.bones.Length);+ CollectionAssert.AreEquivalent(c07.bones.Select(b => b.name).ToList(), soldier.bones.Select(b => b.name).ToList());+ foreach (var bone in soldier.bones)+ {+ var twin = c07.bones.Single(b => b.name == bone.name);+ Assert.AreEqual(twin.parent.name, bone.parent.name, bone.name + ": parent");+ Assert.Less(Quaternion.Angle(Rest(soldier, bone.name).rotation, Rest(c07, bone.name).rotation), 0.5f, bone.name + ": C07's rest orientation");+ // No scale along the chain: a weapon parented under the hand bone (UnitWeapons) takes the bone's scale, and an+ // export with its unit factor on the nodes instead of in the data put C07's socket a hundred times out.+ Assert.That(bone.lossyScale.x / soldier.transform.root.lossyScale.x, Is.EqualTo(1f).Within(1e-3f), bone.name + ": at scale 1 under the root, as C07's bones are");+ Assert.That(twin.lossyScale.x / c07.transform.root.lossyScale.x, Is.EqualTo(1f).Within(1e-3f), bone.name + ": C07");+ }+ Vector3 At(SkinnedMeshRenderer skin, string bone) => Rest(skin, bone).MultiplyPoint3x4(Vector3.zero);+ Assert.Greater(Vector3.Dot((At(soldier, "Left_Toes") - At(soldier, "Left_Foot")).normalized, (At(c07, "Left_Toes") - At(c07, "Left_Foot")).normalized), 0.95f, "faces as C07 does");+ Assert.Greater(Vector3.Dot((At(soldier, "Head") - At(soldier, "Hips")).normalized, (At(c07, "Head") - At(c07, "Hips")).normalized), 0.99f, "upright as C07 is");+ var controller = AssetDatabase.LoadAssetAtPath<UnityEditor.Animations.AnimatorController>($"{CollectionCatalog.Folder}/{UnitFigures.Soldier1948}/{UnitFigures.Soldier1948}-near.controller");+ Assert.IsNotNull(controller, "the rigged soldier's controller");+ Assert.AreSame(controller, Prefab(UnitFigures.Soldier1948).GetComponent<Animator>().runtimeAnimatorController);+ Dictionary<string, AnimationClip> States(string id) => AssetDatabase.LoadAssetAtPath<UnityEditor.Animations.AnimatorController>($"{CollectionCatalog.Folder}/{id}/{id}-near.controller")+ .layers[0].stateMachine.states.ToDictionary(s => s.state.name, s => (AnimationClip)s.state.motion);+ var states = States(UnitFigures.Soldier1948); var c07States = States(UnitFigures.VeteranFighter);+ CollectionAssert.AreEquivalent(new[] { UnitFigureMotion.IdleState, UnitFigureMotion.WalkState, UnitFigureMotion.AttackState }, states.Keys.ToList());+ foreach (var (state, take) in new[] { (UnitFigureMotion.IdleState, "idle"), (UnitFigureMotion.WalkState, "walk"), (UnitFigureMotion.AttackState, "fire") })+ {+ Assert.AreEqual("Armature|" + take, states[state].name, state);+ Assert.AreEqual(CollectionCatalog.SourceModelPath(UnitFigures.Soldier1948), AssetDatabase.GetAssetPath(states[state]), state + ": the take is the copy's own");+ Assert.AreEqual(c07States[state].length, states[state].length, 1e-3f, state + ": as long as C07's take");+ }+ }++ /// <summary>A bone's bind pose in the prefab's frame (the mesh node's transforms up to and including the root, times the+ /// inverse bind pose), so two models' rests compare as the token sees them.</summary>+ static Matrix4x4 Rest(SkinnedMeshRenderer skin, string bone)+ {+ int i = Array.FindIndex(skin.bones, b => b.name == bone);+ Assert.GreaterOrEqual(i, 0, bone);+ var root = Matrix4x4.identity;+ for (var at = skin.transform; at != null; at = at.parent) root = Matrix4x4.TRS(at.localPosition, at.localRotation, at.localScale) * root;+ return root * skin.sharedMesh.bindposes[i].inverse;+ }+/// <summary>The tokens are built with the code-built figures and ask for their models; nothing changes in the frame of/// the request. When the models arrive every figure shows its model in its own frame, upright, as tall as the code-built/// figure, with the code-built renderer off and the figure where it stood; the vehicles arrive on their bases, side-on@@ -321,10 +378,7 @@ public class UnitFiguresTestsAssert.AreEqual(prefab.transform.localRotation, holder.GetChild(0).localRotation, $"{f.name}: the prefab keeps its own rotation (the FBX axis turn)");var b = ModelBox(f); float want = f.GetComponent<MeshFilter>().sharedMesh.bounds.size.y;Assert.AreEqual(want, b.size.y, 0.02f * want, $"{f.name}: as tall as the code-built figure");- // #336's soldier stands with his arms a little out from his sides (0.550 of his height across, measured):- // still far from a T-pose, which is about as wide as it is tall.- float arms = f.Find(UnitFigures.ModelName).GetChild(0).name.StartsWith(UnitFigures.Soldier1948, StringComparison.Ordinal) ? 0.56f : 0.55f;- Assert.Less(Mathf.Max(b.size.x, b.size.z), arms * b.size.y, $"{f.name}: standing upright, arms down");+ Assert.Less(Mathf.Max(b.size.x, b.size.z), 0.55f * b.size.y, $"{f.name}: standing upright, arms down");Assert.AreEqual(0f, b.min.y, 0.01f, $"{f.name}: feet on the figure's origin");}foreach (var v in vehicles)diff --git a/unity/Assets/Tests/EditMode/UnitWeaponsTests.cs b/unity/Assets/Tests/EditMode/UnitWeaponsTests.csindex e42f80db1..ec9078b1d 100644--- a/unity/Assets/Tests/EditMode/UnitWeaponsTests.cs+++ b/unity/Assets/Tests/EditMode/UnitWeaponsTests.cs@@ -82,7 +82,7 @@ public class UnitWeaponsTestsAssert.AreEqual(CollectionCatalog.K98k, UnitWeapons.WeaponFor(UnitData.Israel, UnitFigures.VeteranFighter));Assert.AreEqual(CollectionCatalog.K98k, UnitWeapons.WeaponFor(UnitData.Israel, UnitFigures.PioneerVeteran));Assert.AreEqual(CollectionCatalog.Sten, UnitWeapons.WeaponFor(UnitData.Israel, UnitFigures.PalmachScout), "the Palmach's personal weapon");- Assert.IsNull(UnitWeapons.WeaponFor(UnitData.Israel, UnitFigures.Soldier1948), "#336's soldier has no rig: [GAP]");+ Assert.AreEqual(CollectionCatalog.K98k, UnitWeapons.WeaponFor(UnitData.Israel, UnitFigures.Soldier1948), "#336's soldier, rigged to C07's skeleton (#2384)");foreach (var kv in UnitFigures.BySide){Assert.IsNull(UnitWeapons.WeaponFor(kv.Key, kv.Value), kv.Key + ": no source gives this army Tal's weapons");@@ -118,11 +118,11 @@ public class UnitWeaponsTests}[Test]- public void AnArabFigureAndTheUnriggedSoldierStayAsTheyWere()+ public void AnArabFigureStaysAsItWas(){- foreach (var figure in new[] { UnitFigures.SyrianInfantry, UnitFigures.ArabLegion, UnitFigures.Irregular, UnitFigures.Soldier1948 })+ foreach (var figure in new[] { UnitFigures.SyrianInfantry, UnitFigures.ArabLegion, UnitFigures.Irregular }){- var (_, piece) = Token(figure, figure == UnitFigures.Soldier1948 ? UnitData.Israel : "syria");+ var (_, piece) = Token(figure, "syria");Assert.IsFalse(Model(piece).GetComponentsInChildren<Transform>(true).Any(t => t.name == UnitWeapons.HeldName), figure);Assert.IsNull(piece.GetComponent<UnitFigureWeapon>(), figure);}