Jump to content

Destructible Environments - Josh?


Shard
 Share

Recommended Posts

On the old forums I brought up the question of destructible environments (buildings mainly) and Josh linked a Youtube video from Newton showing a temple being destroyed by a rock and said that it was coming.

 

I'm the just wondering what the status of the destructible environments is.

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

You guys are really asking for the pain! :) The art pipeline for destructible assets can get pretty complicated from what I've heard, but it would neat to have the option. Bad Company 2 is a great example of how destructible environments can completely change game mechanics.

Link to comment
Share on other sites

You guys are really asking for the pain! :) The art pipeline for destructible assets can get pretty complicated from what I've heard, but it would neat to have the option. Bad Company 2 is a great example of how destructible environments can completely change game mechanics.

 

Oh definitely. An RTS game changes a significant amount. And FPS just become awesome, like CoD:MW2 where you can start shooting through a wall until it breaks and kills an enemy behind it.

 

Or just rocket the building the enemy is in :lol:

 

Plus it allows for the map to become far more dynamic and evolving as things change and the players need to adapt to it.

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

The art pipeline for destructible assets can get pretty complicated from what I've heard

 

Lovely and simple with UDK's fracture tool.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

You can't destroy anything in CoD (except for scripted things in the campaign maybe). I guess you meant Battlefield BC2.

 

Whoops, indeed, BF: BC2

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

Various people including myself have tried this with some success. I developed a series of classes for defining destructible objects of which my exploding barrels are an example as they break apart when exploded (video link). I went on to add crates etc. I know wh1sp3r demoed some destructible buildings too which looked really effective. The trickiest part I found was generating the physics objects for all of these but the technique works really well.

 

The Newton demo gave me the impression that the destruction was being done procedurally in code rather than using the prefab fractured object method, but I may be wrong.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

I was under the same impression as Pixel and it was being done in code and not prefabs.

 

http://www.youtube.com/watch?v=cyWgER5O1YI

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Various people including myself have tried this with some success. I developed a series of classes for defining destructible objects of which my exploding barrels are an example as they break apart when exploded (video link). I went on to add crates etc. I know wh1sp3r demoed some destructible buildings too which looked really effective. The trickiest part I found was generating the physics objects for all of these but the technique works really well.

Very nice! Do you swap out the model with broken parts when collision force reaches a threshold and then apply forces to them? I'm thinking of doing it this way, but don't like the idea of making all those individual pieces because i'm pretty weak when it comes to modeling

 

How would you accomplish this without using prefabs? What would be step-by-step process in pseudo code?

If i'm thinking in terms of a simple cube that is supposed to be solid stone block i can put a plane through it and work out where to add vertices to split the cube in two, maybe offset them a little to make a rougher cut and get some funky texturing.. in an actual mesh it would be many times more complex not to mention texturing, and would probably be very costly to create two or how many more physics bodies(likely convex hulls) and update the vertex buffers on every fracture. This would probably be more suited to pre-calculate some pieces based on different fracture points and then when the object breaks swap it out with the closest matching to save you from doing it by hand, hmm..

 

Maybe if you distribute some 'spare vertices' inside the mesh you could use those as fracture points and form new faces with them on the mesh?

I think i read somewhere that we'll be able to create vertices in the shader so maybe this will open up some possibilities?

Link to comment
Share on other sites

Very nice! Do you swap out the model with broken parts when collision force reaches a threshold and then apply forces to them? I'm thinking of doing it this way, but don't like the idea of making all those individual pieces because i'm pretty weak when it comes to modeling

Yes, each destructible object can have a whole load of properties set against it including the breaking force, so anything exerting this force from a nearby explosion to a collision with another object or even a fall from a height will initiate the break where the prefab parts are swapped for the original and forces applied to separate them.

The barrels for instance have a propagate explosion distance property assigned to them, and barrels within this distance from an exploding one will explode themselves. Yeah, I had to break the models apart myself in my only legal modelling tool as I can't afford the more sophisticated modelling tools (and I don't rip software). As I'm not a modeller either I found that a steep learning curve! The Blender tool looks nice though!

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...