Physical Ocean Surface - Developing a Realistic Water Shader

I’ve finished the conversion to 4.8 and have been working on optimizing performance the last few days. It was possible to simplify some equations and what you can see in this video runs now at 85-90 fps @ 1920x1080 with epic quality settings in standalone mode on my AMD Radeon HD 6870.

Looks really good!!

Completely amazing! I cannot wait to break it down and learn from this, Thank you!

That looks awesome! What do you think was the most difficult part of creating this?

Beautiful work !

I can tell you that I would be very interested in seeing this released :slight_smile:

Looking good :slight_smile:

Very nice work ! Looks very smooth so far.

Thanks for your comment. In the last few weeks, I have received quite a few messages from people who like this shader and want it to be released soon. I have also received some constructive criticism that I want to consider. Sadly, I can’t create real breaking waves with this approach, but it could be possible to manually tune the sharpness of wave crests, and to add dynamic foam.
The shader is now running smoothly in 4.8 and is faster than ever before. I have slightly improved the look of the surface to make it look more liquid and less foil-like. However, since many people seem to like the general look I won’t change it too much for the release.
I have decided which features I want to implement before the marketplace submission, and have updated the to do list in my first post accordingly.
I’m also planning a new video featuring a boat and different ocean states.

Interesting, if i could give one constructive criticism would be that water is too noisy on textures. Too much foam in it. If you decrease white values down in opacity should look better.

When you do release this, can I use it in my game that I will sell when finished?

This is just what I am looking for, mine looks like **** lol this thing isn’t letting me upload the image :S it says it failed so here it is on my website
https://gigasoft.ca/?attachment_id=861

I will submit it soon to the Marketplace. Of course you can use it in games that you sell!

Since my last update I have been tweaking different aspects of the water shader. Here is a new video showing my latest progress:

I have slighly adjusted the look of the surface to make it appear more liquid. Also, the number of Gerstner waves that are summed up was increased. The water plane is now moved and scaled with the camera to create the illusion of an infinite ocean. The buoyancy is implemented in a buoyancy component that makes the objects float automatically without any manual setup. The floating boxes in the video are rotated according to the local normal vector of the water surface. This only looks good for very small objects. I will also implement a buoyancy system for larger objects with automatic generation of test points.
I still have a small list of things that I want to implement before I submit the shader to the Marketplace, but I’m getting close!

after messing with waveworks for the last few days to at best menial results, this looks like heaven. i want it.

Can’t wait to grab this up! Great work

wow, this looks really cool !
is it possible to add a little transparency and refelection to it. i cant see either of it with the swimmimg objects.

and how will it behave if it gets to a shoreline ?

keep up the great work !!

The look and most importantly the “feel” of the wave motion is superb having spent most of my life on heaving sailing boats I can be sure if this.

However an ocean without convincing shoreline interaction (even if it’s cheated) its just not useful to me which is a shame as I’d happily pay good money for a plug n play ocean.

Regards

Slinky

Looks amazing!

If it would have shoreline interaction it would be an instant buy for me, no matter the price, hope you can get it working somehow in the future :slight_smile:

Yes, reflections would be nice, I’ll see what I can do. I’ve stayed away from transparency so far because of some horror stories I’ve read of other people who have tried it with their water shader. Maybe in the future I will add it as a feature.

The water motion looks so realistic because the parameters for the Gerstner waves are derived from physically correct wave spectra. I’ve developed this approach after seeing many water materials where the waves don’t move like real water would. I’m quite happy now that in my water shader, the waves really look like they have mass to them.

Shorelines: There is actually a modification I could include in the equations to allow custom water depth. I will check if I can easily add this now, alternatively I will add it later as a feature.

Amazing !
congratulation !!!

have you got an approximative release date ?

I’ll volunteer to test. Out of the goodness of my heart.