Grid projection for water [Contribution]

Hi. I would like to share the projected grid work that I integrated from here. You can use it if you need ocean/sea in your project. The information is available in the readme file.

Click here to download

Have fun!

Note: This is not a complete water shader. I’m just sharing the Grid Projection part.


7 Likes

Thanks! Great work!

1 Like

This is very impressive.
I remember messing with the Brunetons stuff 7-10 years ago implementing this in a custom ogl/c++ personal project being real proud of the achievement with a nvidia gtx260m card. When I went to share with my community friends, the intel_HD guys were quick to complain of glitches with the projection so I dropped it in disappointment. In retrospec, giving up was a mistake and should have stuck with it because it looked great on my end.

I bring this up because something similar with this sample occurs on the underneath side at close to glancing angles. Today I’m on a nvidia gtx1650 but unsure if Flax choses that or the amd radeon behind the scenes. I’d have to dig into which is being considered default on this laptop with the configured performance settings.

Love this sample though and the LiteWater also I consider to be great examples.
This one, I could spend weeks trying to figure out that material and the two accompanying source files.
Thank you so very much. Very generous.

1 Like

I’m glad you like it! I’m pretty much a novice. So maybe the problem you mentioned is caused by me. For example, I had to do a lot of research to be able to mulitply vectors by the Matrix. Or it took me quite a while to realize that there was a problem with converting vertexes to world space. In short, maybe I missed something and that could be the source of the problem. I would like you to consider this as well.

1 Like

We have ships to test this out. The only thing I can see is that we will need a reliable method to detect the height of the waves. Both player (client) and NPC will both need the information for the ships to ‘float’. The floatation is a non-physics based motion (using derivative math) for excellent performance. Also need this information for the swimming.

Some thought while you still develop on this excellent water.

  • ray cast (down preferred) to get normal height. The math can grab the information every 50ms.
  • ability to change the normal direction via wind direction. 0.00 to 1.00 but 0.00 to 360.00 is easily scaled to.

Again. Great work on this. I would be happy to add to your system if you should want to.
Cheers
O

1 Like