Skip to content

Restore world-space ambient occlusion radius - #438

Merged
andeplane merged 1 commit into
mainfrom
andeplane/Ambient-Occlusion-seems-wrong
Sep 11, 2026
Merged

andeplane merged 1 commit into
mainfrom
andeplane/Ambient-Occlusion-seems-wrong

Conversation

@andeplane

Copy link
Copy Markdown
Owner

Summary

Ambient occlusion looked absent on the diffusion example. The earlier SSAO noise fix (#435) put N8AO in screen-pixel radius mode, where Atomify's radius of 10 spans less than one atom and the pass degrades to a faint edge detector. N8AO's AO-only debug view was almost pure white.

  • Keep the occlusion radius in simulation units, so buried atoms stay dark however far the camera is. Verified against the example thumbnail look.
  • Keep the detailed sampling (64 AO / 16 denoise): magnified crops show the grain from Fix ugly lines in SSAO #65 is a sample-count problem, present only at the fast mode, not a radius problem.
  • Ignore a persisted ssaoRadius/ssaoIntensity from the removed legacy slider, so a stale saved value cannot silently change the look now that the radius is honoured in world units.
  • The SSAO e2e spec now perturbs the radius mode before each settings change so it proves the reset instead of N8AO's default, and drops the unread screenshots.

Validation

  • npm run typecheck, 485 unit tests, e2e/ssao-quality.spec.ts pass.
  • Headless quick run of the diffusion example through the real code path: AO-only view shows clear depth structure; before it was near white.

Follow-ups (out of scope)

  • omovi renders the AO-off path without the sRGB output transform, so toggling AO also shifts brightness. That is an omovi bug.
  • The 10-unit radius suits LJ and Å-scale examples; deriving it from the model size would make it robust for unusual scales.
  • The fast quality mode still shows the Fix ugly lines in SSAO #65 grain at this radius. It is the explicit lower-cost choice in Settings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NMqBT1iPcu3ayt1QdXuWB1

The SSAO noise fix switched N8AO to a screen-pixel radius, where the
10-unit radius spans less than one atom and the pass degrades to a faint
edge detector. On the diffusion example the effect looked absent.

Keep the radius in simulation units so buried atoms stay dark at any zoom,
and keep the detailed sampling that removes the grain the pixel mode was
meant to hide. Ignore a persisted radius/intensity from the removed legacy
slider so stale saved settings cannot change the look. The e2e spec now
perturbs the radius mode before each settings change so it proves the
reset rather than N8AO's default.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NMqBT1iPcu3ayt1QdXuWB1
@andeplane
andeplane enabled auto-merge September 11, 2026 09:34
@andeplane
andeplane merged commit 22b56d2 into main Sep 11, 2026
2 checks passed
@andeplane
andeplane deleted the andeplane/Ambient-Occlusion-seems-wrong branch September 11, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant