Jump to content

Destructible objects?


BES
 Share

Recommended Posts

I was wondering if anyone knows how to do something like this:

in the Leadwerks Engine?

 

I been trying to find some tutorials ..haven't found any....so im thinking this isn't possible?

 

I saw 1 youtube video with exploding barrels in Leadwerks, but the wooden crates right next to the exploding barrels were fully intact still...

 

 

Any info on how to do it would be appreciated! ..thanks

Threadripper 2920X Gen2 CPU(AMD 12-core 24 thread) | 32Gigs DDR4 RAM | MSI Nvidia GeForce RTX 2070 Stock OCed | ASRock X399 Professional Gaming Motherboard | Triple M.2 500Gig SSD's in Raid0

Windows 10 Pro | Blender | Paint.NetWorld Machine | Shader Map 4 | Substance Designer | Substance Painter | Inkscape | Universal Sound FX | ProBuilder | 3D World Studio | Spacescape | OpenSky | CubeMapGen | Ecrett Music | Godot Engine | Krita | Kumoworks | GDScript | Lua | Python | C# | Leadworks Engine | Unity Engine

 

Link to comment
Share on other sites

Yeah, it's probably not possible to make such buggy physics in LE, like the roof jumping around :D

But you can make a much more realistic physics breaking in LE, by only setting the mass from 0 to 1 (or some higher value), when the physics object is hit with a strong force, like a bullet.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Of course you can do that, a variety of ways. The easiest would be fixed joints. The "proper" way would be to use zero for the default mass, and then change the mass of an object when shot. You'd want to add a setting for some pieces to be "base" segments that cause the entire structure to collapse when that piece is broken.

 

With all these types of systems, including PhysX, it takes so much work to set up the art assets that people usually don't bother. You can construct a shack out of individual pieces like that, but it's a lot of effort for something that isn't really worth it.

 

I'm much more interested in real dynamic breakage, but no one has done it yet. I think our CSG solids can be used for this because they can be split and carved in real-time. We'll see how it goes.

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

Masterxilo has done real dynamic breakage in LE2 in his wood log slicing video:

His technology works also on planks and owls, as you can see in the other videos on his web page.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Cool, thanks ill mess around with it then ...

 

I am one of those people that like realism, so this was nagging me a bit...

 

Because I wanted to make a space game and wanted to be able to blow objects off of the space ships for example..

Threadripper 2920X Gen2 CPU(AMD 12-core 24 thread) | 32Gigs DDR4 RAM | MSI Nvidia GeForce RTX 2070 Stock OCed | ASRock X399 Professional Gaming Motherboard | Triple M.2 500Gig SSD's in Raid0

Windows 10 Pro | Blender | Paint.NetWorld Machine | Shader Map 4 | Substance Designer | Substance Painter | Inkscape | Universal Sound FX | ProBuilder | 3D World Studio | Spacescape | OpenSky | CubeMapGen | Ecrett Music | Godot Engine | Krita | Kumoworks | GDScript | Lua | Python | C# | Leadworks Engine | Unity Engine

 

Link to comment
Share on other sites

I'm also a reality fan, and I've made a few space game demos, the last one had even infinite streaming space donuts from a sqlite3 database. So you can do infinite maps in LE without any zoning, if you don't use too many different models. Newly loaded models take a few milliseconds lag, and also resetting the camera to the 0,0,0 point when the shadow limits are reached, but those are not zoning, but more like Anarchy Online staggered streaming.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Cool, thanks ill mess around with it then ...

 

I am one of those people that like realism, so this was nagging me a bit...

 

Because I wanted to make a space game and wanted to be able to blow objects off of the space ships for example..

That's a little easier, due to the lack of gravity. I would just create a fixed joint and delete the joint when the object was shot. That's an easy way to make bits and pieces of ships break off.

 

Masterxilo has done real dynamic breakage in LE2 in his wood log slicing video

That's cool, but it's still pretty limited. I'd like to implement something that works on any CSG solids. The breakages probably will not look as good as the pre-broken DMM stuff, but if I had the choice I'd rather have dynamic breakage that is simpler and looks worse than pre-made breakages that look better but require extra work to set up.

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

APEX Destruction

 

Authoring functionality is provided via PhysXLab, a standalone GUI authoring tool. Using PhysXLab, users can take artist-provided meshes, split them into broken fragments and export generated Destructible assets in standart APEX asset (.apx and .apb) file formats. Exported asset will include hierarchy of fractured meshes, collision information and physical material parameters, and support information for each chunk as well.

Link to comment
Share on other sites

That first video doesn't really look all good or real.

 

I would think destroying CSG solids would be able to produce some pretty realistic results on predefined blast types. A bullet or dynamite could probably be reproduced fairly well when done against say a wall, ground, or pillar. Adding the idea of physics to where things would collapse I would think would be difficult. Putting holes or blasting out chunks would be about setting tolerances and forces for the CSG solids and then applying some carve out logic with that given data to reflect what an impact defined by some force would look like against the "toughness" of the CSG solid (doable for someone like Josh who has experience with CSG). When the force hits, run this logic against it, make some particles and generated debris and blast it out with a force. But doing that blast all around a small concrete hut and having the hut eventually cave in under the weight I would think would be difficult to automatically do I would think.

 

Would PC's be able to generate this kind of thing RT fast enough?

 

Everything from PhysX looks like it breaks apart as wood. Even the concrete walls in one of the videos.

Link to comment
Share on other sites

You control the slices, what is sliced, how it's sliced, what is ignored, etc..

 

Looks fairly accurate enough to me as broken concrete or tile.

Batman_AA_wiki_1.jpg

 

Usually meant for static meshes but I've got this working with dynamic meshes as well. I don't think players will care that much that something isn't breaking 100% realistic, it simply adds overall appreciation/game-play value of a more interactive environment.

Link to comment
Share on other sites

That first video doesn't really look all good or real.

 

I would think destroying CSG solids would be able to produce some pretty realistic results on predefined blast types. A bullet or dynamite could probably be reproduced fairly well when done against say a wall, ground, or pillar. Adding the idea of physics to where things would collapse I would think would be difficult. Putting holes or blasting out chunks would be about setting tolerances and forces for the CSG solids and then applying some carve out logic with that given data to reflect what an impact defined by some force would look like against the "toughness" of the CSG solid (doable for someone like Josh who has experience with CSG). When the force hits, run this logic against it, make some particles and generated debris and blast it out with a force. But doing that blast all around a small concrete hut and having the hut eventually cave in under the weight I would think would be difficult to automatically do I would think.

 

Would PC's be able to generate this kind of thing RT fast enough?

 

Everything from PhysX looks like it breaks apart as wood. Even the concrete walls in one of the videos.

 

I am guessing that in those videos since they made everything destructible they could not give the detail that you would like. Check out this tutorial for it and you can see that you can get the detail that you want. Looks quite easy and I just applied to get it.

 

Link to comment
Share on other sites

At the moment you'd have to do it all yourself. Replacing an intact mesh with a mesh in fractured pieces upon the intact meshes "death."

That's exactly how I did it with the exploding barrel video I posted on YouTube (which is probably the video you were referring to BES). The reason the crates weren’t destroyed is simply the fact that I hadn't modeled the broken parts for the crates at that point. The code handles destruction of any object into any number of bits so long as you provide a configuration file pointing at one at one to many broken part files. All the physics is handled automatically along with the propagation forces to trigger secondary destruction and any associated animations/emitters to be run concurrently.

 

This technique will always have limited use as a lot of work needs to go into the front end modeling but any tools that can help with this process, such as the ones being highlighted, or better still enable it to be done dynamically have got to be a huge plus!

 

I never delved any further into this as it seemed to move things out of the realm of the average indie developer and more into the domain of the big game studios with their huge resources.

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 think there's a new general-purpose tool out there to do this with any physics lib that someone posted a while back. I forget what it's called.

 

To me, it always comes down to this increases the art pipeline complexity, and if people can't handle the current workload required, there's no way they'll be able to handle even more complexity. I think the current method of "breaking" objects is a fad people will quickly get tired of when they see how limited it is. Some technology is a real step forward, and some is a trick to look like something it's not. I was initially very interested in this idea, and then I saw the pre-made fragments and the necessity to set each fragment as either "breaks away" or "the whole structure crumbles when this is shot". You can see the effect of this in a lot of videos with pieces that remain suspended in the air because someone forgot to set a fragment's break mode. This has been around for a while, you can download "Warmonger" from 2007 here:

http://www.nvidia.com/content/graphicsplus/us/download.asp

 

Real breakage is the way to go in my opinion, even if the results are more simple than what pre-made fragments can do. I really think we can make CSG solids you can chip away the structure of in real-time, and have it break a different way each time.

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

That's also to say that majority of games made with LE3 would be made mostly of CSG. I would imagine only a certain amount of props would be made with CSG (Source engine comes to mind and their games) but majority of the props/environment would be mesh. In that case, my kitchen cabinets would go to pieces on impact, but not my decorative vase, lol.

Link to comment
Share on other sites

