AR-js-org / AR.js

Image tracking, Location Based AR, Marker tracking. All on the Web.
MIT License
5.3k stars 909 forks source link

Does it even work? #492

Closed lucas23456 closed 1 year ago

nickw1 commented 1 year ago

Hi @lucas23456 what is going wrong in your case?

Is it location-based, marker-based or NFT?

Thanks.

vokai commented 1 year ago

I'm also running on my fedora "new location based" example. I got different results on samsung galaxy S7 and galaxy S22. In Galaxy S7 (older) some examples works but in Samsung S22 nothing appear in camera. Why this different behavior? I think also that examples dirs need a review...I can help you. We can keep update on Telegram or give me your favourite channel. I really want this library goes good. I'm ready to collaborate. (Full stack web-developer here)

lucas23456 commented 1 year ago

I'm also running on my fedora "new location based" example. I got different results on samsung galaxy S7 and galaxy S22. In Galaxy S7 (older) some examples works but in Samsung S22 nothing appear in camera. Why this different behavior? I think also that examples dirs need a review...I can help you. We can keep update on Telegram or give me your favourite channel. I really want this library goes good. I'm ready to collaborate. (Full stack web-developer here)

Yes, we can collabrate together. I can send you my telegram username:) but not here.

lucas23456 commented 1 year ago

Hi @lucas23456 what is going wrong in your case?

Is it location-based, marker-based or NFT?

Thanks.

The examples that in Aframe website doesn't work

nickw1 commented 1 year ago

Hi, it's possible these need to be updated, @nicolocarpignoli would know more.

For up-to-date documentation I would recommend you look at the docs here: https://ar-js-org.github.io/AR.js-Docs/

I am maintaining the location-based side of things, while @kalwalt is looking after the NFT and marker-based parts.

nickw1 commented 1 year ago

@vokai thanks for your offer of collaboration. It's difficult to say why the location-based examples work on some devices and not others, on the S22 I think you'd need to do a bit of debugging to try and see if any errors come up on the console.

I'm not really on any channels besides GitHub and GitLab, I can give you an email if that helps.

vokai commented 1 year ago

I think the problem of different behaviors may be due to the fact that modern smartphones have 2/3 cameras. In fact, with my S22 the wide-angle camera is opened by default. Can this be due to this?

nicolocarpignoli commented 1 year ago

@lucas23456 I'm sorry to be harsh, but there is an issue template that has to be used. I understand it might be a bit of work from your side, but it's a great amount of time saved for all the developers who are willing to help you. Opening an issue with an empty description and a title saying "does it work?" is simply not a collaborative way of exposing your problems.

Anyway, what @vokai says is probably the actual problem here: on AR.js we never really managed to properly handled multicamera phones. That part needs probably a big update that is crucial for Android phones - no problem instead for multicamera iPhones.

I don't have time to prepare a PR for this but I'm okay with providing a review if someone can do the task. :)

nickw1 commented 1 year ago

@vokai feel free to submit a PR to fix this if you are able.

I could probably do it myself as long as the media devices API supports this (haven't checked), but I don't have a multi-camera phone to use for testing.

(If I did, I'd probably need to give it to you for testing if you are happy with this). Thanks.

vokai commented 1 year ago

I have little knowledge of the repository, I am not confident in doing PR but I have done some research. In this repository there is the choice of device to use with the API. (https://github.com/philnash/mediadevices-camera-selection --> livetest: https://philnash.github.io/mediadevices-camera-selection/) I think we need to parameterize the camera stream then enumerating the available devices. In my case running the test I have 4 cameras available (front: wide and normal, back: wide and normal). So the last one in the list is the one that should go by default. Or if you want to provide for device switching. I am currently developing my own project using the "new location based," so I can do all available tests from that example.

photo_2022-12-27_14-46-27

kalwalt commented 1 year ago

@vokai maybe for this issue our project webarkit/ARnft may help. Look at CameraRenderer class, It has a routine to use the right camera.

nickw1 commented 1 year ago

@vokai @kalwalt thanks for the info.

@vokai if you want to do this then feel free to code it, if not I should be able to implement it. It is likely to be in the release after next, as I have a few fixes to new-location-based that I'd like to merge and release this week.

vokai commented 1 year ago

I think I was wrong. I can't see nothing in S22 because it has by default the wi-fi support to get better position. So I was geolocated based on wifi and not my actual location, even using mobile network data same result. By disabling the network to determine location, I was back to being properly positioned.

Nothing about choosing camera. I'm so sorry for my wrong debug.

nickw1 commented 1 year ago

@vokai no worries. We may implement the multi-camera feature anyway, because it will allow a user to choose their camera.