0
\$\begingroup\$

I am trying to determine the most appropriate destruction solution for an online desktop game. There are two main factors here that I am considering; 1) the performance of the approach taken and how much resources it requires, 2) the turn around time for making an asset "destructible".

There are three main destruction approaches which I am aware of:

1) Creating a destruction animation for each asset, which plays based on specific conditions

2) Create a second version of each asset consisting of rigidbodies. Under specific conditions, replace the static asset with the rigidibodies and gravity/ other physics forces will cause it to collapse

3) Use a mesh splitting system to dynamically split static assets into rigidbodies at runtime

Option 1 appears to have the best performance, however it also requires the most preparation time to do realistically. Option 3 on the other hand requires no preparation time for assets, however it is the heaviest on performance since it is completely physics based.

My question than is, which of the above approaches is most common in the industry today? Or if there is another better approach which I have missed, what is it. Ideally I would like to go with option 3, but I fear that the performance hit would be too severe.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ 4) Use voxel-based assets that are easily destructible by design \$\endgroup\$ – Igor S. Oct 17 '15 at 9:27
  • 2
    \$\begingroup\$ I think there are too many factors to consider to make a cut and dry decision. That is why all styles are still used in different games today. \$\endgroup\$ – Steven Oct 17 '15 at 15:30
  • \$\begingroup\$ Thanks Steven. This pretty much answers the question. Please convert your comment to an answer and I will accept it. Since you have mentioned that all of the above approaches are still being used, could you possibly include a game example for each destruction approach? This will make it easier for any future readers to see in what context each approach is most useful. \$\endgroup\$ – FrontEnd Oct 18 '15 at 0:42
1
\$\begingroup\$

I think there are too many factors to consider to make a cut and dry decision. That is why all styles are still in use today. Some projects use more then one in concert - animate the core elements and use physics to drive some additional dynamic objects or particles. The latest GTA worked that way in many places - some dynamics but a lot of canned animation since gameplay elements were important and objects and characters needed to end up in the right place for progression. Games like Star Wars: The Force Unleashed uses both predefined shatter points and dynamic mesh splitting because it is core to the power and structure of the player, and everything needed to be slicable by a sabre. Voxels are popular now for all over 'everything is destructible' but there are trade offs there, as well.

\$\endgroup\$
3
  • \$\begingroup\$ For specifically building based destruction such as that seen in the Battlefield series or the new Rainbow Six Siege; are the buildings largely models consisting of separate meshes which simply use a "destruction animation" once they have received enough damage? Or is their some physics involved? \$\endgroup\$ – FrontEnd Oct 20 '15 at 8:36
  • 1
    \$\begingroup\$ I didn't play all the battlefield games, but I do remember that they used a fixed structure that could never be destroyed, and then had pieces that could be removed when an explosion happened near by. They spawned physics objects and particles for debris, but the debris didn't ever impede gameplay. Later games might have had more sophisticated systems, but I doubt it. \$\endgroup\$ – Steven Oct 20 '15 at 15:55
  • \$\begingroup\$ So that would mean that the destructible pieces were already pre-fractured I suppose. \$\endgroup\$ – FrontEnd Oct 24 '15 at 6:34
1
\$\begingroup\$

These days, for games? You're likely to find that cubic voxels or other uniform-subdivision approaches (voxels, hexels(?)) are the most common... it's a bit of a fad. You might call this the "atomic" approach since destructibles are made up of atoms as in the original sense of that word, i.e. "indivisible element". Building a thing as inherently fragmented makes it far easier to actually break it up - both logically and visually - when the time comes, and is the reason why (again, these days and specifically for games) it's far less common to go for dynamically-fragmented geometry... one of the problems with this latter approach is that it can be harder to control the process of fragmentation in a way that doesn't potentially impact heavily on performance, for example, when shattering a wall, just how many vertices are needed? How many are too many for the hardware? Using atoms, these questions are immediately answerable because the lattice in which they exist immediately answers such questions - e.g. within 5 meters, we have 5 voxel boundaries.

Another approach that is related is something more like octrees or KD-trees, where we may still have these atoms but they are wrapped / grouped in large elements to avoid having to deal with many finer elements except where absolutely necessary. For example, if we cast a ray through a space, if a container element contains no atoms, we can walk through it in a single step, but if contains one or more, we'll need to be iterate through it on an atom-by-atom path in order to ensure we don't hit any obstacles on the way through.

Games built using the atomic approach e.g. cubic voxels make this easier because we can say definitively that within some distance, area or volume, we have P(x Q(x R)) individual elements we will have to deal with as a result of some or another destructive action.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Great answer, thanks a lot for the insight Arcane Engineer. \$\endgroup\$ – FrontEnd Oct 19 '15 at 13:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.