Skip to content

Commit 9a0a844

Browse files
committed
fix: anchor vertex-weight-limit accent glow to the pruned zones
The teal ring sat on the forearm armor, reading as decoration while the actual pruned zones (the flex boots) stayed unmarked. The boots now carry the teal accent and the bright ring seals the elbow boot, so the glow marks the five-influence zones the limit prunes. Counts, weights, and measured check values are byte-identical; all three falsification probes re-run on the remodel (exits 4/6/8), check green on 5.1.2 and 4.5.11. Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
1 parent 51aadb9 commit 9a0a844

5 files changed

Lines changed: 19 additions & 10 deletions

File tree

556 Bytes
Loading

‎docs/gallery/vertex-weight-limit/index.html‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,11 @@ <h1>vertex-weight-limit</h1>
184184
</div>
185185
<section class="detail-section md">
186186
<p>A runnable example that rigs a mech arm — pedestal mount and pauldron, orange armor shells, ribbed flex boots, wrist, three claw prongs — with deliberately rich five-bone weight bumps in the boots, then enforces the game-engine <strong>maximum of four bone influences per vertex</strong> through the data API, following <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/mesh-editing-and-bmesh/SKILL.md"><code>mesh-editing-and-bmesh</code></a> and building on the linear-blend-skinning precedent of <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/armature-bend"><code>armature-bend</code></a>.</p>
187+
<p><strong>Pipeline arc:</strong> modeling/LOD in <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/lod-decimate-chain"><code>lod-decimate-chain</code></a>, weighting here, export in <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/gltf-export-roundtrip"><code>gltf-export-roundtrip</code></a>.</p>
187188
<p><strong>What it witnesses:</strong> the skinning constraint every game engine enforces and AI-generated rigging code most often violates silently.</p>
188189
<p>1. <strong>The limit is a data-API operation, not a context operator.</strong> Instead of <code>bpy.ops.object.vertex_group_limit_total</code>, the example reads each vertex&#x27;s groups, keeps the top four by weight, <code>VertexGroup.remove</code>s the rest, and renormalizes the survivors. Dropping without renormalizing leaves sums at 0.986 — a mesh that shrinks toward the origin under load (the check&#x27;s measured failure, 1.438e-02 off unit sum). 2. <strong>The armature modifier is still exactly linear blend skinning</strong> after the limit: every depsgraph-evaluated vertex equals <code>Σ wᵢ · (pose.matrix @ bone.matrix_local.inverted()) @ rest</code>, with the weights <strong>read back from the mesh&#x27;s own deform layer</strong> (<code>v.groups</code>) — the weights on the mesh are the contract, not the weights you meant to write. Measured <code>lbs_err = 3.0e-07</code>. 3. <strong>Pruning must not damage the pose.</strong> Evaluated positions before and after the limit are held within 0.05 (measured 3.0e-03), the pedestal mount stays exactly pinned (Root is unposed), and the pre-limit authoring really carries five influences in the boots — otherwise the witness would be vacuous.</p>
189190
<p>The vertex-group API (<code>v.groups</code>, <code>VertexGroup.add</code>/<code>remove</code>) is stable between Blender 4.5 LTS and 5.1 — the example runs identically on both, which is itself the version witness (measured values match to the digit).</p>
190-
<p>The render shows the pruned arm mid-pose: the elbow bellows and wrist boot flex through the bend, the teal accent ring rides the forearm — proof that the limited weights still deform as authored.</p>
191+
<p>The render shows the pruned arm mid-pose: the flex boots carry the teal accent — the five-influence zones the limit prunes glow at the elbow and wrist, sealed by the bright ring on the elbow boot — proof that the limited weights still deform as authored.</p>
191192
<h2>Run</h2>
192193
<pre><code># Cheap correctness check (no render) — the CI check:
193194
blender --background --python vertex_weight_limit.py --
@@ -315,8 +316,9 @@ <h2>Source</h2>
315316
(<span class="n">1.82</span>, <span class="n">0.26</span>), (<span class="n">2.00</span>, <span class="n">0.24</span>), (<span class="n">2.10</span>, <span class="n">0.27</span>),
316317
(<span class="n">2.16</span>, <span class="n">0.27</span>), (<span class="n">2.22</span>, <span class="n">0.24</span>), (<span class="n">2.45</span>, <span class="n">0.22</span>)],
317318
ORANGE), <span class="s">&quot;Elbow&quot;</span>)
318-
<span class="c"># teal accent ring inset on the forearm</span>
319-
tag(lathe_part(bm, [(<span class="n">2.10</span>, <span class="n">0.275</span>), (<span class="n">2.16</span>, <span class="n">0.275</span>)], ACCENT), <span class="s">&quot;Elbow&quot;</span>)
319+
<span class="c"># teal accent ring sealing the elbow boot — the primary</span>
320+
<span class="c"># five-influence zone the limit prunes</span>
321+
tag(lathe_part(bm, [(<span class="n">1.33</span>, <span class="n">0.245</span>), (<span class="n">1.39</span>, <span class="n">0.245</span>)], ACCENT), <span class="s">&quot;Elbow&quot;</span>)
320322
<span class="c"># wrist flex boot + ball (second &gt;4-influence region)</span>
321323
tag(lathe_part(bm, [(<span class="n">2.45</span>, <span class="n">0.21</span>), (<span class="n">2.52</span>, <span class="n">0.17</span>), (<span class="n">2.60</span>, <span class="n">0.20</span>),
322324
(<span class="n">2.68</span>, <span class="n">0.16</span>), (<span class="n">2.76</span>, <span class="n">0.19</span>), (<span class="n">2.84</span>, <span class="n">0.16</span>), (<span class="n">2.95</span>, <span class="n">0.15</span>)], RUBBER), <span class="s">&quot;FLEX&quot;</span>)
@@ -518,7 +520,8 @@ <h2>Source</h2>
518520
<span class="k">return</span> [
519521
pbr(<span class="s">&quot;Gunmetal&quot;</span>, (<span class="n">0.11</span>, <span class="n">0.12</span>, <span class="n">0.14</span>), <span class="n">0.9</span>, <span class="n">0.32</span>),
520522
pbr(<span class="s">&quot;HazardOrange&quot;</span>, (<span class="n">0.82</span>, <span class="n">0.30</span>, <span class="n">0.08</span>), <span class="n">0.10</span>, <span class="n">0.45</span>),
521-
pbr(<span class="s">&quot;FlexRubber&quot;</span>, (<span class="n">0.05</span>, <span class="n">0.05</span>, <span class="n">0.06</span>), <span class="n">0.0</span>, <span class="n">0.85</span>),
523+
pbr(<span class="s">&quot;FlexRubber&quot;</span>, (<span class="n">0.04</span>, <span class="n">0.13</span>, <span class="n">0.17</span>), <span class="n">0.0</span>, <span class="n">0.80</span>,
524+
emission=(<span class="n">0.06</span>, <span class="n">0.30</span>, <span class="n">0.34</span>), strength=<span class="n">0.38</span>),
522525
pbr(<span class="s">&quot;TealAccent&quot;</span>, (<span class="n">0.03</span>, <span class="n">0.22</span>, <span class="n">0.26</span>), <span class="n">0.0</span>, <span class="n">0.35</span>,
523526
emission=(<span class="n">0.10</span>, <span class="n">0.65</span>, <span class="n">0.72</span>), strength=<span class="n">2.2</span>),
524527
]

