Skip to content
Implementation of the SPH Algorithm (fluid simulation) in Unity, comparing singlethread and ECS/Job System performances.
ShaderLab C# HLSL
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Updated to Unity 2019.2 Aug 13, 2019
Assets Updated to Unity 2019.2 Aug 13, 2019
Logs Updated to Unity 2019.2 Aug 13, 2019
Packages Updated to Unity 2019.2 Aug 13, 2019
ProjectSettings Updated to Unity 2019.2 Aug 13, 2019
.gitignore Initial commit Dec 10, 2018
LICENSE Initial commit Dec 10, 2018
README.md Updated to Unity 2019.2 Aug 13, 2019

README.md

Unity (ECS/Job System) SPH

Implementation of the SPH Algorithm (fluid simulation) in Unity, comparing singlethread and ECS/Job System performances.

Updated to Unity 2019.2!

More info in this article: https://medium.com/@leomontes_60748/how-to-implement-a-fluid-simulation-on-the-cpu-with-unity-ecs-job-system-bf90a0f2724f

How to:

You can select the scene from 'Assets/Scenes'. Once in the scene, you can hit play to see the simulation. You can change some settings in the script from the MANAGER GameObject.

Settings:

Single-thread:

  • Particle count
  • Particle parameters*

ECS, Job system:

  • Particle count You can find the particle parameters* inside 'Assets/Job System/Prefabs' in the SPHSphereECS GameObject.
  • Particle parameters:
    • radius
    • smoothing radius
    • rest density
    • gravity multiplier
    • mass
    • viscosity
    • drag
You can’t perform that action at this time.