Live data from Hacker News

Simulating fluids, fire, and smoke in real-time

andrewkchan.dev

11–20 of 174 posts

Re: Simulating fluids, fire, and smoke in real-time

#11

As a person who did a PhD in CFD, I must admit I never encountered the vorticity confinement method and curl-noise turbulence. I guess you learn something new every day! Also, in industrial CFD, where the Reynolds numbers are higher you'd never want something like counteracting artificial dissipation of the numerical method by trying to applying noise. In fact, quite often people want artificial dissipation to stabil…

> ... the requirements in computer graphics are more inclined towards making something that looks right instead of getting the physics right.

That is exactly correct. That said, as something of a physics nerd (it was a big part of the EE curriculum in school) people often chuckled at me in the arcade pointing out things which were violating various principles of physics :-). And one of the fun things was listening to a translated interview with the physicist who worked on Mario World at Nintendo who stressed that while the physics of Mario's world were not the same as "real" physics, they were consistent and had rules just like real physics did, and how that was important for players to understand what they could and could not do in the game (and how they might solve a puzzle in the game).

Re: Simulating fluids, fire, and smoke in real-time

#12

As a person who did a PhD in CFD, I must admit I never encountered the vorticity confinement method and curl-noise turbulence. I guess you learn something new every day! Also, in industrial CFD, where the Reynolds numbers are higher you'd never want something like counteracting artificial dissipation of the numerical method by trying to applying noise. In fact, quite often people want artificial dissipation to stabil…

Was the PhD worth it in your opinion?

Re: Simulating fluids, fire, and smoke in real-time

#13

As a person who did a PhD in CFD, I must admit I never encountered the vorticity confinement method and curl-noise turbulence. I guess you learn something new every day! Also, in industrial CFD, where the Reynolds numbers are higher you'd never want something like counteracting artificial dissipation of the numerical method by trying to applying noise. In fact, quite often people want artificial dissipation to stabil…

I think the curl noise paper is from 2007: https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph2007-cu...

I've used the basic idea from that paper to make a surprisingly decent program to create gas-giant planet textures: https://github.com/smcameron/gaseous-giganticus

Re: Simulating fluids, fire, and smoke in real-time

#15

They mention simulating fire and smoke for games, and doing fluid simulations on the GPU. Something I’ve never understood, if these effects are to run in a game, isn’t the GPU already busy? It seems like running a CFD problem and rendering at the same time is a lot. Can this stuff run on an iGPU while the dGPU is doing more rendering-related tasks? Or are iGPUs just too weak, better to fall all the way down to the CP…

Welp. It used to be PhysX math would run on a dedicated gpu of choice. I remember assigning or realising this during the Red Faction game with forever destructing walls.

Almost Minecraft, but with rocket launchers on mars

Re: Simulating fluids, fire, and smoke in real-time

#17

As a person who did a PhD in CFD, I must admit I never encountered the vorticity confinement method and curl-noise turbulence. I guess you learn something new every day! Also, in industrial CFD, where the Reynolds numbers are higher you'd never want something like counteracting artificial dissipation of the numerical method by trying to applying noise. In fact, quite often people want artificial dissipation to stabil…

Was the PhD worth it in your opinion?

From a purely economic standpoint, difficult to say. I was able to build skills that are very in demand in certain technical areas, and breaking into these areas is notoriously difficult otherwise. On the other hand, I earned peanuts for many years. It'll probably take some time for it to pay off.

That said, never do a PhD for economic reasons alone. It's a period in your life where you are given an opportunity to build up any idea you would like. I enjoyed that aspect very much and hence do not regret it one bit.

On the other hand, I also found out that academia sucks so I now work in a completely different field. Unfortunately it's very difficult to find out whether you'll like academia short of doing a PhD, so you should always go into it with a plan B in the back of your head.

Re: Simulating fluids, fire, and smoke in real-time

#18

They mention simulating fire and smoke for games, and doing fluid simulations on the GPU. Something I’ve never understood, if these effects are to run in a game, isn’t the GPU already busy? It seems like running a CFD problem and rendering at the same time is a lot. Can this stuff run on an iGPU while the dGPU is doing more rendering-related tasks? Or are iGPUs just too weak, better to fall all the way down to the CP…

You don't have to be gaming to use a GPU. Plenty of rendering software have a GPU mode now. But writing GPU aglos are often different from a CPU simulation algo, because it is highly parallelized.

Re: Simulating fluids, fire, and smoke in real-time

#19

They mention simulating fire and smoke for games, and doing fluid simulations on the GPU. Something I’ve never understood, if these effects are to run in a game, isn’t the GPU already busy? It seems like running a CFD problem and rendering at the same time is a lot. Can this stuff run on an iGPU while the dGPU is doing more rendering-related tasks? Or are iGPUs just too weak, better to fall all the way down to the CP…

Now that LLMs run on GPU too, future GPUs will need to juggle between the graphics, the physics and the AI for NPCs. Fun times trying to balance all that.

My guess is that the load will become more and more shared between local and remote computing resources.

Re: Simulating fluids, fire, and smoke in real-time

#20

EmberGen is absolutely crazy software that does simulation of fire and smoke in real-time on consumer GPUs, and supports a node-based workflow which makes it so easy to create new effects. Seriously, my workflow probably went from spending hours on making something that now takes minutes to get right. https://jangafx.com/software/embergen/ I was sure that this submission would be about EmberGen and I'm gonna be hones…

Written in Odin

https://odin-lang.org/showcase/embergen/

Post reply on HN