Skip to content

Releases: Loproxi/TFG-FluidSimulation

TFG_FluidSimulation2D

Choose a tag to compare

@Loproxi Loproxi released this 27 Jun 16:31
da480b4

1. Introduction

1.1 Description

  • This tool enables the simulation of fluids in a 2D environment within Unity, providing realistic visual effects of moving fluids. This tool uses an already existing fluid simulation method called smoothed particles hydrodynamics.
  • Example:
    ExampleScene2

The assets used in the example scene and the gif above are from brullov

1.2 Requirements

  • The tool has been tested on Unity 2022.3.3 and 2021.3.3 but it should work on Unity Versions 2020 as well.
  • Since this tool uses compute shaders, it is important to check that your platform support compute shaders in order to this tool to work. Here you have a list of platform that support them (List extracted from Unity Documentation).
    • Windows and Windows Store, with a DirectX 11 or DirectX 12 graphics API and Shader Model 5.0 GPU
    • macOS and iOS using Metal graphics API
    • Android, Linux and Windows platforms with Vulkan API
    • Modern OpenGL platforms (OpenGL 4.3 on Linux or Windows; OpenGL ES 3.1 on Android). Note that Mac OS X does not
      support OpenGL 4.3
    • Modern consoles

2. Installation

2.1 Download

  • Link to download the tool package.

2.2 Import

  • Step-by-step instructions for importing the package into Unity:
    1. Open Unity and create a new project or open an existing project.
    2. Go to Assets > Import Package > Custom Package.
    3. Select the downloaded package and click Import.

3. Initial Setup

3.1 Adding the Fluid Simulation to the Scene

  1. How to add the main fluid simulation package/Tool to a Scene:
    • Add the FluidSimulation prefab from the Assets to the Scene.
  2. How to adjust the Prefab with the needed information, In case it was not already set:
    • After clicking on it you will have to set some things in order for it to work.
    • Required Shaders
      • The Compute shader FluidSimulation2Compute
      • The Particle Instancing Shader Custom/Particle