Fluid Simulation with Volumetric Visualization

Now this is the really fun stuff. Back in university these solvers were only used for cinema like pre renders and benchmarking the newest 2000$ GPUs. At least if they are in 3D. But even in 2D and with graphics toned down a bit to give your graphics hardware the opportunity to catch up with the task, they are quite mesmerizing.

Fluid Ninja for instance used this potential for a high-end production-ready Unreal Engine-Plugin.

This nice. I too can. I thought. And I am too lazy to learn the deeper meanings of the “Unreal” and some strange plugin which I will probably never get to work the way I need for my use cases. Therefore I made some little bastard of this in Flax:

smoke_spending

And also tested with a quick dirty collision controller:

smoke_colliding

There is still a lot to do. First and foremost - optimization and scalability for mass emitting smoke (or explosion) effects like you do in a real game. There is nothing more boring than games that break immersion on the smallest bit of interaction.

5 Likes

The fun stuff #2 - explosions

Don’t need explosions for myself at the moment but thought it is a nice entertaining test showcase for what you can do with fluid solvers. And completely underestimated what kind of finetuning hell it is to get pleasant effects out of it. Also replicating fire explosion vfx you saw somewhere on youtube for the shader was kind of challenging. Even needed to plot simple functions and polynoms to optimize and discover smooth color transitions.

fluid_explosion

Bytheway, this runs on my humble 1070. And the primary bottlenecks are not the fluid physics but the volumetric visualization. Semi transparent things are just so expensive to render with nearly no shortcuts. One of the reasons Microsoft Flight Simulator 2020 is hardly playable on your run-of-the-mill pc. If you own a more recent gpu you can really cramp up the fidelity though and replay your favourite michael bay movie.

3 Likes

Wow that’s some amazing work. A shame it’s so expensive to render.

that looks really promising!
Have you thought about an implementation to import VDB volumes too?

@XeroWolf
Depends. ; )
One of the first papers to fluid solvers in games was published around 2009 and had smartphones as hardware targets. Smartphones that are now 15 years old!
But yeah, visual quality was very low and there were no real use cases for interactive smoke and explosion effects that could easily be prerendered with 100 times more detail. Otherwise these things would pop up in more games.

@DonnieAlex
VDB is a format made for and out of cimema-vfx tools. Unreal supports this only very recently as far as I know and also to cater even more to vfx artists working on movies. I guess VDB is rather something the Flax devs should handle in a professional manner with their own volumetric pipeline that is only used for fog at the moment.

@philstifts yes that’s exactly where I come from :wink: Unreal’s plug in translates the volume into volumetric textures, which makes the use of VDBs feasible in a game environment. Perhaps a better approach in the translation process could make it possible to use in realtime (high end) games. Getting it to run in a fog volume would be awesome, and still useful for cinematic sequences / cut scenes.

In general, I would really much like to see an houdini engine plug in implementation :slight_smile: