Use continuous Imagination ribbon field
This commit is contained in:
parent
b9c889870a
commit
05d6589efb
3 changed files with 25 additions and 29 deletions
|
|
@ -34,45 +34,39 @@ float pairCenterSide(float u, float curl)
|
|||
|
||||
float pairWidth(float u, float activity)
|
||||
{
|
||||
return 0.018 + sin(saturate(u) * 3.14159) * (0.13 + activity * 0.035);
|
||||
float blade = sin(saturate(u) * 3.14159);
|
||||
return 0.012 + blade * blade * (0.17 + activity * 0.045);
|
||||
}
|
||||
|
||||
float3 pairPoint(float angle, float u, float signedEdge, float activity, float curl)
|
||||
float pairThickness(float u)
|
||||
{
|
||||
float2 radial = float2(cos(angle), sin(angle));
|
||||
float2 tangent = float2(-radial.y, radial.x);
|
||||
float side = pairCenterSide(u, curl) + signedEdge * pairWidth(u, activity);
|
||||
float lift = -0.24 + 0.92 * u + 0.18 * sin(u * 3.14159);
|
||||
return float3(radial * pairCenterOut(u, activity) + tangent * side, lift);
|
||||
}
|
||||
|
||||
float sdSheetPairFilm(float3 local, float angle, float activity, float curl)
|
||||
{
|
||||
float2 radial = float2(cos(angle), sin(angle));
|
||||
float2 tangent = float2(-radial.y, radial.x);
|
||||
float3 q = float3(dot(local.xy, radial), dot(local.xy, tangent), local.z);
|
||||
float u = saturate((q.z + 0.24) / 0.92);
|
||||
float sideCenter = pairCenterSide(u, curl);
|
||||
float sheetOut = abs(q.x - pairCenterOut(u, activity)) - 0.020;
|
||||
float sheetSide = abs(abs(q.y) - sideCenter) - pairWidth(u, activity);
|
||||
float sheetRange = max(-u, u - 1.0) * 0.92;
|
||||
return max(max(sheetOut, sheetSide), sheetRange);
|
||||
}
|
||||
|
||||
float sdSheetPairRims(float3 local, float angle, float activity, float curl)
|
||||
{
|
||||
float outerA = sdTaperedCapsuleSegment(local, pairPoint(angle, 0.00, 1.0, activity, curl), pairPoint(angle, 1.00, 0.42, activity, curl), 0.028, 0.010);
|
||||
float outerB = sdTaperedCapsuleSegment(local, pairPoint(angle, 0.00, -1.0, activity, curl), pairPoint(angle, 1.00, -0.42, activity, curl), 0.028, 0.010);
|
||||
float innerA = sdTaperedCapsuleSegment(local, pairPoint(angle, 0.08, -0.44, activity, curl), pairPoint(angle, 0.94, -0.18, activity, curl), 0.020, 0.010);
|
||||
float innerB = sdTaperedCapsuleSegment(local, pairPoint(angle, 0.08, 0.44, activity, curl), pairPoint(angle, 0.94, 0.18, activity, curl), 0.020, 0.010);
|
||||
float root = sdTaperedCapsuleSegment(local, float3(0.0, 0.0, -0.20), pairPoint(angle, 0.14, 0.0, activity, curl), 0.036, 0.020);
|
||||
return smoothUnion(min(min(outerA, outerB), min(innerA, innerB)), root, 0.035);
|
||||
float blade = sin(saturate(u) * 3.14159);
|
||||
return 0.010 + blade * blade * 0.012;
|
||||
}
|
||||
|
||||
float sdSheetPair(float3 local, float angle, float activity, float curl, out float film, out float rim)
|
||||
{
|
||||
film = sdSheetPairFilm(local, angle, activity, curl);
|
||||
rim = sdSheetPairRims(local, angle, activity, curl);
|
||||
float2 radial = float2(cos(angle), sin(angle));
|
||||
float2 tangent = float2(-radial.y, radial.x);
|
||||
float3 q = float3(dot(local.xy, radial), dot(local.xy, tangent), local.z);
|
||||
float uRaw = (q.z + 0.25) / 1.04;
|
||||
float u = saturate(uRaw);
|
||||
float sideCenter = pairCenterSide(u, curl);
|
||||
float centerOut = pairCenterOut(u, activity);
|
||||
float width = pairWidth(u, activity);
|
||||
float thickness = pairThickness(u);
|
||||
float blade = sin(u * 3.14159);
|
||||
float lipCurl = smoothstep(0.60, 1.0, u) * 0.10 * abs(q.y);
|
||||
float outDistance = abs(q.x - centerOut + lipCurl) - thickness;
|
||||
float sideDistance = abs(abs(q.y) - sideCenter) - width;
|
||||
float endDistance = max(-uRaw, uRaw - 1.0) * 1.04;
|
||||
film = max(max(outDistance, sideDistance), endDistance);
|
||||
|
||||
float edgeOffset = abs(q.y) - (sideCenter + width);
|
||||
float edgeRadius = 0.018 + 0.010 * blade;
|
||||
float edgeTube = length(float2(q.x - centerOut + lipCurl, edgeOffset)) - edgeRadius;
|
||||
float rootFold = length(float2(q.x - 0.10, abs(q.y) - sideCenter)) - (0.030 + 0.014 * smoothstep(0.0, 0.18, u));
|
||||
rim = max(min(edgeTube, rootFold), endDistance);
|
||||
return smoothUnion(film, rim, 0.018);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,3 +77,4 @@
|
|||
{"timestamp":"2026-05-13T01:45:00+01:00","topic":"imagination-topology-spec","lesson":"Imagination's visual spec needs topology, not just evocative nouns. The target is a luminous opal seed wrapped by broad translucent curling ribbon-sheets with traced raised rims, visible interior apertures, vertical fountain bias, sparse candidate filaments/sparks, and cool backlog shadow. Trefoil/tube curves may define rim paths, but tubes alone do not satisfy the petal form.","files":["docs/epiphany-agent-sdf-visual-language.md","state/memory.json"],"source":"user supplied imagegen reference and noted current output did not match the imagined impossible flower"}
|
||||
{"timestamp":"2026-05-13T01:58:00+01:00","topic":"imagination-sheet-pair-sdf","lesson":"The compile-bounded Imagination implementation should model topology first: three mirrored sheet-pair SDF fields produce six broad ribbon sheets, while separate film/rim/tendril/spark/shadow distances preserve material classification for translucent petals, glowing raised rims, candidate filaments, and backlog shadow. This keeps the impossible-flower form legible without reverting to trefoil-only tubes or decorative polar fields.","files":["src/Aquarium.Epiphany/Shaders/D3D12ImaginationAgent.hlsl","state/memory.json","state/evidence.jsonl"],"source":"implementation pass after topology spec correction"}
|
||||
{"timestamp":"2026-05-13T02:04:00+01:00","topic":"imagination-dead-code-cut","lesson":"User visual review caught dead implementation carryover: the polar-lobed Imagination seed was not in the spec, and the traced half-torus labeled shadow did not read as backlog shadow. Cut both instead of explaining them. Keep petal tips tapered through width/rim endpoints, avoid vertical rim columns, and only add shadow geometry when it has a readable visual contract.","files":["src/Aquarium.Epiphany/Shaders/D3D12ImaginationAgent.hlsl","state/memory.json","state/evidence.jsonl"],"source":"user screenshot correction"}
|
||||
{"timestamp":"2026-05-13T02:08:00+01:00","topic":"imagination-continuous-ribbon-field","lesson":"The hibiscus cursor lesson applies to Imagination: use a continuous sheet parameterization when it can own the form. Replacing piecewise rim capsule chains with one pair-space field for film and raised edge distance removed straight posts, made the ribbon silhouette more coherent, and reduced headless reload time instead of adding compensating geometry.","files":["src/Aquarium.Epiphany/Shaders/D3D12ImaginationAgent.hlsl","state/memory.json","state/evidence.jsonl"],"source":"user challenged piecewise construction after visual review"}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
"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.",
|
||||
"Imagination's live shader realizes the six-petal topology as three mirrored sheet-pair fields. Keep film, rim, tendril, spark, shadow, and seed distances separated through material classification so raised rims can glow without collapsing the petal sheets into one generic blob.",
|
||||
"Do not reintroduce Imagination's old polar-lobed seed or traced half-torus shadow. The seed is a plain luminous opal bud unless the spec asks otherwise; backlog shadow needs a visual contract before it becomes traced geometry.",
|
||||
"Imagination's ribbon sheets should use one continuous pair-space field for film and raised edge rims. Do not rebuild the bloom from piecewise rim capsules or straight root/tip posts when the sheet parameterization can own the silhouette directly.",
|
||||
"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.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue