r/GraphicsProgramming • u/pankas2002 • Mar 03 '24
Realistic Ocean Simulation Week 16: Finished project for my dissertation
9
Mar 03 '24
Beautiful!
I'm getting into Graphica programming and this is one of the projects on my list. Thanks for the inspiration! Love it!
1
u/zawalimbooo Mar 03 '24
Acerola on youtube has two videos about this
32
u/pankas2002 Mar 03 '24
I would rather recommend looking into these papers as Acerola skips like 90% of what you have to do.
Ocean Simulation by Jerry Tessendorf
Empirical directional wave spectra for computer graphics by Christopher J. HorvathPlus, I would recommend this video:
https://www.youtube.com/watch?v=kGEqaX4Y4bQ&t=634s&ab_channel=JumpTrajectoryFor the FFT solution I would recommend this paper:
Realtime GPGPU FFT ocean water simulation by Flügge and Fynn-Jorin1
u/zawalimbooo Mar 03 '24
Oh right he did skip the lighting entirely
7
u/pankas2002 Mar 03 '24
I'm talking about the ocean geometry. He skipped a lot for ocean geometry. His content is more for entertainment, which is valid.
1
4
u/stonecoldchivalry Mar 03 '24
Currently trying to do the same thing and mine looks like dog shit compared to this, great job. What oscillator function/s are you using? Gerstner waves?
1
u/pankas2002 Mar 03 '24
Generating ocean frequencies based on empirical data from Atlantic ocean. Then using IFFT to convert frequencies into hight map.
2
u/stonecoldchivalry Mar 03 '24
🫣 the big words can’t scare me if I can’t see them.
2
u/pankas2002 Mar 03 '24
LOL. It's not that hard. I linked 3 papers in the comments bellow. If you are interested you can read on them.
1
u/stonecoldchivalry Mar 03 '24
It’s similar to the techniques in the follow-up acerola video right? Maybe I’ll do some reading and see if I can implement anything somewhat close.
3
u/Tr4kt_ Mar 03 '24
Fantastic work! I recently became interested in this because of Acerola's Videos and Sea of Thieves. Your work and additional resources are inspiring!
2
u/pankas2002 Mar 03 '24
You can cheack my subreddit to cross refrence compute shaders (updates from week 1 - 16). I tried to record as much as possible.
3
u/BeTheBrick_187 Mar 04 '24
impressive, may I ask which API do you use to implement this?
3
u/pankas2002 Mar 04 '24
Unity.
3
u/Brilliant-Donkey-320 Mar 04 '24
This is done in Unity?
2
u/pankas2002 Mar 04 '24
Yup.
2
u/Brilliant-Donkey-320 Mar 04 '24
Wow that’s awesome. Do you use HLSL and C# I’m guessing. Great job!
1
u/pankas2002 Mar 04 '24
Yup.
1
u/Brilliant-Donkey-320 Mar 04 '24
Nice. I have been doing C# for more than a year and just started Unity. Any suggestions/topic roadmap I should cover to get to your stage? I did quite a lot of math in my first degree, so dont skimp on the mathy side ;)
1
u/pankas2002 Mar 04 '24
There is no secret, just do projects you like. Overtime, you will get better.
2
2
2
Mar 03 '24
Im getting Thalassophobia just by looking at this... stunning work! Loving the slow look of the waves making the whole look even bigger and impressive.
2
2
u/Stale_Porridge Mar 03 '24
nice one mate! tho the lighting on the water is a bit yellow don't you think? 😉
1
2
Mar 03 '24
Incredible! My water looks like blue plastic lmao
Edit: I’m following a acerolas video, and I saw you mention some more in detail resources. I’ll check them out instead!
1
2
2
u/arycama Mar 06 '24
Looks great, nice work! Geometry and foam looks very nice, and the subsurface scattering around the wave crests is cool. Is this just using some sort of LdotV trick or similar?
I don't suppose you have the Jonswap implementation on github or something? I wrote my own based on some online resources but there were a few parts of the formula I couldn't quite get right. (The emperical direcitonal wave spectrum paper you posted is behind a paywall sadly)
(My current implementation, due for a bit of a rewrite) NodeRenderPipeline/ShaderLibrary/Resources/Ocean FFT.compute at master · arycama/NodeRenderPipeline (github.com)
3
u/pankas2002 Mar 07 '24
Ty.
For subsurface scattering I used the formula in this video.
For the JONSWAP implementation, I will release when my dissertation is graded. However, it still lacks swell as I found a little bit more complicated to implement.
2
1
5
u/native_gal Mar 03 '24
How is this different from tessendorf oceans from 2001?
https://people.computing.clemson.edu/~jtessen/reports/papers_files/course_slides2002.pdf