From 23fa1ca1b852351fdde4ef28d6f6d731e3949a33 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 20 Nov 2026 13:13:31 +0100 Subject: [PATCH] README: the porcelain, its studio and the glaze check Co-Authored-By: Claude Sonnet 5.5 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0b3aa8..3d49232 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Synaptic Induction Chamber, the dummy strapped to a stool with its right hand in input only. Godot's physics engine is set to Dummy; each 120 Hz physics frame the client calls `BodyPainBoxSession.Step()` once and draws Ymir's lanes: one pose-carrying node per stable id, and the body drawn as one skinned SDF mesh (a surface-nets isosurface of the shape lanes, limbs smooth-blended into the body they hang from and -joined by a ball at each joint, built once at startup and rebuilt only when the bodies or joints change; skinned on the CPU every frame by `PuppetSkin`, which derives the facets, creases, vertex normals and altitudes from the skinned surface; flat-shaded, each edge softened by a bevel 2 px wide (`Look.BevelScreen`, at least `Look.BevelMin`, question lodur:question:bds-puppet-bevel-look-width): the fragment shader tilts the facet normal to each edge's bisector and blends corners to the vertex normal). +joined by a ball at each joint, built once at startup and rebuilt only when the bodies or joints change; skinned on the CPU every frame by `PuppetSkin`, which derives the facets, creases, vertex normals and altitudes from the skinned surface; flat-shaded, each edge softened by a bevel 2 px wide (`Look.BevelScreen`, at least `Look.BevelMin`, question lodur:question:bds-puppet-bevel-look-width): the fragment shader tilts the facet normal to each edge's bisector and blends corners to the vertex normal). The puppet is glazed porcelain: a bisque lit by a studio (a shadowing key and two rims, `Look.Studio`) that the camera carries (`Look.StudioFollowsCamera`, question lodur:question:bds-porcelain-studio-follows-camera), plus an analytic glaze that reflects the same studio (`client/studio.gdshaderinc`, Fresnel times the studio in the reflected direction, added as emission so it draws the same under gl_compatibility), pooled darker in concave creases. Needs the .NET 8+ SDK, cmake and a C compiler (MinGW gcc on Windows), the sibling Lodur, Ymir (with joint origin lanes, ABI 8) and CultLib checkouts (`..\Lodur`, `..\Ymir`, `..\CultLib`, or `LODUR_ROOT`, `YMIR_ROOT` and `CULTLIB_ROOT`; CultLib must be a clean checkout of 42dce361, the revision Ymir admits, or the build refuses), and Godot 4.7.2 mono. @@ -84,7 +84,7 @@ Exports need export templates (not installed here yet), so the client runs from The smoke has no renderer. `RenderCheck.tscn` is the check that does: it poses the puppet in a bent pose under a moved parent, renders one frame (gl_compatibility, the client's renderer), and compares the drawn silhouette with the mesh skinned on the CPU (intersection over union, at -least 0.999: a correct render measures 1.0000, and a forearm bone 10 degrees off, a bone 2 cm off and hard weights fail), and checks the lit puppet is not clipped to white and that the chamber's light still lights it (a glow of 0 fails). It also draws the shading normal (the soft bevel) on the torso and compares it with a CPU reference of the whole formula, skinned, welded and derived by the check itself, in five views: close up and from 3.7 m at 1280x720, close up in a bend of 90 degrees, and at 1920x1080 from 2.2 m and from 3.7 m (so a width fixed at 720 lines fails). In each: 90th percentile error at most 2 degrees, 0.6 across the bevel band, 1.5 on triangles whose width the smallest altitude caps, at most 0.7 on the pixels the corner blend reaches (the smooth vertex normal, in view space, within 1.5 widths of a corner) and at most 1.5 on the band of edges turning by 115 to 137 degrees (a bevel that is off, a stale crease, a linear falloff, a missing edge strip or width cap, the wrong width, a vertex normal left in model space, a shorter corner reach and a lower crease clamp fail). The drawn normals across triangle boundaries stay continuous: at most 0.5% of adjacent pixel pairs over 30 degrees at a bend of 60 degrees and 3% at 90, where some edges fold past 120 degrees and 2 px cannot soften them. Add `-- --png=`, `-- --normals-png=` or `-- --normals-far-png=` (also `--normals-bend90-png=`, `--normals-mid-png=`, `--normals-far1080-png=`) to keep a frame. It needs a display. +least 0.999: a correct render measures 1.0000, and a forearm bone 10 degrees off, a bone 2 cm off and hard weights fail), and checks the bisque (the glaze off) is not clipped to white and that the chamber's light still lights it (a glow of 0 fails); with the glaze on at the close view, from the front and from behind, the glaze must change at least 3% of the puppet's pixels and, from the front, clip at most 12% (add `-- --glaze-png=` or `--glaze-behind-png=`). It also draws the shading normal (the soft bevel) on the torso and compares it with a CPU reference of the whole formula, skinned, welded and derived by the check itself, in five views: close up and from 3.7 m at 1280x720, close up in a bend of 90 degrees, and at 1920x1080 from 2.2 m and from 3.7 m (so a width fixed at 720 lines fails). In each: 90th percentile error at most 2 degrees, 0.6 across the bevel band, 1.5 on triangles whose width the smallest altitude caps, at most 0.7 on the pixels the corner blend reaches (the smooth vertex normal, in view space, within 1.5 widths of a corner) and at most 1.5 on the band of edges turning by 115 to 137 degrees (a bevel that is off, a stale crease, a linear falloff, a missing edge strip or width cap, the wrong width, a vertex normal left in model space, a shorter corner reach and a lower crease clamp fail). The drawn normals across triangle boundaries stay continuous: at most 0.5% of adjacent pixel pairs over 30 degrees at a bend of 60 degrees and 3% at 90, where some edges fold past 120 degrees and 2 px cannot soften them. Add `-- --png=`, `-- --normals-png=` or `-- --normals-far-png=` (also `--normals-bend90-png=`, `--normals-mid-png=`, `--normals-far1080-png=`) to keep a frame. It needs a display. Known gap: the culling box. `Puppet` sets the mesh's `CustomAabb` to the skinned bounds every frame; a 1 cm box at the origin or at the centre culls the puppet in the close view and fails, but a box of half the bounds around the centre passes, since it only drops limbs where the box leaves the screen, which no view samples.