Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Seamless Terrain Edge Normals

Discussion in 'World Building' started by Dr4xt3r, Feb 26, 2021.

  1. Dr4xt3r

    Dr4xt3r

    Joined:
    Oct 20, 2018
    Posts:
    2
    Hi guys,

    I'm building a procedurally generated Terrain with multiple Terrain instances present where only the one in the center will be the map to play on - that means i want to decrease the heightmap resolution the farther away the additional terrains are from the center one for performance - especially since intensive erosion processes will be following.

    I encountered the problem that seems to be quite common when it comes to seamlessly trying to blend multiple terrains together. The normal map on the edges of the terrains does not blend nicely (image attached)

    I would normally just check "Auto Connect" in the inspector to fix the problem and it also works when the terrain instances have the same heightmap resolution - the problem is Unity crashes when i try to to that on terrains that have different heightmap resolutions (probably also a bug to report).

    Trying to fix it manually with
    Code (CSharp):
    1. terrain.SetNeighbors()
    and flushing it afterwards does nothing for me. Even with matching resolutions.

    Another option that I could try would be manually recalculating the mesh normals without taking neighbors into account, I just do not know how i would access all the meshes that are present in the terrain.

    So after a few hours trying to find a solution with first checking lighting, texture wrap mode, etc. I now finally came down to write a Post and ask for suggestions :)

    Thanks in advance!
     

    Attached Files:

  2. Dr4xt3r

    Dr4xt3r

    Joined:
    Oct 20, 2018
    Posts:
    2
    Does anyone maybe have experience on how to directly edit the mesh normals for the terrain or is that designed to not be accessible?
     
unityunity