xtreampb Posted December 30, 2011 Share Posted December 30, 2011 I know that josh said something in one of his blogs about having rubble like broken boards and such. I would like for there to be a destructive component for the engine. Similar to what can be found in the battlefield series. Destruction on that scale would be intense to integrate. This might be my ignorance speaking, but couldn't the GMF models have like destruction models. Something similar to the LOD already in place. Maybe AOD (amount of destruction). I guess a fix for now would be for a building model already have parts cut our and when the "health" gets low, some pieces fall off. Something like destruction 3 found in frostbite would be insane to have because everyone likes to blow things up, and a destruction component always makes games better in my opinion. Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Pixel Perfect Posted December 30, 2011 Share Posted December 30, 2011 Basic destruction functionality isn't too hard to code yourself. Here is a link to a video I made years ago featuring breakable objects in LE2 (barrels in this case but it can be anything) which works along the lines you are suggesting: STRANDED - The Game: Exploding barrels . I seem to remember that wh1sp3r did some destructible stuff with buildings in the past too (possibly on the old forum). It would be nice to have some integrated destruction feature though; as Josh wetted our apatites for this some time back by posting a link to a video demoing destruction capability within Newton. I don't know what ever came of that! Quote 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 More sharing options...
xtreampb Posted December 31, 2011 Author Share Posted December 31, 2011 That sounds good for now. Do you have any snippets you wouldn't mind sharing or some logic on how you acheived this? Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Josh Posted December 31, 2011 Share Posted December 31, 2011 There's two ways to do this: CSG brushes can be broken programmatically. This is nice because it requires zero pre-processing and no extra artwork preparation. The breaks are pretty simple, but they can be more complex as CPU speeds increase. In the long run, this is the right way to do things. Another option is to have an entity set to replace itself with a number of different models once a damage threshold is reached. This is how HL2 did breakages, and how PhysX still does it. It requires more work in the art pipeline, but the breakages look more realistic (although they break the same every single time, regardless of the point and direction of impact.) Neither approach deals with shearing forces, so the results will always be limited until that is addressed (which would require many times more computational power). This is why in these demos you always see breakable pieces being shot off an indestructable frame. I've seen a lot of videos where they go out of their way to hide this, but it's always the case. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
xtreampb Posted January 1, 2012 Author Share Posted January 1, 2012 Great! I tried reading up on CSG but was only more confused. Is there a tutorial on how to programmatically break a CSG brush? What is the difference between a CSG Brush and a GMF Model? Thank you everyone for your help, ~Xtreampb~ Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 2, 2012 Share Posted January 2, 2012 Another option is to have an entity set to replace itself with a number of different models once a damage threshold is reached. This is how HL2 did breakages, and how PhysX still does it. It requires more work in the art pipeline, but the breakages look more realistic (although they break the same every single time, regardless of the point and direction of impact.) Josh described the two options well. The above option was the one I used and it does work well. I simply coded a series of classes to support a generic approach to this with each breakable object type having a config file detailing the parameters and model parts. The forces needed to trigger a break could be configured along with whether the objects were explodable and or flammable and parameters set to control the propagation distances so flames and explosions could spread to adjacent objects. It worked pretty well although when the numbers of objects got large I did experience some issues with instability in the physics engine. All of the broken parts were dynamic physics objects in their own right. Quote 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 More sharing options...
Recommended Posts
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.