Ocean Simulation- or, Thank Goodness I Took Computer Graphics
OceanConstructor Developer controlled settings |
My current system in the Unreal Engine consists of three
elements—a Blueprints ‘OceanConstructor’, a shader, and a C++ ‘OceanManager.’
The OceanConstructor class generates a dynamic material
instance of the ocean shader, allowing for definition of parameters at
runtime. The developer chooses the
number of waves to sum, the general wind direction, wave steepness, variation,
and color of the ocean. The Beaufort
Scale setting determines wavelengths, speeds, and amplitudes based on an intensity
scale from 1 to 12.
The shader, applied to a tessellated plane, uses a material function to determine and combine the physical displacement and normals produces by Equations 9 and 12 in the paper. Panning normal maps add fine scale detail, and a simple Fresnel determines the color and influences the specularity of the water.
The shader, applied to a tessellated plane, uses a material function to determine and combine the physical displacement and normals produces by Equations 9 and 12 in the paper. Panning normal maps add fine scale detail, and a simple Fresnel determines the color and influences the specularity of the water.
Gerstner Wave Material Function It looks a lot nicer in C++. |
Wave Height Calculator See? So much nicer in C++. |
Overall, I am quite happy with the results. Despite being one of the hardest courses I had during undergrad, thank goodness I took Computer Graphics!
GPU Gems Paper: https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html
GPU Gems Paper: https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html
Comments
Post a Comment