Skip to content

Commit 743d45c

Browse files
TMHSDigitalclaude
andcommitted
fix(examples): regate gltf-skin-roundtrip against the rebased calibration sets
After the rebase onto main, two things changed. #258 re-rendered bmesh-gear, which darkened the contact-sheet calibration, and #257 raised the asset-sheet reference set. The scorpion stage measured 0.236, brighter than every calibration tile, so the key, fill, rim and wedge come down until the stage sits inside the set (0.204). Luma is now 0.231. The committed asset-sheet tool gains a row for this example, and it now bakes an Armature-deformed asset's staged pose before it removes the rig. Without that bake a skinned asset falls back to its rest pose, and the scorpion rendered with its tail stretched flat. None of the five references is skinned, so their panels are unchanged. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent af45d37 commit 743d45c

8 files changed

Lines changed: 19 additions & 8 deletions

File tree

20.5 KB
Loading
-2.76 KB
Loading
-13.3 KB
Loading

‎docs/gallery/gltf-skin-roundtrip/index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,10 +1169,10 @@ <h2>Source</h2>
11691169

11701170
<span class="c"># shaped warm key, faint cool fill, cool rim, warm wedge on the back wall</span>
11711171
<span class="c"># (docs/VISUAL-STYLE.md)</span>
1172-
light(<span class="s">&quot;Key&quot;</span>, (-<span class="n">3.5</span>, -<span class="n">4.5</span>, <span class="n">5.5</span>), <span class="n">400.0</span>, <span class="n">4.5</span>, (<span class="n">1.0</span>, <span class="n">0.96</span>, <span class="n">0.9</span>), (<span class="n">0</span>, <span class="n">0</span>, <span class="n">0.5</span>))
1173-
light(<span class="s">&quot;Fill&quot;</span>, (<span class="n">4.5</span>, -<span class="n">4.0</span>, <span class="n">2.2</span>), <span class="n">90.0</span>, <span class="n">9.0</span>, (<span class="n">0.75</span>, <span class="n">0.85</span>, <span class="n">1.0</span>), (<span class="n">0</span>, <span class="n">0</span>, <span class="n">0.5</span>))
1174-
light(<span class="s">&quot;Rim&quot;</span>, (<span class="n">0.5</span>, <span class="n">4.0</span>, <span class="n">4.5</span>), <span class="n">380.0</span>, <span class="n">4.0</span>, (<span class="n">0.6</span>, <span class="n">0.78</span>, <span class="n">1.0</span>), (<span class="n">0</span>, <span class="n">0</span>, <span class="n">0.6</span>))
1175-
light(<span class="s">&quot;Wedge&quot;</span>, (<span class="n">0.6</span>, <span class="n">5.2</span>, <span class="n">0.9</span>), <span class="n">320.0</span>, <span class="n">5.0</span>, (<span class="n">1.0</span>, <span class="n">0.76</span>, <span class="n">0.5</span>), (<span class="n">0.3</span>, <span class="n">7.5</span>, <span class="n">2.4</span>))
1172+
light(<span class="s">&quot;Key&quot;</span>, (-<span class="n">3.5</span>, -<span class="n">4.5</span>, <span class="n">5.5</span>), <span class="n">330.0</span>, <span class="n">4.5</span>, (<span class="n">1.0</span>, <span class="n">0.96</span>, <span class="n">0.9</span>), (<span class="n">0</span>, <span class="n">0</span>, <span class="n">0.5</span>))
1173+
light(<span class="s">&quot;Fill&quot;</span>, (<span class="n">4.5</span>, -<span class="n">4.0</span>, <span class="n">2.2</span>), <span class="n">70.0</span>, <span class="n">9.0</span>, (<span class="n">0.75</span>, <span class="n">0.85</span>, <span class="n">1.0</span>), (<span class="n">0</span>, <span class="n">0</span>, <span class="n">0.5</span>))
1174+
light(<span class="s">&quot;Rim&quot;</span>, (<span class="n">0.5</span>, <span class="n">4.0</span>, <span class="n">4.5</span>), <span class="n">300.0</span>, <span class="n">4.0</span>, (<span class="n">0.6</span>, <span class="n">0.78</span>, <span class="n">1.0</span>), (<span class="n">0</span>, <span class="n">0</span>, <span class="n">0.6</span>))
1175+
light(<span class="s">&quot;Wedge&quot;</span>, (<span class="n">0.6</span>, <span class="n">5.2</span>, <span class="n">0.9</span>), <span class="n">230.0</span>, <span class="n">5.0</span>, (<span class="n">1.0</span>, <span class="n">0.76</span>, <span class="n">0.5</span>), (<span class="n">0.3</span>, <span class="n">7.5</span>, <span class="n">2.4</span>))
11761176

