You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 573c7f8
Browse filesBrowse the repository at this point in the historyBrowse files
fix(examples): raise the lightmap cart posts into its canopy
The four 1.35 m posts stopped 0.33 m under the canopy arc, so the canopy
floated. Each post now rises into the arc's underside at its own station,
its top sheared to the arc for a uniform 12 mm bite. Every part keeps its
UV1 island count, zero overlap and minimum island distance; exit codes are
unchanged on all three binaries. Also refreshes the gallery alts and index
for both examples.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
<imgsrc="assets/lightmap-uv-channel-hero.webp" alt="A wooden covered cart beside a board showing its packed lightmap UV atlas as coloured islands." loading="lazy" decoding="async" />
819
+
<imgsrc="assets/lightmap-uv-channel-hero.webp" alt="A wooden covered cart, its four posts carrying an arched canvas canopy, beside a board showing its packed lightmap UV atlas as coloured islands." loading="lazy" decoding="async" />
<imgsrc="assets/bake-normal-high-to-low-hero.webp" alt="A baked tangent-space normal map shown as a lilac card beside a bronze plate wearing it, with a radial embossed pattern." loading="lazy" decoding="async" />
885
+
<imgsrc="assets/bake-normal-high-to-low-hero.webp" alt="A baked tangent-space normal map shown as a lilac card beside a bronze plate wearing it, with a radial embossed pattern, both standing in low display plinths." loading="lazy" decoding="async" />
<metaproperty="og:image:alt" content="A wooden covered cart beside a board showing its packed lightmap UV atlas as coloured islands." />
19
+
<metaproperty="og:image:alt" content="A wooden covered cart, its four posts carrying an arched canvas canopy, beside a board showing its packed lightmap UV atlas as coloured islands." />
<metaname="twitter:description" content="A market cart carrying the two-channel UV contract for baked lighting: UV0 untouched, UVLight packed with no overlaps and a respected margin." />
<metaname="twitter:image:alt" content="A wooden covered cart beside a board showing its packed lightmap UV atlas as coloured islands." />
25
+
<metaname="twitter:image:alt" content="A wooden covered cart, its four posts carrying an arched canvas canopy, beside a board showing its packed lightmap UV atlas as coloured islands." />
26
26
<style>
27
27
/* fonts are deployed by the landing build (docs/fonts/) */
<p>A market cart carrying the two-channel UV contract for baked lighting: UV0 untouched, UVLight packed with no overlaps and a respected margin.</p>
269
269
</header>
270
270
<mainid="main">
271
-
<buttonclass="detail-hero" id="heroZoom" type="button" aria-label="View full size: A wooden covered cart beside a board showing its packed lightmap UV atlas as coloured islands.">
272
-
<imgsrc="../assets/lightmap-uv-channel-hero.webp" alt="A wooden covered cart beside a board showing its packed lightmap UV atlas as coloured islands." width="1280" height="720" />
271
+
<buttonclass="detail-hero" id="heroZoom" type="button" aria-label="View full size: A wooden covered cart, its four posts carrying an arched canvas canopy, beside a board showing its packed lightmap UV atlas as coloured islands.">
272
+
<imgsrc="../assets/lightmap-uv-channel-hero.webp" alt="A wooden covered cart, its four posts carrying an arched canvas canopy, beside a board showing its packed lightmap UV atlas as coloured islands." width="1280" height="720" />
273
273
</button>
274
274
<pclass="zoom-hint">Rendered headless by the example itself — click to zoom.</p>
275
275
<divclass="callout"><spanclass="tag">witnesses</span> Per-part UVMap/UVLight with active vs active_render pinned (ops clear both flags), UV0 drift 0.0, 3680 islands with 0 SAT overlaps, min island distance 0.00401.</div>
<p>A runnable example building the second UV layer engines require for baked lighting, on an asset built to be reused: a market cart assembled from 21 named, watertight parts — a plank-grooved bed with side rails, corner brackets, and fasteners, real wheel assemblies (disc + hub + iron band + bolt ring) on a capped axle, four posts, and a ribbed canvas canopy. Ground-level pivot at <code>z=0</code>, identity transforms by construction, <code>Cart.*</code> datablocks. (An earlier revision shipped a soft uniform-tan cart with lumpy polygon wheels and was remodeled under the asset-quality gate; its wheel material was also silently never applied — a name-key lookup bug the exact per-part mapping now replaces.) UV0 is the texture channel (deterministic dominant-axis box projection per face); UVLight is the baked-lighting atlas (<code>smart_project</code> → <code>lightmap_pack</code>).</p>
281
+
<p>A runnable example building the second UV layer engines require for baked lighting, on an asset built to be reused: a market cart assembled from 21 named, watertight parts — a plank-grooved bed with side rails, corner brackets, and fasteners, real wheel assemblies (disc + hub + iron band + bolt ring) on a capped axle, four posts, and a ribbed canvas canopy. Each post rises from inside the bed into the canopy's underside, its top sheared to the arc at its own station for a uniform 12 mm bite. Fixed 1.35 m posts used to stop 0.33 m short of the arc, so the canopy floated. The UV1 contract is unchanged: every part keeps its island count, zero overlap and minimum island distance. Ground-level pivot at <code>z=0</code>, identity transforms by construction, <code>Cart.*</code> datablocks. (An earlier revision shipped a soft uniform-tan cart with lumpy polygon wheels and was remodeled under the asset-quality gate; its wheel material was also silently never applied — a name-key lookup bug the exact per-part mapping now replaces.) UV0 is the texture channel (deterministic dominant-axis box projection per face); UVLight is the baked-lighting atlas (<code>smart_project</code> → <code>lightmap_pack</code>).</p>
282
282
<p><strong>What it witnesses</strong> (all independently derived, nothing trusted from the packer):</p>
283
283
<ul><li><strong>The flag trap.</strong><code>uv_layers.new()</code> does <strong>not</strong> move the active flags — the first layer keeps <code>active</code> + <code>active_render</code>, so a UV op runs against channel 0 unless you move <code>active</code> yourself (probed: unwrap+pack with the flags unmoved destroys channel 0, measured drift <strong>2.068</strong>). Worse, the edit-mode UV ops <strong>clear both flags</strong> — the sequence must re-assert them. The check pins, per part: exactly two layers <code>UVMap</code>/<code>UVLight</code>, <code>active == UVLight</code> (edit target), <code>active_render == UVMap</code> (render target).</li><li><strong>Channel zero untouched.</strong> UV0 loops snapshotted before the UVLight unwrap, compared after: drift <strong>0.0</strong> on every part (tol 1e-6).</li><li><strong>Bounds.</strong> Every UVLight loop inside <code>[0, 1]</code> within 1e-5.</li><li><strong>Non-overlap.</strong> UV1 triangles binned into a 256² spatial hash and tested pairwise with strict SAT (epsilon-separated, so shared edges don't count): <strong>0</strong> overlapping pairs.</li><li><strong>Margin.</strong><code>MARGIN_DIV</code> semantics measured live: nominal margin == <code>MARGIN_DIV × 0.01</code> UV units; the check requires the measured min island-pair distance ≥ half the nominal — measured <strong>0.00401</strong> (≈ 2× the nominal 0.002, the packer's per-island margin applied twice).</li><li><strong>Island census + watertight parts.</strong> Connected components counted independently per part; loops conserved; every part manifold.</li></ul>
284
284
<p><strong>What each check catches on failure:</strong> wrong layer names/count (exit 3); flags not re-established after the ops (exit 4); channel 0 touched by the UV1 unwrap (exit 5 — probed via the clobber trap, drift 2.068); UV1 loops outside the unit square (exit 6); overlapping islands (exit 7 — probed by translating an island onto a neighbor, 15 SAT hits); margin floor broken (exit 8 — probed with <code>MARGIN_DIV=0</code>, measured 2e-5 < 0.001); non-watertight part (exit 9).</p>
@@ -577,11 +577,26 @@ <h2>Source</h2>
577
577
<spanclass="s">f"</span><spanclass="s">Cart.Wheel.</span>{tag}<spanclass="s">.Band</span><spanclass="s">"</span>, <spanclass="n">0.47</span>, <spanclass="n">0.435</span>, <spanclass="n">0.10</span>, (<spanclass="n">0.55</span>, y, <spanclass="n">0.45</span>))
me = _box(<spanclass="s">f"</span><spanclass="s">Cart.Post.</span>{tag}<spanclass="s">"</span>, (<spanclass="n">0.09</span>, <spanclass="n">0.09</span>, top - post_z0),
<imgsrc="../assets/lightmap-uv-channel-hero.webp" alt="A wooden covered cart beside a board showing its packed lightmap UV atlas as coloured islands." />
1163
+
<imgsrc="../assets/lightmap-uv-channel-hero.webp" alt="A wooden covered cart, its four posts carrying an arched canvas canopy, beside a board showing its packed lightmap UV atlas as coloured islands." />
Copy file name to clipboardExpand all lines: examples/gallery.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -588,7 +588,7 @@
588
588
"name": "lightmap-uv-channel",
589
589
"dir": "examples/lightmap-uv-channel",
590
590
"teaches": "A market cart carrying the two-channel UV contract for baked lighting: UV0 untouched, UVLight packed with no overlaps and a respected margin.",
591
-
"alt": "A wooden covered cart beside a board showing its packed lightmap UV atlas as coloured islands.",
591
+
"alt": "A wooden covered cart, its four posts carrying an arched canvas canopy, beside a board showing its packed lightmap UV atlas as coloured islands.",
592
592
"witnessesFix": "Per-part UVMap/UVLight with active vs active_render pinned (ops clear both flags), UV0 drift 0.0, 3680 islands with 0 SAT overlaps, min island distance 0.00401.",
"teaches": "A collapse-decimated hatch plate receiving a Cycles cage-baked tangent normal map from a ribbed high-poly source",
673
-
"alt": "A baked tangent-space normal map shown as a lilac card beside a bronze plate wearing it, with a radial embossed pattern.",
673
+
"alt": "A baked tangent-space normal map shown as a lilac card beside a bronze plate wearing it, with a radial embossed pattern, both standing in low display plinths.",
674
674
"witnessesFix": "Statistical gates not byte-identity: detail frac 0.7211 / MAD 0.09356 vs flat 0.0000 / 0.00277; --flat-source exits 5; type=NORMAL not bake_type; RNA identical on 4.5.11, 5.1.2, 5.2.1",
0 commit comments