Search Unity

HTC Vive , Flickering Edges, Anti-Aliasing , Large 3D Scene, Unstable graphics

Discussion in 'AR/VR (XR) Discussion' started by aj1729, Feb 17, 2017.

  1. aj1729

    aj1729

    Joined:
    Sep 23, 2016
    Posts:
    8
    Hi ,
    Can anybody be able to help with the following issue ?
    I have a large 3D scene of a playground.(See Pic as an attachment). I am using Unity3D 5.5.0f3 64Bit Pro.
    Graphics is GTX 1080 with i7-6700.
    Steam VR and Unity is up to date.
    I am struggling to remove edges flickering in the scene. None of the anti aliasing scripts on asset store are helpful.
    I have spent so much time on it and really hope there is a bool somewhere which will change the ugly looking graphics into a fine one.
    Please Help!
    Cheers,
    Aj
     

    Attached Files:

  2. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Are you using forward rendering with MSAA? also the pic makes me wonder what is your render scale or super sampling settings in Steam
     
    tango209 likes this.
  3. aj1729

    aj1729

    Joined:
    Sep 23, 2016
    Posts:
    8
    I tried both forward rendering and deferred rendering, I could not get satisfying results. I am testing the scene in Unity itself. I have not compiled a build . Also I have not altered any parameters in steam let alone sampling !
    I also tried attaching sampling algorithm to camera in Unity. No Change.
    What do you mean by render scale ?
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,350
    Set your project (& cameras) to use forward rendering. Disable HDR rendering on the camera. Set Antialiasing to at least 4x under quality settings.
    https://docs.unity3d.com/Manual/class-QualitySettings.html

    Obvious aliasing in VR is mostly from temporal aliasing, like when whole pixels flicker on and off between frames. Most post process AA techniques, like those you can enable by adding a script to the camera, don't handle this very well, and are mainly just for spatial aliasing, sometimes called "jaggies". Temporal anti-aliasing is supposed to be able to help with both, and it can be quite good at it most of the time, but it's not as consistent as MSAA for geometry edges.

    MSAA is pretty much the defacto AA technique for VR, but it's difficult / slow to use with deferred and Unity does not support using them together. Even Unreal Engine 4 which spent a lot of time pushing deferred and temporal anti-aliasing for VR has had to admit that their new forward rendering path with MSAA produces better results for cheaper.

    Disabling HDR to use MSAA is due to a long standing limitation of Unity's in that they disable MSAA when HDR is enabled. They've finally resolved this in 5.6, but for now you'll need to disable it.

    Render scale is a setting you can change from script to enable super sampling. If you need to use the deferred rendering path or HDR (before 5.6), super sampling and Temporal anti-aliasing (TAA) are your only options, and TAA is currently broken in Unity when using single pass stereo VR, so for now it's really just super sampling as your only option.
    https://docs.unity3d.com/ScriptReference/VR.VRSettings-renderScale.html
     
  5. aj1729

    aj1729

    Joined:
    Sep 23, 2016
    Posts:
    8
    Hi ,
    I tried both settings you suggested
    1. MSAA ..i got the script from THE LAB RENDERER.....didnt work
    2. Forward rendering ...It made shadows stronger and increased black areas in the scene.
    I attached super sampling script to the camera and camera went black completely.
    I tried using TAA ..but doesnt seem to have an effect on the scene.
    Also How do I change Renderscale and to what ?
    I am attaching a screen shot , kindly check.
    with Forward and TAA.PNG
    Cheers,
    Ajit
     
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,350
    The Lab Renderer isn't something you can really pick and choose parts of. You're either using the Lab Renderer and all of it's parts or you're not. And again, enabling MSAA doesn't need a script, just turn it on explicitly in the Quality settings.

    Deferred and forward don't match features perfectly, there are several effects that can only be done properly when deferred is used, but it is the only way to enable MSAA.

    What script, from where? Whatever you used probably doesn't work with VR, and you really just need to change the render scale which is Unity's built in super sampling setting for VR. The default of 1.0 renders the image at the default resolution, 2.0 renders at 2x those dimensions (which is 4x the number of pixels). See here for an implementation example:
    https://unity3d.com/learn/tutorials/topics/virtual-reality/getting-started-vr-development

    Like I said, it's broken with VR right now, i.e.: it does nothing if you have VR enabled.
     
    aj1729 likes this.
  7. aj1729

    aj1729

    Joined:
    Sep 23, 2016
    Posts:
    8
    Hi,
    Really appreciate your inputs for the question.
    I have managed to get the desired output by manipulating render scale.
    Thanks .
    Cheers,
    Ajit