- Home /
How to make an ocean by modifying a mesh
I want to make an ocean by modifying a mesh, and I have looked for several days now on google. So far I haven't found what I'm looking for. Just about everything I have found either gives nothing or gives some script that does the same wave over and over again on a small plane. I wan't to be able to have the ocean bob up and down in random patterns like the actual ocean does, and have waves pop up every once and a while near the shore. I know it is possible, I have seen it in MANY games, but how do I do it?
Answer by KataSeiko · Feb 22, 2017 at 11:52 AM
It is usually perlin noise applied to the points of a mesh surface. The functions for this are available in Unity, and there are a few tutorials on creating terrain using perlin noise on Youtube. My suggestion is that you follow them and work the rest out for your ocean.
As @Tourist said, there are very few examples for this because oceans are HARD and companies consider them IP.
Answer by tanoshimi · Feb 22, 2017 at 01:19 PM
Well, Gerstner wave displacement is pretty easy and that's included in Unity's standard assets, so have you started with that?
Well... why not? It's kind of hard to know what you want without more information.
+1. For a simple ocean, the water effects included with Unity are quite good, with control over how fast waves are and how they look etc.
Answer by Tourist · Feb 22, 2017 at 10:00 AM
No offense, but you'll have to do it yourself. Many games have intellectual property on their script and won't share them, that's why you may not find anything.
Proceed by thinking about what should be done and iterate over it. It will be long, maybe painful but at the end you will say : "I made this".
I DID IT! I used perlin noise tomodify the mesh and then added my own way to bob the ocean up and down! Now to add my own little details.