openvr icon indicating copy to clipboard operation
openvr copied to clipboard

Please give a tip why it's always in 45 FPS?

Open shenyu0403 opened this issue 10 years ago • 9 comments

I'm working on custom driver, just launched the SteamVR with it and direct mode enabled, only a background displayed in HMD, everything worked fine, but just in 45FPS. Any suggestion?

shenyu0403 avatar Jun 30 '16 14:06 shenyu0403

Do you have "Enable Always-on Reprojection" checked in the developer settings? Reducing the frame rate to 45Hz is what that setting does.

JoeLudwig avatar Jun 30 '16 18:06 JoeLudwig

Thanks for your reply, nope, never checked that, but i'm running in SteamVR Beta, does it matter? I will have a try on the sample driver, becuase it's really simple so i can find if it's the problem of driver itself or the code i did.

shenyu0403 avatar Jul 01 '16 01:07 shenyu0403

Renaming the sample driver to something else might help. The name "sample" kicks the compositor into debug mode where it expects to show in a window on the desktop instead of an actual HMD. That turns off full screen and limits framerate to 60Hz.

JoeLudwig avatar Jul 01 '16 18:07 JoeLudwig

yep, i just found that, it's forced in debug mode so i did like you suggested. the background and tutorial is also in 45 FPS, but a heavy game in 90 FPS :), really weird. so that's not a real problem i think.

thanks for your reply JoeLudwig.

shenyu0403 avatar Jul 02 '16 01:07 shenyu0403

What kind of hardware are you running on? Maybe it's not keeping up?

JoeLudwig avatar Jul 02 '16 01:07 JoeLudwig

Intel Core i7-6700 3.4GHz (8 CPUs), AMD Radeon R9 Fury Series, 16GB Memory, Windows 10 Pro. I played on my computer with HTC Vive, it was really good for each games.

shenyu0403 avatar Jul 02 '16 08:07 shenyu0403

I got another problem i think, even if it's in 90 FPS, the game still present lagging while headset rotating or moving. i tried if the headset is just put on table, only navigate in game scene with keyboard, it will display very smothly. So i guess it's something about prediction or wrap, but i didn't see anything can help in driver interface except vr::DriverPose_t::poseTimeOffset, and VsyncEvent(), speaking about vsync, i can't get such a time if i was not in charge of rendering, right? do you have any suggestion about this?

i'm reading the sensor data from another thread once per 1ms then call TrackedDevicePoseUpdated() immediately, but the poseTimeOffset always set to 0, just i don't know how to measure.

++ I found such a comments in driver head file.

` /* Time offset of this pose, in seconds from the actual time of the pose, * relative to the time of the PoseUpdated() call made by the driver. */

/* Generally, the pose maintained by a driver * is in an inertial coordinate system different * from the world system of x+ right, y+ up, z+ back. * Also, the driver is not usually tracking the "head" position, * but instead an internal IMU or another reference point in the HMD. * The following two transforms transform positions and orientations * to app world space from driver world space, * and to HMD head space from driver local body space. * * We maintain the driver pose state in its internal coordinate system, * so we can do the pose prediction math without having to * use angular acceleration. A driver's angular acceleration is generally not measured, * and is instead calculated from successive samples of angular velocity. * This leads to a noisy angular acceleration values, which are also * lagged due to the filtering required to reduce noise to an acceptable level. */ ` so i guess i need to really do something with angular velocity.

shenyu0403 avatar Jul 02 '16 08:07 shenyu0403

It sounds like you're describing what happens when the driver is passing 0 for velocity and angular velocity. That prevents the rest of the system from doing prediction so the pose provided to applications is always the latest pose from the driver (which is always wrong.) Are you providing velocity and acceleration from your driver?

JoeLudwig avatar Jul 04 '16 17:07 JoeLudwig

yep, i'm going to provide that.

shenyu0403 avatar Jul 06 '16 03:07 shenyu0403