TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

FFT-based ocean-wave rendering, implemented in Godot

836 pointsby RafelMri8 months ago

37 comments

kamranjon8 months ago
The other two Godot repos by this person are very interesting as well. I love the level of detail they add to explaining their repos. This one is particularly interesting: <a href="https:&#x2F;&#x2F;github.com&#x2F;2Retr0&#x2F;GodotGaussianSplatting">https:&#x2F;&#x2F;github.com&#x2F;2Retr0&#x2F;GodotGaussianSplatting</a><p>Wonder if they are a student, they seem to cite other work frequently and have a strong grasp on recently published materials.
评论 #41679843 未加载
jesperwe8 months ago
20 years ago I could spend months tweaking ocean surface in renders and not get even close to that. Amazing how good this is!!<p>Although the demo clip feels a bit exaggerated (saying this having over 50k Nm open water ocean sailing in my logbook). Waves that sharp and high would need the wind blowing a lot stronger. But I am sure that is just a parameter adjustment away!<p>Since it is in Godot I assume the rendering is real time? Does it need a monster GPU?
评论 #41680229 未加载
评论 #41680563 未加载
评论 #41679922 未加载
评论 #41679686 未加载
评论 #41680092 未加载
评论 #41679335 未加载
评论 #41681787 未加载
fcatalan8 months ago
Things like this brought me into computers, but along the way I fell for the easy and boring life of glueing libraries, endpoints and corporate bullshit that leads to burnout. Perhaps some day...
评论 #41680909 未加载
评论 #41684121 未加载
评论 #41679728 未加载
viraptor8 months ago
Different approaches, but if someone&#x27;s interested in waves&#x2F;ocean simulation, Acerola published some awesome (as always) videos on this topic. <a href="https:&#x2F;&#x2F;youtu.be&#x2F;PH9q0HNBjT4" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;PH9q0HNBjT4</a> and <a href="https:&#x2F;&#x2F;youtu.be&#x2F;yPfagLeUa7k" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;yPfagLeUa7k</a> (edit: just realised one is linked in the references, just under the real name rather than nick)
btbuildem8 months ago
It&#x27;s interesting how hard this problem is. We&#x27;ve been trying for decades, and we&#x27;re still in the uncanny valley with it.<p>If you freeze-frame this, the peaking waves look like snow-capped mountains. It feels unrealistic because for water to have features this sharp, it would have to be quite windy -- and the wind would never be blowing straight up. Here, the sharp features would need to be directional.<p>The simulation has the swell nature of the waves down pretty well though. There isn&#x27;t as much horizontal movement, as more up-and-down, which is what you&#x27;d expect to see in open water.
评论 #41681034 未加载
tomcam8 months ago
I spent years living on the beach. When you live on the beach, you watch the ocean for hours at a time because it’s mesmerizing and feels sensational. I wouldn’t guess for a second this was a render.
评论 #41682198 未加载
评论 #41679332 未加载
评论 #41683141 未加载
tsurba8 months ago
Shadertoy also has nice ones <a href="https:&#x2F;&#x2F;www.shadertoy.com&#x2F;view&#x2F;Ms2SD1" rel="nofollow">https:&#x2F;&#x2F;www.shadertoy.com&#x2F;view&#x2F;Ms2SD1</a>
convivialdingo8 months ago
Fourier was measuring tidal waves when he came up with wave frequency transforms - so in a way this is almost a full circle.<p>Very impressed!
Eddy_Viscosity28 months ago
This is great, but this approach will break down a bit for REALLY big waves as they become non-linear. Water waves are not sinusoidal, but are close enough for small and medium wave heights that these methods work really well. The big big waves are not only much farther from sinusoidal but the waves start interacting with each in a non-linear way that can&#x27;t be captured by the linear superposition approach used here.<p>So for most sea states, this is fantastic. But if you want to do the &#x27;perfect storm&#x27; wave or something like that, you need to use a different approach for realism.
bnegreve8 months ago
It is very impressive, and better than anything I&#x27;ve seen before but think something is bit off with the swell. If I had to explain I would say that high frequency waves don&#x27;t travel on top of low frequency waves the way they do in the video.
eps8 months ago
Don&#x27;t have any substantial comments, but I must say that the result is really impressive. Just wow.
julosflb8 months ago
Very neat! I&#x27;m hydrodynamics by background and I wondered a long time ago why this kind of approach was not used as I always found ocean waves to look awful in movies. Once you describe ocean sea state in frequency domain, it is quite easy to give to floating objects like ships realistic motions using what we called RAO in this field (linear operator). You can also model sea disturbance (diffracted and radiated waves) caused by an object in a similar fashion.
lambdaone8 months ago
This is astoundingly good work; even though, as other commenters have said, it could still be improved on, the fact that it achieves such a level of realism with such a simple and elegant framework is truly impressive.
lukko8 months ago
Oh my - this is great!<p>Does it mention what the density of the mesh is, or is it a flat plane with no displacement?<p>Also, I wonder if there&#x27;s a way to optimise the foam particles in some way. It does seem very wasteful to generate them across the whole plane, when most are culled. I wonder if the particle emission &#x2F; creation could be linked to foam density?
评论 #41680077 未加载
kroolik8 months ago
That&#x27;s some National Geographic clip. Now, show us the demo!
kelseyfrog8 months ago
Any other resources on empirically derived rendering&#x2F;animation methods?<p>A lot of hobbyist gamedevs can think of tutorials where we &quot;slap noise&quot; on various things. While a good temporary use, there&#x27;s an pedagogical gap between beginner and advanced methods.<p>Another that comes to mind is vegetation animation. Like ocean waves, we often see animators throw a few octaves of sin&#x2F;cos on plants to simulate wind, but because it doesn&#x27;t spectrally match what we see in the real world, it looks off.
HL33tibCe78 months ago
This is beautiful, I&#x27;d love to have this as a lockscreen or even a screen panel on a wall somewhere
goode8 months ago
I was a bit confused what use an FFT had here since I was only familiar with the Fourier transform in the _forward_ direction (compute the component frequencies of a signal given samples). But this uses the _inverse_ Fourier transform, which effectively lets you take samples of a signal given its component frequencies. Here, those component frequencies are generated by mathematical functions developed (by other researchers) to model ocean waves, which are explained in <a href="https:&#x2F;&#x2F;github.com&#x2F;2Retr0&#x2F;GodotOceanWaves#ocean-wave-spectra">https:&#x2F;&#x2F;github.com&#x2F;2Retr0&#x2F;GodotOceanWaves#ocean-wave-spectra</a>.
bee_rider8 months ago
It looks really good.<p>Out of curiosity, I’m sure everybody has heard of the FFT. They are quite general and used all over the place, and I imagine they’d be the first thing somebody would reach for if they had to describe waves.<p>But I’d never heard of Gerstner waves. This leads me to believe that Gerstner waves are a more specialized thing. Since lots of work has already gone into rendering water, I tend to assume the method with a name I’ve never heard of was only reached for after very clever people rejected Fourier transforms for some reason.<p>But, the results look better than most of what I see elsewhere. Has something changed to enable the more conventional solution?
评论 #41683662 未加载
wslh8 months ago
Great! I&#x27;ve shared this with every physicist I know who&#x27;s not directly involved in animations.<p>Quick question from my swimming class yesterday: We know that professional swimmers use a range of technologies, both old and new, in their training. Is there currently a model that fully simulates the physics of swimming across different styles? If not, this seems like a great project idea!
cheschire8 months ago
While I appreciate ever more realistic water bodies, the part that game makers really struggle with is where the water encounters an obstacle.<p>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?
评论 #41679717 未加载
评论 #41679974 未加载
评论 #41679553 未加载
arminiusreturns8 months ago
This is awesome to see! Much more progress than I have made on my gplv3 version for my system. (the original intention was to replicate Blackwake style ship combat)<p>For what it&#x27;s worth, the real difficulty in gameplay is getting physics objects to interact with the waves properly.
chhs8 months ago
Looks incredible!
tonetegeatinst8 months ago
What level of math is this?<p>I struggled in calculus over the summer but passed and am currently taking discrete math but recognized basically none of the math equations in the github project readme.
评论 #41683579 未加载
shireboy8 months ago
Nice, but may need to adjust the limits: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41631177">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41631177</a>
rkagerer8 months ago
The sample video is really impressive, it&#x27;s worth a peek.
Archelaos8 months ago
The demo looks unrealistic. The waves never break. Increasinlgy steeper slops with pointy peaks travel from left to right until they just sink down towards the left.
评论 #41679248 未加载
nox1018 months ago
Reminds me of Sea of Thieves<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;aGogFt4bhTM?t=12" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;aGogFt4bhTM?t=12</a>
评论 #41683631 未加载
pmarreck8 months ago
How do I get this masterpiece running locally to play with? I don&#x27;t even know what Godot is (but I&#x27;ve used makefiles and such)
评论 #41683301 未加载
评论 #41681640 未加载
评论 #41680996 未加载
评论 #41680228 未加载
eniwnenahg8 months ago
i live by the sea and have a sea view. when a gust comes through to stir seadogs the color is darker in patches where there is wind in small areas. You cant havr choppy weather without some of this patchy color. also the white chop never goes straight up as in the videos, but it curls at least slightly.
aetherspawn8 months ago
I think the downside of this approach is you can’t ie split the waves with a ship.
评论 #41679939 未加载
Mattish8 months ago
2 of the linked references have full implementations of very similar things, with some shared references.<p>Is there something here which godot is enabling which wasn&#x27;t previously possible? It seems to be entirely GPU compute workload with particles which are available as part of all mature rendering engines
评论 #41681015 未加载
ReptileMan8 months ago
That looks wet. And honestly it is the best compliment I can give.
bobim8 months ago
I would like a Silent Hunter III remake with this.
purple-leafy8 months ago
This is a really fascinating graphical piece!
jkmegtu8 months ago
Free fire
bschmidt18 months ago
Looks awesome. Is it from a fixed perspective only? If not should show the camera rotation in the video demos so it&#x27;s clear how it could be used.<p>Would be curious to see how it looks from different angles etc. as the light changes.
评论 #41683200 未加载