Physics Meets Art: Playing With Fire and Water


Krzysztof Mieloszyk, one of the authors of Game Programming Gems 8 and a professor at the Gdansk University of Technology, is an expert on creating realistic-looking explosions, water flow, collisions and fire in game environments. I recently spoke with him about the chapter he wrote about the application of quasi fluid dynamics for arbitrary closed meshes.

Arti Gupta: Why is the role of physics becoming more important to game developers?

Krzysztof Mieloszyk: In the past, games were very simple. People generally found that in games, there weren’t any effects. In the present, every game has to have effects and be realistic to keep gamers and players in the product. People don’t want to play a game where the virtual world doesn’t behave like the real world. They don’t like games if something does not behave realistically, like fire or some objects. It’s not realistic; it’s not interesting. People need to feel like they’re in the real world while playing the game.

A.G.: There are different simulations for water versus fire versus other objects. Are there any considerations game developers should pay attention to?

K.M.: Yes. General physic simulation is important in games, and it depends [what you] want to simulate — waves in the tree or fire or water or object collision. Every situation usually needs different models of simulation. For object collision, you use different a model. For fire, you use models depending on the situation. If it’s only bomb fire, you can use just smart animation. If it will be some kind of explosion, there needs to be some kind of simulation.

A.G.: Even particle simulation would come in there if you’re doing an explosion, right?

K.M.: Yes. It depends on the factors what model you would use … and how precise an algorithm you would use. Sometimes you can write an algorithm that’s almost universal, for fire, liquid, everything. But it needs high computing, and it’s not useful for the games. So you have to find a compromise between quality, heavy numeric computing and realistic behavior, especially in games.