Search Unity

Trees flickering like mad in VR

Discussion in 'AR/VR (XR) Discussion' started by nsmith1024, Feb 10, 2019.

Thread Status:
Not open for further replies.
  1. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Hello,

    Sorry if i ask silly question, im fairly new to VR, so i made a nice scene sort of like a forest with a bunch of trees. When i play it in regular (non VR) is looks really nice, when i build it for VR it looks really bad, the trees flickering like crazy, especially the leaves when you look up at it with the sky behind it.

    I have HTC VIVE.

    Anyone know anything about this or how to solve it?

    Thanks!
     
  2. EoinOF

    EoinOF

    Joined:
    Nov 11, 2017
    Posts:
    6
    Add anti-aliasing to your scene through post-processing effects on your camera. Go with MSAA for grass and tree heavy scenes. Then go into your steam VR settings and turn your super sampling up to what is recommended or no higher than 200%. Are you using a rendering pipeline like LWRP?
     
  3. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Thanks for the help, i will try all of that. No i was not using any pipelline.
     
  4. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Did you ever resolve your issue? If so care to share what you did? I am having the same exact problem.
     
  5. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    No it was never resolved, i stopped doing VR
     
  6. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Did you ever resolve your issue? If so care to share what you did? I am having the same exact problem.
    Ah that sucks. I mean I know exactly how to fix it at an unrealistic, hefty graphic/manpower cost. When I don't have sharp edges (as in real life every edge has a width), on meshes I don't get this problem. I have few models with tapered smooth edges and they do not have this problem. I really hope there would be a solution to this. Everything I have tried either they don't do a good job or the ones that work kills the quality of graphic by completely removing sharpens.
     
  7. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Yes, high amount of post processing to reduce the flickering reduces the overall look, and its compute intensive, and on top of that that want 90fps, it was all too much work for one person.
     
  8. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Yep I know what you mean. Seriously it's depressing to see I am getting 144+ fps(usually way more) with ultra settings on a non VR build and then see it just takes a dive when I turn on VR. :( Well good luck to you on whatever you're working on. Don't give up on VR though. There's a solution to everything.
     
  9. RetroFlight

    RetroFlight

    Joined:
    Nov 16, 2019
    Posts:
    41
    What I did to help with flicker is mute the textures so they are more one common color..
    Also I took away a lot of the transparent holes between branches so the tree is one solid piece except for the outline. This reduced the jaggies a lot. Im still fighting it though.

    VEry frustrating.
     
    FlightOfOne likes this.
  10. HugoZink

    HugoZink

    Joined:
    Mar 4, 2018
    Posts:
    13
    Check your LOD levels, it seems that there might be a quirk in VR and LOD's causing it to take lower LOD levels than it should.
     
  11. RetroFlight

    RetroFlight

    Joined:
    Nov 16, 2019
    Posts:
    41
    Im not the OP but for mine I imported models into unity to use as trees. They only accept one LOD level and generate a billboard for the second. If you hace 2 LOD levels it wont create billboards (as far as I can tell).
     
  12. DirtyFred

    DirtyFred

    Joined:
    May 17, 2014
    Posts:
    29
    HI,

    I am having the same problem on the Quest 2. Did anyone find a solution for this?
     
  13. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    There is no quick/real easy way to do this with the current technology (maybe in a few years) but here are few things that has helped me.

    Use proper vegetation for VR. This is the most important one. E.g having too many small leaves is not a good idea. Especially if your platform is mobile (unless you use it with PC GPU) platform like Quest. Lower fps makes this worse.

    Use LODs and replace further trees with bigger leaves or use imposters (though this may have transparent overdraw issues so be careful). Lower the LOD aggressively.

    Use
    fog (this helps a lot with distant objects). Fog along with LODs can greatly help with distant objects

    Use a better shader
    (I use Boxophobic's "The Vegetation Engine") that has fade option and color adjustments (e.g. to match with fog)

    Use TAA (as far as I know, only HDRP has this, I have tried some assets but nothing come close to HDRP's built in TAA) this helps a lot.

    Use proper lighting
    (bake when you can and minimize the use of point lights), make and try to maintain a higher FPS. As I said earlier, lower the fps, worse this can get. Probably has to do with lighting

    There is one sure fire way to fix this though, that is never to use sharp edges (use beveled edges). In other words try to maintain an angle higher than 120 degrees between two joining faces. I do this to my own models now but It is little hard to do with vegetation and it increases the poly count.

    Hope these helps!
     
  14. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Highly suspect most people are having wildly different artefacts and offering completely random advice. When dealing with artefacts, make videos and write precisely what you're seeing.

    I saw someone describe an eye culling issue, and someone else claim that they needed to use MSAA and super sampling to solve it. That's just... I don't even.

    So, if anyone's serious about visual artefacts on a forum, explain it visually with a video. Preferably in a new thread per person.
     
    Dark-Table likes this.
Thread Status:
Not open for further replies.