Lights: capsule extents and distant capsule intensity #275

Manually merged
github merged 1 commit from gh-pr/275/head into gh-pr/275/base 2026-11-26 20:23:43 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-25 13:55 UTC · original
holdmysocks:six-192-capsule-intensity → master · +50 −15 · 3 files · 1 commits · merged 2026-11-25 14:17 UTC

Follow-up to #264: the capsule rule for distant light intensity, plus the last LOD field.

  • Capsule extents. Placed lights now carry extents (2d3f79c0). It is an inline array of three floats, which the scalar-field reader skipped. For capsules, x is the length.
  • Capsule intensity. When bit 0x20000 of the placed flags 684c08c5 is set, a capsule's distant intensity is the placed intensity / (1 + length)². Otherwise it is unchanged. This holds for 99.95 % of capsules that are either scaled or unscaled, and for 93.4 % of all sampled capsules.
  • distant_intensity for every light. world.jsonl now writes it for points, spots and capsules, through the new lights::distant_intensity.
  • Measured match rates. The rules match 92.5 % of sampled points, 97.3 % of spots and 93.4 % of capsules. Most of the rest sit where several placed lights overlap: for about half of the remaining spots and a third of the points, another light at the same spot has exactly the distant value.
  • LOD 0e852fda. Two u16, the second one more than the first: a per-file id shared by the lights of one object. Those lights are nearby and of one type, and 95 % of them come from one source entity. 0 / 0 on 47 %.
  • LOD tangent. No tangent is written for the 370 lights that store 0x7fff7fff (two NaN halves).

A full sixng lights levels run gives the same counts as #264: 778,985 placed, 492,298 distant and 4,950 modifier regions. cargo check --workspace --all-targets and cargo test -p sixng-core -p sixng-gui --release pass.

**@⁠holdmysocks** on GitHub · 2026-11-25 13:55 UTC · [original](https://github.com/holdmysocks/SixNG/pull/275) `holdmysocks:six-192-capsule-intensity` → `master` · +50 −15 · 3 files · 1 commits · merged 2026-11-25 14:17 UTC Follow-up to #264: the capsule rule for distant light intensity, plus the last LOD field. - **Capsule extents.** Placed lights now carry `extents` (`2d3f79c0`). It is an inline array of three floats, which the scalar-field reader skipped. For capsules, x is the length. - **Capsule intensity.** When bit 0x20000 of the placed flags `684c08c5` is set, a capsule's distant intensity is the placed intensity / (1 + length)². Otherwise it is unchanged. This holds for 99.95 % of capsules that are either scaled or unscaled, and for 93.4 % of all sampled capsules. - **`distant_intensity` for every light.** `world.jsonl` now writes it for points, spots and capsules, through the new `lights::distant_intensity`. - **Measured match rates.** The rules match 92.5 % of sampled points, 97.3 % of spots and 93.4 % of capsules. Most of the rest sit where several placed lights overlap: for about half of the remaining spots and a third of the points, another light at the same spot has exactly the distant value. - **LOD `0e852fda`.** Two u16, the second one more than the first: a per-file id shared by the lights of one object. Those lights are nearby and of one type, and 95 % of them come from one source entity. 0 / 0 on 47 %. - **LOD tangent.** No tangent is written for the 370 lights that store 0x7fff7fff (two NaN halves). A full `sixng lights levels` run gives the same counts as #264: 778,985 placed, 492,298 distant and 4,950 modifier regions. `cargo check --workspace --all-targets` and `cargo test -p sixng-core -p sixng-gui --release` pass.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:23:41 +00:00
github manually merged commit a28ec4c4b4 into gh-pr/275/base 2026-11-26 20:23:43 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.