Fluid Frenzy – Unity
Fluid Frenzy – Unity
🎮 target=”_blank”>Check out the downloadable demo! 🎮
🎮 target=”_blank”>Check out the online Samples demo! 🎮
🎮 target=”_blank”> Check out the Curved World demo! 🎮
target=”_blank”>🎮 target=”_blank”>Check out the online Erosion demo! target=”_blank”> 🎮
target=”_blank”>🎮 Check out the online Terraform S.C.U.L.P.T. demo! 🎮
🔴 Important Information 🔴
Fluid Frenzy uses the Package Manager to manage it’s assets and is created using the Hybrid Package system as described target=”_blank”>here. Only the core requirements are imported into your project by default. This prevents your project from being bloated with samples and documentation by default. Import samples using the Package manager (see target=”_blank”>documentation here).
Contact me if you need help.
⛰ target=”_blank”>The Forest Demo Scene can be found on github! ⛰
Overview
Fluid Frenzy is a powerful 2.5D GPU-accelerated fluid simulation and rendering tool. It allows developers to create realistic and interactive fluid dynamics, such as water, lava, and terrain erosion, enhancing the visuals and immersion of their games or applications.
Realistic Rendering
Fluid Frenzy allows you to render realistic water by simulating how light interacts with the fluid. The system handles light absorption, subsurface scattering, and refraction based on depth to create a natural look. It also supports underwater rendering, so if the camera goes below the surface, you get effects like Absorption, Scattering/Fog, Meniscus (Water Lens Line), Caustics, and Snell’s window. The rendering is highly configurable, letting you tweak the settings to match the exact look of your project.
Stylized Rendering
Render stylized water driven by the fluid simulation. The shader blends shallow and deep colors by scene depth, with soft highlights, sparkles, foam, edge foam, flow tint, reflections, and refraction. Underwater effects use the same stylized shallow-to-deep color style. Highly configurable.
Toon Rendering
Render toon/cel-shaded water driven by the fluid simulation. The system uses a lighting ramp and hard light steps, with crisp sun highlights, rim glow, sparkles, foam, edge foam, reflections, and refraction. Underwater effects use the same toon shallow-to-deep color style. Highly configurable.
Open Water and World Rendering.
World Rendering combines multiple fluid simulations into one continuous water surface and can add cascaded Ocean FFT waves for open water. Inside a Flow simulation domain, those ocean waves can blend and couple into the shallow water simulation so swell drives local flow and height near the shoreline, while outside the domain the ocean surface continues as FFT waves.
Terraforming
One if the unique features is the terraforming and fluid mixing capabilities. If you ever wanted to make a god-game based around flowing water, lava and terrain terraforming, then Fluid Frenzy is for you. Fluid Frenzy has the unique capabilty of two fluids interacting and mixing allowing the creation of fun gaming experiences.
Contents
The package includes a customizable fluid simulation along with water and lava shaders, modifier scripts for waves, flow, and forces, and samples. Expand it with your own C# and Shaderlab layers.
Render Pipelines
Fluid Frenzy fully supports BiRP and URP (2022.3+), HDRP (6000.0+). See the target=”_blank”>docs for version and pipeline details.
Features:
2.5D Shallow water equation simulation.
The simulation uses a shallow water equation to simulate waves and flow based of the height of the fluid.
Terrain interaction.
The simulation interacts with the Unity Terrain, Terraform Terrain system, or a generic heightmap texture from any other terrain system you might use. The fluid simulation will make fluids flow over and around this terrain.
GameObjects and Layers
If your game does not use the Unity Terrain you can also choose to use a MeshCollider, or select Layers for the simulation to interact with.
GPU Level of Detail.
The simulation has options for several rendering systems, one of these methods is a GPU accelerated LOD system called Quadtree on the GPU. This rendering system is highly performant compared to rendering a standard grid while also allowing higher details near the viewer.
GPU Particles.
The rendering of the fluid simulation can be optionally enhanced by the GPU accelerated system which can spawn particles under certain conditions like break waves and waterfalls which can interact with the fluid simulation.
Obstacle Interaction.
Mark any object as an obstacle to make the fluid collide with your scene geometry. Choose MeshRenderer mode for complex meshes or Shape mode for fast procedural primitives. Supported shapes include Box, Sphere, Cylinder, Capsule, Ellipsoid, Capped Cone, Hex Prism, and Wedge.
Rigidbody Interaction.
Enable two-way physics between the fluid and your objects. Rigidbodies float and drift with simulation currents, while their movement displaces the water to create realistic waves and ripples. This system uses Unity Jobs and spatial optimization for high performance, allowing for mesh-accurate interaction with MeshColliders or simplified sphere, box, and capsule colliders.
World Rendering.
Multiple fluid simulations can be rendered as one continuous water surface. Matching tiles are packed into GPU atlases and drawn with GPULOD, so open water, coasts, and rivers can share a single water mesh. The Water World Renderer supports underwater, caustics, and planar reflections on that shared surface.
Ocean FFT Waves.
Cascaded Ocean FFT waves (JONSWAP) drive large open-water surfaces with multi-scale swell, choppiness, foam, and distance fades. Presets are included for calm ocean, windy ocean, shores, lakes, and rivers.
Ocean FFT Coupling.
The ocean FFT can drive local flow and height so swell interacts with the shallow water solver near the shoreline. Depth and elevation fades control how strongly that coupling applies in shallow or elevated areas.
Per-side Borders.
Each edge of a simulation can be set independently to Closed, Open, or Neighbour, with optional absorb bands and per-edge velocity or fluid level controls.
C# Scripting
Readback and sampler fluid simulation data in C# scripts through a simple FluidSimulationManager class to query the (nearest) fluid height, depth, velocity, or layer.
You can also trigger events when fluid enters or leaves a position using a simple to use FluidEventTrigger component.
Interact with the simulation.
You can interact with the fluid simulation by adding/removing fluid, applying forces or waves. All you have to do is add in a component and configure the options to the type of interaction you want.
Foam generation.
Foam is generated using a custom Fluid Layer to extend the simulation. Add this layer to generate a foam mask which can be applied to the water shader to dynamically display foam determined by the flow if the simulation.
Flow mapping.
Velocity based flow mapping is applied to fluid rendering shaders to create a flow effect by offsetting detail textures.
Water rendering.
Render high quality water using the built in water shader. The water shaders are highly configurable and supports features like: PBR, Stylized, Toondepth based absorption, subsurface scattering, refraction, reflection, underwater rendering, Snell’s window, and vertex displacement waves.
Lava rendering.
Render lava using the built in lava shader. The lava shader supports the following features: emission, flow mapping, velocity based heat.
ShaderGraph Support.
Build your own custom shaders to render the fluid simulation data. The asset provides full ShaderGraph support, letting you sample the simulation data like height, velocity, and foam to create your own unique visual effects and specialized fluid materials.
Terrain terraforming.
Apply terraforming to a custom terraform terrain system. This custom terrain system can update the terrain in real-time by modifying the height and splat maps. Add multiple types of terrain to the base layer, and add a layers of material ontop that can be eroded and terraformed by the fluid simulation.
Two fluid layer mixing.
Mix lava and water to create rock on terrain.
Add a second layer of fluid within the same simulation for optimal performance. This second layer can interact with the first by mixing and turning the mixed fluid into terrain (water + lava = rock).
Physics Colliders.
Generate and update colliders for the Terraform and Fluid Simulation at runtime to interact with the simulation through Unity’s physics.
Overall, Fluid Frenzy provides developers with a robust set of tools to create immersive and visually appealing fluid dynamics. Whether you want to simulate water flowing over terrain, create volcanic eruptions with lava, or model erosion effects on landscapes.
Third-party support
Fluid Frenzy has automatic third-party support for the following assets:
- target=”_blank”>Enviro3 – Sky and Weather
- target=”_blank”>COZY: Stylized Weather 3
- target=”_blank”>Curved World
If you wish support for your, or other assets it can be considered.
Limitations
It’s important to note that Fluid Frenzy does have limitations. It is a 2.5D shallow water equation-based fluid simulation, meaning fluids can only flow over and not under objects simultaneously. The simulation has a maximum speed limit due to pixel-based movement, and multiplayer functionality is not supported due to synchronization challenges over a network.
Home Page: _https://assetstore.unity.com/packages/vfx/shaders/fluid-frenzy-273366