diff --git a/src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl b/src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl index 2badd03..04a7cdc 100644 --- a/src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl +++ b/src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl @@ -326,10 +326,10 @@ float imaginationPetalSdf(float3 local, float angle, float activity, float heart float2 radial = float2(cos(angle), sin(angle)); float2 tangent = float2(-radial.y, radial.x); float phase = timeSeconds * 1.15 + angle * 1.7 + heartbeat * 6.28318; - float3 petalCenter = float3(radial * (0.15 + activity * 0.04), 0.024 * sin(phase)); + float3 petalCenter = float3(radial * (0.34 + activity * 0.05), 0.028 * sin(phase)); float3 p = local - petalCenter; float3 q = float3(dot(p.xy, radial), dot(p.xy, tangent), p.z); - float3 petalRadius = float3(0.50 + activity * 0.06, 0.25, 0.60 + 0.045 * sin(phase)); + float3 petalRadius = float3(0.50 + activity * 0.05, 0.13, 0.64 + 0.045 * sin(phase)); return sdEllipsoid(q, petalRadius); } @@ -354,18 +354,15 @@ AgentSurface agentImaginationSdf(float3 local, AgentVisual agent) { float activity = agent.state.x; float heartbeat = agent.state.y; - float core = sdSuperellipsoid(local, float3(0.54 + activity * 0.08, 0.54 + activity * 0.08, 0.56), 1.18); + float core = sdSuperellipsoid(local, float3(0.30 + activity * 0.04, 0.30 + activity * 0.04, 0.42), 1.18); float phase = timeSeconds * 0.42; float petal0 = imaginationPetalSdf(local, phase, activity, heartbeat); float petal1 = imaginationPetalSdf(local, phase + 1.2566371, activity, heartbeat); float petal2 = imaginationPetalSdf(local, phase + 2.5132741, activity, heartbeat); float petal3 = imaginationPetalSdf(local, phase + 3.7699112, activity, heartbeat); float petal4 = imaginationPetalSdf(local, phase + 5.0265482, activity, heartbeat); - float bloom = smoothUnion(core, petal0, 0.26); - bloom = smoothUnion(bloom, petal1, 0.26); - bloom = smoothUnion(bloom, petal2, 0.26); - bloom = smoothUnion(bloom, petal3, 0.26); - bloom = smoothUnion(bloom, petal4, 0.26); + float petals = min(petal0, min(petal1, min(petal2, min(petal3, petal4)))); + float bloom = smoothUnion(core, petals, 0.055); float ring = sdTorus(local, float2(0.72 + activity * 0.08, 0.032)); float halo = sdTorus(local.zxy, float2(0.50, 0.024)); float detail = min(ring, halo); diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 7f39e49..bc726ed 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -25,3 +25,4 @@ {"timestamp":"2026-05-11T16:28:00+01:00","topic":"agent-sdf-polar-seams","lesson":"Do not animate role SDF lobes with raw atan2 angle fields inside the traced distance function; the polar branch cut creates visible cracks and sliced surfaces. Use continuous harmonic polynomial lobes over normalized directions, widen conservative proxy bounds, and reduce march step scale for distance-ish composite organs.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","state/memory.json"],"source":"visible artifact review"} {"timestamp":"2026-05-11T16:32:00+01:00","topic":"imagination-sdf-connected-lobes","lesson":"Continuous polar harmonics can still behave like a decorative pseudo-distance and leave visible petal gaps. Imagination now uses a central superquadric plus smooth-unioned ellipsoid petals, keeping the bloom continuous enough for bounded sphere tracing while preserving the five-lobed visual character.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","state/memory.json"],"source":"visible artifact review"} {"timestamp":"2026-05-11T16:34:00+01:00","topic":"imagination-sdf-march-conservatism","lesson":"Visible missing structure in Imagination came from shallow petal overlap plus a too-brave march through chained smooth unions. Petals now sit deeper into the core, use broader axes and larger union radii, and agent tracing uses 72 steps with smaller hit epsilon and 0.12 step scale.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","state/memory.json"],"source":"visible artifact review"} +{"timestamp":"2026-05-11T16:39:00+01:00","topic":"imagination-sdf-petal-legibility","lesson":"Overcorrecting Imagination into a continuous blob destroyed the intended petal read. The better LOD 1 shape uses a small central seed, five narrow ellipsoid petals, and intentional negative space with only a tiny smooth union at the seed.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","state/memory.json"],"source":"visible artifact review"} diff --git a/state/memory.json b/state/memory.json index 972f4e9..a446f00 100644 --- a/state/memory.json +++ b/state/memory.json @@ -38,6 +38,7 @@ "Role SDF animation should avoid raw atan2 polar fields for lobe deformation unless the branch cut is explicitly handled. Use continuous harmonic polynomials over normalized XY directions for rotational lobes so sphere tracing does not open visible seams.", "If a role SDF still shows cut-through gaps after removing angular branch cuts, stop using radial pseudo-distance deformation for that organ. Prefer smooth unions of analytic primitives with conservative bounds so the marcher sees connected surfaces instead of decorative distance fiction.", "Chained smooth-union role organs need conservative tracing even when each primitive has a decent distance estimate. Keep petal overlaps substantial, union radii generous, hit epsilon tight, and step scale small enough that narrow joins are sampled instead of skipped.", + "Imagination should read as distinct petals first, not as a fully merged blob. Keep the central seed small, make petal lobes narrow and visibly separated, and accept intentional negative space when it makes the role shape legible.", "Heavy/specialized SDF evaluators should not live inside generic packed-id helpers when those helpers are called repeatedly; avoid shader compiler path cloning.", "Lighting is diegetic. Self is the initial emitter; later other Selves should emit through an explicit body light lane, not generic field instances or ambient convenience fill.", "Keep bundled blue-noise texture assets available for future dithering/noise work even when no current pass samples them.",