Skip to content

Commit 657e459

Browse files
TMHSDigitalclaude
andcommitted
fix(examples): parent-inverse-orrery and depsgraph-export quality pass
parent-inverse-orrery: the orbit rings ran through the planets and Lapis's arm read as feeding the moon. Each arm now runs under its planet with a riser post and cup carrying the sphere, and the ring sits at arm height so it passes beneath. Column collars at each arm, a finial under the sun and a foot collar; the plain bronze puck is a turned, moulded walnut base (metal mirrored the black stage and vanished). Planets and sun get an object-space noise mottle with a faint bump. The moon spins to 210 deg world, out past the planet's flank. Camera pitch 81 -> 80.2 to clear the wider foot. depsgraph-export: bumpers lay on the deck and overhung its back edge; they are now ray-cast onto the rear shoulder wall. Shell plastics get a fine noise bump and roughness wander. Checks unchanged and passing on 5.2.1 LTS and 4.5.11 LTS (render path too); falsifiers still fail: --skip-mpi exit 6, --unevaluated exit 5 (2346 vs 3666). Framing and asset-quality floors pass; contact sheets luma 0.237 (orrery) / 0.208 (controller) vs calibration 0.237-0.243; asset sheet regenerated. Link gate: 122 pages, 0 failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8aa4837 commit 657e459

14 files changed

Lines changed: 394 additions & 67 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ or expand a category below.
320320

321321
<p align="center">
322322
<a href="examples/grease-pencil-rosette/"><img src="examples/grease-pencil-rosette/preview.webp" width="24%" alt="Grease pencil rosette: five nested neon rose curves mounted as a sign on a brass-framed black lacquer board" /></a>
323-
<a href="examples/parent-inverse-orrery/"><img src="examples/parent-inverse-orrery/preview.webp" width="24%" alt="Parent inverse orrery: a brass tabletop orrery with a glowing yellow sun and three planets" /></a>
323+
<a href="examples/parent-inverse-orrery/"><img src="examples/parent-inverse-orrery/preview.webp" width="24%" alt="Parent inverse orrery: a brass tabletop orrery on a turned walnut base with a glowing gold sun and three mottled planets on riser posts" /></a>
324324
<a href="examples/compositor-glare/"><img src="examples/compositor-glare/preview.webp" width="24%" alt="Compositor glare: three neon rings with colored bloom halos" /></a>
325325
<a href="examples/image-pixels-testcard/"><img src="examples/image-pixels-testcard/preview.webp" width="24%" alt="Image pixels testcard: a studio monitor showing a procedural broadcast test card" /></a>
326326
</p>
@@ -845,7 +845,7 @@ ring pinned and the tip deflected. A straight tube is a failure.
845845
</tr>
846846
<tr>
847847
<td width="46%" valign="middle">
848-
<a href="examples/parent-inverse-orrery/"><img src="examples/parent-inverse-orrery/preview.webp" alt="Parent inverse orrery: a brass tabletop orrery with a glowing yellow sun, three planets on pivot arms inside brass orbit rings, and a silver moon, on a dark studio floor" /></a>
848+
<a href="examples/parent-inverse-orrery/"><img src="examples/parent-inverse-orrery/preview.webp" alt="Parent inverse orrery: a brass tabletop orrery on a turned walnut base with a glowing gold sun, three mottled planets on riser posts at the ends of collared pivot arms, brass orbit rings running beneath them, and a silver moon, on a dark studio floor" /></a>
849849
</td>
850850
<td valign="middle">
851851

1.94 KB
Loading
-288 Bytes
Loading
4.65 KB
Loading
15.2 KB
Loading
4.2 KB
Loading

‎docs/gallery/depsgraph-export/index.html‎

Lines changed: 75 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@ <h2 id="exit-codes">Exit codes<a class="anchor" href="#exit-codes" aria-label="L
400400
<h2>Source</h2>
401401
<div class="src-meta">
402402
<code>examples/depsgraph-export/depsgraph_export.py</code>
403-
<span>614 lines &middot; <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/depsgraph-export/depsgraph_export.py">View on GitHub &rarr;</a></span>
403+
<span>646 lines &middot; <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/depsgraph-export/depsgraph_export.py">View on GitHub &rarr;</a></span>
404404
</div>
405-
<div class="code" data-lines="614">
405+
<div class="code" data-lines="646">
406406
<pre class="gutter" aria-hidden="true">1
407407
2
408408
3
@@ -1016,7 +1016,39 @@ <h2>Source</h2>
10161016
611
10171017
612
10181018
613
1019-
614</pre><pre class="code-lines"><span class="s">&quot;&quot;&quot;Depsgraph-evaluated export — a runnable example.
1019+
614
1020+
615
1021+
616
1022+
617
1023+
618
1024+
619
1025+
620
1026+
621
1027+
622
1028+
623
1029+
624
1030+
625
1031+
626
1032+
627
1033+
628
1034+
629
1035+
630
1036+
631
1037+
632
1038+
633
1039+
634
1040+
635
1041+
636
1042+
637
1043+
638
1044+
639
1045+
640
1046+
641
1047+
642
1048+
643
1049+
644
1050+
645
1051+
646</pre><pre class="code-lines"><span class="s">&quot;&quot;&quot;Depsgraph-evaluated export — a runnable example.
10201052

10211053
Witnesses the depsgraph lifetime contract AND that modifiers actually ship in
10221054
exports. Builds a game controller whose shell is a sparse quad control cage
@@ -1259,6 +1291,29 @@ <h2>Source</h2>
12591291
<span class="k">return</span> mat
12601292

12611293

1294+
<span class="k">def</span> grain(mat, scale=<span class="n">90.0</span>, strength=<span class="n">0.05</span>, rough_jitter=<span class="n">0.08</span>):
1295+
<span class="s">&quot;&quot;&quot;Moulded-plastic texture: fine noise bump plus a roughness wander, so a
1296+
large shell stops reading as one flat CG gloss.&quot;&quot;&quot;</span>
1297+
nt = mat.node_tree
1298+
bsdf = nt.nodes[<span class="s">&quot;Principled BSDF&quot;</span>]
1299+
coord = nt.nodes.new(<span class="s">&quot;ShaderNodeTexCoord&quot;</span>)
1300+
noise = nt.nodes.new(<span class="s">&quot;ShaderNodeTexNoise&quot;</span>)
1301+
noise.inputs[<span class="s">&quot;Scale&quot;</span>].default_value = scale
1302+
noise.inputs[<span class="s">&quot;Detail&quot;</span>].default_value = <span class="n">4.0</span>
1303+
nt.links.new(coord.outputs[<span class="s">&quot;Object&quot;</span>], noise.inputs[<span class="s">&quot;Vector&quot;</span>])
1304+
bump = nt.nodes.new(<span class="s">&quot;ShaderNodeBump&quot;</span>)
1305+
bump.inputs[<span class="s">&quot;Strength&quot;</span>].default_value = strength
1306+
nt.links.new(noise.outputs[<span class="s">&quot;Fac&quot;</span>], bump.inputs[<span class="s">&quot;Height&quot;</span>])
1307+
nt.links.new(bump.outputs[<span class="s">&quot;Normal&quot;</span>], bsdf.inputs[<span class="s">&quot;Normal&quot;</span>])
1308+
base = bsdf.inputs[<span class="s">&quot;Roughness&quot;</span>].default_value
1309+
rmap = nt.nodes.new(<span class="s">&quot;ShaderNodeMapRange&quot;</span>)
1310+
rmap.inputs[<span class="s">&quot;To Min&quot;</span>].default_value = base - rough_jitter
1311+
rmap.inputs[<span class="s">&quot;To Max&quot;</span>].default_value = base + rough_jitter
1312+
nt.links.new(noise.outputs[<span class="s">&quot;Fac&quot;</span>], rmap.inputs[<span class="s">&quot;Value&quot;</span>])
1313+
nt.links.new(rmap.outputs[<span class="s">&quot;Result&quot;</span>], bsdf.inputs[<span class="s">&quot;Roughness&quot;</span>])
1314+
<span class="k">return</span> mat
1315+
1316+
12621317
<span class="k">def</span> _smooth(me, angle=<span class="n">35.0</span>):
12631318
<span class="s">&quot;&quot;&quot;Smooth shading with sharp breaks above `angle` (4.1+ mesh API).&quot;&quot;&quot;</span>
12641319
me.shade_smooth()
@@ -1272,8 +1327,10 @@ <h2>Source</h2>
12721327

