diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index 24e00ba..18ba287 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -86,6 +86,7 @@ "examples/uv-layer-grid", "examples/vertex-weight-limit", "examples/vse-cut-list", + "examples/vse-gamma-cross", "examples/wave-displace" ] } diff --git a/.github/workflows/blender-smoke.yml b/.github/workflows/blender-smoke.yml index 8ab1309..fc8a357 100644 --- a/.github/workflows/blender-smoke.yml +++ b/.github/workflows/blender-smoke.yml @@ -427,3 +427,13 @@ jobs: # re-imported rig. Exits non-zero on failure. xvfb-run -a "$BLENDER" --background \ --python examples/gltf-skin-roundtrip/gltf_skin_roundtrip.py -- + + - name: Shipped example - VSE gamma cross (blend-curve closed form) + run: | + set -euo pipefail + # Check only: renders tiny frames across a GAMMA_CROSS and asserts + # every sample against the gamma-0.5 closed form ((1-t)*sqrt(A) + + # t*sqrt(B))^2 with t = (frame-start)/duration, plus the material + # lerp deviation at mid. Exits non-zero on failure. + xvfb-run -a "$BLENDER" --background \ + --python examples/vse-gamma-cross/vse_gamma_cross.py -- diff --git a/README.md b/README.md index 54ef199..e8f805b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@

- 12 skills  •  6 rules  •  2 templates  •  17 snippets  •  28 examples + 12 skills  •  6 rules  •  2 templates  •  17 snippets  •  29 examples

@@ -36,7 +36,7 @@ ## Overview -This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 28 runnable examples** for Blender Python development targeting Blender 5.1 (current stable) with Blender 4.5 LTS fallback support. +This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 29 runnable examples** for Blender Python development targeting Blender 5.1 (current stable) with Blender 4.5 LTS fallback support. The content is consumed by AI coding agents (Cursor, Claude Code, any MCP-capable client) when working on Blender add-ons, geometry nodes scripts, batch pipelines, or animation tooling. There is no build step. Edit the markdown and Python files directly. @@ -186,7 +186,7 @@ byte images stay straight 8-bit. Also witnesses `EXR color_mode='RGB'` dropping

-Mesh, curves & text — 8 examples +Mesh, curves & text — 9 examples @@ -306,6 +306,22 @@ ending in `length=` vs `frame_end=`, and `left_handle`/`right_handle`/`duration` the deprecated `frame_final_*`. Asserts closed-form spans, GC wiring and clamping, the consumed-input compositing contract, and a save/reload round-trip. + + + + +
+VSE gamma cross: a mixing bench in a dark studio - eight emissive panels fading crimson to teal across the cross, with the brighter naive-lerp midpoint framed in hazard orange on the console below + + +### [vse-gamma-cross](examples/vse-gamma-cross/) + +The GAMMA_CROSS fade is not the naive linear mix: it blends in a gamma-0.5 +space, `((1-t)·√A + t·√B)²` with `t = (frame − start) / duration` — never 1 +inside the effect. Per-frame sample renders assert the closed form (mid dips +0.115 below the sRGB lerp), and the AgX-default sampling trap is documented +(`view_transform = 'Standard'` is mandatory for any pixel witness). +
diff --git a/ROADMAP.md b/ROADMAP.md index 6e0a032..3aa72ba 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -110,7 +110,7 @@ Not committed; target list for the next content version. (v0.3.0 shipped the smo - UV-handle lifetime snippet: re-fetch attribute/UV layers by name after any CustomData-reallocating call (`calc_tangents`, `VertexGroup.add`, modifier edits) — held handles dangle silently on 4.5, survive by luck on 5.1 (found authoring `triangulate-tangents`) - glTF skinned-mesh export witness: follow-up to `gltf-export-roundtrip` + `vertex-weight-limit` — **SHIPPED** as `examples/gltf-skin-roundtrip/` — `skins[0].joints` names every bone, JOINTS_0/WEIGHTS_0 with unit sums (3e-8), weights bit-exact, rest matrices to 2.4e-07, deformation to 4.8e-07; exporter welds duplicate loops (sorted-multiset comparisons mispair — compare by rest-key); unparented skinned meshes make the exporter bind an armature by name - Degenerate-bevel weld hazard (snippet or rule): bevel width ≥ half a box dimension creates zero-area faces whose loops weld on glTF export (found authoring `gltf-export-roundtrip`, where the count check caught a 36-vertex weld) -- GAMMA_CROSS blend-curve witness: the cross blend is not the naive linear mix (mid-cross measured (0.341, 0.349, 0.463) from crimson (0.85, 0.10, 0.22) and teal (0.06, 0.75, 0.80)) — derive and assert the gamma-space closed form per frame; follow-up to `vse-cut-list` +- ~~GAMMA_CROSS blend-curve witness~~ **SHIPPED** as `examples/vse-gamma-cross/` — the cross blends in a gamma-0.5 space: `((1-t)·√A + t·√B)²` with `t = (frame − start)/duration`, never 1 inside the effect; mid-cross dips 0.115 below the sRGB lerp from crimson/teal (closed form (0.341, 0.349, 0.463) confirmed per frame); AgX-default sampling poisons the fit (0.146 red-channel error, `view_transform='Standard'` mandatory); deleting a consumed input orphans-and-deletes the effect — follow-up to `vse-cut-list` - Falsy `bpy_prop_collection` trap snippet: an empty collection is falsy, so `editor.strips or editor.sequences` silently falls through to the legacy accessor on an empty timeline — always branch on `hasattr`; likely generalizes across the API (found authoring `vse-cut-list`) ## Future (uncommitted) diff --git a/docs/gallery/assets/vse-gamma-cross-hero.webp b/docs/gallery/assets/vse-gamma-cross-hero.webp new file mode 100644 index 0000000..2e950bf Binary files /dev/null and b/docs/gallery/assets/vse-gamma-cross-hero.webp differ diff --git a/docs/gallery/contact-sheets/vse-gamma-cross-contact-sheet.webp b/docs/gallery/contact-sheets/vse-gamma-cross-contact-sheet.webp new file mode 100644 index 0000000..f300329 Binary files /dev/null and b/docs/gallery/contact-sheets/vse-gamma-cross-contact-sheet.webp differ diff --git a/docs/gallery/index.html b/docs/gallery/index.html index 3e36cfb..fde0d5f 100644 --- a/docs/gallery/index.html +++ b/docs/gallery/index.html @@ -513,6 +513,17 @@

gltf-skin-roundtrip

View example +
+ + vse-gamma-cross — The GAMMA_CROSS fade is not the naive linear mix: it blends in a gamma-0.5 space, so the mid-cross dips below the sRGB lerp. + +
+

vse-gamma-cross

+

The GAMMA_CROSS fade is not the naive linear mix: it blends in a gamma-0.5 space, so the mid-cross dips below the sRGB lerp. Tiny per-frame renders are asserted against the closed form per frame.

+

witnesses out = ((1-t)*sqrt(A) + t*sqrt(B))^2 with t = (frame - start) / duration, never 1 inside the effect. The mid lerp deviation is 0.115; AgX-default sampling poisons the fit (Standard is mandatory).

+ View example +
+