Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How to identify causes and mitigations of "judder"

Discussion in 'VR' started by OmarGC, Mar 11, 2022.

  1. OmarGC

    OmarGC

    Joined:
    Apr 18, 2021
    Posts:
    11
    Hello,

    I'm encountering an issue where objects seem to jitter / flicker when I move. It's kind of like double vision. Or you could describe it as blurry edges.

    After googling I discovered that this is called judder.

    It happens more noticeably when I have a heavier scene. But it does happen a bit in light scenes as well. I did not notice a correlation with the performance metrics I'm tracking (FPS, stale frames, GPU usage, CPU usage).

    I did not quite understand the previous discussion I read on the topic. I'm a novice VR developer. I'd appreciate some guidance on ways to identify the causes and mitigations for this issue.

    I'm developing for PCVR using the Oculus Quest 2 headset.

    Thank you
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    With the correlation, do you mean low fps == more judder?
     
  3. OmarGC

    OmarGC

    Joined:
    Apr 18, 2021
    Posts:
    11
    I mean I had more judder in heavier scenes even though the FPS was still 72.
     
  4. mabulous

    mabulous

    Joined:
    Jan 4, 2013
    Posts:
    198
    it always boils down to performance. If you don't meet the refresh-rate of the HUD display, you'll get this effect. That's because your eyes expect the image at the new location as you turn/move your head, but because your app was not fast enough in rendering, it still displays it in the location of the previous frame. This generates this double vision or jittering.

    You'll have to optimize the performance of your app to meet at least the 72fps of the Quest 2.
     
  5. mabulous

    mabulous

    Joined:
    Jan 4, 2013
    Posts:
    198
    how exactly did you measure these 72 fps?
     
  6. TomGoethals

    TomGoethals

    Joined:
    Jan 29, 2022
    Posts:
    40
    If you're 100% sure you're hitting framerate, have a look at your physics timesteps. Objects moved by physics (like a lot of VR rigs are using) could be jittery.. I've fixed jitter/judder before by setting the physics timestep to 1/72 (using quest)
     
    DevDunk likes this.
  7. OmarGC

    OmarGC

    Joined:
    Apr 18, 2021
    Posts:
    11
    I'm measuring framerate using the OVR Metrics Tool overlay.

    To eliminate issues that could be caused by player movement. I created a scene where I'm standing still and a cube is moving. The cube is moving without physics:
    Code (CSharp):
    1.     void Update()
    2.     {
    3.         transform.Translate(speed * Time.deltaTime);
    4.     }
    When the scene has more elements (~10K draw calls vs ~1K draw calls), jitter is much more noticeable. The metrics overlay keeps showing 72 FPS regardless.

    So I don't think it's physics? Is it possible FPS is not being measured correctly?
     
  8. OmarGC

    OmarGC

    Joined:
    Apr 18, 2021
    Posts:
    11
    Measuring with the OVR Metrics Tool overlay was misleading.

    I started using the performance HUD that can be enabled from the Oculus Debug Tool and I got much saner results.
     
    Eclectus and DevDunk like this.
  9. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Interesting, what was rhe difference?
     
  10. OmarGC

    OmarGC

    Joined:
    Apr 18, 2021
    Posts:
    11
    Two things:
    1. In some cases, the old measurement could show ~72 FPS while the new tool shows ~35 FPS. The scene feels more like ~35 so the second measurement is more reasonable.
    2. The new tool shows a count of dropped frames which is very useful. The graph could show consistent 72 FPS without indicating occasional dropped frames.
    The new tool also shows metrics that seem interesting and useful but I won't comment on them until I understand them more.
     
  11. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Interesting, myself I just use the Unity Profiler. Also worth a look since you can see where the issue is
     
    OmarGC likes this.