Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Virtual Reality demo problem? Camera drifting

Author
Message
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 4th Mar 2016 00:30
Hello everybody.

I was trying the Virtual Reality user demo, but something weird happened.

When I tried to rotate my head at around ~90 degrees, the camera seems to be drifting randomly.

This doesn't happened with other apps I made using the gyroscope though.
I'm using Xperia Z2.

Anybody else had this problem?
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 4th Mar 2016 00:41
I did some testing, and it seems like the camera drifting is related to quaternion.

When these commands are used, the drifting occurs:
GetRawRotationVectorW2()
GetRawRotationVectorX2()
GetRawRotationVectorY2()
GetRawRotationVectorZ2()
SetCameraRotationQuat()

But when I rotate the camera with these commands, the drifting seems to disappears
gyroX# = GetRawGyroVelocityX()
gyroY# = GetRawGyroVelocityY()
gyroZ# = GetRawGyroVelocityZ()

RotSensorX# = - gyroX#
RotSensorY# = - gyroY#
RotSensorZ# = gyroZ#

RotateCameraLocalX(1, RotSensorX#)
RotateCameraLocalY(1, RotSensorY#)
RotateCameraLocalZ(1, RotSensorZ#)



Is there really a problem with quarternion?
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Mar 2016 09:51
This is a problem with the lack of accuracy in mobile devices.

Samsung has extra sensors to make their Gear VR work properly. That's why you can't use it with all phones.
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 4th Mar 2016 11:51
Also, Samsung Gear VR looks like its FPS is more than 60. Is that really the case?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 4th Mar 2016 12:14 Edited at: 4th Mar 2016 20:27
Quote: "This is a problem with the lack of accuracy in mobile devices."
I think It's more to do with a lack of properly implemented sensor fusion. There are VR demos available that prove the regular mobile phone sensor set can acheive very solid and non-drifty VR. To get such solid performance requires the fusion of accelerometer, gyros, and magnetometer which is tricky to get right. Just using the built-in "fused" functionality provided by NDK doesn't quite cut it.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Mar 2016 12:59
Quote: "Also, Samsung Gear VR looks like its FPS is more than 60. Is that really the case?"


This page says it's 60. Which makes sense because mobile phones tends to be locked to 60.

http://www.digitaltrends.com/virtual-reality/oculus-rift-vs-samsung-gear-vr/
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Mar 2016 13:17
You do get issues sometimes, what I do is shake my head a bit and look all around and the drifting seems to stop.

As mentioned, it's inherent with the internal sensors of mobile devices, which is why all commercial VR headsets have external sensors to track the deice.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Mar 2016 13:59
Quote: "which is why all commercial VR headsets have external sensors to track the deice."


I think this is mostly because they what to track where your head is and not just the angle. Oculus realized after a while that for the best experience they needed to be able to track when you move your head, not just when you tilt it. For example leaning is more movement than tilting. This makes it more immersive and makes people feel less ill from using it. It's of course more accurate as well, which also helps.
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 4th Mar 2016 17:01
Well, currently I can somewhat eliminate the drifting by avoiding quarternion commands, and replacing them with gyroscope commands.

Anybody has a shader for proper VR camera FOV? One that bends the view in those oval shape?

The default FOV commands seems to only bends FOV horizontally

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Mar 2016 18:47
Quote: "Anybody has a shader for proper VR camera FOV? One that bends the view in those oval shape?"

I don't bother with the barrel shader, and just output the images direct to screen.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Mar 2016 21:31
Quote: "Anybody has a shader for proper VR camera FOV? One that bends the view in those oval shape?"

I think you're fine as long as your headset has lenses. But correct me if I'm wrong.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Mar 2016 23:33
Quote: "I think you're fine as long as your headset has lenses. But correct me if I'm wrong."

I'd say so. I have no problems with my setup.

Login to post a reply

Server time is: 2024-11-17 04:09:10
Your offset time is: 2024-11-17 04:09:10