Live data from Hacker News

Navier-Stokes fluid simulation explained with Godot game engine

myzopotamia.dev

21–30 of 36 posts

Re: Navier-Stokes fluid simulation explained with Godot game engine

#21
post #19

This is great! When I have some leftover time I want to try copying this implementation for 3D. I reckon I could get away with minimal modifications to support the third axis...I think... That'll perform even worse though, hopefully my CPU can handle it or I'm gonna need a lot of leftover time to make a shader

You are correct: Stable Fluids extends to 3d relatively easily.

Re: Navier-Stokes fluid simulation explained with Godot game engine

#22
Before you go adding vorticity confinement, consider performing a higher-order backward advection scheme (Runge-Kutta 2nd or similar), and using a higher-order interpolation method (triangle-shaped cloud instead of bilinear).

In my implementations I use 4th order for both and vortices stick around a lot longer.

Re: Navier-Stokes fluid simulation explained with Godot game engine

#24
post #18

Earlier quoted context omitted.

It won’t satisfy those laws. It’s also not a goal though of this post.

I mean if you're writing a ray tracer and the reflected light has more intensity than the light sources, then that's not desired. You can have the same sort of thing going on with a fluid simulation.

Sure, but conservation in ray tracing is also a goal that not everyone has and isn’t required for teaching or games or making pretty & even plausible images. There are plenty of situations in both ray tracing and fluid simulation where conservation is not desirable.

Re: Navier-Stokes fluid simulation explained with Godot game engine

#25

Earlier quoted context omitted.

Assuming you mean the site - pinch zoom & pan works for me on Windows and iOS?

well android chrome doesn't

Web exports from Godot (and other game engines) played on mobile is a hard place between compatibility, performance, and many other factors. It's getting better, but very slowly. Try on PC

Re: Navier-Stokes fluid simulation explained with Godot game engine

#27

Before you go adding vorticity confinement, consider performing a higher-order backward advection scheme (Runge-Kutta 2nd or similar), and using a higher-order interpolation method (triangle-shaped cloud instead of bilinear). In my implementations I use 4th order for both and vortices stick around a lot longer.

If you implement this on the GPU, it's my understanding you can get the 4th-order interpolation quite cheaply exploiting the bilinear texture sampling hardware[1].

So instead of reading 16 grid values and combining them to get the interpolated sample value, you can fetch 4 bilinearly filtered samples and combine those. And thanks to the hardware filtering, those bilinear samples cost basically the same as reading an unfiltered value.

[1]: https://developer.nvidia.com/gpugems/gpugems2/part-iii-high-...

Re: Navier-Stokes fluid simulation explained with Godot game engine

#28

I appreciate the AI disclosure, I hope that becomes normalized

I wonder how it'll read in 20 years. Like all the covid references in blog posts from 2020, or vague references to "the current political situation" from any point in the last 10 years or so.

Re: Navier-Stokes fluid simulation explained with Godot game engine

#30

Very cool. For your next project, how about a DIY 2D EM field solver? You've done a lot of the work already.

AI model latent space needs to be instrumented to a DAW and 3D helical visual effects on triangle slices to show the mathsemantic field gears grinding at the prompt: What's on your mind?
Post reply on HN