Skip to content

Commit dda157b

Browse files
TMHSDigitalclaude
andauthored
fix(examples): redesign shape-key-blend as a ceramic vase morphing jar to trumpet (#275)
The committed hero was three bare purple boxes with a thin wire cage: programmer art whose only difference between copies was height. The subject is now a lathe-turned ceramic vase (cobalt glaze, ochre band, bisque foot, cream interior) whose relative Tall key lifts the rim, flares the lip and slims the belly, shown at values 0, 0.5 (the checked object) and 1. The ochre band rides the key, and three thin rings read from the Basis key block trace the jar's belly around the full key. The check keeps its contract and codes 3-9: every raw vertex must equal Basis, every evaluated vertex must match basis + value * (key - basis), the foot stays at z=0, and the rim ring is lifted and flared in closed form. The render path now runs the shared framing (10) and asset-quality (11) gates; no-file moves to 12. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent f702110 commit dda157b

12 files changed

Lines changed: 659 additions & 305 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,14 +393,14 @@ the Z span matches the amplitude, and a probe vertex matches the closed-form wav
393393
</tr>
394394
<tr>
395395
<td width="46%" valign="middle">
396-
<a href="examples/shape-key-blend/"><img src="examples/shape-key-blend/preview.webp" alt="Shape-key blend: three violet blocks on a dark studio floor showing a relative Tall shape key at values 0, 0.25, and 0.5 - plain cube to lifted, flared truncated pyramid, left to right" /></a>
396+
<a href="examples/shape-key-blend/"><img src="examples/shape-key-blend/preview.webp" alt="Shape-key blend: three cobalt-glazed ceramic vases with an ochre band on a dark studio floor - the same vase at Tall shape-key values 0, 0.5 and 1, squat jar to amphora to flared trumpet vase, left to right, with thin pale rings of the jar's belly around the tallest" /></a>
397397
</td>
398398
<td valign="middle">
399399

400400
### [shape-key-blend](examples/shape-key-blend/)
401401

402-
A relative Tall shape key that lifts and flares the top face — authored through
403-
`shape_key_add` / `key_blocks` / `.value`. Witnesses that shape keys do not rewrite
402+
A relative Tall shape key that turns a squat ceramic jar into a trumpet vase,
403+
lifting and flaring the rim — authored through `shape_key_add` / `key_blocks` / `.value`. Witnesses that shape keys do not rewrite
404404
`mesh.vertices`: every evaluated vert matches `basis + value × (key − basis)`.
405405

406406
</td>

‎ROADMAP.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ not measurable by the floors (curve/GP data, no mesh hero). Re-survey after
223223
any example remodel.
224224

225225
- naming (default datablock names): gltf-skin-roundtrip (3 parts), gn-sdf-remesh (`Torus`), turntable (`Suzanne`)
226-
- materials (multi-part, single material): armature-bend (3 parts/1 mat — vertex-color weight bands are the honest display), degenerate-bevel-weld (2/1), driver-wave (16/1, also edge90 1.0), shape-key-blend (3/1, also edge90 1.0)
226+
- materials (multi-part, single material): armature-bend (3 parts/1 mat — vertex-color weight bands are the honest display), degenerate-bevel-weld (2/1), driver-wave (16/1, also edge90 1.0)
227227
- edge90 (raw right angles, 1.0): depsgraph-export (also naming + materials), image-pixels-testcard, png-exr-alpha, temp-override-join, text-version-stamp, vse-cut-list; vse-gamma-cross at 0.92
228228
- reference: gallery best-modeled measure collision-hull-proxy 0.044, custom-normals-shade 0.288, vertex-weight-limit 0.150, lod-decimate-chain 0.019; calibration details in `docs/VISUAL-STYLE.md` § Asset quality
229229

51.5 KB
Loading
8.76 KB
Loading
-9.48 KB
Loading

‎docs/gallery/index.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,12 @@ <h2><a href="gn-modifier-inputs/">gn-modifier-inputs</a></h2>
464464
</article>
465465
<article class="card" data-tags="mesh shape-keys">
466466
<a class="card-media" href="shape-key-blend/" tabindex="-1" aria-hidden="true">
467-
<img src="assets/shape-key-blend-hero.webp" alt="Three purple boxes flaring wider at the top by increasing amounts; the rightmost sits inside a pale wire cage of its full shape key, halfway to it." loading="lazy" decoding="async" />
467+
<img src="assets/shape-key-blend-hero.webp" alt="One cobalt vase with an ochre band at shape-key values 0, 0.5 and 1: squat jar, amphora, tall trumpet vase, with pale rings of the jar&#x27;s belly around the tallest." loading="lazy" decoding="async" />
468468
</a>
469469
<div class="card-body">
470470
<h2><a href="shape-key-blend/">shape-key-blend</a></h2>
471-
<p class="teaches">A relative Tall shape key that lifts and flares the top face — authored via shape_key_add / key_blocks / .value — read back from the depsgraph-evaluated mesh.</p>
472-
<p class="witnesses"><span class="tag">witnesses</span> Shape keys do not rewrite mesh.vertices: every evaluated vert matches basis + value × (key − basis), including the flared top half-extent.</p>
471+
<p class="teaches">A relative Tall shape key that turns a squat ceramic jar into a trumpet vase — lifting and flaring the rim — authored via shape_key_add / key_blocks / .value and read back from the depsgraph-evaluated mesh.</p>
472+
<p class="witnesses"><span class="tag">witnesses</span> Shape keys do not rewrite mesh.vertices: every evaluated vert matches basis + value × (key − basis), including the lifted, flared rim ring.</p>
473473
<a class="card-link" href="shape-key-blend/">View example<span class="sr-only"> shape-key-blend</span> <span aria-hidden="true">&rarr;</span></a>
474474
</div>
475475
</article>

‎docs/gallery/shape-key-blend/index.html‎

Lines changed: 320 additions & 150 deletions
Large diffs are not rendered by default.

‎examples/gallery.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@
151151
{
152152
"name": "shape-key-blend",
153153
"dir": "examples/shape-key-blend",
154-
"teaches": "A relative Tall shape key that lifts and flares the top face — authored via shape_key_add / key_blocks / .value — read back from the depsgraph-evaluated mesh.",
155-
"alt": "Three purple boxes flaring wider at the top by increasing amounts; the rightmost sits inside a pale wire cage of its full shape key, halfway to it.",
156-
"witnessesFix": "Shape keys do not rewrite mesh.vertices: every evaluated vert matches basis + value × (key − basis), including the flared top half-extent.",
154+
"teaches": "A relative Tall shape key that turns a squat ceramic jar into a trumpet vase — lifting and flaring the rim — authored via shape_key_add / key_blocks / .value and read back from the depsgraph-evaluated mesh.",
155+
"alt": "One cobalt vase with an ochre band at shape-key values 0, 0.5 and 1: squat jar, amphora, tall trumpet vase, with pale rings of the jar's belly around the tallest.",
156+
"witnessesFix": "Shape keys do not rewrite mesh.vertices: every evaluated vert matches basis + value × (key − basis), including the lifted, flared rim ring.",
157157
"hero": "docs/gallery/assets/shape-key-blend-hero.webp",
158158
"preview": "examples/shape-key-blend/preview.webp",
159159
"tags": [

‎examples/shape-key-blend/README.md‎

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
# Shape-Key Blend
22

33
A runnable example that authors a relative shape key entirely through the data
4-
API — `shape_key_add`, per-vertex `key_blocks["Tall"].data[i].co`, and
5-
`.value` — then reads the blend back from the depsgraph-evaluated mesh. The Tall
6-
key both lifts and flares the top face, so the silhouette is a truncated pyramid.
4+
API — `shape_key_add`, `key_blocks["Tall"].data` (bulk `foreach_get` /
5+
`foreach_set` on the key's `co`), and `.value` — then reads the blend back from
6+
the depsgraph-evaluated mesh. The subject is a lathe-turned ceramic vase: its
7+
Basis is a squat jar, and the Tall key lifts the rim (stretching the neck),
8+
flares the lip into a trumpet, and slims the belly.
79

810
**What it witnesses:** shape keys do not rewrite `mesh.vertices`. The undeformed
9-
mesh stays at Basis; every evaluated vertex matches the closed-form blend
10-
`co = basis + value × (key − basis)`. The check also asserts the flared top half-extent
11-
(`0.5 + value × flare`) so a uniform-scale mistake cannot pass.
11+
mesh stays at Basis (every vertex, plus the rim ring at `z = 1.0`, `r = 0.335`);
12+
every evaluated vertex matches the closed-form blend
13+
`co = basis + value × (key − basis)`. The check also pins the rim ring — lifted
14+
to `1.0 + value × 1.5` and flared to `0.335 + value × 0.38` — with the foot
15+
still on the floor, so a uniform scale or a lift without the flare cannot pass.
16+
17+
## The render
18+
19+
The same vase at `Tall.value` 0, 0.5 (the checked object) and 1, left to right:
20+
squat jar, amphora, trumpet vase. The ochre band is part of the lathe profile,
21+
so it rides the key — thin on the jar's shoulder, stretched tall and higher on
22+
the full key. Around the full-key vase, three thin pale rings are read straight
23+
from the `Basis` key block: the jar's belly it was blended from. If the blend
24+
broke, the three vases would render as three identical jars.
1225

1326
## Run
1427

@@ -27,7 +40,7 @@ blender --background --python shape_key_blend.py -- --output blend.png --engine
2740
## Exit codes
2841

2942
Per-script sequential checks. `9` is a valid check code; there is no rule
30-
against it.
43+
against it. `10` and `11` are the shared render-path gates' own codes.
3144

3245
| Code | Meaning |
3346
| --- | --- |
@@ -40,8 +53,10 @@ against it.
4053
| 6 | Undeformed `mesh.vertices` not at Basis |
4154
| 7 | Evaluated vert off closed-form blend |
4255
| 8 | Evaluated Z span off closed form |
43-
| 9 | Top flare off closed form |
44-
| 10 | `--output` produced no file |
56+
| 9 | Rim radius (flare) off closed form |
57+
| 10 | Framing gate (`gallery_framing`, `--output` only) |
58+
| 11 | Asset-quality gate (`gallery_asset_quality`, `--output` only) |
59+
| 12 | `--output` produced no file |
4560

4661
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
4762
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
8.03 KB
Loading

0 commit comments

Comments
 (0)