News for hackers. Stuff that matters.
Re:User interface design timeframes: from 0.1 seconds to 10 ... by _dain_ on Tuesday March 07, 2023 @09:19AM (#35055607)
>0.1 seconds or less: the illusion of direct manipulation is maintained.

100 milliseconds is still an atrocious amount of latency in many contexts (typing for example). There were some Microsoft usability studies of tablets, people dragging their fingers on the touchscreen to draw things. They needed on the order of single-digit millisecond latency to make it feel immediate, because otherwise you could see the drawn brushstroke noticeably lagging your finger.

It's true that human reaction time is at that timescale, but that got thoughtlessly transmuted into "latency below 100ms doesn't matter", which doesn't follow at all. The hand-eye-brain system is a very complex prediction-feedback system, used to working in real life where there's usually zero real latency between what your fingers do and how the world reacts. Your brain is already doing the biological equivalent of lag compensation and rollback to account for how long nerve signals take to travel and how long muscles take to move and how fast its own neurons can process information. Adding more latency and jitter on top of that can only make the error rate worse.

And doubly so when there are different amounts of latency for the different sense modalities, e.g. visual vs audio.

See: https://danluu.com/keyboard-latency/#appendix-counter-argume...

Re:User interface design timeframes: from 0.1 seconds to 10 ... by moritonal on Tuesday March 07, 2023 @09:31AM (#35055730)
Yep, even worse in gaming where some user's are likely capable of noticing between 1-10ms latency differences. Not strictly, but enough to let a reviewer describe a game as sluggish as noted in today's PC Gamer article[1].

https://www.pcgamer.com/we-played-the-fps-with-unlimited-des...

Re:User interface design timeframes: from 0.1 seconds to 10 ... by fwlr on Tuesday March 07, 2023 @09:45AM (#35055879)
Yeah, these rules are scoped to “doing stuff by clicking on a web page”. They are rules for buttons, basically.

Typing absolutely needs to be “instantaneous”, i.e. it happens by the very next frame, so “< 16 milliseconds”. Same goes for mouse movement, the cursor has to be perfectly in sync with your hand movement. These are a step beyond “it feels like you made the thing happen”, they are more primitive, like maybe “it feels like you are the thing”. When you put touchscreen gestures in the same category as mouse cursor movement and typing, it seems obvious you would need single digit millisecond feedback - but it did take us some time to empirically discover that was the natural category for gestures.

Re:User interface design timeframes: from 0.1 seconds to 10 ... by _dain_ on Tuesday March 07, 2023 @10:24AM (#35056336)
>These are a step beyond “it feels like you made the thing happen”, they are more primitive, like maybe “it feels like you are the thing”.

That's a great way of putting it. I imagine VR developers have to deal with this.

Re:User interface design timeframes: from 0.1 seconds to 10 ... by fwlr on Tuesday March 07, 2023 @12:03PM (#35057802)
I vividly recall Carmack describing some of the lengths they had to go to to get VR respond to body movements. IIRC it was crucial to get the scene to move around exactly when your head moves around, or else your body would think you’re poisoned/dying or something. The PC would be polling head position and rendering at like 90fps and even that was too much latency so they had this insane hack where the rendered frame was sent down the wire to the headset, and the headset itself had some onboard processor that would skew and shift the frame according to the last data from the accelerometer literally right before putting the frame on screen.

https://developer.oculus.com/documentation/native/android/mo...

Re:User interface design timeframes: from 0.1 seconds to 10 ... by Ajedi32 on Tuesday March 07, 2023 @01:10PM (#35058805)
> the headset itself had some onboard processor that would skew and shift the frame according to the last data from the accelerometer literally right before putting the frame on screen

FWIW that's only needed when you don't have enough bandwidth to send an uncompressed video stream to the headset and need a decompression step that introduces additional latency (e.g. you're sending the video stream over 6 GHz Wi-Fi or USB instead of DisplayPort).

Tethered headsets do use a similar technique in situations where the game can't keep up with rendering at 90fps but that's done on the computer's GPU, not on the headset.

Re:User interface design timeframes: from 0.1 seconds to 10 ... by fwlr on Tuesday March 07, 2023 @01:34PM (#35059192)
Yeah, on re-reading I don’t know where I got the idea the headset was doing on-board processing. I recalled that rendering was done using positional data and they had to add a compositor post processing step afterwards using newer position data, but I hallucinated that the need for low latency was so extreme that it had to be done on the headset.
Re:User interface design timeframes: from 0.1 seconds to 10 ... by Ajedi32 on Tuesday March 07, 2023 @02:31PM (#35060018)
Again, it does happen on the headset, but that's only necessary in situations where there's not enough bandwidth to send an uncompressed video stream.

See Oculus Link over USB, for example: https://developer.oculus.com/blog/how-does-oculus-link-work-... The diagram there shows Timewarp running on both the PC and the headset side.

In headsets like the Rift or Valve Index that send video streams over HDMI or DisplayPort that extra step isn't necessary; everything happens on the PC's GPU.

Re:User interface design timeframes: from 0.1 seconds to 10 ... by fwlr on Tuesday March 07, 2023 @05:46PM (#35062391)
Ah, ok, that’s how I ended up with the original mistaken belief. I remembered “Timewarp is necessary” and “Timewarp can happen on the headset” and conflated them into “Timewarp necessarily has to happen on the headset”.