Augmented Reality and GPS
Hi,
I have to create a Augmented Reality App as shown here. I want to Augment pipes when the camera is open. Different combinations must be Augmented depending on the directions. How can I achieve this? Currently I am a beginner to Unity and Vuforia.
You should start by running a tutorial for vuforia showing you how to augment anything (a cube for example). Work on from there.
However, the way I think they worked in the video is not by using Vuforias object detection, but with GPS coordinates and the device rotation to just draw meshes to where the pipes would be in that location. So for Vuforia, it's just the capability of rendering the camera in the scene as RenderTexture.
Do a search for markerless augmented reality on YouTube. There are plenty of relevant examples. Some just overlay CG onto video but aren't interacting or tracking the world at all. Throw GPS into the search to try to narrow it down.
I've used the sensors on a phone (GPS + gyro + compass) to draw virtual objects onto camera video. There are a few issues that I found worth noting.
The camera FOV for your CG objects must match the FOV of video rendering. (a combination of the phone's camera FOV and the phone screen aspect ratio).. If your video display is 40 deg. and you're rendering camera is 60 deg., things aren't going to line up.
The accuracy of GPS is only 3m, so if you're rendering something close to your position, small errors in detecting the phone's position will translate to large directional differences, and the virtual objects won't line up on the physical ones.
I found a lot of jitter in the phone compass and drift in the gyro, so if your virtual objects are far away, those small errors translate into big differences in position.
I did a hybrid approach as an experiment. I use the GPS to establish the phone's position (still bad for close up objects) and then AR Core (using its visual/imu tracking system) to track rotation. That gives me good stability. Unfortunately, AR Core isn't available for a lot of phones yet.
Vuforia's a good answer, because it uses an external tracking marker to establish a coordinate system between the local CG objects and the world. But, you need to have that tracking object for it to work.