RenderCheck: the rest-pose mesh is left-right symmetric (mirror distance, bound 85 mm by the margin rule); neck bound re-derived for the new mesh

FellaSkin.MirrorGap; mutant skin-lopsided; neck bound 1.14 from shipped 0.73 and mutant 1.79.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-28 03:53:22 +01:00
commit b2792f0a32
3 changed files with 33 additions and 3 deletions

View file

@ -60,6 +60,23 @@ public partial class FellaSkin : Node3D
return worst;
}
/// <summary>
/// How far the rest pose is from left-right symmetric, in metres: the largest distance from any rest vertex mirrored across x = 0 to the nearest rest vertex.
/// The plan is symmetric about x = 0, so a lopsided build shows here whatever the pose.
/// </summary>
public float MirrorGap()
{
float worst = 0f;
foreach (var v in _rest)
{
float nearest = float.MaxValue;
var mirrored = new Vector3(-v.X, v.Y, v.Z);
foreach (var u in _rest) nearest = Math.Min(nearest, mirrored.DistanceTo(u));
worst = Math.Max(worst, nearest);
}
return worst;
}
public override void _Ready()
{
var plan = SeatedPuppet.Plan;

View file

@ -22,7 +22,7 @@ public partial class RenderCheck : Node
private const double WatchdogSeconds = 120;
// Bounds (shipped worst, least claimed mutant, separation) are in each check's comment.
private const int OddLevelFloor = 1245, FigureMisses = 1, DitherBlocks = 160;
private const double NeckBound = 1.0, FogLevels = 6.6, LightLevels = 11, MipPercent = 6.5;
private const double SymmetryMillimetres = 85, NeckBound = 1.14, FogLevels = 6.6, LightLevels = 11, MipPercent = 6.5;
private readonly List<string> _failures = new();
private Main _main = null!;
@ -89,6 +89,7 @@ public partial class RenderCheck : Node
CheckFigureWhereLanesAre(await Capture("play-clear"));
_main.Chamber.Volume.Visible = true;
await CheckNeck();
CheckSymmetry();
var home = _camera.Transform;
_camera.Distance = 0.9f;
@ -195,8 +196,8 @@ public partial class RenderCheck : Node
/// <summary>
/// A real neck is drawn. The chamber is hidden and the camera put straight in front of the head, 1.2 m away; the reading is the figure pixels on the row
/// 1 cm below the projected neck joint (the torso's pose times the joint's local anchor) over the figure pixels on the row through the projected head origin:
/// how wide the figure is at the neck against how wide at the head. Bound 1.0 = sqrt(0.58 x 1.72): shipped 0.58 (63 px over 108), the least claimed mutant
/// fella-primitives (the primitive box torso, 0.30 m wide, drawn again beside the skin) 1.72 (186 px over 108), separation 3.0; skin-unposed reads 0.54.
/// how wide the figure is at the neck against how wide at the head. Bound 1.14 = sqrt(0.73 x 1.79): shipped 0.73 (66 px over 90), the least claimed mutant
/// fella-primitives (the primitive box torso, 0.30 m wide, drawn again beside the skin) 1.79 (183 px over 102), separation 2.45; skin-unposed reads 0.72.
/// </summary>
private async Task CheckNeck()
{
@ -231,6 +232,17 @@ public partial class RenderCheck : Node
_main.Chamber.Visible = true;
}
/// <summary>
/// The rest-pose mesh is left-right symmetric: no rendering, a count of the skin's own vertices (<see cref="FellaSkin.MirrorGap"/>, millimetres).
/// Bound 85 mm = sqrt(55.9 x 128.9): shipped 55.9 mm, the least claimed mutant skin-lopsided (the left half's vertices stretched 1.5 times in x) 128.9 mm, separation 2.3.
/// </summary>
private void CheckSymmetry()
{
double gap = _main.Bodies.Skin.MirrorGap() * 1000.0;
Report("symmetry: largest mirror distance of the rest mesh in mm", gap, SymmetryMillimetres);
Check(gap <= SymmetryMillimetres, "symmetry", $"the rest mesh is {gap:0.#} mm from its mirror image at worst (bound {SymmetryMillimetres})");
}
/// <summary>
/// The snap and the affine probes: the figure and floor are hidden and a probe is drawn with the client's own material under the client's camera.
/// Snap: a box on a 30-line grid (blocks of 24 px), its drawn blocks against the blocks the CPU-projected hull covers with its corners snapped to

View file

@ -44,6 +44,7 @@ MUTANTS=(
'glow-unset|Chamber.cs|Look.GlowLightEnergy * glow|0f|glow'
'carrier-unposed|BodyRenderer.cs|node.Transform = new Transform3D(new Basis(new Quaternion(rx[i]|_ = new Transform3D(new Basis(new Quaternion(rx[i]|figure at lanes'
'fella-primitives|BodyRenderer.cs|SeatedPuppet.PartOf(ids[i]) is null && PrimitiveOf(|PrimitiveOf(|neck'
'skin-lopsided|FellaSkin.cs|positions.Add(v[i]);|positions.Add(v[i].X > 0f ? new Vector3(1.5f * v[i].X, v[i].Y, v[i].Z) : v[i]);|symmetry'
'skin-unposed|FellaSkin.cs|is { } pose) _skin[p] = pose * _inverseCreation[p];|is { } pose) _skin[p] = Transform3D.Identity;|figure at lanes'
)