viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.3k stars 481 forks source link

Read QR code and load a 3d asset #822

Open ardian-c opened 4 years ago

ardian-c commented 4 years ago

Hi,

After going through some of the documentation, issues, and browsing I am still unsure if it is possible to use this library to show a 3d asset when the camera encounters a QR code in a map image. Any help, tips are appreciated.

Thank you!

HedwigAR commented 4 years ago

Depends on if you know the QR code beforehand. I don't think there's a way to scan QR codes, but you could load it as a normal image and use that as a marker. https://docs.viromedia.com/docs/viroarimagemarker You could use this https://developers.google.com/ar/develop/c/augmented-images/arcoreimg tool to verify if your image would make a good marker.

There's already a demo that shows a 3D object when scanning a marker here: https://github.com/viromedia/viro/tree/master/code-samples/js/ARCarDemo

ardian-c commented 4 years ago

Thanks for your reply. Yes all the QR codes will be generated beforehand, I just need to recognize them with a value and load a 3D object on that surface.