Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Horizontal lines in scene and game view

Discussion in 'General Graphics' started by paubrohoneyhome, Feb 28, 2024.

  1. paubrohoneyhome

    paubrohoneyhome

    Joined:
    Jan 13, 2024
    Posts:
    3
    Hey, I have an issue with these horizontal lines showing up on objects in my scene. I'm using URP/Lit shader for all of these materials. The lines show up on all objects in my scene with textures using these materials. They show up in the scene editor even when the game is not running, but they also appear in game as well.

    I haven't done made any modifications on the URP asset nor have I done anything exotic on the materials themselves. Most are Metallic and Opaque with just a base map and GI as baked.

    In the picture below, I've zoomed into the object so you can clearly see the lines. But they are visible any time the player is looking at them.

    Screenshot 2024-02-28 152741.png

    Thanks!
     
    Last edited: Feb 28, 2024
  2. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    700
  3. paubrohoneyhome

    paubrohoneyhome

    Joined:
    Jan 13, 2024
    Posts:
    3
    I checked out the only light I have in the scene and actually disabled the game object, but they are still there. I rebaked lighting and they are still there. What's weird about it is that in the scene view, the lines move with the movement of my mouse or scene-view camera. So, if I hold right click and pivot around in the editor's scene view, the lines appear to move up and down on the game object. But they aren't visible in the sky, only on the game object. I've uploaded a video. Hopefully that demonstrates it.

    Recording2024-02-29125305-ezgif.com-gif-maker.gif
     
  4. paubrohoneyhome

    paubrohoneyhome

    Joined:
    Jan 13, 2024
    Posts:
    3
    In case anyone finds this, I discovered that it was the Render Pipeline Asset being used in my Project Settings > Quality. When changing the level to Performant, the lines went away. I haven't nailed down which setting in the pipeline asset was causing it, but now things look much better.
     
  5. Fireking1111

    Fireking1111

    Joined:
    Jul 14, 2022
    Posts:
    1
    In case people are still experiencing this issue, I managed to solve it by, on the URP renderer used (I used balanced), at the bottom of the inspector there is an "Screen space ambient occlusion". In the quality tab, by changing the source from depth to depth normals, the issue was fixed. Hope this helps someone in the future!
     
  6. red1monster_unity

    red1monster_unity

    Joined:
    Dec 29, 2021
    Posts:
    8
    Thank you so much !!!
     
  7. ayoayomide124

    ayoayomide124

    Joined:
    Jul 8, 2020
    Posts:
    3

    Thanks
     
  8. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    2,011
    FYI: the technical name for this artifact is self-occlusion. It's caused because screen-space ambient occlusion uses the depth of each pixel to determine whether it occludes nearby pixels. However in completely flat surfaces this may incorrectly lead to the conclusion that a pixel is occluding another -even if it isn't- just because it is closer to the camera. Adding surface orientation information (changing from "depth" to "depth normals") allows ambient occlusion to correctly determine that all pixels in a flat surface are facing in the same direction and should not occlude each other.

    Hope this sheds some light on the issue :)