So I wrote this script that generates an ocean made of triangles. The script relocates the ocean every frame around the midpoint of your character. This is much better than making and destroying triangles every frame in terms of performance.
The video also shows geometry issues, but that is none of my concern at the moment. I really hate the illusion that emerges in the video. The problem is that the ship is actually moving through the water with quite a bit of speed. This is not visible in the video because the water is relocated to the X and Z coordinates of the character every frame. In other words, there is no reference point. You cannot tell if the ship is actually moving or not. I tried to highlight this illusion by suddenly jumping off my raft.
So the only potential solution that I have tried so far is giving every position a unique color. This color is determined from the X and Z position of the triangle. The idea is that you can see the differences in colors as reference points and thus beat the solution. Unfortunately, this is not effective enough.
no matter what, the ocean is basically following the player.
To fix this, you might need to start thinking about mesh-oceans. take a look at this post:
except this is a hassle to just come up with.
tbh, I really do not know. You can try doing this:
1. Relocate the ocean around the ship 2. Use a chunk system to generate and remove triangles if you get far enough from your ship. 3. Once back near your ship, remove all of the chunked triangles.
again, not sure this would work. Good luck on your quest! (I love sea based games… cough Sea of Thieves cough)
Thank you for your reply! A friend of mine mentioned skinned meshes before and I did not think that they would suit for a sea. I will look into them. Also, that is quite an amazing article.
I fixed the geometry using Delaunay Triangulation. Removing the outlines by setting the material to Enum.Material.Glass seemed to help. The illusion is pretty much gone as you can see in the video.