Remove Self orbital branch seam
This commit is contained in:
parent
562e38e7f0
commit
eccbd18a37
2 changed files with 22 additions and 21 deletions
|
|
@ -15,35 +15,35 @@ struct SelfParts
|
|||
struct SelfOrbitSpace
|
||||
{
|
||||
float r;
|
||||
float theta;
|
||||
float phi;
|
||||
float3 dir;
|
||||
float2 spinA;
|
||||
float2 spinB;
|
||||
float z;
|
||||
float shell;
|
||||
float scale;
|
||||
};
|
||||
|
||||
float wrapPi(float value)
|
||||
float2 rotate2(float2 p, float angle)
|
||||
{
|
||||
return frac(value / (2.0 * PI) + 0.5) * (2.0 * PI) - PI;
|
||||
}
|
||||
|
||||
float periodicDistance(float value, float period)
|
||||
{
|
||||
return abs(frac(value / period + 0.5) - 0.5) * period;
|
||||
float c = cos(angle);
|
||||
float s = sin(angle);
|
||||
return float2(p.x * c - p.y * s, p.x * s + p.y * c);
|
||||
}
|
||||
|
||||
SelfOrbitSpace selfOrbitSpace(float3 local, float phase)
|
||||
{
|
||||
float r = max(length(local), 0.0001);
|
||||
float theta = atan2(local.y, local.x);
|
||||
float phi = acos(clamp(local.z / r, -1.0, 1.0));
|
||||
float3 dir = local / r;
|
||||
float logRadius = log(r / 0.58);
|
||||
float shell = logRadius * 2.35;
|
||||
float polarTighten = 0.52 + 0.48 * sin(phi);
|
||||
float polarTighten = 0.58 + 0.42 * sqrt(saturate(1.0 - dir.z * dir.z));
|
||||
|
||||
SelfOrbitSpace space;
|
||||
space.r = r;
|
||||
space.theta = theta + shell * 0.72 + phase * 0.18;
|
||||
space.phi = phi + 0.18 * sin(theta * 2.0 - phase * 0.35);
|
||||
space.dir = dir;
|
||||
space.spinA = rotate2(dir.xy, shell * 0.72 + phase * 0.18);
|
||||
space.spinB = rotate2(float2(dir.x, dir.z), shell * -0.48 + phase * 0.13);
|
||||
space.z = dir.z;
|
||||
space.shell = shell;
|
||||
space.scale = r * polarTighten;
|
||||
return space;
|
||||
|
|
@ -58,9 +58,9 @@ float sdSelfCore(float3 local, float heartbeat, float timeSeconds)
|
|||
float sdSelfRailFamily(SelfOrbitSpace space, float pressure, float phase)
|
||||
{
|
||||
float shellRadius = space.r - lerp(0.76, 0.66, pressure);
|
||||
float equatorRail = periodicDistance(space.phi - PI * 0.50 + 0.16 * sin(space.theta * 2.0 + phase), PI * 0.50);
|
||||
float meridianRail = periodicDistance(space.theta + 0.34 * sin(space.phi * 2.0 - phase * 0.7), PI * 0.50);
|
||||
float spiralRail = periodicDistance(space.theta * 1.5 + space.phi * 0.85 + space.shell - phase * 0.55, PI * 0.72);
|
||||
float equatorRail = abs(space.z + 0.13 * sin(phase + space.spinA.x * 3.0));
|
||||
float meridianRail = abs(dot(space.spinA, normalize(float2(0.76, 0.65))));
|
||||
float spiralRail = abs(dot(float2(space.spinB.x, space.z), normalize(float2(0.62, 0.78))) + 0.22 * sin(space.shell + phase * 0.55));
|
||||
float shellRail = length(float2(shellRadius, equatorRail * space.scale)) - 0.018;
|
||||
float meridianTube = length(float2(shellRadius, meridianRail * space.scale)) - 0.014;
|
||||
float spiralTube = length(float2(shellRadius, spiralRail * space.scale)) - 0.012;
|
||||
|
|
@ -70,9 +70,9 @@ float sdSelfRailFamily(SelfOrbitSpace space, float pressure, float phase)
|
|||
float sdSelfGateFamily(SelfOrbitSpace space, float pressure, float phase)
|
||||
{
|
||||
float shellRadius = space.r - lerp(0.76, 0.66, pressure);
|
||||
float equatorRail = periodicDistance(space.phi - PI * 0.50 + 0.16 * sin(space.theta * 2.0 + phase), PI * 0.50);
|
||||
float meridianRail = periodicDistance(space.theta + 0.34 * sin(space.phi * 2.0 - phase * 0.7), PI * 0.50);
|
||||
float spiralRail = periodicDistance(space.theta * 1.5 + space.phi * 0.85 + space.shell - phase * 0.55, PI * 0.72);
|
||||
float equatorRail = abs(space.z + 0.13 * sin(phase + space.spinA.x * 3.0));
|
||||
float meridianRail = abs(dot(space.spinA, normalize(float2(0.76, 0.65))));
|
||||
float spiralRail = abs(dot(float2(space.spinB.x, space.z), normalize(float2(0.62, 0.78))) + 0.22 * sin(space.shell + phase * 0.55));
|
||||
float gateA = length(float3(shellRadius * 1.35, equatorRail * space.scale, meridianRail * space.scale)) - 0.036;
|
||||
float gateB = length(float3(shellRadius * 1.35, equatorRail * space.scale, spiralRail * space.scale)) - 0.030;
|
||||
return min(gateA, gateB);
|
||||
|
|
@ -80,7 +80,7 @@ float sdSelfGateFamily(SelfOrbitSpace space, float pressure, float phase)
|
|||
|
||||
float sdSelfSeam(SelfOrbitSpace space, float activity)
|
||||
{
|
||||
float seamBand = periodicDistance(space.phi - PI * 0.50, PI) * space.scale;
|
||||
float seamBand = abs(space.z) * space.scale;
|
||||
float shellRadius = abs(space.r - lerp(0.515, 0.49, activity));
|
||||
return max(shellRadius - 0.010, seamBand - 0.028);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,3 +85,4 @@
|
|||
{"timestamp":"2026-05-13T03:15:00+01:00","topic":"self-angel-vibe-not-literal-eyes","lesson":"The 'biblically accurate angel' reference for Self means overwhelming ordered otherworldly complexity, not literal loose eyes. The orrery comparison is a motion metaphor for orbital rings and torus arcs. Remove detached eye/pupil bodies, animate rail and halo planes with phase offsets, and keep spec edits aligned to user intent instead of rewriting requirements around an over-literal interpretation.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","docs/epiphany-agent-sdf-visual-language.md","state/memory.json","state/evidence.jsonl"],"source":"user screenshot correction"}
|
||||
{"timestamp":"2026-05-13T03:31:00+01:00","topic":"self-orbital-grammar-rebuild","lesson":"When the desired form is an orrery-like routing heart, build a spatial/topological grammar where rails, shells, seams, and gates cohere naturally. The old Self shader was deleted because it hand-placed arcs and then patched their collisions. The replacement maps local space into spherical/log-shell coordinates and defines rail/gate/seam families as level sets in that shared space, following the recursive-lotus lesson of choosing the right coordinate authority before adding geometry.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","docs/epiphany-agent-sdf-visual-language.md","state/memory.json","state/evidence.jsonl"],"source":"user pointed to pac-dev recursive_lotus.glsl and asked to delete/rebuild"}
|
||||
{"timestamp":"2026-05-13T03:36:00+01:00","topic":"self-rail-volume-fix","lesson":"In the Self orbital grammar, periodic angular rail fields must become signed tube volumes, not zero-thickness max surfaces. Build rails as length(shellRadius, angularDeviation * localScale) - radius, and build gates as small intersections of those same rail families. Otherwise only detached gate blobs render while the intended rails vanish.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","state/evidence.jsonl"],"source":"user screenshot showed core plus floating blobs without rails"}
|
||||
{"timestamp":"2026-05-13T03:39:00+01:00","topic":"self-orbital-branch-cut","lesson":"Do not feed visible Self rails from raw atan2/fract longitude coordinates. The angular wrap creates a visible seam through the orbital lattice. Use continuous direction-vector fields and harmonic/dot-product rail distances for visible topology; reserve branchy angular coordinates only for invisible indexing or explicitly masked regions.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","state/evidence.jsonl"],"source":"user screenshot showed one-sided seam"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue