Search Unity

Question Z-Fighting on Distant Objects

Discussion in 'VR' started by mlaubenheimer, Aug 2, 2022.

  1. mlaubenheimer

    mlaubenheimer

    Joined:
    Jun 25, 2022
    Posts:
    6
    In my project I have buildings that are very big (made in blender at 60x60x60 dimensions) and then i have a quad with a material on it which is an image. I have positioned the quad slightly in front of the wall so as to avoid z-fighting. but my issue (seems to be) is that because the buildings and the quad are so big that when they are viewed from a normal viewing position there is z-fighting because the objects are considered too far off in the distance and the Oculus Quest 2 can't resolve them. I have been trying to create a subshader with an offset parameter but it doesn't seem to work. i have also been trying to play with the render queue but no luck. it's all rather silly because the scene is very simple. in the video you can see the z-fighting represented by the white diagonal line.

    any thoughts? is it even z-fighting or maybe something else? when i get closer to the quad (image) the z-fighting goes away completely.

    [video deleted]
     
    Last edited: Aug 4, 2022
  2. mlaubenheimer

    mlaubenheimer

    Joined:
    Jun 25, 2022
    Posts:
    6
    ok. if i delete my blender object (walled structure) and use a unity 3d object (cube) to make the wall, the issue goes away. so somehow unity doesn't like my mesh that i made in blender. but i can't figure out why.....
     
  3. TomGoethals

    TomGoethals

    Joined:
    Jan 29, 2022
    Posts:
    48
    Check your near and far planes on the camera, get them closer towards each other, don't use really small near planes if you don't have to.
     
  4. mlaubenheimer

    mlaubenheimer

    Joined:
    Jun 25, 2022
    Posts:
    6
    it turns out i just had a mesh with bad topology. case closed.
     
    TomGoethals and DevDunk like this.