Search Unity

Flickering jagged edges for objects in Immersive Mixed Reality

Discussion in 'VR' started by raedbenz, Nov 11, 2017.

  1. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    Hello,

    I have built an app for Immersive headsets using windows Mixed reality technology. I run the app on Lenovo Explorer IHMD. Laptop is Dell Inpiron with GTX1050Ti.

    The issue is that on every object in the scene we get the effect of flicker and jagged edges. I am running with opaque display settings Ultra/Fantastic.
    This has been tested with Unity 2017.2.0f3 MRTP & MRTP4 with latest code (commit 842c4a1) from Mixed Reality Toolkit-Unity.
    I am applying project and scene settings from MRT menu.

    I am getting this issue with my app and also the mixed reality toolkit example scenes.
    I tried to change the near clipping value from 0.1 to 0.3 but no luck.
    Also tried diffent sets for anti aliasing under Quality settings in unity but it keeps defaulting at play mode to 2X Multisample and still no luck.

    The villa in the mixed reality portal runs fine.

    Please find attached some screenshots and a sample app where the problem is reporducible.

    Can anyone one point me to a sample code that you know it works fine, so I can test it, maybe is something with my dev environment.

    I originally raised the issue in github MRTK (1327) by they advised me to post the issue here as well.

    Please advise.

    Download screenshots, videos and sample app. To run the app add MRTK code.

    Many Thanks
    nc0.1-portal-NoAA.png nc0.1-unity-NoAA.png nc0.1-portal-AA4x.png nc0.3-unity-NoAA.png NearClippin0.3-portal-NoAntiAliasing.png
     
    Last edited: Nov 11, 2017
  2. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    Any luck?
    Does any one else having same issue?
    Or is this an acceptable level of quality for such technology?
    Thanks
     
  3. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Is it possibly something to do with the HoloTool Kit? It look like there are some scripts controlling the camera.
     
    raedbenz likes this.
  4. StephenHodgson-Valorem

    StephenHodgson-Valorem

    Joined:
    Mar 8, 2017
    Posts:
    148
    No, it's not a toolkit issue, we're not doing anything special with the camera.
     
    raedbenz likes this.
  5. sergiocap

    sergiocap

    Joined:
    Jul 25, 2017
    Posts:
    1
    Hi, I can see the edges flickering even if I just put a simple quad.
    If you put the device and look at the edges of the quad, the edges flicker once you move your head.
     
    raedbenz likes this.
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    What resolution are you rendering at? That's looks like just aliasing.
     
  7. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    Below are the unity quality settings when hitting play on unity whilst the device is connected. In the MR portal on the device the resolution under settings is 2100x2100.
    IMG-20171115-WA0006.jpg
     
  8. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    Does anything don't look right from the quality settings?
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    It looks good. Can we have a bug report on this? I can't explain what you're seeing from what you showed me.
     
  10. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    I raised a bug here.
    Quick note: I raised it from a different machine so the computer specs are not the one I am experiencing the problem. I am running on Inspiron 15 7577, GTX1050Ti.
    I don't know if you can amend bugs details. Thanks
     
  11. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    in the very first post there is a video...try observer the plane top right corner as shown below, it shows the flicker:
    snapshot.PNG
     
  12. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    I tried a different app developed using unity and mrtk, on two different laptop brands and different VR device brands and the flicker is still there. However, I tried the Halo Recruit and it looks good. It also seems the effect is much less in dark objects. white object suffer terribly.
     
    Last edited: Nov 19, 2017
  13. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    There's not really any kind of bug or unexpected behavior here. You're seeing aliasing.

    2x MSAA simply isn't enough to remove most aliasing, especially for stereo rendering. I consider 4x MSAA to be a bare minimum for VR / XR.

    Dark vs Light objects may be in part an issue caused by using linear color space, which the hardware MSAA resolve unfortunately does not handle properly. Unity does not yet have support for custom resolves which could properly handle linear color space, plus custom resolves can be quite slow.
     
  14. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    SOLUTION

    For Windows Mixed Reality with MRTK:
    1. Apply Project and Scene Settings
    2. Select "MixedRealityCamera" withing "MixedRealityCameraParent" object and under Camera in the inspector tick "Allow MSAA"
    3. Go to Unity QualitySettings and set Multi Aliasing 2x, 4x , 8x (start with 4x)
    4. Apply SSAA; add an empty object to the scene and attach to it a this script
    Code (CSharp):
    1. public class MySettings : MonoBehaviour
    2. {
    3.     void Start()
    4.     {
    5.         XRSettings.eyeTextureResolutionScale = 2.0f; // tune this value between 1.4-2.0
    6.     }
    7. }
    Due to classic tradeoff of quality vs performance, keep tuning the above values until you find the sweet point.
    The above solution, excluding step 2, still applies to HTC Vive using Unity VR.

    LINK to BLOG
     
    Last edited: Dec 3, 2017
  15. jessechunn

    jessechunn

    Joined:
    Jun 10, 2015
    Posts:
    18
    Thanks very much for posting your solution. Didn't really solve it for me, but I appreciate you posting what solved it for you. I am using some old Unity demo prefabs from way back that I don't think work well with the new Unity tech.
     
  16. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    On my WMR headset AA doesn't work in any app or game. WMR seems to be overriding it, or something is messed up for me between SteamVR to WMR transition (I work in SteamVR mode)
     
  17. markjanzen88

    markjanzen88

    Joined:
    May 31, 2017
    Posts:
    68
    ive noticed on my projects the aliasing is worse on laptops compared to desktops due to the weaker gpu even if its the same model. if you were using steam vr, i would try increasing the super sampling. honestly, after seeing your video this look pretty normal to me and is just a technical limitation with the current hardware/tech imo...