minorua / Qgis2threejs

3D map visualization and web export plugin for QGIS
http://minorua.github.io/Qgis2threejs/docs/
501 stars 92 forks source link

What is AR mode supposed to do? #207

Open Llaves opened 4 years ago

Llaves commented 4 years ago

I'm running 2.4.2, which fixes the error I was seeing in iOS/Safari where navigator.getUserMedia is replaced by navigator.mediaDevices.getUserMedia. Now Safari no longer throws an error when AR mode is invoked. However, when AR mode is active, all I see is a live view of the rear camera. I would have expected that the camera view would be semi-transparent and overlaid on the 3D scene. Is this assumption incorrect?

While I don't pretend to fully understand the code, I see nothing that makes the video layer semi-transparent. I tried editing mobile.css to contain: #video { position: absolute; width: 100%; height: 100%; filter:opacity(10%);

This created transparency in Firefox on my laptop, but had no effect on Safari on iOS 13.3.1

I also tried changing mobile.js, removing document.getElementById("view").classList.add("transparent"); from StartARMode, but this had no effect that I could see when combined with the opacity addition to the video element in mobile.css

rossoe commented 4 years ago

I just tested this for the first time and was amazed at the new feature - it's fantastic to be able to move the camera about pick your next spot to teleport to, and then view as if you were standing in that selected spot paning around with the mob camera - I took a couple of screen shots:

AR active and looking down on terrain with mobile

Spot selected on terrain to shift your location to

Jumped to view ready to pan around with mob camera

I have not tested the GPS element, as I was doing from indoors. But am I right in assuming that if you were actually positioned in the same real world position matching the ROI in use within web template project, as you walk about you will be moved on the AR version on your phone accurate to a certain number of meters?

kannes commented 2 years ago

This seems to work in Chrome/Chromium but not in Firefox, at least for me. I tried on a phone and a tablet and two Android versions.

Centering the current view on the current location work in both, that's not the AR stuff though. That means your view onto the scene will be centered by your real world position. This works whether you use EPSG:4326 or a projected system with no issues.

What the AR view does:

a) It shows you the scene "on the ground" in your local position/room/reality and you can move your device around it to see it from different perspectives. You can also click on a point and zoom it. Moving back and forth does not zoom or pan, the scene is not fixed in a static location in your real world place but always centered in the device's view space.

b) Using the current location icon you can jump to your current location within the scene. The camera images are composited into the scene for the void/sky. If your camera is covered, it will just be black but still work (uses sensors, no photogrammetry I guess ;) ). This looks pretty cool but getting on the same height level as your scene can be tricky. Also the scale is not realistic, far away objects will be closer than they would be in the real world. So rather think of this of an augmented, immersive view into the scene, not really reality augmented by the scene.

So a lets you watch your scene from above in a god-like view, dynamically controlled by your device stance and b lets you use your device as a "window" into the scene.