Give Self a void core

This commit is contained in:
Meta Vens 2026-05-13 04:22:26 +01:00
commit a0ead66047
4 changed files with 31 additions and 30 deletions

View file

@ -347,7 +347,10 @@ paths, one current routing decision.
Math:
- Exact sphere core with continuous inlay/vein fields on its surface.
- Exact stable sphere core rendered as a black void with golden Fresnel
edge-lighting, bypassing the shared PBR shader for that core region. Keep one
gold lattice band on the core surface; do not stack multiple crossing bands
whose material regions can overtake the sphere.
- A compact log-spherical lattice maps local direction and logarithmic radius
into stable nested shells. Orbital rails are level sets where fixed radial
shell strata cross angular harmonic bands; gate nodes are the crossing points

View file

@ -9,10 +9,7 @@ struct SelfField
float inlay;
float rail;
float gate;
float seam;
float distanceValue;
float vein;
float glow;
};
float3x3 selfOrbitalFrame(float phase)
@ -64,15 +61,13 @@ void selfShellField(float3 dir, float r, float shellIndex, float pressure, float
SelfField selfField(float3 local, SdfObject sdfObject, float timeSeconds)
{
float activity = saturate(sdfObject.state.x);
float heartbeat = saturate(sdfObject.state.y);
float pressure = saturate(sdfObject.state.z);
float phase = timeSeconds * 0.72 + heartbeat * 2.1;
float r = max(length(local), 0.0001);
float3 dir = local / r;
float shell = log(r / 0.54);
float coreRadius = 0.50 + 0.020 * sin(timeSeconds * 0.75 + heartbeat * 6.28318);
float coreRadius = 0.50;
float rail = 10.0;
float gate = 10.0;
@ -83,28 +78,21 @@ SelfField selfField(float3 local, SdfObject sdfObject, float timeSeconds)
}
float3 coreBands = abs(selfLatticeCoordinates(dir, -1.0, phase));
float angularBand = min3(coreBands);
float coreShell = r - (coreRadius + 0.006);
float coreInk = min(angularBand, abs(sin(shell * 2.2 + dot(coreBands, float3(0.21, 0.21, 0.21)) + phase * 0.19)));
float inlay = length(float2(coreShell, coreInk * r * 0.11)) - 0.006;
float seam = length(float2(r - (coreRadius + 0.002), coreBands.x * r * 0.09)) - lerp(0.002, 0.006, activity);
float inlay = length(float2(coreShell, coreBands.x * r * 0.10)) - 0.007;
float core = sdSphere(local, coreRadius);
float routed = smoothUnion(core, inlay, 0.006);
routed = smoothUnion(routed, rail, 0.026);
routed = smoothUnion(routed, gate, 0.030);
routed = smoothUnion(routed, seam, 0.008);
SelfField field;
field.core = core;
field.inlay = inlay;
field.rail = rail;
field.gate = gate;
field.seam = seam;
field.distanceValue = routed;
field.vein = 0.5 + 0.5 * sin(dot(dir, normalize(float3(0.37, 0.63, -0.68))) * 12.0 + shell * 1.7 + phase * 0.35);
field.glow = 0.5 + 0.5 * sin(shell * 2.1 + dot(coreBands, float3(0.42, 0.31, -0.27)) + phase * 0.55);
return field;
}
@ -123,35 +111,44 @@ SdfSurface sdfSurface(float3 p, int sdfIndex)
float3 local = (p - sdfObject.centerRadius.xyz) / radius;
SelfField field = selfField(local, sdfObject, timeSeconds);
float isGate = field.gate <= min(min(min(field.core, field.inlay), field.rail), field.seam) ? 1.0 : 0.0;
float isRail = (1.0 - isGate) * (field.rail <= min(min(field.core, field.inlay), field.seam) ? 1.0 : 0.0);
float isInlay = (1.0 - isGate) * (1.0 - isRail) * (field.inlay <= min(field.core, field.seam) ? 1.0 : 0.0);
float isSeam = (1.0 - isGate) * (1.0 - isRail) * (1.0 - isInlay) * (field.seam <= field.core ? 1.0 : 0.0);
float isCore = (1.0 - isGate) * (1.0 - isRail) * (1.0 - isInlay) * (1.0 - isSeam);
float isGate = field.gate <= min(min(field.core, field.inlay), field.rail) ? 1.0 : 0.0;
float isRail = (1.0 - isGate) * (field.rail <= min(field.core, field.inlay) ? 1.0 : 0.0);
float isInlay = (1.0 - isGate) * (1.0 - isRail) * (field.inlay <= field.core ? 1.0 : 0.0);
float isCore = (1.0 - isGate) * (1.0 - isRail) * (1.0 - isInlay);
float3 coreColor = lerp(float3(0.78, 0.53, 0.35), float3(1.0, 0.84, 0.58), field.glow) + field.vein * 0.05;
float3 inlayColor = float3(1.0, 0.72, 0.28);
float3 coreColor = float3(0.0, 0.0, 0.0);
float3 inlayColor = float3(1.0, 0.70, 0.22);
float3 railColor = float3(0.86, 0.54, 0.20);
float3 gateColor = lerp(float3(0.78, 0.66, 0.42), float3(1.0, 0.82, 0.42), saturate(sdfObject.state.x));
float3 seamColor = float3(0.12, 0.065, 0.028);
SdfSurface surface;
surface.baseColor = coreColor * isCore + inlayColor * isInlay + railColor * isRail + gateColor * isGate + seamColor * isSeam;
surface.metallic = 0.0 * isCore + 0.64 * isInlay + 0.72 * isRail + 0.18 * isGate + 0.0 * isSeam;
surface.roughness = 0.34 * isCore + 0.20 * isInlay + 0.24 * isRail + 0.18 * isGate + 0.52 * isSeam;
surface.baseColor = coreColor * isCore + inlayColor * isInlay + railColor * isRail + gateColor * isGate;
surface.metallic = 0.0 * isCore + 0.64 * isInlay + 0.72 * isRail + 0.18 * isGate;
surface.roughness = 1.0 * isCore + 0.20 * isInlay + 0.24 * isRail + 0.18 * isGate;
float3 selfLight = primitiveEmissionRadiance(sdfFieldId(sdfIndex));
surface.emission = selfLight * (isRail * 0.045 + isGate * 0.08)
+ coreColor * isCore * (0.070 + field.vein * 0.030)
+ inlayColor * isInlay * 0.30
+ railColor * isRail * 0.18
+ gateColor * isGate * (0.22 + sdfObject.state.y * 0.08)
+ seamColor * isSeam * 0.008;
+ gateColor * isGate * (0.22 + sdfObject.state.y * 0.08);
return surface;
}
float3 shadeSdf(float2 uv, float travel, float3 p, float3 normal, int sdfIndex, SdfSurface surface)
{
SdfObject sdfObject = sdfObjects[sdfIndex];
float radius = max(sdfObject.centerRadius.w, 0.001);
float3 local = (p - sdfObject.centerRadius.xyz) / radius;
SelfField field = selfField(local, sdfObject, timeSeconds);
bool isCore = field.core <= min(min(field.inlay, field.rail), field.gate);
if (isCore)
{
float3 viewDirection = normalize(cameraPosition - p);
float rim = pow(1.0 - saturate(dot(normal, viewDirection)), 2.2);
float3 gold = float3(1.0, 0.62, 0.18);
return float3(0.001, 0.0006, 0.0) + gold * (rim * 1.35 + pow(rim, 4.0) * 3.0);
}
return shadeSdfPbr(p, normal, surface);
}

