Uploaded October 2023 | Updated November 2026, 21 hours ago
Let's try to convince a bunch of particles to behave (at least somewhat) like water.
Written in C# and HLSL, and running inside the Unity engine.
Support my work (and get early access to new videos and source code) on Patreon or Nebula
* Patreon: patreon.com/SebastianLague
* Nebula: go.nebula.tv/sebastianlague
Source code:
* GitHub: github.com/SebLague/Fluid-Sim/tree/Episode-01
Check out my other fluid simulation videos:
youtube.com/playlist?list=PLFt_AvWsXl0dJrPelwdVSMVC_MDTYPJWn&si=Z5cOCDSI1aS4fe_C
Credits and References:
* matthias-research.github.io/pages/publications/sca03.pdf
* web.archive.org/web/20250106201614/http://www.ligum.umontreal.ca/Clavet-2005-PVFS/pvfs.pdf
* sph-tutorial.physics-simulation.org/pdf/SPH_Tutorial.pdf
* web.archive.org/web/20140725014123/https://docs.nvidia.com/cuda/samples/5_Simulations/particles/doc/particles.pdf
* Music: github.com/SebLague/Misc-Project-Info/blob/main/Coding-Adventures/Fluid-Sim.txt
Chapters:
0:00 Intro
0:27 Gravity and Collisions
2:31 Smoothed Particles
3:55 Calculating Density
7:53 The Interpolation Equation
11:58 Gradient Calculations
15:38 The Pressure Force
19:19 Trying to Make it Work...
22:05 Optimizing Particle Lookups
26:31 Spatial Grid Code
27:48 Position Predictions
30:32 Mouse Force
33:22 Artificial Viscosity
36:46 Pressure Problems
39:51 Bugs
41:06 Parallel Sorting
43:22 Some Tests and Experiments
44:47 The Third Dimension
47:23 Outro
Let's try to convince a bunch of particles to behave (at least somewhat) like water.
Written in C# and HLSL, and running inside the Unity engine.
Support my work (and get early access to new videos and source code) on Patreon or Nebula
* Patreon: patreon.com/SebastianLague
* Nebula: go.nebula.tv/sebastianlague
Source code:
* GitHub: github.com/SebLague/Fluid-Sim/tree/Episode-01
Check out my other fluid simulation videos:
youtube.com/playlist?list=PLFt_AvWsXl0dJrPelwdVSMVC_MDTYPJWn&si=Z5cOCDSI1aS4fe_C
Credits and References:
* matthias-research.github.io/pages/publications/sca03.pdf
* web.archive.org/web/20250106201614/http://www.ligum.umontreal.ca/Clavet-2005-PVFS/pvfs.pdf
* sph-tutorial.physics-simulation.org/pdf/SPH_Tutorial.pdf
* web.archive.org/web/20140725014123/https://docs.nvidia.com/cuda/samples/5_Simulations/particles/doc/particles.pdf
* Music: github.com/SebLague/Misc-Project-Info/blob/main/Coding-Adventures/Fluid-Sim.txt
Chapters:
0:00 Intro
0:27 Gravity and Collisions
2:31 Smoothed Particles
3:55 Calculating Density
7:53 The Interpolation Equation
11:58 Gradient Calculations
15:38 The Pressure Force
19:19 Trying to Make it Work...
22:05 Optimizing Particle Lookups
26:31 Spatial Grid Code
27:48 Position Predictions
30:32 Mouse Force
33:22 Artificial Viscosity
36:46 Pressure Problems
39:51 Bugs
41:06 Parallel Sorting
43:22 Some Tests and Experiments
44:47 The Third Dimension
47:23 Outro


![RPG graphics E07: Armour [Blender]
In this episode we create some armour to shield our character from harm.
See Brackeys channel for the programming half of this series: https://www.youtube.com/user/Brackeys
Download end-of-video file here:
https://www.dropbox.com/s/zulzdchm19wzf9l/E07%20armour.blend.zip?dl=1
Download start-of-video file here:
https://www.dropbox.com/s/0ri4oeogm3y0x5v/E06%20clothing.blend.zip?dl=1
RPG gameplay programming playlist:
https://www.youtube.com/playlist?list=PLPV2KyIb3jR4KLGCCAciWQ5qHudKtYeP7
Support the creation of more gamedev tutorials:
https://www.patreon.com/SebastianLague RPG graphics E07: Armour [Blender]](https://i.ytimg.com/vi/rzau6SFcNOk/mqdefault.jpg)




![Visual Debug [Unity Editor Tool]
Hello, Ive been working on a simple tool for recording diagrams and playing them back in Unity editor. This can be helpful for debugging certain algorithms.
Project available here: https://github.com/SebLague/Visual-Debug
Support the creation of more gamedev tutorials:
https://www.patreon.com/SebastianLague Visual Debug [Unity Editor Tool]](https://i.ytimg.com/vi/tdISDcM1oxo/mqdefault.jpg)
![[Unity] Procedural Planets (E03: layered noise)
In this episode well create a noise filter to process noise, and layer it for more interesting terrain. Episode 04 is out for early access viewers here: https://www.patreon.com/posts/21079771
Noise script:
https://github.com/SebLague/Procedural-Planets/blob/master/Procedural%20Planet%20Noise/Noise.cs
Get the project files for this episode:
http://github.com/SebLague/Procedural-Planets
Support the creation of more tutorials and get early access to new videos: https://www.patreon.com/SebastianLague [Unity] Procedural Planets (E03: layered noise)](https://i.ytimg.com/vi/uY9PAcNMu8s/mqdefault.jpg)

