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

Add the possibility to use Phoenix with AR #212

Closed
EdwardMoyse opened this issue Feb 10, 2021 · 18 comments · Fixed by #324
Closed

Add the possibility to use Phoenix with AR #212

EdwardMoyse opened this issue Feb 10, 2021 · 18 comments · Fixed by #324

Comments

@EdwardMoyse
Copy link
Collaborator

It would be great if we could do this via configuration, or URL, so users could open a simple QR link and see a detector.

I'm not sure how best to do this, by renaming and extending the VRManager to support both VR and AR (and be called XRManager) or by adding a new ARManager.

@cohm
Copy link

cohm commented Jul 6, 2021

Hi @EdwardMoyse and @9inpachi,

This looks very interesting - is there a way for a (stupid) user to try this out? Would be incredibly useful for outreach etc. On the ATLAS phoenix display I see there are now buttons for VR and AR, but they're grayed out:

Screenshot 2021-07-06 at 09 39 58

Thanks a lot!

Best,
Christian

@9inpachi
Copy link
Collaborator

9inpachi commented Jul 6, 2021

Hi @cohm,

AR on the web only works on devices that support ARCore. You can check the list here — if your device is supported you can open Phoenix in Chrome and AR should work. If you want to test this out on your desktop machine, you could use the WebXR API Emulator browser extension, see instructions here. Make sure to choose an AR device in the extension not a VR one.

Hope this helps.

Best,
Fawad

@cohm
Copy link

cohm commented Jul 6, 2021

Thanks a lot for the quick reply, @9inpachi! I tried just now on an iPhone X and older iPad Pro which both appear to be supported (iOS 14.6 on both), but I still get the grayed out VR/AR icons in Chrome:

IMG_5809

I've used plenty of AR apps on these devices, but I don't remember ever even trying a web-based AR application, so it could certainly be a problem on my side if others with similar setups manage to run this!

Thanks again!

Best,
Christian

@cohm
Copy link

cohm commented Jul 6, 2021

FWIW, I tried Firefox on my iPhone X too with the same results. The Chrome extension gives me something, but no ATLAS detector :)

Screenshot 2021-07-06 at 10 39 54

@EdwardMoyse
Copy link
Collaborator Author

EdwardMoyse commented Jul 6, 2021

The problem with the link @9inpachi posted is it shows the hardware capabilities, not the software. iOS is very restricted. But I can confirm it works with XRViewer from Mozilla on my iPhone, and it is VERY VERY VERY cool:

IMG_4393239197DE-1

@9inpachi
Copy link
Collaborator

9inpachi commented Jul 6, 2021

@cohm,

I don't really know much about iPhone so I can't tell the reason. On Android, in Chrome, having the latest version of Chrome does give you the AR option but also a pop-up to install some Google Play Services related to AR to make it work. It might be the same for iPhone? Not sure?

On the extension, it's hard to navigate through the environment. The detector loads somewhere around you and might be right at the back of the phone. ATLAS is also a bit greedy in terms of resources so the extension might not be able to load everything. Testing on a real device will be easier. As Ed suggested, the XRViewer should work on your phone too.

Best,
Fawad

@cohm
Copy link

cohm commented Jul 6, 2021

That's it - thanks a lot, Ed! Now we're talking, ATLAS hovering above the kitchen table here in Stockholm 🤓

RPReplay_Final1625562365.mov

This is really great! Now, is there a way to access the controls in this mode? I'd love to be able to turn detector parts on and off, and animate an event - that would be absolute gold for teaching purposes, in outreach situations, etc.

Thanks a lot, guys - this is fantastic 💪

@9inpachi
Copy link
Collaborator

9inpachi commented Jul 6, 2021

Unfortunately, no controls for now. It's a bit tricky to do with three.js.

@9inpachi
Copy link
Collaborator

9inpachi commented Jul 6, 2021

I added #331 for the controls.

@cohm
Copy link

cohm commented Jul 6, 2021

Thanks @9inpachi, no worries. Is it worth creating an issue if someone with the right experience (or is sadistic enough to go through the pain) comes along and wants to contribute to this? I really think it would be a great feature, but can certainly appreciate that it can be technically cumbersome (and regardless not be at the top of the features to prioritize).

Best,
Christian

@cohm
Copy link

cohm commented Jul 6, 2021

I added #331 for the controls.

Great minds ;)

@9inpachi
Copy link
Collaborator

9inpachi commented Jul 6, 2021

Is it worth creating an issue if someone with the right experience (or is sadistic enough to go through the pain) comes along and wants to contribute to this? I really think it would be a great feature, but can certainly appreciate that it can be technically cumbersome (and regardless not be at the top of the features to prioritize).

I am that someone. 😆 I am more or less the most familiar with the code for this.
I'll probably start working on this soon. If everything goes well, it should be there next week.

Best,
Fawad

@cranmer
Copy link

cranmer commented Jul 6, 2021

@EdwardMoyse what phone do you have? I have an iPhone11 Pro with 14.6 and I can't get it to work on Safari, Chrome, or the Mozilla XRViewer

@cohm
Copy link

cohm commented Jul 6, 2021

Hey @cranmer! FWIW, in Safari and Chrome didn't work on my old iPhone X (MQAF2ZD/A), but in Mozilla XRViewer it worked out of the box. XRViewer also works great on my (even older?) iPad Pro (9.7", MLMV2LL/A). I'm running iOS 14.6 on both, so I would have thought XRViewer should work for you too!

@EdwardMoyse
Copy link
Collaborator Author

Hi both - the only thing I can think, is make sure you’re connecting to https. Certainly VR requires a secure connection. Maybe AR does as well?

@EdwardMoyse
Copy link
Collaborator Author

I’ve now set it up so we only permit https access. Maybe try again? And if that doesn’t work, can you open an issue and record your screen so we can see what’s going on? (Google “iPhone record screen” and you should find out how).

@cranmer
Copy link

cranmer commented Jul 7, 2021

Well I'm not sure what happened. I confirmed I was using https before. I didn't realize at first you could scroll in the bottom menu. I did scroll yesterday and I didn't see any VR options. Today thought I'm able to scroll farther and see many more options. I doubt anything went wrong technically and somehow I just didn't see the full set of options in the scroll bar.

The app is beautiful, but on the UX side I'm not sure if there is anything that can be done to hint to the user that the bottom menu can scroll horizontally. Either < and > or a gradual fade? Now that I know it's obvious, but it wasn't yesterday.

@9inpachi
Copy link
Collaborator

9inpachi commented Jul 7, 2021

@cranmer I assume the AR works for you now?
Thanks for the useful recommendations though.

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 a pull request may close this issue.

4 participants