Custom ocean with PBR textures, inspired by Tyridge77's Ocean


This is an old version of the ocean! I posted how it looks now here: In-Game Realistic Ocean Thunderstorm - #4 by Quantum_Rio
Please check that thread out instead!

Old thread

Hey, so I saw the custom ocean that Tyridge77 made for their new game, and decided to try making my own version!
This took me a day with no help (except for finding textures for the water), and most of the time was spent tweaking some settings to make it look as good as possible. I’m not finished yet as I’d like to add more settings for the waves for customization and also make it infinite, but so far all of this fits in 100 lines! Really proud of how this turned out :smile:

(As you can see in the bottom-left corner, I made a small UI to be able to mess around with the settings)


Nice and smooth owo, Only thing id suggest is having the texture actually move. When it stands in place like that it just looks like a piece of cloth lol.


Yeah, I’ve no idea how to make the actual texture move. I don’t think you can do that with SurfaceApperance objects, but IIRC doesn’t Texture have some offset value? Could potentially mess around with that.


Updated the thread with a new video - after working on it for 7 hours, the ocean now looks much better. I now used summed Gerstner waves rather than just 1, leading to a much better scenery :slight_smile:

1 Like

After optimizing a bit, I managed to scrape the update times down to 1 millisecond. I approached this by simply only calculating height, rather than all the X,Y,Z axes. This proved to be much more efficient. I believe that if I continue optimizing this a bit further, I could get it down even more. Otherwise though, the code is really small now!
The important piece of code is literally just this:

Update times for 1k bones every renderstep, as you can see it’s ~1ms.

1 Like

How does that even work? That isn’t lua code is it?

Hey! I posted a much better version of the ocean here: In-Game Realistic Ocean Thunderstorm - #4 by Quantum_Rio
I can address your question if you could kindly re-post it on that thread. I’ll prob edit this thread to link the newer one :tongue:

This is amazing! I love the smoothness of the water and the wave sizes! Incredible job!

Thank you! I’ve been cutting down time and optimizing it as much as possible, and I now able to update a mesh with 4000 bones in just 2ms! Progress is going well :stuck_out_tongue:


I have a question regarding the mesh itself how does the weight paint and bones look to get the mesh to bend?

Where did you find a texture for the water if you don’t mind me asking?

How did you do make this? Blender maybe?