Commit Graph

2 Commits

Author SHA1 Message Date
d2fae504b4 world_build: continue loading after malformed placement values
Count unhashable LOD values and overflowing position/rotation components as malformed rows, then continue loading valid neighbors. Preserve the existing unit fallback for invalid optional scales, including integers too large to convert to finite floats.

Add synthetic loader and complete-world regressions covering row counts, scale defaults, unchanged finite/zero/negative scales, region/LOD filters and resulting geometry bounds. New regressions reproduced nine errors on the unmodified base; all 178 world-related tests now pass.
2026-11-22 05:24:07 -04:00
1c56460bfb world_build: place models at their map placements (--placements)
world_build placed every model at its own coordinates or in rows; it never read the CEntityDef records.

- world_index.py --entities-out writes one JSON line per complete entity: archetype hash and 64-bit key,
  position, stored rotation, scales and LOD fields.
- world_build.py --placements matches each selected entity to an exported model the way world_names.py does
  (lower-cased joaat of the manifest name, confirmed by the Murmur3-64 key when the row has one). It then
  scales by (scaleXY, scaleXY, scaleZ), rotates by the conjugate of the stored quaternion, translates and
  converts to glTF Y-up. Normals use the inverse-transpose; a mirroring scale flips the winding.
  --lod-levels (default 0,5) and --region select the entities. world.json reports the count of each outcome
  in stats.placements.
- tests/test_world_place.py: 15 synthetic tests.
- docs/world.md: "Building a placed world", with measurements on a 700 m downtown box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 08:01:15 +00:00