Water Simulation Study


This is a documentation on my whole-year experiements with different water shaders on different platform, from cartoon to realistic style.


1. GLSL water shader with sine wave and noiseOctave.

2. Water attack effect with Unity Particle System and Shader Graph

3. Music controlled water with depth fade and wave control in Unreal Engine 5.

4. Realistic Water in Unity with refraction, reflection, depth fade, color control and foam.






1. Water Simulation in GLSL

2023.03

This is my first water shader. I tried to apply what I learned in computer graphics class and create a beautiful ocean scene with a towering lighthouse.

There were two parts for the water effect: motion and color. For the motion, I initially planned to use perlin noise to simulate the waves. However, I realized that perlin noise couldn’t simulate the waves motion well due to its randomness. In order to solve this problem, I used sin to create waves and set amplitude, wavelength, base height, wave direction and speed to be variables. In order to add some dynamics, I applied noiseOctave to amplitude, wave direction and wavelength.








2. Water Particle System in Unity

2023.04

Platform: Unity Shader Graph and Particle System

Project Purpose: To create a water attack effect for our game “SodaVerse” in a hackthon. This is the highlight moment for the game.

Features: water color, reflection, water path.

︎reference






Third Experiment: Water in Unreal Engine

2023.05

Platform: Unreal Engine 5

Project Purpose: To create a customizable water shader in UE5 to interact with music for our game MOVEMENTS, since wave data is not accessible in Unreal Engine’s default water package.

Features: wave direction, wave amplitude, wave frequency, depth fade, color

︎Click here to check details








Forth Experiment: Realistic Water in Unity

2023.10

Platform: Unity Shader Graph

Project Purpose: To better understand more features in water and challenge myself to create realistic water, especially in terms of lighting

Features: albedo color, refraction, reflection, speed, foam, depth, foam color


Refraction & Reflection
Depth Change & Foam


Details:


Calculate reflection with a camera (made with kMirrors)
Calculate refrection


Calculate water depth to the underneath surface
Simulate foam


Final Material



︎reference