I think there's a new general-purpose tool out there to do this with any physics lib that someone posted a while back. I forget what it's called.

 

To me, it always comes down to this increases the art pipeline complexity, and if people can't handle the current workload required, there's no way they'll be able to handle even more complexity. I think the current method of "breaking" objects is a fad people will quickly get tired of when they see how limited it is. Some technology is a real step forward, and some is a trick to look like something it's not. I was initially very interested in this idea, and then I saw the pre-made fragments and the necessity to set each fragment as either "breaks away" or "the whole structure crumbles when this is shot". You can see the effect of this in a lot of videos with pieces that remain suspended in the air because someone forgot to set a fragment's break mode. This has been around for a while, you can download "Warmonger" from 2007 here:

http://www.nvidia.com/content/graphicsplus/us/download.asp

 

Real breakage is the way to go in my opinion, even if the results are more simple than what pre-made fragments can do. I really think we can make CSG solids you can chip away the structure of in real-time, and have it break a different way each time.

 

 

Did you watch the tut. That I posted. I am banking on you making LE3 easy. But if a end user can not use appex fracture tool then they will not be able to use LE3.

D

Link to comment
Share on other sites

Did you watch the tut. That I posted. I am banking on you making LE3 easy. But if a end user can not use appex fracture tool then they will not be able to use LE3.

 

I don't know if I'd agree with that. From a programmers perspective I'd prefer to have this all done for me in code with maybe a setting on the CSG model. If at all possible I'd prefer not to have external dependencies to accomplish this. If possible.

Link to comment
Share on other sites

I think it would be incredibly performance hogging (slicing multiple CSG at a single time after multiple impacts and applying material to the sides of each chunk), for hardly any benefit or with even reasonable looking results, on CSG only environment assets. All of that together sounds like a waste of time. But, Josh will do what he wants.

Link to comment
Share on other sites

I don't know if I'd agree with that. From a programmers perspective I'd prefer to have this all done for me in code with maybe a setting on the CSG model. If at all possible I'd prefer not to have external dependencies to accomplish this. If possible.

 

 

I think all programmers would rather do thins in code. Sometimes outside apps can make things a lot easier. The guy in the tut fractured the collum in less than 2 mins. Can you do that in code?

Link to comment
Share on other sites

Well ....I would say that BFBC2 is and BF3 will be a good examples of object destruction, it seems pretty impressive to me, I played the BF3 Alpha ...shoot an RPG at a large corporate building where someone is shooting at you using the wall as cover and you will blow a massive hole in the wall....shoot the RPG multiple times and parts of the building start falling off..

 

Shoot just about anything and its breakable.. still got impressive FPS while all that was going on...maxed graphic settings...

 

I just wanted to break up simple objects for starters in the Leadwerks engine...crates, barrels, maybe a building ...

 

I was only concerned because I didn't see very many youtube videos about Destructible objects using the Leadwerks Engine...

Threadripper 2920X Gen2 CPU(AMD 12-core 24 thread) | 32Gigs DDR4 RAM | MSI Nvidia GeForce RTX 2070 Stock OCed | ASRock X399 Professional Gaming Motherboard | Triple M.2 500Gig SSD's in Raid0

Windows 10 Pro | Blender | Paint.NetWorld Machine | Shader Map 4 | Substance Designer | Substance Painter | Inkscape | Universal Sound FX | ProBuilder | 3D World Studio | Spacescape | OpenSky | CubeMapGen | Ecrett Music | Godot Engine | Krita | Kumoworks | GDScript | Lua | Python | C# | Leadworks Engine | Unity Engine

 

Link to comment
Share on other sites

Virtually no one has a working game engine yet capable of demoing even the most basic of games but we spend time arguing over having to have dynamic breakable object functionality. Believe me, there are more important things to be doing with our time :P

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

If Josh does the coding framework for it and all I have to do is set some values on the csg model, then it could be done in about 5 seconds by all us users. The settings would basically be tolerances of forces. When x forces is applied to a given point on the CSG model look at the tolerance of CSG model (what kind of material is it, how deep can the blast go, etc) then based on those values the code to break the CSG model runs. In the game if you shoot the CSG model you apply a force at the point of contact the relates to the type of blast you want. Smaller force for a bullet and a big force for dynamite for example.

 

Sometimes outside apps can make things a lot easier.

 

I think outside apps make things more realistic, but not easier than having it all integrated into the engine directly via code. Converting all these models to gmf and textures to DDS and making these mat files is a big pain and time consuming enough.

 

 

Believe me, there are more important things to be doing with our time ;)

 

Not when I'm at work killing time before my football game :P

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...