Search Unity

Mesh edges flickering in VR Only.

Discussion in 'AR/VR (XR) Discussion' started by seanybaby2, Sep 28, 2017.

  1. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Hello,

    I'm working on a project and all of my mesh edges are flickering when looked at a distance in VR only. I'm not sure what the issue is and have experimented with nearly every graphical setting I can think of. This issue is pretty major and is making my project look very amateurish. I was wondering if anyone knew of a solution to this problem.

    Here is a GIF of what the issue looks like.
    https://imgur.com/a/PYium

    Here's a video from someone who had a very similar looking issue.


    T
    he settings I currently have.
    Forward Rendering
    Single Pass Stereo Rendering
    MSAA
    4X Anti Aliasing.
    .3 Near Clip Plane

    Unity Version 2017.1
     
    Last edited: Sep 28, 2017
  2. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
  3. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    RE Foliage in your gifs:

    Well I presume for your texture: you've got mipmaps enabled and at least bicubic filtering.

    It may be a cutout shader with too high a threshold.
    You may be able to reduce the effect by changing the threshold of the cutout shader.
    If your foliage texture is bad then you won't be able to fix it in engine:
    A good cutout texture will have its alpha ramp from opaque to transparent over several pixels around the entire shape, in a uniform manner around the entire shape, this can be done in photoshop, you can make a white copy of the hard outline shape, then apply inner black glow, then use that to derive alpha mask.

    The youtube video is a different cause, geometry based: it needs more MSAA or supersampling to reduce effect, or to remove effect: the windows and frames should not be in mesh geometry, but rather baked as bump/normal maps into the texture.
     
    Last edited: Oct 7, 2017
    seanybaby2 likes this.
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
  5. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Awesome link! I'll give these things a try. Thanks for the tips.
     
  6. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    238
    Did it help?
     
  7. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    No, the problem I'm having I think is different from what is in the gif. It's sort of a universal blurring effect that hits edges of every piece of mesh / foliage in the game. Initially I thought it a was post processing effect or Anti Aliasing but messing with those things don't seem to fix it.
     
  8. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    Hi,
    I am having similar issue with Windows MixedReality.
    It is very annoying flickering effect, but i have not got any solution after posting it in pretty much every forum.
    If you visit the link i have a video that demonstrates the problem with a simple app; cube and a plane; (no textures, no complex stuff).
    It seems it is a limitation of the current technology (I hope i am wrong).
    All what i can do now is keep digging and i ll share any findings.

    Thanks
     
    Last edited: Nov 27, 2017
  9. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Hey raedbenz issue looks very similar to mine. I'll give you an update if I'm able to fix it. I think it's something Unity / VR / AR related but I'm unsure. I put the issue on hold for now but I will return to it in the future.
     
    raedbenz likes this.
  10. nat42

    nat42

    Joined:
    Jun 10, 2017
    Posts:
    353
    All I see in these is aliasing. When you have detail that is smaller than 2 pixels samples wide/high such as the thin recessed windows in the building from the OP video, you are going to get aliasing.
     
  11. raedbenz

    raedbenz

    Joined:
    Oct 8, 2017
    Posts:
    13
    As BGolus suggested in some other thread, try to set MSAA to atleast 4x , and use a script to set (SSAA) renderScale to 1.4-2.0, as long as you are happy with the performance.

    XRSettings.eyeTextureResolutionScale = 2.0f; //replaces the deprecated VRSettings.renderScale

    more steps here: http://abusanad.net/2017/12/03/atta...ed-edges-of-windows-mixed-reality-in-unity3d/
     
    Last edited: Dec 3, 2017
    JohnGerard likes this.
  12. rahul20dec

    rahul20dec

    Joined:
    Jul 8, 2018
    Posts:
    9
  13. rahul20dec

    rahul20dec

    Joined:
    Jul 8, 2018
    Posts:
    9
  14. JohnGerard

    JohnGerard

    Joined:
    Jan 15, 2016
    Posts:
    4
    appreciate this is an old thread, but this XR setting has been a life saver, thank you so much
     
  15. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Also, if someone is like me and tried everything but nothing worked. This might be obvious for some but my render resolution was turned way done. To like .6. If your render resolution is below 1.0 aliasing becomes incredibly noticeable. More so the further your resolution goes down.
     
    DreamersHQ and AhmadKarim like this.
  16. AhmadKarim

    AhmadKarim

    Joined:
    Aug 17, 2022
    Posts:
    12
    I changed render scale from 1 to 2 and it is better now.