Right now, Oceans / Water in Urho are mostly made with a plane. I’m trying to come up with a way to create an infinite ocean within the engine. So far, I have created 9 big planes: 1 at the center, where the player/camera is, and 8 around it. Whenever the player moves towards a certain area of the 9-tile-patch, I move the opposing tiles towards that direction, never deleting any tile, just shifting them and hoping the player does not notice.
Is this a good technique? What would you guys do in this situation?
Sounds good to me as long as the tile area are bigger than player view. I’d do the same
How does this differ from just using a big plane? I am working on a water shader that does not use render to texture.
The best way to avoid the player noticing the shift in the tiles is to actually have more Ocean tiles than what you render. This way you can transition from “not visible” to “visible” and “visible” to “not visible” and then when the ones that are “not visible” are outside the load radius, they’re free to be re-used.
Iam using the GitHub - anthonix/ffts: The Fastest Fourier Transform in the South library for ocean, inspired by GitHub - jiasli/OceanSurface: A real-time ocean surface simulated using Tessendorf's algorithm and OpenGL.. Its tileable an i have 9 tiles loadet at once at the playerposition. I generate a Heightmap (128x128) not a model and sample it in VS (reposit the verts from a plane) / PS (Mixing 2 Textures / Colors with Heightmapinfo).
Fast and very impressive Results (already postet a Video from my Terrain, but you can see the Ocean also)
Found a few Urho-based approaches, but unfortunately none of them are “infinite”. I can still cheat by using the camera tricks though:
Also, for anyone else going down this rabbit hole, I found Unigine’s approach to be very creative:
And this looks surreal: https://liris.cnrs.fr/Documents/Liris-5812.pdf
So much to learn.