feat: add lightmap-uv-channel example#116
Merged
Merged
Conversation
The second UV layer engines require for baked lighting, on a reusable market cart (ground pivot, identity transforms, Cart.* datablocks, watertight parts). Per-part UVMap/UVLight with active == UVLight and active_render == UVMap re-asserted after the pipeline - uv_layers.new() never moves the flags and the edit-mode UV ops clear both. UV0 untouched by the second unwrap (drift 0.0; the clobber trap measured 2.068), every UV1 loop inside [0,1], zero overlapping islands via an independent binned strict-SAT scan (15 hits when falsified), min island distance 0.00401 against the nominal 0.002 pack margin, island census per part. Byte-identical check output on 4.5.11 LTS and 5.1.2 (9 parts, 1114 islands). Authoring hazards pinned: iterating a held MeshUVLoopLayer.data after edit-mode UV ops segfaults 4.5.11 headless (EXCEPTION_ACCESS_VIOLATION, 5/5; survives on 5.1.2) - re-fetch layers by name; lightmap_pack silently no-ops without prior unwrap. The ROADMAP UV atlas candidate is narrowed to its remaining unbuilt slice (utilization); the UV-handle snippet note gains the segfault confirmation. The atlas board is built from live UV1 data so a change in the packed layout moves the board geometry; --falsify stacks the second-largest island onto the largest in emissive red. Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
New example
lightmap-uv-channel: the second UV layer engines require for baked lighting, on a reusable market cart (bed, axle, two wheels, four posts, arched canvas canopy — ground-level pivot, identity transforms by construction,Cart.*datablocks, watertight parts). UV0 is the texture channel (deterministic box projection); UVLight is the bake atlas (smart_project→lightmap_pack), with every contract independently verified rather than trusted from the packer.Contract witnessed (check-only path)
UVMap/UVLight, exactly two per partactive == UVLight,active_render == UVMapMARGIN_DIV × 0.01)Check output byte-identical on 4.5.11 LTS and 5.1.2. The UV layout is packer-version-dependent by design; the contracts are layout-independent invariants.
Falsification evidence (live run, exit codes observed)
activeleft on UVMap → UV0 drift 2.068 (tol 1e-6) → exit 5 territory. Confirmed on both versions with identical measured drift.MARGIN_DIV=0→ min island distance 2e-5 < 0.001 floor → exit 8.Authoring hazards pinned (in code comments + README; ROADMAP updated)
MeshUVLoopLayer.dataafter edit-mode UV ops segfaults 4.5.11 headless —EXCEPTION_ACCESS_VIOLATION, 5/5 repro, bisected down from a full-pipeline crash to the exact dangling read; the same read survives on 5.1.2. Second confirmation of the UV-handle lifetime hazard (first:triangulate-tangents); the ROADMAP snippet note now carries both.lightmap_packsilently no-ops (exit OK) when the active layer has no UVs — unwrap first, then pack.uv_layers.new()moves no flags; the edit-mode UV ops clear them — both halves of the active/active_render trap are pinned by the check.Render and visual passes (iteration log)
modular-kit-snapand every other card; detail page verified. featured_rank: no — strong card, but does not outclass any of the current eight featured members.docs/gallery/contact-sheets/lightmap-uv-channel.webp— sits naturally in the calibration lineup (dark stage, warm subject, palette accents). Mean luminance 55.1 vs calibration 44.5–77.7 — mid-range, no outlier risk.Generated output read
Card alt re-read character by character — complete, no truncation. WITNESSES numbers verified against measured check output: drift 0.0, 1114 islands, 0 overlaps, 0.00401 — all exact.
Test plan (exact binaries)
E:\Blender-Developer-Tools\.scratch\blender-5.1.2-windows-x64\blender.exe— Blender 5.1.2: check exit 0, renders, all falsification probes, API probes.E:\Blender-Developer-Tools\.scratch\blender-4.5.11-windows-x64\blender.exe— Blender 4.5.11 LTS: check exit 0 (byte-identical), render parity confirmed visually, clobber probe, segfault bisect series.blender-smokejobs run the new step (check-only) on their floating series releases.Live run vs inspection-only
Live run: all checks, probes, renders, framing numbers, in-situ captures, contact sheet. Inspection only: engine-side bake/import behavior (not claimed — the README does not claim engine compatibility), Cycles engine path (
--engine cyclesflag exists; renders used EEVEE).