‎examples/vertex-weight-limit/README.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ rich five-bone weight bumps in the boots, then enforces the game-engine
88
building on the linear-blend-skinning precedent of
99
[`armature-bend`](../armature-bend/).
1010

11+
**Pipeline arc:** modeling/LOD in [`lod-decimate-chain`](../lod-decimate-chain/),
12+
weighting here, export in [`gltf-export-roundtrip`](../gltf-export-roundtrip/).
13+
1114
**What it witnesses:** the skinning constraint every game engine enforces and
1215
AI-generated rigging code most often violates silently.
1316

@@ -32,9 +35,10 @@ The vertex-group API (`v.groups`, `VertexGroup.add`/`remove`) is stable between
3235
Blender 4.5 LTS and 5.1 — the example runs identically on both, which is itself
3336
the version witness (measured values match to the digit).
3437

35-
The render shows the pruned arm mid-pose: the elbow bellows and wrist boot flex
36-
through the bend, the teal accent ring rides the forearm — proof that the
37-
limited weights still deform as authored.
38+
The render shows the pruned arm mid-pose: the flex boots carry the teal
39+
accent — the five-influence zones the limit prunes glow at the elbow and
40+
wrist, sealed by the bright ring on the elbow boot — proof that the limited
41+
weights still deform as authored.
3842

3943
## Run
4044

380 Bytes
Loading

‎examples/vertex-weight-limit/vertex_weight_limit.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ def tag(rings_verts, bone):
110110
(1.82, 0.26), (2.00, 0.24), (2.10, 0.27),
111111
(2.16, 0.27), (2.22, 0.24), (2.45, 0.22)],
112112
ORANGE), "Elbow")
113-
# teal accent ring inset on the forearm
114-
tag(lathe_part(bm, [(2.10, 0.275), (2.16, 0.275)], ACCENT), "Elbow")
113+
# teal accent ring sealing the elbow boot — the primary
114+
# five-influence zone the limit prunes
115+
tag(lathe_part(bm, [(1.33, 0.245), (1.39, 0.245)], ACCENT), "Elbow")
115116
# wrist flex boot + ball (second >4-influence region)
116117
tag(lathe_part(bm, [(2.45, 0.21), (2.52, 0.17), (2.60, 0.20),
117118
(2.68, 0.16), (2.76, 0.19), (2.84, 0.16), (2.95, 0.15)], RUBBER), "FLEX")
@@ -313,7 +314,8 @@ def pbr(name, base, metallic, roughness, emission=None, strength=0.0):
313314
return [
314315
pbr("Gunmetal", (0.11, 0.12, 0.14), 0.9, 0.32),
315316
pbr("HazardOrange", (0.82, 0.30, 0.08), 0.10, 0.45),
316-
pbr("FlexRubber", (0.05, 0.05, 0.06), 0.0, 0.85),
317+
pbr("FlexRubber", (0.04, 0.13, 0.17), 0.0, 0.80,
318+
emission=(0.06, 0.30, 0.34), strength=0.38),
317319
pbr("TealAccent", (0.03, 0.22, 0.26), 0.0, 0.35,
318320
emission=(0.10, 0.65, 0.72), strength=2.2),
319321
]

0 commit comments

Comments
 (0)