Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /homepages/42/d877479984/htdocs/routes.php on line 18

Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /homepages/42/d877479984/htdocs/routes.php on line 18
AGP Developer
Ocean Simulation
Personal Work Materials UE4
This project is a simulation of a sea through the Gerstner Waves formula, this formula is applied to each vertex of the mesh so that to simulate the sea. It is implemented in Unreal Engine 4 with materials and C++ functionality to simulate the flotation through physics. The waves of the sea can be modified in real time by deciding the height, the distance, the curvature of the wave peak, the speed.
Features

  • Formula Gerstner Waves
  • Buoyancy
  • Water Material
Explanation
The Gerstner Waves formula obtained from Nvidia's GPU Gems has been used to generate the sea.

Applying this formula to each vertex of the mesh you get the simulation of the sea, for this you need to know "Q", "Amplitude", "Direction", "Length", "w", "speed", "φ" and "time".

Q is the peak formed by the wave and must be between 0 - 1.
Amplitude s the height of the wave, the higher the number the higher the wave.
Direction is the direction of the wave.
Length is the distance between waves.
w is 2/Lenght
speed is the speed of the waves.
φ is speed * w
time the elapsed time for the waves to move.

With this you get a sea with a direction and characteristics, to simulate a more realistic sea you have to apply the formula with different values and add the results. Once the shape of the sea is created, it would be necessary to take the normals so that the shading matches the shape of the sea. To do this we use the following formula.