Destroying buildings

Started by
5 comments, last by PolyVox 15 years, 5 months ago
Hey All, I'm currently working on a 3d-fps agme, and I want to implement a dynamic environment. So assuming I have a building, and a tank is going through it, I want the building to break but only in the place where the tank was going into it. I really have no idea how to do this - The only idea I have in mind is creating a lot of Meshes (for the building) and then just destroy those who are near the tank when the collision occurs but this way wastes a lot of space and is not a very smart way. are there any other ways to do this? Thanks in advance.
Advertisement
Not really, this is probably the only possible way since you need to store some structural information to be able to break it down nicely anyway.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
You could try modify your geometry using CSG.

edit: Uhm. yeah, it would be tricky to get the "breaking down nicely"-bit...
Thanks For The Answers

I'll try and check it out
Perhaps you could mark certain bits of geometry as supporting other bits. If the tank hits a sheet metal wall (non-load bearing), subdivide the wall's geometry in the engine and "break" pieces out. If the tank hits (and demolishes) a load-bearing pillar, the geometry supported by it needs to fall. Have you implemented a physics system in your game yet?
It depends on a lot of factors but you might be able to put together a mostly-code solution.

For example, if you had the supporting structures of the buildings be more highly tessellated and modeled a rudimentary interior as well as the exterior you might be able to run a psuedo physics simulation where the vertices are all connected by breakable stiff springs. Depending on how it is tessellated/polygons break off you might be able to pull off something somewhat convincing.

Its definitely not an ideal solution but you will always be making tradeoffs between art, code and performance.
I believe that the approach you have described is reasonable and is how many modern games such as Battlefield : Bad Company do their destructible environments. There is quite a lot of work on the part of the artist, though. It sounds like what your really after is something like Digital Molecular Matter. I don't know how good it is in practice, though (I think it's use in Force Unleashed may have been quite limited).

For a summery of my ideas, read the last post of this thread: http://www.ogre3d.org/phpBB2/viewtopic.php?p=308719

Also, I should shamelessly plug the link in my signature although it is a little different to what you are doing.

This topic is closed to new replies.

Advertisement