Search Unity

  1. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  2. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice
  3. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  4. Dismiss Notice

Jittery motion on Oculus Quest

Discussion in 'AR/VR (XR) Discussion' started by Fingerbob, May 24, 2019.

  1. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    348
    okay so I upgraded to latest Oculus integration in Unity and then I had to update Oculus Quest as well. Now it is working but its the same results. Multi-Pass still renders only on Left Eye and black on Right Eye even after upgrading the project to latest Unity 2019.3.0f6. And this is through using Legacy XR System.
     
  2. nomand

    nomand

    Joined:
    Dec 23, 2008
    Posts:
    44
    Got a confirmation from support that a fix for this will come in URP 7.2 update. Would be nice to know the ETA, since deadlines and stuff.
     
    saifshk17 and ROBYER1 like this.
  3. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    348
    Last edited: Feb 11, 2020
  4. CGPepper

    CGPepper

    Joined:
    Jan 28, 2013
    Posts:
    141
    Did the issue get solved?
    I was actually getting much better performance with mobile vertex lit shader instead of URP
     
  5. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    141
    This issue disappeared for us after upgrading, although I haven't looked to see if it has re-occurred.
     
    ROBYER1 likes this.
  6. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    348
    I am using URP for Oculus Quest. There is alot of camera jittery motion and it is visible when UI elements are near the camera. What is the render scale you have set for URP and what are the best settings to enable for Oculus Quest?
     
  7. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,168
    You need to post more info than that, what is your framerate
     
  8. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    348
    Okay so basically I am using URP. The render scale of URP is set to 1.3f. Everything looks sharp but the camera starts to jitter with movement. This can be reflected with the UIs infront of the camera. However when I reduce the render scale to 1.0f, then there is no jitter motion in the camera, the movement is smooth, however the UIs in the scene look compressed and bad quality. So how do I make sure that the render scale is set to 1.3 as well as there is no jittery motion?
     
  9. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,168
    What is your framerate in FPS?
     
  10. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    348
  11. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    348
    Here is the fixed timestep used in the application.
     

    Attached Files:

  12. cruizea5

    cruizea5

    Joined:
    Sep 18, 2020
    Posts:
    2
    I've just tried a build to SteamVR (running on Vive) on PC. I'm seeing the same issue if the game window is fullscreen and has focus! the timing on the jittery window is smaller (1/3 sec every second or so, instead of 1 sec every 3 seconds) but it's the same behaviour.
     
  13. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    68
    @saifshk17 The UIs probably look compressed because they're using Mipmaps based on distance. Upping the render scale is not a good way to improve clarity. It increases the resolution of the render textures for the eyes, therefore increasing your rendering and memory costs.

    Instead try moving the UI closer to the player camera, and see if that makes a difference. Likely you'll just need to find a distance where they don't get mipmapped, and a size that is legible.
     
    ROBYER1 likes this.
  14. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    348
    Yes but my UI is in world space so it needs to stay in the position where it is. This UI is an image with written text. So is there an alternate solution?
     
  15. SOIL

    SOIL

    Joined:
    Sep 2, 2011
    Posts:
    213
    After the Lightbaker made problems in all 2019 versions, I was happy with the latest Unity 2020.xxx. The Oculus Integration & XR also run without problems. Simple 3D model scene, with a few animations and no other code features. The head tracking is super smooth. Timestep 0.1111 (90hz) for my Quest 2. But the animations jitter as well. Is there a solution for this now?
     
  16. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    68
    You have a variety of options, but we'd need to know more about your setup. You can disable mipmaps on textures, but that can result in a shimmering effect on your text as the camera moves. You can also try increasing the font size, and then decreasing the scale, or try adjusting the dynamic pixels per unit on your canvas scaler.

    Lastly, if none of these solutions work, you may want to consider changing or redesigning the way they're positioned in world-space so that they're closer to the player.
     
    Last edited: Nov 4, 2020
    Arclite83 likes this.
  17. gargmukul121

    gargmukul121

    Joined:
    Nov 5, 2020
    Posts:
    1
  18. SOIL

    SOIL

    Joined:
    Sep 2, 2011
    Posts:
    213
    • Do not be abusive or drag company staff ex or otherwise into discussions of a technical nature.
    HEAVY jittering/stutter still in 2019.x and in 2020.x - whatever unity is talking about, there is nothing fixed! They have other problems, like how many sexual predators are still in the company, for example. Helgason left the company, maybe because he was the predator. *fg "WHO CARES?!" ..... And NO - I wont always "DELETE THE LIBRARY FOLDER" and reimport everything, just because Unity has forgotten to do its job and someone in here thinks that's the solution for everything. That is so embarrassing and thousands of miles away from being professional!

    If I start a simple project - AS A VETERAN! - and I publish it to my stupid, S*** OCULUS quest 2 - then it has to run smoothly from the beginning, because we have 2020!!!! and not 1984!!!!!!!! Jittering, Stutter, TimeDelta problems, Lightbaker for the trashbin!!!!! (look at plugin Bakery plus realtime tool as well!), Collab = BULLSHIT!, URP problems wihout any end - URP 9.x (which is still in development) ETC:..........

    Is here anyone, who still has the jittering issue? Timestep to 0.11111 doesn't make ANY difference!
    tested with ALL 2019,.x versions... as well with 2020.1, which is the one I need, because that stupid, F*** engine does have so many URP problems on 2019.x that I ask myself, how can a company go with that thing into production?!


    appendix for hippocoder: i
    t's not the fault of the developers. It's always the fault of those who run the company! but hey, tell that a developer -.-

    Have fun repairing what cannot be repaired by you or someone else here in this thread. Therefore every further word here is superfluous. And the ban just ridiculous.

    Adios!
     
    Last edited: Feb 12, 2021
  19. CrispyCritter

    CrispyCritter

    Joined:
    May 11, 2018
    Posts:
    17
    This is a complete joke from unity clamining they fixed it i mean do they test these fixes? clearly its not fixed basicly any object that is being moved using delta.time is jittery meaning you simply can not use unity for vr development for the quest at this point, as a paying customer of unity i am just concidering moving over to UE at this point
     
    SOIL likes this.
  20. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,207
    SOIL is no longer able to post on this specific thread. No matter how frustrating an issue might be of a technical nature, it must always remain technical, not abusive.

    Unity can't improve if the only feedback is anger. Please post bug reports, case numbers etc if issues don't appear to be solved by the forum in a timely manner. Attacking staff or company is not the answer.
     
    Gruguir likes this.
  21. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,207
    You should try it then, or post bug reports. I hate to be that guy, but posting real bug reports and including the case # number in your replies is and always has been, the most effective way to get Unity to look at an issue.

    The reason for this is that the vast majority of issues are the developer's fault. Unity does have bugs but they cannot respond to all users on the forum without a case number so they can see the problem for what it is, and not what the developer thinks it might be.
     
  22. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    56
    Prior to OpenXR, it was common practice to set the fixed timestep of a Unity project to match the frame rate of the device to eliminate "the jitters" as discussed above. Is this required anymore with pure OpenXR targeting multiple headsets?
     
  23. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    141
    We do this on Oculus Quest (non OpenXR, fwiw) and it definitely improves things, but we have almost the entire game running in FixedUpdate, so naturally it's necessary to lock-step the FixedUpdate with the rendering.
     
  24. CatTestTrophy

    CatTestTrophy

    Joined:
    Feb 4, 2021
    Posts:
    2
    Hey there!

    Since some of you here seem to have insight into what works well in terms of fixed time step with Oculus Quest 2, I kindly ask you to answer some questions (or point me to the answers, if I failed to find them):

    1. What is the minimum viable fixed time step the Oculus Quest 2 with Unity 20.3 is capable of (e.g., in case I almost do nothing in the FixedUpdate) and how did you come by this information?

    2. How would I notice (e.g. by using Oculus Metrics tool) or debugging via ADB that the fixed time step I chose is too small for the CPU/OS to support (e.g. 0.01)?

    3. Some here are talking about correlating fixed time step and refresh rate closely. But won't that introduce interference issues?

    4. Does anyone here know a comprehensive and up-to-date best practices guide for the development with Unity for the Quest 2? I have gathered information from places seemingly all over the internet. But for many options in the project settings and player settings I still have no clue if they actually affect how my software will run and what sensible values are for these options.
     
  25. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    141
    Just consider, unless you're using interpolation/extrapolation (and usually you don't want to because they have their own artifacts), your fixed time step *must* be equal to the display refresh rate. Otherwise you might have two render frames (26ms) that show an object frozen in the same position. This is especially critical in VR where subtle jerks are very perceptible.

    1. Oculus Quest 2 supports a min of 72FPS, so 72FPS is the minimum fixed time step for smooth physics. Make sure to set max fixed timestep as well to the same value, so it doesn't take more than one in a single frame (unless you can comfortably afford it).
    2. Use the Unity profiler. You should see a single Fixed Update for each frame.
    3. Interference?
    4. Unfortunately no. It's a hodge-podge of learnings over the last year or two. It's made worse because Oculus Quest is constantly improving, so things like ATW, FFR, change the 'common wisdom' of what the platform can achieve.
     
    Fingerbob and CatTestTrophy like this.
  26. CatTestTrophy

    CatTestTrophy

    Joined:
    Feb 4, 2021
    Posts:
    2
    Hey Kleptine!

    Thank you for your reply. After reading your reply I realized that I had the wrong idea about what "fixed update" was.
    My application needs to measure user behavior in the VR environment at a rate as fast and as constant as possible. So I put this measuring into fixed update in my first attempt thinking measuring should occur regularly and not be prone to any changes in frame rate. This was me thinking that there were two separate processes running in a Unity 3D application, one for the refresh of the UI per frame (that could sometimes take longer than a frame and therefore be discarded) and another process, responsible for updating the world (physics, etc) in regular intervals (fixed updates). Why else should there be separate values, to adjust these refresh rates in unity, right?

    Thanks for your advise, I highly appreciate it.
     
  27. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,207
    It's completely not necessary to lock the game to 72hz with FixedUpdate. Not only does this increase CPU time and run slower than it could, it also illustrates the project is not using Unity correctly, or it's just a bunch of workarounds.

    Physics can and should be entirely decoupled from display frame rate. If there's issues with jitter it is because the developer is choosing to lock the visual rendering with with logical updating - something no-one has recommended since the 90s unless they had a very specific use-case.

    For instance putting it all inside FixedUpdate doesn't guarantee that it won't run multiple times in one frame. It often will. A tragic waste of processing in my view.

    The right practise is to decouple your rendering from your physics and interpolate the results. Even DOTS works like this. It will save a lot of CPU time, battery, temperature etc.
     
  28. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    141
    You're not wrong in general, but VR is has some specific constraints:
    • The display rate *has* to run at 72fps, full stop. You will fail Oculus Quest certification if it doesn't. Single dropped frames can cause an incredible amount of nausea, even with the Timewarp measures Oculus takes. So you're already in a fixed frame-rate environment.
    • Similarly, to maximize comfort, you want the objects in the game to be as close as possible to the the latest input frames from the controllers and headset. Otherwise your hands and held objects will drift slightly behind your real hands, even a few milliseconds of this is noticeable and uncomfortable. Interpolation makes this dramatically worse, and extrapolation causes weird jumping.
    • Running physics at a lower rate means you may have two entire render frames where a physics object doesn't update based on your controllers. This is starkly noticeable in VR.
    • Both interpolation and extrapolation have cases where it fails and will create non-physical behaviour. Interpolation creates a delay, extrapolation creates jumping.
    Additionally, you can guarantee physics only runs once a frame using Time.maximumDeltaTime.

    To be clear, you *could* run an Oculus game with 50fps physics and interpolation, but if you want to maximize comfort and polish, 72fps is the better choice.
     
    Last edited: Jun 3, 2021
unityunity