Sign in to follow this  
johnnyBravo

Making destructable objects, eg laser burns/holes

Recommended Posts

johnnyBravo    100
Hi, I'm trying to think of a good way to make lots of objects destructable. Because I am going to make a quite basic 3d space sim, but with decent destruction of things like asteroids, space stations and ships. Say maybe 10 to 50 objects in one spot at a time max. Say a ship collides with an asteroid, I thought maybe have the asteroid would make a dent in the ship, or a laser shoots an asteroid and could cut it in half. I thought of using voxels, but I think they would make everything run too slow, as they are more suited to landscapes, or maybe I thought you could calculate the damage and create new triangles etc to portray it. any ideas on making nicely destructable objects?

Share this post


Link to post
Share on other sites
Kelly G    358
If you want to make a lot of desturctable objects, and make it fast, I would probably create broken versions of each object and replace the object with the broken version when it is destroyed. If the player shoots the astroid, replace it with two astroid pieces, each moving away from each other. That seems to be a very light-weight method.

Share this post


Link to post
Share on other sites
johnnyBravo    100
true i guess.

Well imagine you were flying your ship to a space station and you were jumped by some pirates, but you managed to escape them, unfortunetly you sustained some laser fire damage, so when you get to the space station to repair your ship, you can view all the cuts and damage done to your ship.

Some game called galatic federation i think its called, have done it sorta, only that you can take large chunks out.

kelly g, i guess i could do that for the asteroids actually, since there are going to be alot of them, i might aswell save the hard work for the more interesting objects

Share this post


Link to post
Share on other sites
M3d10n    170
I assume this is an indie project. If so, certain "quality shortcuts" are totally understandable. You shouldn't spend limited and precious development resources on lesser details. If you want visible damage, add it to the game in the easiest way you can find.

For asterioids, create set of different sizes (like 1X, 2X and 4X sized asteroids). When a 4X asteroid blows up, spawn 2 2X asteroids where it was and apply oppositing impulse to them.

For ships, you can model their parts separatedly and glue them in the game. For each part, model the different levels of damage (2 or 3). When a certain part gets hit, replace it with the next damage level part.

Share this post


Link to post
Share on other sites
johnnyBravo    100
thanks for the ideas, I'm going to start trying the out.

I've got one more idea, dynamic surfaces, I'd calculate the damage done to the ship eg crashing, or a laser, and then I'd modify the vertices on the parts damaged, eg a dent would add a bit of a pushing in on the surfaces that are damaged, or a laser could cut a cylinder hole into the ship.

I guess the only draw back is, if too many ships in the current area have received heavy damage, the might slow things down.

Does anyone know of this being done before?

Share this post


Link to post
Share on other sites
Binomine    611
Quote:
Original post by johnnyBravo
I guess the only draw back is, if too many ships in the current area have received heavy damage, the might slow things down.

Does anyone know of this being done before?
AFAIK, only in research. The common trick is to voxelize the surface and then realign the vectors based on the surface. It's still a costly operation and not yet sutible for real time applications.

[Edited by - Binomine on November 24, 2004 10:35:34 PM]

Share this post


Link to post
Share on other sites
Trond A    139
This 'idea' have been more or less covered already, but I think this would make for a more dynamic damage system.

I'd suggest to make two versions of all objects, one completely "damaged" and one intact. Then you can make a third version for all objects, that will be an interpolation between the two original models. This would fairly easily allow for local damage as well. Imagine a car that gets a rock in the left side, you'll only interpolate the vertices on the left side towards the damaged model. The vertices only have to be calculated on impact, as you'll have one model set for each object. Or, I don't know if it would be just as good to calculate the interpolation each frame based on vertex damage... It's a memory/speed issue I guess.

EDIT: Oh, and you could edit each vertex color to make the illusion of burn marks... This will obviously not work for _very_ low-poly models. Also, on the damaged-intact-interpolation stuff, the game would run at the same speed with partly damaged units or intact units.

-Trond

[Edited by - Trond A on November 27, 2004 2:13:14 PM]

Share this post


Link to post
Share on other sites
DrGUI    402
I had a game demo, maybe Red Faction where you could blow holes in the walls and floor in a 'greenhouse' - so it has actually been accomplished.


[Edited by - DrGUI on November 26, 2004 2:31:25 PM]

Share this post


Link to post
Share on other sites
Tiblos    122
Hi.

For ships and stations I would use a decal system to show damage. This is pretty cheap and effective. For catastrophic damage a mesh swap accompanied by particle effects would be nice, dust and debris drifting off etc to highlight the level of damage. Even sparks, fire and smoke.


I had an idea for my own space game for asteroid deformation. Because their shape is simple you could get away with deforming the mesh without some of the problems involved with more complex models.

I was planning to generate my roids procedurally for variety. Each one would have a `core` radius ( a percentage of its total size) when you mine or shoot the roid you indent the verts at the location by the magnitude of the impact creating a crater. You simply stop them being eroded when the verts reach the inner radius, this prevents the problems inherent with systems like this (such as people carving holes in objects or cutting parts off which becomes very intensive!), while allowing the player to have fun blowing holes in stuff.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this