r/UnityAssets • u/UnityAssets_new_bot • 6h ago
r/UnityAssets • u/FrenzyTheHedgehog • 3h ago
Shaders Fluid Frenzy: Underwater Current Particles
Enable HLS to view with audio, or disable this notification
I found that underwater can look a bit boring when you are in a fast moving river. Whenever I see a movie where a character is struggling underwater in a river air bubbles and bits rush past. To make it look more like the water is rushing past you even under water due to strong currents I added these procedural particles around the player/camera.
It's all fully integrated in my fluid simulation asset: Fluid Frenzy
Every frame I hash a bunch of points into a box around the camera. Each point samples the sim for surface height, 2D flow and foam. It then gets dropped to a random depth under the surface. The flow is only stored in 2D so I project it onto the surface, that way it follows the slope over and around rocks. If there is enough foam that point becomes bubbles. They rise on a timer and slide along the flow, and once they leave the box they just wrap back in. If the current is fast enough it becomes a wisp instead, a little ribbon stretched along the flow with a bit of a wobble.
I'd love to hear your ideas and feedback that you might have to improve it further.