OSVR-Core icon indicating copy to clipboard operation
OSVR-Core copied to clipboard

Disable Client Side Prediction for HDK because of poor performances

Open demonixis opened this issue 9 years ago • 13 comments

Hi,

According to this doc the server side prediction is already enabled. The client side prediction is enabled too, so it can be a good idea to disable it by default for clients OR disable the server side prediction and keep the client side prediction enabled.

Today both are enabled resulting poor performances and a lag when you move your head.

demonixis avatar Jun 22 '16 13:06 demonixis

I vote for disabling server-side prediction by default, because the client side actually knows how far ahead it needs to predict.

russell-taylor avatar Jun 23 '16 12:06 russell-taylor

Except when in extended mode, where at the moment we don't have accurate timings, and so disabling server-side overall would be a regression. We already have separate configs for direct and extended mode, just need to make the direct mode ones not use server-side prediction - I'm not sure why this wasn't done before the client-side prediction config enabled by default was merged in to begin with, but we can do it now in any case.

Ryan

On Thu, Jun 23, 2016 at 7:44 AM Russell Taylor [email protected] wrote:

I vote for disabling server-side prediction by default, because the client side actually knows how far ahead it needs to predict.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OSVR/OSVR-Core/issues/441#issuecomment-228038425, or mute the thread https://github.com/notifications/unsubscribe/AADuyQL0fcfchWk5a1tUKgLwt1J_vxo1ks5qOn--gaJpZM4I7yPV .

Ryan A. Pavlik, Ph.D. CTO - OSVR Platform Sensics, Inc. www.sensics.com

Latest news and blog posts (subscribe here http://sensics.com/subscribe-to-our-mailing-list/ to get weekly updates):

June 22: The three (and a half) configurations of eye trackers http://sensics.com/the-three-and-a-half-configurations-of-eye-trackers/

June 17: Notes from the Zero Latency free-roam VR gameplay http://sensics.com/notes-from-the-zero-latency-free-roam-vr-gameplay/

June 15: VRguy podcast: Jens Christensen, former CEO of Jaunt VR, on the video value chain in VR http://sensics.com/vrguy-podcast-episode-15-jens-christensen-on-360-and-3d-video-in-vr/

rpavlik avatar Jun 24 '16 03:06 rpavlik

Client-side prediction can be done in extended mode, and the RenderManager config files are set up to do it. It just predicts for a fixed interval, which is the same thing that server side does. The config files for extended mode add a frame of prediction to the ones in direct mode. Note that we need separate prediction for each eye, so the client-side prediction will always be active. May as well have it do all the work.

russell-taylor avatar Jun 24 '16 12:06 russell-taylor

Hi,

Any news about this issue? The client side prediction is still enabled resulting to bad performances for new users. I can prepare a pull request that fix that if all of you are agree with that.

demonixis avatar Aug 30 '16 07:08 demonixis

@demonixis it sounds like there is consensus to make this change, so you could prepare a pull request. To disable server-side prediction, add: "aliases": {"/me/head":"/com_osvr_Multiserver/OSVRHackerDevKit0/semantic/hmd"} to any HDK server config that uses a renderManagerConfig with (client-side) prediction enabled.

DuFF14 avatar Sep 07 '16 15:09 DuFF14

OK, This is maybe a good idea to update all HDK files?

demonixis avatar Sep 07 '16 16:09 demonixis

You'd want to edit all the HDK configs in the sample-configs directory which have a renderManagerConfig in them or reference an external renderManagerConfig with prediction enabled, like this one: https://github.com/OSVR/OSVR-Core/blob/master/apps/sample-configs/osvr_server_config.HDK13DirectMode.sample.json#L4

You wouldn't add it to this file because it doesn't use a renderManagerConfig: https://github.com/OSVR/OSVR-Core/blob/master/apps/sample-configs/osvr_server_config.autodetectonly.sample.json

Don't need to change this either because it already disables server-side prediction: https://github.com/OSVR/OSVR-Core/blob/master/apps/sample-configs/osvr_server_config.renderManager.HDKv2.0.direct.json#L96

It looks like the default osvr_server_config.json file is a copy of "sample-configs/osvr_server_config.HDK13DirectMode.sample.json" https://github.com/OSVR/OSVR-Core/blob/master/apps/CMakeLists.txt#L220 so that's probably the most important one in terms of changing the default user experience.

I'm not sure which config files are packaged as the defaults in Razer's installer.

DuFF14 avatar Sep 07 '16 17:09 DuFF14

@DuFF14 OK thanks. Are you ok if I send a pull request with these changes?

demonixis avatar Sep 08 '16 05:09 demonixis

Yes.

DuFF14 avatar Sep 08 '16 18:09 DuFF14

So the caveat is that we don't have the timing data in extended mode to do client-side prediction well, isn't that right? so we should actually be disabling client side prediction in extended mode rm configs...

rpavlik avatar Sep 09 '16 22:09 rpavlik

If the timing data ever shows up, it will be on the client side, and there may be some APIs available to get it. We still know the relative eye timing. We also know the expected value (I think I've added a half frame of delay to the extended-mode files compared to the DirectMode ones). When timing data is not available, timing returns "0" as time to vsync, so it sort of auto-disables itself.

russell-taylor avatar Sep 10 '16 12:09 russell-taylor

@rpavlik ok, do you want to keep server-side prediction for extended mode?

demonixis avatar Sep 12 '16 05:09 demonixis

(hoping Ryan says "no")

russell-taylor avatar Sep 12 '16 13:09 russell-taylor