diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index 387b252..a0cb5fe 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -81,6 +81,7 @@ "examples/png-exr-alpha", "examples/shader-node-group", "examples/shape-key-blend", + "examples/sky-texture-sun-elevation", "examples/swatch-grid", "examples/temp-override-join", "examples/text-version-stamp", diff --git a/.github/workflows/blender-smoke.yml b/.github/workflows/blender-smoke.yml index a6cf6f7..9cb33f8 100644 --- a/.github/workflows/blender-smoke.yml +++ b/.github/workflows/blender-smoke.yml @@ -474,3 +474,14 @@ jobs: # Exits non-zero on failure. xvfb-run -a "$BLENDER" --background \ --python examples/custom-normals-shade/custom_normals_shade.py -- + + - name: Shipped example - sky texture sun elevation (Nishita / MS + zenith rise) + run: | + set -euo pipefail + # Check only (no gallery still): World ShaderNodeTexSky drives + # Background Color; sky_type is NISHITA on 4.5 and MULTIPLE_SCATTERING + # on 5.1 (NISHITA gone); dust_density is 4.5-only (aerosol_density on + # 5.1). Two tiny Cycles OPEN_EXR zenith probes assert sun_elevation + # 8→55 deg brightens zenith (rise gate ≥ 1.25). Exits non-zero on failure. + xvfb-run -a "$BLENDER" --background \ + --python examples/sky-texture-sun-elevation/sky_texture_sun_elevation.py -- diff --git a/README.md b/README.md index 423846c..7551db6 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@

- 12 skills  •  6 rules  •  2 templates  •  17 snippets  •  32 examples + 12 skills  •  6 rules  •  2 templates  •  17 snippets  •  33 examples

@@ -36,7 +36,7 @@ ## Overview -This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 32 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 33 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. @@ -85,7 +85,7 @@ or expand a category below.

