Skip to content

docs/bvh.md: what the 0x40 instance key is not (ASSET-350) - #4525

Open
ScarionWorkspace wants to merge 2 commits into
ItsNotRexed:mainfrom
ScarionWorkspace:docs/asset-350-bvh-key
Open

ScarionWorkspace wants to merge 2 commits into
ItsNotRexed:mainfrom
ScarionWorkspace:docs/asset-350-bvh-key

Conversation

@ScarionWorkspace

Copy link
Copy Markdown

ASSET-350. Records in docs/bvh.md §3.2 what the +0x40 key of the 208-byte instance descriptor is, measured over all 269,106 descriptors of core_bvh4.rpf. What it hashes stays Open.

  • Two uniform populations: 144,471 keys below 2^55 and 124,635 full 64-bit. The population follows the BLAS (28 of 197,324 BLAS in both).
  • Not a hash of any of the 318,149 drawable names of levels.rpf under 13 64-bit hash families. The name set is validated: Murmur3 h1 of the same names reproduces 228,610 of 228,681 archetype keys.
  • Not an entity id (1b60404d) or archetype key (c8a7b90a) of any of the 1,670,435 entities, and not shared with the 24,832 other descriptors (2 occurrences).

Measured on my own 1.0.2.1 package with tools/bvh_index.py (reproduces the §1 totals exactly), rpf9dump models over all of levels.rpf, and tools/world_index.py over the whole archive, plus local standard-library scripts for the hash comparisons. Counts only; no keys, names or game bytes.

Tested: python -I tests/test_docs_*.py (7 files, all pass). Docs only; no GPU needed. AI-assisted (Claude Code).

🤖 Generated with Claude Code

Measured over all 269,106 instance descriptors of core_bvh4.rpf: the key is
two uniform populations (below 2^55 and full 64-bit) that follow the BLAS,
is not a hash of any drawable name (name set validated against 228,610 of
228,681 archetype keys), not an entity id or archetype key, and not shared
with the other descriptor streams. What it hashes stays Open.

Counts only; no keys, names or game bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this at 2988cbba on Windows 11: test_docs_links.py 6 OK, test_docs_design_rows.py 2 OK; git diff --check clean.

The BVH page now records what the 0x40 instance key is not, with counts/offsets only. No blocking issue.

@kapitche

kapitche commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Tested 2988cbb merged with main d0835dd (no conflicts) on Linux (WSL2) Python 3.12.16: concern (docs-only; overlaps another open PR).

  • tests/test_docs_*.py (all 7): OK.
  • Arithmetic and links hold: 144,471 + 124,635 = 269,106; the 235,533 distinct keys and 269,106 descriptors agree with the existing §3.2 table; world_names.md does contain the c8a7b90a and 1b60404d rows it cites.
  • Overlap and mismatch with docs/bvh.md: where the BLAS of the §4a interior's other entities are (ASSET-351) #4506, which also adds a paragraph on the +0x40 key to docs/bvh.md (§4a, "The descriptor key"): that one says "1,008 (BLAS header, transform) pairs occur under more than one key, up to 60 keys", this one says "11,209 of the 211,407 (crc32, transform) pairs carry more than one key, up to 743". The identities differ (stored header vs stream crc32), but both read as the same observation on the same 269,106 descriptors, so one of the two (or the definitions) needs reconciling (the two branches merge without a textual conflict, so nothing flags it).
  • The 55-bit / 64-bit populations, the 0-of-235,533 hash search and the 24,832 other-descriptor count need the game; not repeated.

@Krashgamer

Copy link
Copy Markdown

@kapitche, about the +0x40 overlap you raised: that paragraph ("1,008 (BLAS header, transform) pairs … up to 60 keys") is #4265's (ASSET-322, @NiiRoZz). #4506 shows it only because its branch is built on #4265 (Depends on: #4265), and #4506's own commits don't touch it. Reconciling the two definitions (stored header vs stream crc32) is therefore between this PR and #4265.

…350)

Give the count keyed by the stored BLAS header (sizes, bounds, crc32) and
transform, the identity ItsNotRexed#4265 uses: 1,030 pairs carry more than one key, up
to 60 (ItsNotRexed#4265: 1,008). Keep the crc32-only count after it.

AI-assisted. tests/test_docs_*.py: 7/7 OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ScarionWorkspace

Copy link
Copy Markdown
Author

@kapitche thanks. The two counts use different identities: this PR grouped by the stream crc32 + transform, #4265 by the stored BLAS header (sizes, bounds, crc32) + transform. Recounted with #4265's identity on the same 269,106 descriptors: 1,030 pairs carry more than one key, up to 60 (#4265: 1,008, up to 60). Adding any further header field gives 1,029–1,030, so the remaining ~20 is most likely in how descriptors are paired with their BLAS. The bullet now gives the header-based count first and the crc32-only one second (follow-up commit on this branch). AI-assisted; doc tests 7/7 OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants