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

How to make a seemingly endless ocean with waves and with no seams?

Discussion in 'Scripting' started by ale-carrazzoni, Aug 14, 2016.

  1. ale-carrazzoni

    ale-carrazzoni

    Joined:
    Jan 10, 2016
    Posts:
    8
    I am trying to make an endless game where you fly a ship in an ocean, and since the game is endless, the ocean should appear to be endless. So whenever the player moves, new parts of the oceans are added. However, by doing this I cannot add waves to the water, since this would create seams. How can I make a seemingly endless body of water with waves, without having seams?
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    You are going to have to add in some more detail. How are you creating water and waves?
     
  3. ale-carrazzoni

    ale-carrazzoni

    Joined:
    Jan 10, 2016
    Posts:
    8
    Never mind, I managed to fix this. It was simpler than I thought.
     
  4. jmarcos007

    jmarcos007

    Joined:
    Mar 2, 2017
    Posts:
    11
    I have same problem. How you solve that?
     
  5. jmarcos007

    jmarcos007

    Joined:
    Mar 2, 2017
    Posts:
    11
    Seams appear because the normals of edge vertex of your mesh are a bit different of neighbor mesh part, even the both mesh are under the same waves rules. I can see 3 solutions in this case:
    1 - Overwrite the normals of each edge vertex to be sure that they are equal (I´m talking about two diferent parts).
    2 - Create an overlap between all mesh different parts, and hide (through an alfa mask or an shader editor) the overlapped area. This works because only the edge normal vertex are "wrong". All inner vertex have the correct normal.
    3 - Create runtime a single mesh thats grow up and shrink according your camera position.

    I had the same problem. I got sucess trying the solution number 2. :)
     
    Last edited: May 2, 2020