Within a VR app for smartphone, would it be possible to track the player’s position in real world space using the phone’s accelerometer? To achieve something similar to how the HTC Vive tracks the player position? So that physically moving through VR space would be possible?
I would try it out myself, but sadly I don’t have a capable phone right now.
This is one of the things that Google’s Project Tango may be a solution for one day. Because without the right sensors and/or data it cant be done properly, and crude attempts to fake it with the sensors most phones have are a bad idea for VR where even small tracking errors can cause a bad and nauseating experience for users.
It’s not something I would even begin to hope of right now. It’s a problem plenty want to solve but its not that easy and we must wait an unknown number of years to see which solutions work and go mainstream. In the meantime, there is a good reason why the likes of Oculus and Vive come with additional hardware to make tracking actually work.
It’s also quite vital to many AR & Mixed Reality dreams, so we also have the likes of Microsoft coming up with their own ‘inside-out’ tracking systems for Hololens etc.
I dont doubt these efforts will ultimately be successful but I am cautious about predicting when and who, and whether the first consumer versions end up being good enough.
So as of now it’s unusuable because the accelerometer is too unprecise? I was wondering because the gyro on most phones is working so seamlessly. But I guess it’s simply a whole different set of technology.
However, I feel like what I want to achieve is still more simple. All I want is a somewhat reliable detection of the phone’s location in physical space. Is that really something the accelerometer cannot handle? If the accuracy is only +/- 1-3 cm then that would still be fine with me. The player could recalibrate their position every 5 minutes if neccessary - that wouldn’t be too much of a hassle I suppose. I might try it out myself eventually, but I don’t think I’m the first one to ever try this so I’d like to check out what other people did first.
Deriving position by integrating a noisy acceleration signal: it’s janky I’ve tried it. Position error accumulates over time, you need to have a constant drift back to center or your position ends up in the weeds real quick.
But some games may be possible with, say the user has to quickly dodge left right into 2 discreet X positions, maybe weaving a superbike through dense traffic or something.
Accelerometers are quite noisy, and even the best factory calibration will drift a little extra with even minor temperature changes and age. But let’s say for every second of movement an accelerometer can guarantee +/- 3 cm of precision. What that really means is in 60 seconds the accuracy is +/- 1.8 meters!
The reality is actually much worse though, and even the best accelerometers in modern HMDs can’t guarantee that level of accuracy because there are a lot of additional complications with trying to derive position from an accelerometer.
Here’s a basic rundown of why: gravity. Gravity is applying a constant acceleration down on the accelerometer, which sounds like a good thing because now you know what direction is down, right? But if the accelerometer is in motion and rotating how does it know what part of the accelleration its measuring is from gravity? The obvious answer is using a gyro! Problem solved! Except gyros also drift and aren’t perfectly accurate either, a good one is maybe accurate to +/- 0.1 degree. So now you have two sensors that individually seem relatively accurate, but compounded together and now you’re looking at the precision being +/- >60 meters after a minute, and multiple kilometers after 5 minutes. And that’s with modern, well calibrated hardware. Just a few years ago it wasn’t uncommon to hear programmers jokingly talk about accuracy in km per minute.
Kind of pointless. ARCore already makes heavy use of the accelerometer, gyrometer, and magnetometer along with the camera. You can get position and acceleration data straight from ARCore itself, which is using the combination of all of those sensors to get something accurate enough for something like VR.
Note I say “like” VR, not actually VR since you really need multiple cameras and much more accurately calibrated accelerometers to keep you from getting sick.