11771177
cam_data = bpy.data.cameras.new(<span class="s">&quot;Cam&quot;</span>)
11781178
cam_data.lens = <span class="n">50.0</span>

‎examples/gltf-skin-roundtrip/gltf_skin_roundtrip.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,10 +858,10 @@ def light(name, loc, energy, size, col, aim):
858858

859859
# shaped warm key, faint cool fill, cool rim, warm wedge on the back wall
860860
# (docs/VISUAL-STYLE.md)
861-
light("Key", (-3.5, -4.5, 5.5), 400.0, 4.5, (1.0, 0.96, 0.9), (0, 0, 0.5))
862-
light("Fill", (4.5, -4.0, 2.2), 90.0, 9.0, (0.75, 0.85, 1.0), (0, 0, 0.5))
863-
light("Rim", (0.5, 4.0, 4.5), 380.0, 4.0, (0.6, 0.78, 1.0), (0, 0, 0.6))
864-
light("Wedge", (0.6, 5.2, 0.9), 320.0, 5.0, (1.0, 0.76, 0.5), (0.3, 7.5, 2.4))
861+
light("Key", (-3.5, -4.5, 5.5), 330.0, 4.5, (1.0, 0.96, 0.9), (0, 0, 0.5))
862+
light("Fill", (4.5, -4.0, 2.2), 70.0, 9.0, (0.75, 0.85, 1.0), (0, 0, 0.5))
863+
light("Rim", (0.5, 4.0, 4.5), 300.0, 4.0, (0.6, 0.78, 1.0), (0, 0, 0.6))
864+
light("Wedge", (0.6, 5.2, 0.9), 230.0, 5.0, (1.0, 0.76, 0.5), (0.3, 7.5, 2.4))
865865

866866
cam_data = bpy.data.cameras.new("Cam")
867867
cam_data.lens = 50.0
-2.37 KB
Loading

‎scripts/asset_sheet.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"rope-bridge": (r"^BridgeLow$", None),
6767
"wheelbarrow": (r"^BarrowLow$", None),
6868
"export-preset-axis": (r"^RadioMast\.Unity$", None),
69+
"gltf-skin-roundtrip": (r"^ScorpionAuthored$", None),
6970
}
7071

7172
_REF_LINE = re.compile(r"Asset-sheet gate.*?reference set — currently (.+?) — rendered", re.S)

‎scripts/asset_sheet_panel.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ def _pre(scene, depsgraph=None):
7474
edge90 = aq.measure_edge90(asset)[0]
7575
print(f"sheet: floors parts={parts} materials={mats} edge90={edge90:.3f}")
7676

77+
# A skinned asset deforms through an Armature modifier whose rig is removed
78+
# below; without this it would fall back to its rest pose (a scorpion with
79+
# its tail stretched out flat). Bake the pose it was staged in.
80+
_deps = bpy.context.evaluated_depsgraph_get()
81+
for ob in asset:
82+
if any(m.type == "ARMATURE" for m in ob.modifiers):
83+
baked = bpy.data.meshes.new_from_object(ob.evaluated_get(_deps))
84+
ob.modifiers.clear()
85+
ob.data = baked
86+
7787
# Restage in place. Deleting the scene would wipe the datablocks the asset
7888
# needs, so unparent the asset (world transform kept) and remove the rest.
7989
for ob in asset:

0 commit comments

Comments
 (0)