Тёмный

Real-time Eulerian fluid simulation on a Macbook Air, using GPU shaders 

RL Hugh
Подписаться 1,9 тыс.
Просмотров 47 тыс.
50% 1

In order to implement fluid simulation we need to implement conservation of mass, incompressibility, and conservation of momentum. How to do this, using Eulerian cell representation, on GPU shaders?

Наука

Опубликовано:

 

25 дек 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 72   
@Kevin-jz9bg
@Kevin-jz9bg 10 дней назад
That was one of the best explanations for advection I've seen online! Especially the pushing bubbles out of a phone screen protector analogy.
@rlhugh
@rlhugh 9 дней назад
Thank you very much! Very much appreciated :)
@jonsonj5249
@jonsonj5249 День назад
love the experimental feel to how you moved forward itteration by itteration,
@mikhailhumphries
@mikhailhumphries 6 дней назад
Can't believe I watched entire video about coding and didn't get bored
@samaltschul4605
@samaltschul4605 5 месяцев назад
Hugh, the standard first book on PDE is Walter Strauss's book. If you want to try questions on me I'm happy to help out.
@SpeedyGwen
@SpeedyGwen 8 дней назад
first thing I thought about when I clicked on this video is about The Powder Toy which is a pixel based particle simulator game which actually has that exact same type of fluid simulation for simulating air in the game
@rlhugh
@rlhugh 7 дней назад
Interesting! Thank you!
@anonymouscommentator
@anonymouscommentator 9 дней назад
loved the video! feels like discovering sebastian lagues yt channel all over again :)
@rlhugh
@rlhugh 9 дней назад
Wow, that's a very nice thing to say. I feel like I can die happy now. I mean, unfortunately this is my least bad video to date, and you will be disappointed if you watch any of my others, but it's still very nice to hear these words :)
@Cmanorange
@Cmanorange 4 месяца назад
very good video. i'm glad you showed or mentioned what approaches didn't work
@hyperFixationStudios
@hyperFixationStudios 5 месяцев назад
Great work, I can't wait to see your next simulations!
@justinsciullo3342
@justinsciullo3342 17 дней назад
This is so cool, and you did a great job with the video editing! I hope you make more videos like this!
@rlhugh
@rlhugh 17 дней назад
Thank you! That's very kind to say. Very much appreciated :)
@santiagobirkenstock
@santiagobirkenstock 18 дней назад
I wish the very best on RU-vid, I am so glad I discovered your channel. Keep up the good work !
@PAPERSCHOOL
@PAPERSCHOOL 5 месяцев назад
Really well produced, nice work
@Theo-iz5cj
@Theo-iz5cj 4 месяца назад
Great and inspiring video, thanks a lot!
@veritas7010
@veritas7010 11 дней назад
I love this, thank you for makin my day on yt much better!
@rlhugh
@rlhugh 10 дней назад
Thank you very much!
@benjaminlehmann
@benjaminlehmann 13 дней назад
I loved this video! Really inspiring, and I'm sort of amazed that this was running on a macbook air too - great job :D Thanks so much for sharing.
@rlhugh
@rlhugh 13 дней назад
Thank you very much!
@HitAndMissLab
@HitAndMissLab 16 дней назад
Thanks for the beautiful video.
@jomazu7874
@jomazu7874 15 часов назад
i bet this would run much better on a gpu with a cooling system and more than 10 cores (or whatever your model of macbook has)
@saadahmed688
@saadahmed688 5 месяцев назад
Subbing cause I wanna see you simulate the inside of Earth. Great content
@tommycard4569
@tommycard4569 13 дней назад
educational and entertaining! loved it, thank you
@rlhugh
@rlhugh 13 дней назад
Thank you!
@CalcWithDec
@CalcWithDec 20 дней назад
Beautiful!
@tahmidchoudhury8946
@tahmidchoudhury8946 5 месяцев назад
Got recommended.....now in love
@Kyler1Ace
@Kyler1Ace 3 месяца назад
Great video
@FromLake
@FromLake 3 дня назад
Thank you for this video
@rlhugh
@rlhugh 3 дня назад
Thank you!
@Tordek
@Tordek 15 дней назад
regarding the parallel part: would it be feasible to work the opposite way? Instead of writing to 4 cells, each cell would instead read from 4 neighbors and update itself.
@janerikjakstein
@janerikjakstein 4 дня назад
Awesome 👍
@rlhugh
@rlhugh 4 дня назад
Thank you!
@naztar4323
@naztar4323 5 дней назад
You could have used MultiGrid for the solver since it land it self to parallelism better
@rlhugh
@rlhugh 4 дня назад
Yes. Potentially a topic for a next video :)
@incription
@incription День назад
this thumbnail is better
@qfurgie
@qfurgie 21 час назад
me: 50 frames per second that’s pretty bad performance RL: *”on my MacBook Air”* thats CRAZY
@D.S69
@D.S69 Час назад
50 fps is bad?
@sapiosuicide1552
@sapiosuicide1552 10 дней назад
Cool
@blitzguitar
@blitzguitar 2 часа назад
Imagine the kind of simulation you could do with a 4090 over the mac book.
@tselhamishac5910
@tselhamishac5910 4 дня назад
Nice
@rlhugh
@rlhugh 4 дня назад
Thank you!
@josiahjoel7580
@josiahjoel7580 28 дней назад
this is so cool, is it possible to upload the source code to a public repo?
@dovos8572
@dovos8572 2 дня назад
11:11 that looks like the lines of a magnet.
@drpwnage23
@drpwnage23 3 месяца назад
This is really cool. Do you have a github repo available for this?
@rlhugh
@rlhugh 3 месяца назад
I probably should do that yeah...
@NobodyYouKnow01
@NobodyYouKnow01 7 дней назад
No way Euler got named for a fluid dynamics problem. We're supposed to name the problem after the *second* person to solve it!
@cashkurtz5780
@cashkurtz5780 8 дней назад
So persistent zero velocity is like a solid object? I wish it were easier to see it against an unmoving background .
@rlhugh
@rlhugh 8 дней назад
Yes, that's right. As far as the coloring scheme, definitely open to suggestions. Won't affect this video, since cannot modify published videos. But could be useful for future videos.
@redstoneready697
@redstoneready697 27 дней назад
do you think this could be used for electromagetics?
@rlhugh
@rlhugh 27 дней назад
Interesting question!
@YaofuZhou
@YaofuZhou 23 дня назад
Depending on what you want. I guess you want to iteratively compute the EM fields?
@XGD5layer
@XGD5layer День назад
Some of the simulations definitely looked like simple 2d magnetic fields
@user-fj9hf4bu9f
@user-fj9hf4bu9f 3 дня назад
no links to the code?
@kwccoin3115
@kwccoin3115 15 дней назад
How do you run these shader ? Can it use under sdl2?
@rlhugh
@rlhugh 15 дней назад
These are running in Unity, using HLSL.
@wokeupina
@wokeupina 9 дней назад
wait you need a macbook pro to do pro stuff?? (looks sexy)
@rlhugh
@rlhugh 9 дней назад
I'm using a MacBook air m2
@samwolfe1000
@samwolfe1000 2 дня назад
Which method is cheaper to run?
@rlhugh
@rlhugh 2 дня назад
You mean for Lagrangian vs Eulerian? Eulerian is faster/cheaper.
@samwolfe1000
@samwolfe1000 День назад
@@rlhugh Sorry for the vagueness, I meant for particle - vs vector based
@tomd6410
@tomd6410 17 дней назад
Love this but if that’s how you say Euler I’ve been saying it wrong all this time 💀💀
@rlhugh
@rlhugh 17 дней назад
I did research the pronunciation. There are a couple of ways. Before I researched the pronunciation, I was saying "you lurr Ian". But "oiler Ian" appeared to be more common, as far as I could see? How are you thinking if should be pronounced?
@tomd6410
@tomd6410 17 дней назад
@@rlhugh I’ve been saying youll-lah 😅
@rlhugh
@rlhugh 17 дней назад
@@tomd6410 actuuaaalllyyy seems that it might depend on us vs UK pronunciation, eg see youglish.com/pronounce/eulerian/english/uk
@unepintade
@unepintade 14 дней назад
​@@tomd6410i feel like "name"-ian in English are pronounced very differently from how you pronounce the name so while Euler is pronounced weirdly, eulerian is pronounced how you would expect, like Laplace and Laplacian
@landsgevaer
@landsgevaer 3 дня назад
Oy-lear-ean, surely...?
@ethos8863
@ethos8863 2 дня назад
rather than updating a bunch of nonadjacent cells why don't you store two buffers, and instead of changing a cell's neighbors, instead calculate how a cell is affected by its neighbors, and write that into the second buffer.
@rlhugh
@rlhugh 11 часов назад
Do you mean, in the projection step? Because we aren't updating the cells: we are updating the walls of each cell. And each wall is attached to two cells. There isn't a way of updating one cell without updating its neigbor, because we aren't really updating the cells: we are updating the walls. When we choose 'a cell', what we are doing is updating all 4 walls of that cell. Then, you might say, can we select arbitrary walls? Well, no, because the update of 4 walls around a cell is based on ensuring incompressiblity of the fluid entering and leaving that one cell, but the updates themselves are applied to the walls, not to the cell. There is no way then to update two adjacent cells, because we'd be updating the same wall twice, i.e. the wall in between the two cells. Having a buffer doesn't really change that. Let's imagine we update the walls around cell A, into buffer 2. Now, when we calculate the walls around adjacent cell B, we'll need to read the values from buffer 2, in order to have the up to date value for the shared cell wall. So, it's sequential, not parallel. Not sure to what extent that answers your question?
@Leviathan_22
@Leviathan_22 Месяц назад
"shaders are fun" consider me an opp
@rlhugh
@rlhugh Месяц назад
Haha :)
Далее
I Made a Neural Network with just Redstone!
17:23
Просмотров 468 тыс.
Coding Adventure: Simulating Fluids
47:52
Просмотров 1,6 млн
МОЯ НОВАЯ МАШИНА🤍КАК ВАМ?😍
01:01
БАБУШКА И ИНТЕРНЕТ
00:30
Просмотров 139 тыс.
Lerp smoothing is broken
57:19
Просмотров 111 тыс.
The shape that should be impossible.
26:01
Просмотров 294 тыс.
The Largest Unsolved Problem in VR.
25:43
Просмотров 357 тыс.
Master the Complexity of Spaceflight
32:12
Просмотров 277 тыс.
The greatest clock (and map) ever made
21:19
Просмотров 334 тыс.
How to train simple AIs to balance a double pendulum
24:59
WHY did this C++ code FAIL?
38:10
Просмотров 137 тыс.
Юмор AirPods Max 😃
0:36
Просмотров 21 тыс.
Автодержатель телефона
0:29
Просмотров 11 тыс.
Lost Vape Ursa Pocket
0:17
Просмотров 89 тыс.
Technics 1500 Ремонтируем
52:13
Просмотров 37 тыс.