I FINALLY got a bit of time to begin playing around with UE4. What better way than to dive into a fun shader!
I am making an ocean shader and have roughed out some of the structural trigonometry and some of the simple physics equations. However, there is still several parameters that are not being calculated properly and some of the Trig. needs to be updated and modified. After that, I am going to be generating the smaller waves and tessellation. Once all the math is done, I will make the shader look pertty (Hopefully packed full of features such as translucent crest color)
After I finish everything, I will write an e-article and post it up on my website showing a detailed breakdown of how I constructed it.
Sorry for the late reply. The masked out areas are incomplete parts of the equation. (Some of the master shader is also not finished.) Therefore I didn’t want people building those parts only to find out that the gersnter wave was squashing too much.
I am still trying to read a few papers to find out how I want to implement these.
The current equations I am using are from nVidia, however for large ocean swells and large, slow moving choppy waves, I might be utilizing some of Jerry Tessendorf’s work.
Thank you. The true goal of this is to really try and bridge the gap between mathematics and implementation in a modern game engine so that artists can understand. If only more people knew how wonderful and powerful the vertex animation was in UE3 and especially UE4, then it would boost their product quality. The more I talk to people, the more I find that the stumbling block is the actual conversion of math into nodes. This in-depth article will target that problem area and try to break down how things like (obtaining the sine of (equation)) can be constructed in Node View as well as (ex: Σ) is constructed with multiple complex node “trees”.
I am rusty at the more complex equations, therefore I am trying to learn a bit more from a petrophysicist “Name Withheld”, when I hit a snag. This slows the progress down a bit, but not by much.
This is proving to be a fun adventure so far, and I look forward to seeing all of the equations working in harmony.
Ufna - I really appreciate the offer. However, to try and accomplish my goal, I am building everything in nodes so that artist may do this as well. The gerstner wave is just one of several options I hope to implement. Once the waves are working right, I am going to be looking into reflectance waves, wind curve over wave crest and influence, and many other options. Then later, I will build a tessellation equation to generate the many miniature waves and noise across the ocean surface. (Hopefully a foam generator as well - Using GPU particles). Doing this in node form is most likely not going to be as efficient, but the purpose of this is to implement everything in the most easily understood way (For the community). Most people flinch at code / HLSL or become discouraged, visual feedback and easy to follow spline connections within a node editor seem to yield better results when trying to simply learn a complex object.
I’ll be really happy to participate if you not mind. I suppose I’m a big fan of ocean in UE, and my project is even open source now. You can find useful examples of ocean surface equations, height calculation both with and without tesselation, etc. Soon I’ll add foam and splashes, as it’s very important part for ships movement visuals FFT will be next, because it’s much better and faster than Gerstner waves approach.
We’re working on the same things, and I’ll be happy if some of my works will be helpful to your article.