12731328
me = bpy.data.meshes.new(<span class="s">&quot;Gamepad.Shell&quot;</span>)
12741329
build_shell_cage(me)
1275-
me.materials.append(principled(<span class="s">&quot;Gamepad.Cobalt&quot;</span>, (<span class="n">0.014</span>, <span class="n">0.105</span>, <span class="n">0.54</span>, <span class="n">1.0</span>), <span class="n">0.0</span>, <span class="n">0.34</span>))
1276-
me.materials.append(principled(<span class="s">&quot;Gamepad.Graphite&quot;</span>, (<span class="n">0.030</span>, <span class="n">0.032</span>, <span class="n">0.040</span>, <span class="n">1.0</span>), <span class="n">0.0</span>, <span class="n">0.55</span>))
1330+
me.materials.append(grain(principled(<span class="s">&quot;Gamepad.Cobalt&quot;</span>, (<span class="n">0.014</span>, <span class="n">0.105</span>, <span class="n">0.54</span>, <span class="n">1.0</span>),
1331+
<span class="n">0.0</span>, <span class="n">0.34</span>)))
1332+
me.materials.append(grain(principled(<span class="s">&quot;Gamepad.Graphite&quot;</span>, (<span class="n">0.030</span>, <span class="n">0.032</span>, <span class="n">0.040</span>, <span class="n">1.0</span>),
1333+
<span class="n">0.0</span>, <span class="n">0.55</span>), strength=<span class="n">0.12</span>))
12771334
_smooth(me, <span class="k">None</span>)
12781335
shell = bpy.data.objects.new(<span class="s">&quot;Gamepad.Shell&quot;</span>, me)
12791336
coll.objects.link(shell)
@@ -1285,11 +1342,16 @@ <h2>Source</h2>
12851342
<span class="c"># limit surface, not the cage, or every button floats above the plastic.</span>
12861343
dg = bpy.context.evaluated_depsgraph_get()
12871344

