Jump to content
  • Advertisement
Sign in to follow this  
Kest

Highly destructible

This topic is 3627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What would be the best way to implement highly destructible objects like chairs, tables, sinks, toilets, etc, in a real-time 3D shooter? By destructible, I mean spec by spec. Something on a pixel level, such as in games like Lemmings or Worms, but 3D. Rendering is one big question, but there also needs to be rather decent collision detection. For an example, it might be possible to set up a 3D grid of an object, where each cell in the grid has hit points. Collision detection could then be disabled for a cell when it is destroyed, allowing a bullet to pass through it next time to hit another cell. If all cells are a specific size, it would obviously be a little inaccurate (cells would fall under or above the visible surface), but if they're small enough, it probably won't matter too much. Large-scale collision detection, such as chair vs character, isn't an issue. Something like a chair would likely use a simple cylinder until it's mostly gone, then be disabled for that scale collision. The visible insides of objects can be very simple. Black or charcoaled-looking textured quads, or something similar would be okay. Are there any articles or resources about this? Anyone have ideas?

Share this post


Link to post
Share on other sites
Advertisement
Maybe look into fluid dynamics for collisions, the PhysX SDK has some demos. Its going to be ridiculously computational instensive to get granularity down to a 'spec' level.

Share this post


Link to post
Share on other sites
Quote:
Original post by Guthur
Its going to be ridiculously computational instensive to get granularity down to a 'spec' level.

Which part, the rendering or the collision detection?

In either situation, specs could be combined into larger surfaces when their states match. For example, an undamaged flat 25x25 spec area can be rendered as 1 quad.

However, dealing with custom objects in that fashion is a pain in the ass. That's why I'm here looking for advice. Is this kind of thing not feasible, or does it just take some extra work?

Share this post


Link to post
Share on other sites
Voxels would be one way to do it, in fact Voxelstein 3D does exactly this so you might want to give that a play.

Unfortunately voxels won't be hardware accelerated like polys, so you're forced to use a lower screen resolution to keep the framerate up. Coupled with the resolution of the voxel grid things are going to look pretty pixelated.

If you want proper resolution 3d graphics I'd be tempted to just manually break objects like chairs down into multiple segments that can be broken and shot off. Depends on how important accuracy is to your gameplay.

Share this post


Link to post
Share on other sites
Maybe you could break it up on a per polygon basis, possibly using geometry shaders and adjacent triangle picking to implement it using DX10 hardware, which will give you some form of hardware acceleration.

Fluid dynamics was more for the physical simulation, I was just think that if you were really atomizing an object it would act very much like a fluid in those demo simulations.

I'm sorry I haven't enough experience to give you a clear solution, I'm building a map at the minute, so my designer hat is on for the next few days :p.

Voxels would also be cool, the lack of hardware support may be a problem when it comes to rendering, as mentioned by others.

[Edited by - Guthur on January 8, 2009 8:56:52 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Kest
Something on a pixel level, ..., but 3D.

That's basically the definition of a voxel [smile]

There are a couple of places you could look. As mentioned above, Voxelstein3D is a cool little game built on Ken silverman's Voxlap game engine, which is exclusivly voxel based. It really is an impressive peice of tech.

At risk of shamelessly plugging my own project, you might also be interested in Thermite3D which is a hybrid polygon/voxel engine. Even if you don't want the whole engine, the core PolyVox Technology is a seperate library with no external dependancies. It's work in progress, but getting close to being usable.

If you decide you do want to look into voxels, you might also be interested in Ken Silverman's Forum

Share this post


Link to post
Share on other sites
Nice engine PolyVox, only watched the video.

If you don't mind a suggestion and the OP doesn't mind a mild hijack :p ; I would suggest, if possible, showing more volumetric like voxel removal eg craters. I know it is showing it but its not immediately obvious. On quick glance it can look like you aren't actually 'digging' into the voxel space, the castle wall is the only real obvious example of it.

But still cool :)

I'm a voxel 'noob' so if I am incorrect in my desciption or suggestion don't be too rough ;). It's something I'd like to look into myself sometime; its a pity it hasn't gained more traction in the mainstream.

Share this post


Link to post
Share on other sites
Quote:
Original post by GuthurI would suggest, if possible, showing more volumetric like voxel removal eg craters. I know it is showing it but its not immediately obvious. On quick glance it can look like you aren't actually 'digging' into the voxel space, the castle wall is the only real obvious example of it.


Agreed, and the reason why it isn't shown very well at the moment is because of the difficulties in creating volumetric content (something the OP should also keep in mind). In the case of that castle, it was created by converting a polygon mesh which is (by its nature) hollow. At some point I may implement a 3D flood-fill to go through and fill the hollow regions.

The game Forever War (which is built on an earlier version of the engine) is actually a better example of being able to dig through the world. In this case the worlds are generated procedurally and so do not suffer from the 'hollow' problem in my demo.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!