View file

@ -90,3 +90,4 @@
{"timestamp":"2026-05-13T03:51:52+01:00","topic":"self-nested-log-shells-core","lesson":"The log-spherical lesson for Self is nested radial authority, not merely twisting more curves across one level. Rails and gates should occupy distinct inner, mid, and outer shell fields, while the core needs continuous inlay and vein material fields so it reads as a radiant command object instead of a dead sphere with an intermittent black strap.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","state/memory.json","state/evidence.jsonl"],"source":"user compared current Self to imagegen reference and called out one-level structure plus dead core material"}
{"timestamp":"2026-05-13T03:59:28+01:00","topic":"self-lattice-not-hoop-inventory","lesson":"Nested structure is not achieved by naming inner/mid/outer shells and piling repeated trigonometry onto each one. Self's complexity should arise from a compact log-spherical lattice: radial shell waves crossed with angular harmonic bands. Rails, gates, seams, and inlays are thresholds of that shared field, not separate hand-authored hoop components.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","docs/epiphany-agent-sdf-visual-language.md","state/memory.json","state/evidence.jsonl"],"source":"user called out clown math and repeated piecewise components after nested-shell patch"}
{"timestamp":"2026-05-13T04:13:17+01:00","topic":"self-stable-nested-shells","lesson":"Self's lattice shells must be stable radial strata. If phase participates in the radial shell zero crossing, rings appear from nowhere as points expanding into circles before sliding into place. Keep radial shell radii structural, animate only angular frames and mild band distortion, and offset each concentric shell into an orthogonal frame so nested orbits do not collide on one surface.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","docs/epiphany-agent-sdf-visual-language.md","state/memory.json","state/evidence.jsonl"],"source":"user screenshot correction after first log-spherical lattice pass"}
{"timestamp":"2026-05-13T04:19:17+01:00","topic":"self-void-core-fresnel","lesson":"Self's core surface should not fight multiple core band materials or pulse its sphere radius. Keep the core radius stable, retain one gold lattice band, and shade the core as a black void with a simple golden Fresnel rim outside the shared PBR path while the surrounding rails/gates continue to use PBR.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","docs/epiphany-agent-sdf-visual-language.md","state/memory.json","state/evidence.jsonl"],"source":"user visual correction asking for a void core edge-lit with gold"}

View file

@ -63,7 +63,7 @@
"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.",
"Self's body is the routing authority object: a radiant warm command sphere crossed by a compact log-spherical lattice. Rails are fixed radial shell strata crossed with angular harmonic bands, gates are multi-band crossings, and each concentric shell owns an orthogonal frame. Do not animate radial zero crossings, grow rings from points, or rebuild Self as named hoop inventories, one-radius ornament layers, or repeated trigonometry piles.",
"Self's body is the routing authority object: a black void command sphere with golden Fresnel edge-light, one gold core band, and a compact log-spherical lattice around it. Rails are fixed radial shell strata crossed with angular harmonic bands, gates are multi-band crossings, and each concentric shell owns an orthogonal frame. Do not animate radial zero crossings, grow rings from points, stack multiple core bands, or rebuild Self as named hoop inventories, one-radius ornament layers, or repeated trigonometry piles.",
"For Self, the orrery comparison is motion and topology grammar. Rails, gates, and seams should emerge from a shared orbital space with phase motion, not from independent tilted hoops, loose symbols, or literal anatomical motifs.",
"Self is allowed to be a scene light, but its visible body must not add full primitive light radiance to every surface. Scale field-owned radiance to small accents and let PBR material contrast carry the core, rails, gates, and seam.",
"Heavy/specialized SDF evaluators should not live inside generic packed-id helpers when those helpers are called repeatedly; avoid shader compiler path cloning.",