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.
Source code:
https://github.com/SebLague/Fluid-Sim...
Next episode:
• Coding Adventure: Rendering Fluids
If you'd like to support me in creating more videos like this, you can do so here:
/ sebastianlague
https://ko-fi.com/sebastianlague
Resources:
https://matthias-research.github.io/p...
http://www.ligum.umontreal.ca/Clavet-...
https://sph-tutorial.physics-simulati...
https://web.archive.org/web/201407250...
Music:
https://github.com/SebLague/Misc-Proj...
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
Watch video Coding Adventure: Simulating Fluids online without registration, duration hours minute second in high quality. This video was added by user Sebastian Lague 08 October 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,037,751 once and liked it 91 thousand people.