1288-
<span class="k">def</span> seat(ob, x, y, sink=<span class="n">0.02</span>):
1289-
hit, loc, nrm, _ = shell.ray_cast(Vector((x, y, <span class="n">5.0</span>)), Vector((<span class="n">0</span>, <span class="n">0</span>, -<span class="n">1</span>)),
1290-
depsgraph=dg)
1345+
<span class="k">def</span> seat(ob, x, y, sink=<span class="n">0.02</span>, back_z=<span class="k">None</span>):
1346+
<span class="s">&quot;&quot;&quot;Seat on the deck below (x, y), or — with back_z — on the rear
1347+
shoulder wall at height back_z, casting forward from behind.&quot;&quot;&quot;</span>
1348+
<span class="k">if</span> back_z <span class="k">is</span> <span class="k">None</span>:
1349+
origin, ray = Vector((x, y, <span class="n">5.0</span>)), Vector((<span class="n">0</span>, <span class="n">0</span>, -<span class="n">1</span>))
1350+
<span class="k">else</span>:
1351+
origin, ray = Vector((x, <span class="n">5.0</span>, back_z)), Vector((<span class="n">0</span>, -<span class="n">1</span>, <span class="n">0</span>))
1352+
hit, loc, nrm, _ = shell.ray_cast(origin, ray, depsgraph=dg)
12911353
<span class="k">if</span> <span class="k">not</span> hit:
1292-
<span class="k">raise</span> RuntimeError(<span class="s">f&quot;</span>{ob.name}<span class="s">: no shell under (</span>{x}<span class="s">, </span>{y}<span class="s">)</span><span class="s">&quot;</span>)
1354+
<span class="k">raise</span> RuntimeError(<span class="s">f&quot;</span>{ob.name}<span class="s">: no shell at </span>{tuple(origin)}<span class="s">&quot;</span>)
12931355
rot = nrm.to_track_quat(<span class="s">&#x27;Z&#x27;</span>, <span class="s">&#x27;Y&#x27;</span>).to_matrix().to_4x4()
12941356
ob.matrix_world = Matrix.Translation(loc - nrm * sink) @ rot
12951357
ob.parent = shell <span class="c"># shell sits at the identity, so no parent inverse</span>
@@ -1322,10 +1384,12 @@ <h2>Source</h2>
13221384
part(<span class="s">&quot;Gamepad.Start&quot;</span>, part_extrusion, satin, <span class="n">0.62</span>, <span class="n">0.62</span>, _stadium(<span class="n">0.36</span>, <span class="n">0.13</span>), <span class="n">0.06</span>, <span class="n">0.02</span>)
13231385
home = principled(<span class="s">&quot;Gamepad.Home&quot;</span>, (<span class="n">1.0</span>, <span class="n">0.50</span>, <span class="n">0.10</span>, <span class="n">1.0</span>), <span class="n">0.0</span>, <span class="n">0.3</span>, emission=<span class="n">0.8</span>)
13241386
part(<span class="s">&quot;Gamepad.Home&quot;</span>, part_disc, home, <span class="n">0.0</span>, <span class="n">0.0</span>, <span class="n">0.16</span>, <span class="n">0.06</span>, <span class="n">28</span>, <span class="n">0.02</span>)
1387+
<span class="c"># Bumpers ride the rear shoulder wall, high under the deck lip, instead of</span>
1388+
<span class="c"># lying on top of the deck and overhanging its back edge.</span>
13251389
<span class="k">for</span> side <span class="k">in</span> (-<span class="n">1</span>, <span class="n">1</span>):
13261390
b = part(<span class="s">f&quot;</span><span class="s">Gamepad.Bumper</span>{<span class="s">&#x27;L&#x27;</span> <span class="k">if</span> side &lt; <span class="n">0</span> <span class="k">else</span> <span class="s">&#x27;R&#x27;</span>}<span class="s">&quot;</span>, part_extrusion, satin,
1327-
side * <span class="n">2.2</span>, <span class="n">1.16</span>, _stadium(<span class="n">1.5</span>, <span class="n">0.34</span>), <span class="n">0.15</span>, <span class="n">0.05</span>)
1328-
b.rotation_euler.z += math.radians(-side * <span class="n">8.0</span>)
1391+
side * <span class="n">2.15</span>, <span class="n">1.0</span>, _stadium(<span class="n">1.4</span>, <span class="n">0.26</span>), <span class="n">0.14</span>, <span class="n">0.05</span>)
1392+
seat(b, side * <span class="n">2.15</span>, <span class="k">None</span>, sink=<span class="n">0.06</span>, back_z=<span class="n">0.40</span>)
13291393
<span class="k">return</span> shell
13301394

13311395

‎docs/gallery/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ <h2><a href="color-attribute-wheel/">color-attribute-wheel</a></h2>
630630
</article>
631631
<article class="card" data-tags="objects transforms" data-kind="examples" data-name="parent-inverse-orrery">
632632
<a class="card-media" href="parent-inverse-orrery/" tabindex="-1" aria-hidden="true">
633-
<img src="assets/parent-inverse-orrery-hero.webp" alt="A brass orrery: a glowing yellow sun on a stand with blue, green and orange planets on arms, orbit rings and a silver moon." width="1280" height="720" loading="lazy" decoding="async" />
633+
<img src="assets/parent-inverse-orrery-hero.webp" alt="A brass orrery on a turned walnut base: a glowing gold sun atop the column, mottled blue, green and orange planets on riser posts, orbit rings beneath them, and a silver moon." width="1280" height="720" loading="lazy" decoding="async" />
634634
</a>
635635
<div class="card-body">
636636
<h2><a href="parent-inverse-orrery/">parent-inverse-orrery</a></h2>

0 commit comments

Comments
 (0)