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

WebXR Postprocessing #4264

Open
Beilinson opened this issue Apr 28, 2023 · 6 comments
Open

WebXR Postprocessing #4264

Beilinson opened this issue Apr 28, 2023 · 6 comments

Comments

@Beilinson
Copy link
Contributor

          Thanks @elalish

I did checks on https://modelviewer.dev/examples/postprocessing/
Is it possible to have the bloom effect working on AR viewer as well like it’s the case now for 3D viewer please?

Thank you

55114183-4B09-45F8-A30A-AC66AC499042

Best

Originally posted by @zelghrabi-edu in #3948 (comment)

@Beilinson
Copy link
Contributor Author

  1. For the native WebXRRenderer for three.js, it requires some tinkering with the renderers that isn't fully supported yet by pmndrs/postprocesssing, which maybe shouldn't enter model-viewer as it is meant to be a fully stable API.
  2. On most mobile devices <model-viewer> actually defaults to the native AR viewer, meaning <model-viewer-effects> actually has no control over the rendering. On IOS for example, this is because WebXR is mostly unsupported.

More on WebXR iOS support:

It is currently in an "experimental state", which is accessible through:
Settings -> Safari -> Advanced -> Experimental Features and all the way at the bottom:

image

It is disabled by default, and I am not sure how well it will work in the case of model-viewer, though it might be interesting to test.

Additionally, apple has the RealityKit API for AR experiences on IOS, which does allow for custom postprocessing, however this is only for c/swift IOS apps, while browsers are limited to quick look which is not customizable.

@elalish
Copy link
Collaborator

elalish commented Apr 28, 2023

Indeed, this would be an Android-only feature for now, since iOS doesn't yet support WebXR. We don't actually use three's WebXRRenderer currently, so hopefully it's a bit simpler.

@zelghrabi-edu
Copy link

Hello,
Thanks guys for your answers
It doesn't work for Android as well

image

@elalish
Copy link
Collaborator

elalish commented Apr 28, 2023

That's actually SceneViewer on Android, which also can't support this, since like QuickLook, it's a separate app. Only WebXR mode can be made to work (though I don't think it does yet).

@mahdavifar2002
Copy link

@elalish Hello. I'm looking for applying some custom postprocessing effects on AR mode (webxr). Could you please give me a hint on how I may achieve this goal?

@elalish
Copy link
Collaborator

elalish commented Aug 21, 2023

It's hasn't quite been implemented yet, but I don't think it should be too hard. Basically we need a similar update to the render loop in ARRenderer.ts as we now have in Renderer.ts. @Beilinson would be good to ask for review, and I'll certainly help with any PR as well.

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

4 participants