diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 20:09:16 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 20:09:16 +0100 |
| commit | 4c99e1dbae1420eab3deda63d18ccf3ebe9f60f1 (patch) | |
| tree | 533d8fb6ae0a53f7536e0c69a92648ac2fad9938 /docs | |
| parent | 8b600152bf28edfc5fb6276647920ac51a049087 (diff) | |
meshlet_page: meshlet record word +12 bits 14-30 are the normal cone
Axis octahedral 6+6 unorm (bits 14-19, 20-25), sin(half-angle) = (31 - f)/31
from bits 26-30, all-zero = no cone. Over the minigame archive (counts
only): 43,415 cones, axis within 25 degrees of the mean face normal for 82.0%,
every face inside within 0.05 for 97.8% (core_restofworld 74.9% / 99.7%).
meshlet_cone, cone_agreement under --cones, tests, docs/story.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/story.md | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/docs/story.md b/docs/story.md index 02434fa7c..9a64a9908 100644 --- a/docs/story.md +++ b/docs/story.md | |||
| @@ -313,14 +313,25 @@ and it is tight, at most 1.25 × that distance plus the rounding: | |||
| 313 | 313 | ||
| 314 | So the record carries a culling sphere (centre plus radius) for each meshlet. | 314 | So the record carries a culling sphere (centre plus radius) for each meshlet. |
| 315 | 315 | ||
| 316 | The other bits are not decoded: | 316 | **Word +12 bits 14-30 hold the meshlet's normal cone.** The axis is octahedral, 6 + 6 bits: u = bits 14-19 and |
| 317 | - **w3 bits 12-31** are non-zero in 24% of the `42 40` meshlets of the first 400 streams (14,594 of 61,156), and | 317 | v = bits 20-25, each read as unorm `x / 31.5 − 1`, unfolded like the normals above. Bits 26-30 give the spread: |
| 318 | bits 12-13 are clear in every one of them. They follow how closely the meshlet's face normals agree (r ≈ 0.7 with the smallest dot product to the mean normal), which | 318 | sin(half-angle) = (31 − f) / 31. All-zero bits 12-31 (76% of records) is no cone. Bits 12-13 and bit 31 are always |
| 319 | suggests a normal cone. | 319 | clear. On the first 400 streams, the median smallest dot between a face normal and the stored axis follows |
| 320 | - **w2 bits 24-31** are 0 or 16. 16 is set on 1,225 of 61,156 meshlets of the first 400 streams, nearly always | 320 | √(1 − ((31 − f)/31)²) within 0.033 on average; linear, square-root, squared and sine readings of the field miss by |
| 321 | together with non-zero w3 bits 12-31. | 321 | 0.14-0.32. `--cones` counts: |
| 322 | 322 | ||
| 323 | **Slots 11 and 18 are tangents.** Their type-7 words are unit vectors in the same 10:10:10 unorm, perpendicular to the vertex's stored normal. Bits 30-31 are always 3 or 0, which fits the bitangent sign +1 or −1. Over the minigame archive (`--normals`, counts only): | 323 | | Archive | Cones | Axis within 25° of the mean normal | Every face inside | … within 0.05 | |
| 324 | |---|---:|---:|---:|---:| | ||
| 325 | | `shared_minigame000.rpf` | 43,415 | 35,615 (82.0%) | 18,483 (42.6%) | 42,454 (97.8%) | | ||
| 326 | | `core_restofworld.rpf` | 1,221 | 914 (74.9%) | 463 (37.9%) | 1,217 (99.7%) | | ||
| 327 | |||
| 328 | So the cone is rounded to the nearest step, not widened to be conservative. With the centre and radius it completes | ||
| 329 | a meshlet's culling data. **w2 bits 24-31** are still open. They are 0 or 16; 16 is set on 1,225 of 61,156 meshlets | ||
| 330 | of the first 400 streams, nearly always together with a cone. | ||
| 331 | |||
| 332 | **Slots 11 and 18 are tangents.** Their type-7 words are unit vectors in the same 10:10:10 unorm, perpendicular to | ||
| 333 | the vertex's stored normal. Bits 30-31 are always 3 or 0, which fits the bitangent sign +1 or −1. Over the minigame | ||
| 334 | archive (`--normals`, counts only): | ||
| 324 | - 7,520,441 tangent words, 7,435,001 (98.9%) of them within |dot| < 0.05 of perpendicular; | 335 | - 7,520,441 tangent words, 7,435,001 (98.9%) of them within |dot| < 0.05 of perpendicular; |
| 325 | - sign bits 6,457,714 × 3 and 1,062,727 × 0, and never 1 or 2. | 336 | - sign bits 6,457,714 × 3 and 1,062,727 × 0, and never 1 or 2. |
| 326 | 337 | ||
| @@ -332,7 +343,7 @@ The other bits are not decoded: | |||
| 332 | - 69.4% of 699,618 shared edges have neighbouring faces within ~25°, and 0.37% are opposed; | 343 | - 69.4% of 699,618 shared edges have neighbouring faces within ~25°, and 0.37% are opposed; |
| 333 | - 10,555 of 14,697 centre axes (71.8%) are in the same 1/16 m step, and 87.6% within one. | 344 | - 10,555 of 14,697 centre axes (71.8%) are in the same 1/16 m step, and 87.6% within one. |
| 334 | 345 | ||
| 335 | Still open: the +0x5C word, the cone-like meshlet record bits above, the type-1 normal's | 346 | Still open: the +0x5C word, meshlet record w2 bits 24-31, the type-1 normal's |
| 336 | bits 20-31, and what the `42 40` colour and UV slots hold beyond rpf9-explorer's reading. | 347 | bits 20-31, and what the `42 40` colour and UV slots hold beyond rpf9-explorer's reading. |
| 337 | 348 | ||
| 338 | ### `story000_script.rpf`, full | 349 | ### `story000_script.rpf`, full |