Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes on enabling ambient occlusion with EffectComposer #113

Open
gizatt opened this issue Feb 22, 2022 · 0 comments
Open

Notes on enabling ambient occlusion with EffectComposer #113

gizatt opened this issue Feb 22, 2022 · 0 comments

Comments

@gizatt
Copy link
Collaborator

gizatt commented Feb 22, 2022

I spent a little while playing with adding postprocessing using EffectComposer, which requires relatively few additional LOC (branch here) to support. It works OK:

Without:
Selection_034
With:
Selection_035

Note that it's adding darkening inside of the cabinet at the creases. I don't love either Meshcat SSAO implementations (or I haven't tuned them very well yet; they all create really bad halos), but a subtle application does help readability on solid-color boxy geometry. It's really easy to add in more postprocessing stages (see the threejs examples) using the same pipeline.

I hit one weird glitch: there's a weird ghosting that only shows up only when the gradient background is enabled. Here's a picture of it (with extremely-high-amplitude SAO applied):
Selection_037

And here's the normal map used by the SAO pipeline:
Selection_036

My first instinct is that the texture being used by the gradient background is causing some side-effect geometry that's being picked up by the postprocessing shader internals; there are a couple of threejs issues (like this one that give me a sense that threejs bugs might be the culprit. Either way, this'll need more work before it could be made a feature.

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

No branches or pull requests

1 participant