Simulated building collapse caused by a gas explosion. This simulation was done using my own physics engine, written in C. One of my other programming projects, the procedural city, serves a an environment. Interaction between the physics engine and the procedural city is minimal. A ground mesh is draped over the procedural city and cars stop when too many thing break nearby. The physics model is a mass-spring system. Fire, smoke and dust are simulated using spherical particles. For fire this doesn't work very well, but I don't know a simple way which works better. Not all materials have collision detection for performance reasons. The springs are drawn as lines, triangles fill the space between the springs. These triangles are just for drawing, they don't have any physics. Each camera has it's own settings for which elements are drawn and how they are drawn. For example one camera in this simulation derives the color of the spring from the actual force applied to it. Another camera translates speed to color. The simulation is done using a timestep of 1/8192 sec, so springs can be made stiff enough. In total there are about 8M springs in this simulation and it takes 3.5 hours to run. Please do not ask for source code, it is not in the public domain. If you want to program this sort of physics engine yourself, there are a lot of great books and articles about game physics engine design online, explaining how to do this and a lot more.
Негізгі бет Building collapse simulation in physics engine
No video
Пікірлер: 94