Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Destructible environments. Time for this thread again!

Discussion in 'General Discussion' started by Nanako, Nov 10, 2014.

  1. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    hello all. I know that this is a subject which comes up a lot. I googled before startng it, there were threads a few years ago and lots of people pointing to Piecemaker, which seemed to be the Next Big Thing. I followed the paper trail a fair bit to get there.

    Unfortunately, the support thread is full of complaints. It seems to have no shortage of bugs, hasn't been updated for a long time (requires unity 3.4.2 or higher, lol). and most notably, the author is gone. So there's no support, fixing, or response on anything. The project is dead and worthless as far as i'm concerned.

    There was a lot of interested posters in the interest thread for it though, it seemed like something with a notable market. Has any competitor come along to replace it yet?



    Edit: I'm presently looking at This wonderful looking package: https://www.assetstore.unity3d.com/en/#!/content/9411

    It seems to be pretty full featured. It doesn't cut meshes dynamically/in realtime, but perhaps that's too much to ask of modern computing technology anyway. It does, however, have a toolset built in for generating fractured objects at authortime.

    The main issue i see though isn, isn't that still going to add a lot of overhead, having the pre-fractured, ready-to-break objects sitting around your scene? What could be done to work around this?

    I'm thinking possibly having lots of plain, flat, cuboid walls around, which are replaced with pre-fractured prefabs, and handed over to this system, whenever they become "interesting" (ie, something hits them). The system does include scripting methods for creating impacts and explosions, so perhaps i could use that to "fake" that first impact when the system wasn't there to register it.
     
    Last edited: Nov 10, 2014
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    I guess it depends how much destruction you want to do and how you want it to animate and how flexible etc, and whether it needs to support other features like dynamic lighting etc. I mean, you can make a destructible environment out of physics cubes that are just sitting there like a brick wall. Or you could have some mesh-slicing thing, or fragmentation thing, or breaking things down by vertices etc.
     
  3. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    well the thing is, although i do have a project, and a specific design in mind, those sort of technical decisions would, i feel, be best made based upon what tools and toys i have to work with.

    The "wall made of physics cubes" is certainly too simple for most gaming purposes, imo. i'm defnitely looking for something more complex than that, though at present, how complex is still an enigma.
     
  4. Kensei

    Kensei

    Joined:
    Apr 26, 2013
    Posts:
    63
    I am in no way well informed but doesn't nVidia's new FLEX system solve for any and all destruction? ALthough I have no clue how exactly will it work.
    As it stands now from what I know is that you need to have prefabs with several stages of destruction of an object (for example a car) and then instantiate them based on the damage taken. I've seen a terrain random generator and destruction solver asset in the asset store, but I haven't tried it.

    Actually it would be pretty cool if somebody explains how FLEX will work in Unity 5, and what would the process of setting up a destructible item is. For example if we have a wall, Do we just have a wall being hit by a grenade. From the demos I've seen (even though they do them in UE4) it seems that the system calculates and generates on the fly without any extra assets in the background. I dunno really, if I were you I'd just postpone destruction until Unity 5 hits and do it all with FLEX (well, depending on how it ACTUALLY works).
     
  5. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    The fracturing and destruction is a good package and generates the pieces and a single mesh and takes care of swapping them when hit.

    Exploder can dynamically shatter objects during runtime, you can even shoot the broken pieces and they shatter into smaller pieces.

    There's also some projects floating around that edit a unity terrain to leave craters where bombs hit using terrainData GetHeight(s)/SetHeight(s)
     
    Nanako likes this.
  6. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    aha! thank you, specific mentions of packages is what i was looking for. I'm investigating that now
     
  7. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    huh ? doesn't Nvidia make videocards?

    what's the purpose of a hardware manufacruter doing this, , isn't it going to be useless until commercial engines integrate it ?
    i'll research that too
     
  8. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    okay, done with my poking around for now. It does indeed seem to do what it claims, slicing meshes at runtime, and impressively quickly, too

    I do notice though, that it has ridiculously aggressive culling. The demos on the store page cull far too much for my liking. That shouldn't be related to the effectiveness of the cutting script, but to unity's capability of handling lots of small objects.

    I think i'll probably buy that at some point and use it to extend my ideas, although as-is it doesn't seem like much of a complete solution, more a tool to be used for edge cases. Thank you greatly!
     
  9. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    851
    I like the exploder asset. I'll add it to my wishlist.

    I have the fracturing and destruction asset but I haven't really used it yet. I must have bought it when it was on sale.

    Anyway, I just tried it with Unity 5 and it the 4 included demo scenes worked without issue.

    Just an fyi.
     
  10. Kensei

    Kensei

    Joined:
    Apr 26, 2013
    Posts:
    63
    UE4 integrates it. They have demos on it.

    Also, nVidia made PhysX, I'm surprised that you're surprised.
     
    Nanako likes this.