Snap Soul seams to facet edges
This commit is contained in:
parent
00e104de71
commit
dceb9c3390
2 changed files with 24 additions and 10 deletions
|
|
@ -59,22 +59,35 @@ SoulField soulField(float3 local, SdfObject sdfObject)
|
|||
float risk = saturate(sdfObject.state.z * 1.55 + (1.0 - confidence) * 0.35);
|
||||
float body = soulBodyDistance(local, confidence, risk);
|
||||
SoulCutField cuts = soulCutField(local, confidence, risk);
|
||||
float4 plane = float4(cuts.a, cuts.b, cuts.c, cuts.d);
|
||||
float4 planeAbs = abs(plane);
|
||||
float dominant = max(max(planeAbs.x, planeAbs.y), max(planeAbs.z, planeAbs.w));
|
||||
float smallest = min(min(planeAbs.x, planeAbs.y), min(planeAbs.z, planeAbs.w));
|
||||
float scale = lerp(0.58, 0.66, confidence) - risk * 0.026;
|
||||
float faceA = abs(cuts.a) - (scale * 0.82);
|
||||
float faceB = abs(cuts.b) - (scale * 0.78);
|
||||
float faceC = abs(cuts.c) - (scale * 0.84);
|
||||
float faceD = abs(cuts.d) - (scale * 0.80);
|
||||
float4 face = float4(faceA, faceB, faceC, faceD);
|
||||
float4 faceAbs = abs(face);
|
||||
float dominant = max(max(face.x, face.y), max(face.z, face.w));
|
||||
float smallest = min(min(faceAbs.x, faceAbs.y), min(faceAbs.z, faceAbs.w));
|
||||
float chamber = saturate(1.0 - length(cuts.warped) * 1.22);
|
||||
|
||||
float riskPlane = cuts.b - cuts.c * 0.58 + cuts.d * 0.24 + 0.018 * sin(timeSeconds * 0.51 + confidence * 2.0);
|
||||
float edgeAgreement = min(min(abs(cuts.a - cuts.b), abs(cuts.a + cuts.c)), min(abs(cuts.b + cuts.d), abs(cuts.c - cuts.d)));
|
||||
float edgeAB = abs(faceA - faceB);
|
||||
float edgeAC = abs(faceA - faceC);
|
||||
float edgeAD = abs(faceA - faceD);
|
||||
float edgeBC = abs(faceB - faceC);
|
||||
float edgeBD = abs(faceB - faceD);
|
||||
float edgeCD = abs(faceC - faceD);
|
||||
float edgeAgreement = min(min(edgeAB, edgeAC), min(min(edgeAD, edgeBC), min(edgeBD, edgeCD)));
|
||||
float riskEdge = min(min(edgeBC, edgeAD), edgeCD);
|
||||
float riskWidth = lerp(0.010, 0.036, risk);
|
||||
float riskSeam = min(abs(riskPlane), edgeAgreement * 0.62 + abs(riskPlane) * 0.42) - riskWidth;
|
||||
float branchA = abs(riskPlane + (cuts.a - cuts.d) * 0.24);
|
||||
float branchB = abs(riskPlane - (cuts.b + cuts.c) * 0.20);
|
||||
float branchC = abs(riskPlane + cuts.a * 0.12 + cuts.b * 0.09 - cuts.d * 0.21);
|
||||
float riskBand = max(riskEdge, abs(riskPlane) * 0.22 - (0.16 + risk * 0.10));
|
||||
float riskSeam = riskBand - riskWidth;
|
||||
float branchA = max(edgeAC, abs(riskPlane + cuts.d * 0.18) * 0.24 - 0.11);
|
||||
float branchB = max(edgeBD, abs(riskPlane - cuts.a * 0.16) * 0.24 - 0.10);
|
||||
float branchC = max(edgeAB, abs(riskPlane + cuts.c * 0.12) * 0.24 - 0.09);
|
||||
float fracture = min(min(branchA, branchB), branchC) - riskWidth * 0.40;
|
||||
|
||||
float edgeMask = smoothstep(0.04, 0.30, dominant - smallest);
|
||||
float edgeMask = smoothstep(0.01, 0.10, dominant - smallest);
|
||||
float findingWidth = lerp(0.008, 0.020, confidence) * edgeMask;
|
||||
float findingEdge = edgeAgreement - findingWidth;
|
||||
float paneA = abs(cuts.a * 0.62 + cuts.b * 0.28 - cuts.c * 0.18);
|
||||
|
|
|
|||
|
|
@ -87,3 +87,4 @@
|
|||
{"timestamp":"2026-05-13T18:08:00+01:00","topic":"soul-organic-cut-plane-domain","lesson":"Soul's durable domain is not a rigid octahedron. It is a living crystal governed by an organic family of cutting planes: silhouette, panes, grooves, finding edges, risk seams, fractures, and inner light should read from the same warped plane field so the object feels grown and faceted, not decorated with axis-aligned octahedral markings.","files":["src/Aquarium.Epiphany/Shaders/D3D12SoulAgent.hlsl","state/evidence.jsonl"],"source":"user corrected the octahedral-domain interpretation using imagegen crystal reference"}
|
||||
{"timestamp":"2026-05-13T18:18:00+01:00","topic":"soul-distance-material-authority","lesson":"Soul's raymarch distance must stay owned by the crystalline body silhouette. Cutting-plane seams, pane grooves, finding edges, and risk fractures are surface-domain material/light masks unless they intentionally change the silhouette; smooth-unioning those masks into the trace distance turns cracks into slabs and is SDF Jenga.","files":["src/Aquarium.Epiphany/Shaders/D3D12SoulAgent.hlsl","state/evidence.jsonl"],"source":"user screenshot showed escaped seam planes and called out SDF Jenga risk"}
|
||||
{"timestamp":"2026-05-13T18:34:00+01:00","topic":"soul-facet-relief-not-decals","lesson":"Soul finding seams need real facet-domain relief, not flat decals. Use the organic cutting-plane field to displace the body surface: active facets lift outward along their plane normals, strongest around the equator, while finding/risk/fracture seams cut into that relief. Keep this as bounded body displacement, not smooth-unioned freestanding seam geometry.","files":["src/Aquarium.Epiphany/Shaders/D3D12SoulAgent.hlsl","state/evidence.jsonl"],"source":"user compared current Soul to reference art and identified extruded facets/fractured adjacent faces"}
|
||||
{"timestamp":"2026-05-13T18:58:00+01:00","topic":"soul-seams-follow-facet-edges","lesson":"Soul seams must be measured against the facet edge graph, not raw cut-plane coordinates or free risk planes. Derive finding/risk/fracture distances from pairwise differences of the same offset face distances that define the crystal body; auxiliary risk planes may gate which edge segments light up, but they must not draw independent paths across facet interiors.","files":["src/Aquarium.Epiphany/Shaders/D3D12SoulAgent.hlsl","state/evidence.jsonl"],"source":"user screenshot showed real relief seams drifting across faces instead of following facet edges"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue