Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question artifacts on the surface of the terrane

Discussion in 'Universal Render Pipeline' started by Zimaell, Aug 6, 2023.

  1. Zimaell

    Zimaell

    Joined:
    May 7, 2020
    Posts:
    337
    for the test, I created a terrain and set the height of a certain surface, I noticed that on the surface there are shadows that should not be there, in the screenshots I show how it looks.

    standard urp project, standard terrain, standard light...
     

    Attached Files:

  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,844
    hmmm. it all looks fine and as expected!?
    could you mark what you think is a false shadow?
     
    Zimaell likes this.
  3. Zimaell

    Zimaell

    Joined:
    May 7, 2020
    Posts:
    337
    look at the surface of the top and the right side, the surface itself is absolutely flat and then there is a sharp drop in height, so the surface should be white, and there is something like a shadow on it, and I want to note that if the shadow is completely removed, then these artifacts are still there. ..
     

    Attached Files:

  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,844
    the sharp drop does nor result in a fully upright edge. in fact the profile looks like in my overpaint: even the sharpest drop will result in a slope when it comes to a heightmap based terrain.
    so the darkening you see is caused by a) n dot l lighting (correct) and shadows (also correct).
    surface.PNG
     
    Zimaell likes this.
  5. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    1,834
    A terrain is rendered as a grid of small quads (two triangles each). The texture mapped on them will always look sharp and jagged if you have significant jumps in the Y value for those intersecting quads. However, the lighting system for terrain will try to "smooth" the change in normals, so you don't get color banding on subtle or minimal changes in slope. This ends up making the last vertex before a large plunge have a strongly deflected normal, causing highlights and darkening at those edges.