Wave Generator
Gerstner Wave Generator
This application is a demonstration of Gerstner/Trochoidal waves, and how they can be procedurally generated over time to create a realistic looking ocean!
- Firstly a mesh is generated (the size cannot be changed in this build)
- Through the use of Perlin noise, update each Y co-ordinate of the grid so that an interesting surface is created. (cannot be changed in this build)
- Update each vertex in the generated mesh each frame using a Gerstner wave function.
- User is able to manipulate three sliders to change the waveform in real time. (Amplitude, first wavelength, and second wavelength)
Other sliders are available at generation time but can only be accessed through the Unity editor. The files are available on Github here: https://github.com/Ziszel/wave-generator
The application supports moving around the scene with the following controls:
W, A, S, D | Move forward, backward, left, and right |
Q, E | Rotate the camera to look at the wave from a different perspective |
Z, X | Move the camera up and down the Y axis to look at the wave from a different perspective |
Mouse | Use the mouse to click on the sliders. (NOTE: Click off the sliders once changed as 'A and D' will also update their values!) |
Free skybox used from here: https://assetstore.unity.com/packages/2d/textures-materials/sky/skybox-series-fr...
Leave a comment
Log in with itch.io to leave a comment.