Simulating fluids, fire, and smoke in real-time
101–110 of 174 posts
Re: Simulating fluids, fire, and smoke in real-time
#102As 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
We liked to call it “curly noise” when we first did it, and I used it on some shots and shared it with other effects animators at DreamWorks at the time. Actually the very first name we used was “curl of noise” because the implementation was literally curl(noise(x)), but curly noise sounded better/cuter. Curly noise is neat because it’s static and analytic, so you can do a fluid-like looking animation sequence with every frame independently. You don’t need to simulate frame 99 in order to render frame 100, you can send all your frames to the farm to render independently. On the other hand, one thing that’s funny about curly noise is that it’s way more expensive to evaluate at a point in space than a voxel grid fluid update step, at least when using Perlin noise which is what I started with. (Curly noise was cheaper than using PDI’s (Nick Foster’s) production fluid solver at the time, but I think the Stam semi-Lagrangian advection thing started making it’s way around and generally changed things soon after that.)
BTW gaseous giganticus looks really neat! I browsed the simplex noise code for a minute and it looks gnarly, maybe more expensive than Perlin even?
Re: Simulating fluids, fire, and smoke in real-time
#103Earlier quoted context omitted.
Yes, we can since a long time. They were already a thing 14 years ago on the PS3 in the game "Pixeljunk shooter" [0]. But real time simulations often use massive simplifications. They aim to look real, not to match exact solutions of the Navier-Stokes equations. [0] https://www.youtube.com/watch?v=qQkvlxLV6sI
Heck, the Wii had Fluidity around the same time period (2010), and that's a lot weaker than the PS3. Fluidity was pretty neat—you played as a volume of water, changing states as you moved through a level that looked like a classic science textbook: https://youtu.be/j7IooyXp3Pc?si=E79rCrq2mdyZSKoF&t=120
Both use the same technique: Smoothed Particle Hydrodynamics.
But the PS3 was able to fill the whole screen with these particles. Hundreds of them. The game Fluidity seems to have approx. 20.
Re: Simulating fluids, fire, and smoke in real-time
#104Earlier quoted context omitted.
At some point every render-engine builder goes through the exercise of imagining purely physically-modeled photonic simulation. How soon one gives up on this computationally intractable task with limited marginal return on investment is a signifier of wisdom/exhaustion. And, yes, I've gone way too far down this road in the past.
Not being a graphics person, is this what hardware ray tracing is, or is that something different?
Our universe has a surprising amount of detail. We can't even simulate the simplest molecular interactions fully. Even a collision of two hydrogen atoms is too hard - time resolution and space resolution is insanely high, if not infinite.
Re: Simulating fluids, fire, and smoke in real-time
#105Earlier quoted context omitted.
“Everything is smoke and mirrors in computer graphics - especially the smoke and mirrors!”
This was the big realization for me when I got into graphics - everything on the screen is a lie, and the gestalt is an even bigger lie. It feels similar to how I would imagine it feels to be a well-informed illusionist - the fun isn’t spoiled for me when seeing how the sausage is made - I just appreciate it on more levels.
So the non-generated frames are the "fake frames".
Re: Simulating fluids, fire, and smoke in real-time
#106I wrote a super simple flame simulation a long time ago as a toy in C after reading an article somewhere. You just set each pixel’s brightness to be the average brightness of the immediately adjacent pixels. Calculate from bottom to top. Add a few “hot” pixels moving back and forth along the bottom and boom, instant fire. Looks very cool for a tiny amount of code and no calculus. :)
You've been doing calculus the whole time. There's a difference between knowing the path, and walking the path.
Here's a 3Blue1Brown video with intuitive graphics on it https://youtube.com/watch?v=ToIXSwZ1pJU
Re: Simulating fluids, fire, and smoke in real-time
#107Earlier quoted context omitted.
Even the ray tracing / path tracing is half-fake these days cause it's faster to upscale and interpolate frames with neural nets. But yeah in theory you can simulate light realistically
It’s still a model at the end of the day. Material properties like roughness are approximated with numerical values instead of being physical features. Also light is REALLY complicated when you get close to a surface. A light simulation that properly handles refraction, diffraction, elastic and inelastic scattering, and anisotropic material properties would be very difficult to build and run. It’s much easier to use…
Re: Simulating fluids, fire, and smoke in real-time
#108Earlier quoted context omitted.
Was the PhD worth it in your opinion?
Hard to say whether economically a PhD always makes sense, but it certainly can open doors that are otherwise firmly closed.
Re: Simulating fluids, fire, and smoke in real-time
#109Earlier quoted context omitted.
It’s still a model at the end of the day. Material properties like roughness are approximated with numerical values instead of being physical features. Also light is REALLY complicated when you get close to a surface. A light simulation that properly handles refraction, diffraction, elastic and inelastic scattering, and anisotropic material properties would be very difficult to build and run. It’s much easier to use…
If I understood Feynman’s QED at all, light gets quite simple once you get close enough to the surface. ;) Isn’t the idea was that everything’s a mirror? It sounds like all the complexity comes entirely from all the surface variation - a cracked or ground up mirror is still a mirror at a smaller scale but has a complex aggregate behavior at a larger scale. Brian Green’s string theory talks also send the same message,…
Also, light may be simple but light interaction with electrons (ie. matter) is a very different story!
Re: Simulating fluids, fire, and smoke in real-time
#110EmberGen 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…