Search Unity

Oculus Go Screen Resolution & Anti-Aliasing Tips & Tricks

Discussion in 'AR/VR (XR) Discussion' started by Three65, Oct 10, 2018.

  1. Three65

    Three65

    Joined:
    Oct 1, 2018
    Posts:
    26
    Hey everyone, I am new to Unity and have been working on getting the best possible resolution for my Oculus Go. Hopefully this will be a good thread to share all of our tips and tricks. I reached out to @JoeStrout about this in a conversation to learn somethings from him. But he would rather start something in the Forums so that everyone can benefit from some of his tips and tricks.

    I am hoping to figure out how to do something like this.
    https://forum.unity.com/threads/quality-settings-for-oculusgo.544942/

    Or if there is a better way I would love to learn how to get a better overall resolution from my Oculus Go.

    I also recently came across this little program that uses the ADB to change the resolution of the Oculus Go.

    https://www.reddit.com/r/OculusGo/comments/8nhhsj/heres_an_easy_tool_to_increase_visual_quality_on/
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    It's literally a matter of creating a script, and putting this into the Awake or Start method:

    Code (csharp):
    1.  
    2. XRSettings.eyeTextureResolutionScale = 2.0f;
    3.  
    And you might experiment with other values; it doesn't have to be an integer. A value of 1.3 or 1.7 might actually look better than 2.0.

    Second, make sure you have anti-aliasing (in the Player settings) set to 4x Multi-Sampling. Nothing to experiment with here; that should always be the setting used on the Go.

    Finally, you want to try to avoid high-contrast, straight lines as much as possible. These show the aliasing much more than curved or lower-contrast lines.
     
    stefanob, beyonderic and Three65 like this.
  3. Three65

    Three65

    Joined:
    Oct 1, 2018
    Posts:
    26
    Do I need to add this script to something in my project or just create it and when my project runs it will work?
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    No, sorry, you do need to actually add the script to an object in the scene in order for it to run.

    But if this is the level of Unity development you're at, you shouldn't be worrying about anti-aliasing, and probably shouldn't even be worrying about deploying to the Go yet. First you need to get a strong foundation in Unity itself. I recommend putting the Go project aside for a few weeks, and work through the tutorials you'll find in the Learn section. This will save you a lot of time in the long run, as you won't waste time on the basics and can then really focus on the stuff that's more interesting to you.
     
    gjf likes this.
  5. Three65

    Three65

    Joined:
    Oct 1, 2018
    Posts:
    26
    I appreciate your help, but I work for a company that does large events and I am currently working on a project for our client appreciation event which will have 4 Oculus Go being used at it. So I really can't just put my go away and start learning from scratch. I have built several Oculus Rift projects in UE4 and the only reason I switched over to Unity was because UE4 has some issues lunching to the Go right now. I would say I have a good grasp on things I just need to know how Unity expect items in the project to feed them to the Go.
     
  6. Three65

    Three65

    Joined:
    Oct 1, 2018
    Posts:
    26
    If anyone else is trying to do this, the proper bit of code is
    Code (CSharp):
    1. UnityEngine.XR.XRSettings.eyeTextureResolutionScale = 2.0f;
     
    JoeStrout and jaugustin like this.
  7. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    That's true (unless you have
    #using UnityEngine.XR
    at the top, which you'll probably want if you're doing much XR coding).
     
  8. Three65

    Three65

    Joined:
    Oct 1, 2018
    Posts:
    26
    Thats good to know @JoeStrout thanks for letting me know that. I took some C++ coding along time ago in college and haven't really used it since. I am currently working on learning some C# cause it seems to be pretty heavily used in Unity. Have you ever switched the go into a 75Hz mode? I am curious how to do this, and it looks as if I will need to write another script that will enable it in my app. I have found the code but have not got it to work correctly yet.

    Code (CSharp):
    1. float[] freqs = OVRManager.display.displayFrequenciesAvailable;
    2.  
    3. OVRManager.display.displayFrequency = 72.0f;
     
  9. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I haven't tried that yet. Your code looks about right to me. Are you getting an error, or it just doesn't seem to have any effect?
     
  10. Three65

    Three65

    Joined:
    Oct 1, 2018
    Posts:
    26
    I am getting a error in Unity that says "please fix compile errors before creating new script components" I probably don't have my code in the correct areas is what I am thinking.
     
  11. Three65

    Three65

    Joined:
    Oct 1, 2018
    Posts:
    26
    I also found a post that said to just add this code to the any start method

    Code (CSharp):
    1. OVRManager.tiledMultiResLevel = OVRManager.TiledMultiResLevel.LMSHigh;
    2.         OVRManager.display.displayFrequency = 72.0f;
     
  12. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Well those are two different thnigs — changing the multi-res tile level (which has to do with rendering at a higher resolution in the center of the view vs. the edges), and changing the display refresh rate.

    That's not the useful part of the error message. Somewhere (probably right above that one) is the actual error message, which will include the file name and line number where the error was found, along with a good explanation of what the problem is.
     
  13. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Keep in mind that increasing eyeTextureResolutionscale costs performance, as things essentially are rendered at a higher resolution and scaled down afterwards ( which in turn reduces the aliasing )
     
    JoeStrout likes this.
  14. Three65

    Three65

    Joined:
    Oct 1, 2018
    Posts:
    26
    I was able to get this working, its been a while since I have done any coding and it was just a matter of putting the code in the correct spots. For what my company uses this for we have the room to spare for the extra performance cost to get the higher resolution.

    On another note, our event was last night and we had 4 Oculus Go's running with the project I created on them and it turned out really well and generated a lot of interest in our company. I look forward to learning more about Unity and the Oculus Go now that I have more time to learn and become more knowledgeable about the whole work flow. I would like to thank everyone for their help I really do appreciate it!
     
    SiliconDroid and JoeStrout like this.
  15. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    973
    View attachment 337042
    I have just tried this.
    Does it make any difference?
    I have noticed when the app runs at 60 fps at 60 Hz - increasing frequency will increase the fps.
    When the fps is slowed down by heavy graphics content, increasing frequency does just nothing.
     

    Attached Files:

    Last edited: Nov 29, 2018
  16. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Well, of course. It just changes the refresh rate of the screen, which is the upper bound of how many frames per second you can get. But if your game is already too slow, this can't magically make your game run faster. That'd be awesome if it could, though!
     
    tomekkie2 likes this.
  17. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    973
    But I can't see any difference above some 50-60 fps or Hz.
    Is the 72 Hz option useful for anyone?
     
  18. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes, it's useful if your game is fast enough to actually keep up that frame rate.

    That can be tough to do with a nontrivial game, though.
     
  19. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Some people can see the difference easily at any time, especially some of the ones prone to VR sickness. You should also be able to see it yourself eg. in bright scenes as flickering.
     
  20. sergiosoba

    sergiosoba

    Joined:
    Apr 28, 2017
    Posts:
    8
    Hi, I'm developing a multiplatform game in Oculus, Android (Smartphone) and WebGL.
    When I build it on Oculus or WebGL, there is no problem. But on Android!!!

    In XR Settings I changed Oculus to None in VirtualReality SDKs. It works faster and all was good.
    The problem is: There is no Icon on my Smartphone!!!
    Do you know what I should do?

    Thanks