-Materials, shading & compositing — 6 examples +Materials, shading & compositing — 7 examples @@ -179,6 +179,23 @@ as if associated-alpha — straight-authored dark values at low alpha clamp to w (closed-form error **0.98** at `(0.02, a=1/255)`). OpenEXR preserves float RGBA; byte images stay straight 8-bit. Also witnesses `EXR color_mode='RGB'` dropping alpha. + + + + +
+Sky texture sun elevation: terracotta jar diptych on a dark floor — left panel low sun at 8 degrees with a deep blue zenith and warm horizon limb, right panel high sun at 55 degrees with a brighter cyan sky, proving ShaderNodeTexSky sun_elevation + + +### [sky-texture-sun-elevation](examples/sky-texture-sun-elevation/) + +World `ShaderNodeTexSky` driving Background Color — the sky contract AI lighting +code misses across 4.5 → 5.1. `sky_type` is `NISHITA` on 4.5 LTS and +`MULTIPLE_SCATTERING` on 5.1 (`NISHITA` gone); `dust_density` exists only on 4.5 +(`aerosol_density` on 5.1). Two tiny Cycles EXR zenith probes assert +`sun_elevation` 8° → 55° brightens zenith (rise **2.25x** / **1.50x**, gate ≥ 1.25). +Gallery still is a dual-elevation diptych so the contract reads at thumbnail scale. +
diff --git a/ROADMAP.md b/ROADMAP.md index f0011c3..d20d9ec 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -114,6 +114,11 @@ Not committed; target list for the next content version. (v0.3.0 shipped the smo - 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`) - ~~Collision compound witness~~ **SHIPPED** as `examples/collision-hull-proxy/` — game-prop collision as a compound of convex pieces, each a `bmesh.ops.convex_hull` of a coarse `sec(π/n)`-inflated cage (containment 4.4e-08, watertight, positive signed volume, Euler 2, per-piece 255-face budget: body 70, caps 60×3, compound 250); a hull of the dense render mesh measures 380 faces — over budget — which is why pipelines hull cages; proud details cost cage rows, concave grooves are free; byte-identical on 4.5.11 and 5.1.2 - ~~Custom-normals / shade-by-angle witness~~ **SHIPPED** as `examples/custom-normals-shade/` — the post-4.1 shading contract: `use_auto_smooth`/`use_custom_normals`/`calc_normals` are AttributeError on BOTH 4.5.11 and 5.1.2; `set_sharp_from_angle` sharp sets match an independent dihedral recompute exactly (188/388 edges, 3 meshes); evaluated normal welds/splits exact (0.0 dev); custom split normals survive depsgraph evaluation within int16 quantization (1.407e-04, not float-exact); **divergence**: the legacy `shade_auto_smooth` operator CANCELS headless on 4.5 ("Asset loading is unfinished", mesh untouched, no exception) while 5.1 FINISHES with the Smooth-by-Angle NODES modifier — the data API is the portable path +- ~~Sky Texture / sun_elevation witness~~ **SHIPPED** as `examples/sky-texture-sun-elevation/` — World `ShaderNodeTexSky` → Background; `sky_type` is `NISHITA` on 4.5 and `MULTIPLE_SCATTERING` on 5.1 (`NISHITA` gone); `dust_density` is 4.5-only (`aerosol_density` on 5.1); zenith EXR rise 8°→55° measured **2.25x** (5.1.2) / **1.50x** (4.5.11), gate ≥ 1.25; dual-elevation gallery diptych +- Grease Pencil Line Art contour witness: empty GPv3 object + `modifiers.new(..., "LINEART")`; `thickness` on 4.5 vs `radius` on 5.1; evaluated contour stroke counts for a known source mesh +- Camera DOF + focus_distance witness: `cam.dof.use_dof`, focus plane vs defocus variance on high-freq cards (Stage deviation — depth needs background content) +- Volumetric scatter optical-depth witness: Volume Scatter density → Beer–Lambert transmittance along a known path (Cycles; Stage deviation) +- Freestyle SVG / line-set witness: Freestyle line set on a silhouette (full render pass; prefer Line Art first) - prop-origin-transform witness — origin to base center, `transform_apply` through the data API, delta transforms, `matrix_parent_inverse` so parented children do not teleport; closed forms: post-apply scale exactly (1,1,1), local bbox min Z == 0, world bbox unchanged (builds on `parent-inverse-orrery`, does not duplicate it) - mesh-hygiene-audit witness — the engine-ingest checklist as executable contract: no ngons, no loose vertices, no non-manifold edges, no zero-area faces, consistent outward winding; closed forms via Euler characteristic and exact edge-face incidence counts diff --git a/docs/gallery/assets/sky-texture-sun-elevation-hero.webp b/docs/gallery/assets/sky-texture-sun-elevation-hero.webp new file mode 100644 index 0000000..a91c325 Binary files /dev/null and b/docs/gallery/assets/sky-texture-sun-elevation-hero.webp differ diff --git a/docs/gallery/contact-sheets/sky-texture-sun-elevation-contact-sheet.webp b/docs/gallery/contact-sheets/sky-texture-sun-elevation-contact-sheet.webp new file mode 100644 index 0000000..e799544 Binary files /dev/null and b/docs/gallery/contact-sheets/sky-texture-sun-elevation-contact-sheet.webp differ diff --git a/docs/gallery/index.html b/docs/gallery/index.html index daa75ec..4d3a5a5 100644 --- a/docs/gallery/index.html +++ b/docs/gallery/index.html @@ -197,11 +197,14 @@

Examples Gallery

+ + +
@@ -557,6 +560,17 @@

custom-normals-shade

View example
+
+ + sky-texture-sun-elevation — World ShaderNodeTexSky driving Background Color — the sky contract across 4.5 LTS and 5.1. + +
+

sky-texture-sun-elevation

+

World ShaderNodeTexSky driving Background Color — the sky contract across 4.5 LTS and 5.1. sky_type is NISHITA on 4.5 and MULTIPLE_SCATTERING on 5.1 (NISHITA gone); dust_density exists only on 4.5 (aerosol_density on 5.1). Two tiny Cycles OPEN_EXR zenith probes prove sun_elevation 8 deg to 55 deg brightens zenith (rise 2.25x on 5.1.2, 1.50x on 4.5.11, gate >= 1.25).

+

witnesses AI code still assigns sky_type='NISHITA' and dust_density on 5.1 — both are wrong (NISHITA removed; dust_density is AttributeError; use MULTIPLE_SCATTERING + aerosol_density). A near-black Background Strength alone is not a sky: Sky must link into Background Color. Elevation that does not brighten zenith fails the rise gate.

+ View example +
+