Hacker News new | ask | show | jobs
by cheschire 637 days ago
While I appreciate ever more realistic water bodies, the part that game makers really struggle with is where the water encounters an obstacle.

I did not see any mention of this in the description. Conceivably though, this is not a huge conceptual leap right? A game maker would simply need to add logic to impact the frequencies near objects, no?

2 comments

The referenced paper "Simulating Ocean Water" talks about this in section 5. Indeed the FFT approach makes this difficult, where a different approach[1] for waves reflecting off obstacles.

That approach uses convolution, however you can perform convolution using FFTs[2], so perhaps there's some nice way to combine the two approaches.

edit: I just skimmed the papers, and it seems[1] does indeed mention combining the FFT approach with the convolution approach in the section on Ambient Waves.

[1]: https://people.computing.clemson.edu/~jtessen/reports/papers...

[2]: https://phys.uri.edu/nigh/NumRec/bookfpdf/f13-1.pdf

To an extent you can get away with just sampling the output of the water shader to work out the water's effective height at any given point. Big changes in height, or buoyancy for non-static objects, indicate bigger angles hitting the waves and you can fake some splashes with particles while the wave itself just gets occluded. Apply forces at just three or four points and you can make a boat rock pretty believably on top of this kind of water.