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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Ultimate Fracturing Destruction editor extension for Unity 3D

Discussion in 'Assets and Asset Store' started by UGTools, May 30, 2013.

  1. Talony

    Talony

    Joined:
    Aug 10, 2016
    Posts:
    10
    Hi all,

    We've been using this for mobile with Voronoi. It's great yet the objects, when split, have a lot of chunks. Maybe not a huge amount in the grand scheme of things - however when there are multiple objects fracturing and pieces flying all over it can cause a few frame rate drops as you'd expect!

    I'm looking for advice and some help - do you have any tips on how best to get the LEAST number of chunks on Voronoi? Mostly because that method is a lot nicer/exploded chunks of objects look great.

    I believe at the moment I'm getting between 20-30 chunks per object; if I could get that to 10 (or less!) that would be great. Any tips/ideas on how best to do this?

    Also great to see @UGTools back! Hope you continue to recover well :)
     
  2. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    888
    There are so many nice assets that are not supported any longer. I also wanted to buy this one, but I do not until the author reply contantly and provide an update. And who knows what happen to unity2017.

    * Does the asset is able to replace an un-destroyed object with a destructable object only until it was hit, like pooling?

    * Does the breaking pieces disapear after a predefined time step by step to save performance and drawcalls?

    * After an object is destroyed, is it possible to respawn the same object after a predefined time or by distance 》x to the object and the cam is not facing the object?

    * Does the asset is able to combine pieces ( after the last falling piece has none velocity ) into one mesh and collider (to an static GO) to save performance and drawcalls?

    Didnt find any info about these essential options.
     
    Last edited: Mar 26, 2017
  3. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    I've been using this software and it's fantastic but I've run into problems with using particle effects to seperate chunks from the main game object. It works absolutely fine with your standard gameobject and rigidbody, is there something special I need to do to get it working or is there an option I've missed somewhere.

    I tried contacting your support site directly a couple of times but there has been no response, does anyone know if the developer is even active? I hope I haven't just wasted $60. For those wondering about this the tool works great but the lack of response I've received from the developer is worrying.

    Edit: Just found the post that UGTools made, that explains a lot! Hope everything healed! I guess this is the problem with small developer teams or one person doing all the work, has anyone else worked out how to get world particle colliders working with the destruction tool?
     
    Last edited: Apr 12, 2017
  4. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    888
    tapawafo likes this.
  5. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hello guys! It took a little longer than expected but I'm back again and doing really fine :)
    I've updated all my assets to Unity 5.6 and fixed some issues that appeared on newer versions of Unity.

    Now let's work on those big new features :D
     
    Ascensi, red2blue and hopeful like this.
  6. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    What kind of objects are the missile and the player? Maybe the first is a dynamic rigidbody and the second one a kinematic rigidbody?
     
  7. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    It is an optimization flag that's enabled by default. If you want to check the connected chunks you can activate the "Check Structure Integrity" checkbox on the Explosion Source component. That should fix it :)
     
  8. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    I can fix that for you. Drop me an e-mail to info@ultimategametools.com
     
  9. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    It is! There's a BSP fracturing algorithm available that lets you specify how the fracturing planes should be created.
    Check out the video
    (00:57s time mark). There it shows the 3 axes configured independently but you can change it to activate all 3 axes and no angular randomness in order to create blocky chunks.
     
  10. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hi Quatum1000!

    All things sorted out and back on track again :)

    Yes, all objects are not fractured unless there is a fracturing event. Then the object is replaced by chunks.

    There is a parameter that lets you specify the amount of time. You can specify a range so that not all of them disappear at the same time.
    Also there is another method that removes broken pieces when they get out of the screen.

    There is no built-in functionality for that but it should not be very difficult to do.

    I'm currently working on a branch that has that functionality and some other features to improve performance but it's not available on the version currently at the store.
     
  11. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hello Lethn,

    Thanks for your patience! Everything should be OK now :)

    Do you mean you want particle collisions against a breakable object to trigger fracturing?
    There is no built-in functionality for that but I think it should be easy:

    -Detect particle collisions using this method: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnParticleCollision.html
    -Force fracturing using one of these methods: http://www.ultimategametools.com/products/fracturing/scripting

    If you need help with scripting just tell me
     
  12. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Thanks Talony!

    I agree Voronoi gives the best results. Since the collision detection is what takes the most time my advice (besides the obvious minimizing chunk count) would be:
    • Try keeping fractured objects away from each other if possible. Usually an isolated group of X chunks work well, but if they get close to another group of Y chunks coming from another object there is a big performance hit due to the multiple combinations that need to be tested and the number of contact points being generated.
    • If you fracture objects, it's way better if the chunks get separated from each other instead of collapsing close to each other in one big pile for the same reason as above. You can use bigger explosion forces for that.
    • Use the LifeTime parameters to remove chunks using timers or when they get off screen.
    • Use the Min Collider Volume to speed up collision detection. Small pieces can use box collision detection and those are very fast to compute. Certainly way faster than convex hulls.
    Do you have screenshots of the game. I would love to take a look at it :)
     
  13. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Okay yeah I'm looking at this and I don't have a clue of what's going on, I'll be honest. So I already figured out the collision particles awhile back and that's all working but I'll need some help understanding the scripting for your asset in particular. What I'm looking for is to have the particles break off chunks just like if you were using standard gameobjects. I actually have some examples from my project that show what I'm doing so it all makes sense for you.



    This video is with me just using green spheres.



    Here's me using fancier particle effects, as you can see, rigidbodies work fine, just need to get the destruction tool working right with particles. I am reading through the documentation, are collision notifications the sort of thing I'm looking for? I just don't understand how to use the syntax.
     
  14. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    I can't see it on the videos, but do the particles collide with a FracturableObject? Do they just go through or do they bounce back?
    If they collide, then it should be easy to solve. Try it out and tell me.
     
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    @UGTools I think you may have missed my comment/question so I'll re-post here:

    In watching your video I see a flaw that I'm wondering if it's ever been corrected. At the 2:14 point, the video shows the statue standing on just one leg and when the remaining leg is shot, the body of the statue falls. However, it not only falls, it instantly breaks into pieces. But this shouldn't happen. The remaining body part should fall as a whole chunk.
     
  16. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583


    Here it is, they collide for sure, in case you're wondering, minimum impact velocity is set to 0.001, very low for testing purposes.
     
  17. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    That could be an issue with how he put in the support planes rather than a genuine bug, if you noticed in one of my videos where you had the wall coming to pieces like tiles that happened as well and it's because of me putting in three support planes and shooting bits of the centre first.

    I've been experimenting with concrete blocks and if you want the thing to come to pieces more naturally you should place only one support plane at the bottom and it will break apart like you'd expect a solid object to rather than something with beams in it and so on. It could also just be to how the physics are acting it might be there just wasn't enough force to knock that particular piece over somehow, the computer is just doing the calculations that are there.
     
    Last edited: Apr 17, 2017
    magique likes this.
  18. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
    Good day:)
    First, thanks for incredable work on your asset:)
    Second - i seem to get exeptions now and then:
    If i use fractured objects with no support planes that are suposed to be destroyed on hit (like glass) it works wonderfull.
    If i add a support plane - it starts to throw off same error now and again on almost any atempt to fracture object:

    NullReferenceException: Object reference not set to an instance of an object
    FracturedChunk.HandleCollision (UnityEngine.Collider other, Vector3 v3CollisionPos, Single relativeSpeed) (at Assets/Ultimate Game Tools/Fracturing/Scripts/FracturedChunk.cs:209)
    FracturedChunk.OnCollisionEnter (UnityEngine.Collision collision) (at Assets/Ultimate Game Tools/Fracturing/Scripts/FracturedChunk.cs:118)

    Can you, pretty please, give me a hint on what do i do wrong?
     
    akareactor likes this.
  19. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    I too get this error, but even with fractured objects that do not have chunk interconnection. The error is thrown, and when I save the scene and return, the chunk objects are missing.
     
  20. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hello guys!

    Let me check it out. Is it something that appeared with a newer Unity version or did it always happen?
     
  21. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
    Started happening with me since i had to upgrade to 5.5.2 from 5.4.5.
     
  22. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    I'm on 5.6.0f3 (the latest release version I believe). I used this plugin long ago (I think 5.1) and it worked perfectly, so I don't know exactly when this started happen unfortunately.
     
  23. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    592
    @UGTools Is there a way that I can set a tag on all of the chunks when they are detached? I imagine I'll need to call a method on the "On Every Chunk Detach Event" but I only know how to use PlayMaker, so it's a bit beyond me!

    Any help would be much appreciated! Thank you!

    Mark
     
  24. mzarogoza

    mzarogoza

    Joined:
    Sep 16, 2014
    Posts:
    4
    I love it. Works well. I've been tinkering around with it for a couple weeks and it has everything I need. One question..

    How do I control the shooting distance? I'd like to have the player close to objects before they are able to shoot destructibles. Thank you!
     
  25. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    357
    There are a dozen ways to do this, depending on your game and scene, not specific to this topic. Raycasting, Triggers, varying per weapon (bow vs. gun), just to name a few.
     
  26. mzarogoza

    mzarogoza

    Joined:
    Sep 16, 2014
    Posts:
    4
    Thanks for the response. I guess more specifically, is there a way to control distance in the extensions inspector panel or do I need to write/add code? @UGTools
     
    Last edited: Apr 27, 2017
  27. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    I just thought I'd mention to @UGTools I had a discussion with others in Unity about how to do proper bullet physics and so on and in regards to making the particle effects solid I've come up with much better solutions. Empties in particular with particle effects as the children seem to be the much better option physics wise when having them interact with other objects or using raycasts.
     
  28. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Yes, you would need to add code for that. It would be something like:

    Code (csharp):
    1.  
    2. float minDistance = 100.0f; // 100 meters minimum distance
    3. float explosionForce = 100.0f; // explosion force. tweak this value
    4. float explosionRadius = 2.0f; // explosion will affect chunks within this distance from the impact point
    5.  
    6. RaycastHit raycastHit;
    7. FracturedChunk chunk = FracturedChunk.Raycast(playerWeapon.transform.position, playerWeapon.transform.forward, out raycastHit);
    8. if(chunk != null && Vector3.Distance(playerWeapon.transform.position, chunk.transform.position) < minDistance)
    9. {
    10.     chunk.Impact(raycastHit.point, explosionForce, explosionRadius, false);
    11. }
    12.  
     
    mzarogoza likes this.
  29. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Yes, that seems more reasonable indeed :)
     
  30. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    Hi - @UGTools - I want to use Fracturing Destruction in my Projects with RFPS (Realistic FPS Prefab) and Opsive - Third Person Controller. Will it work "out of the box" or do we need integrations? Can you support us with integration if needed? Thanks in advance and keep up the good work ;)
     
  31. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    It probably won't work out of the box, but I can definitely help you with integration.
    I will try to contact the authors and also UltimateFPS because I get a lot of these requests and I think it is time for adding an integrations folder with support for different packages :)
     
    Weblox likes this.
  32. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Just wondering if we can have Rainbow Six-esque description. Eg. partial destruction of a door or being able to shoot holes in walls?
     
  33. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    I don't know how well it would work, but you could set up something similar to Rainbow Six by putting in support planes where it would make sense.in the Varanoi mode you can divide up your meshes into cells but I don't know about punching actual holes into the walls and so on.
     
  34. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    Sounds awesome! Fracturing & Destruction will be a great addon to my Project. Opsive is very responsive when it comes to support. For the RFPS a Post on the RFPS Forum thread may be good. It does get some really great support, mostly not from the author but from active Supporters that have published RFPS - Addons to the Asset store. There also is Ultimate Survival which is actively developed by Winterbyte and seems to fit perfectly in the integrations list. I hope you will keep us informed about integrations progress. ;)
    Again,thanks in advance.
     
    Last edited: May 12, 2017
  35. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Right now you can have partial destruction using support planes :)
     
  36. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Cool! nice to know. I will keep you guys posted :)
     
    Weblox likes this.
  37. Silvermurk

    Silvermurk

    Joined:
    Apr 29, 2016
    Posts:
    164
  38. Solstar

    Solstar

    Joined:
    Jan 22, 2015
    Posts:
    7
    Hey @UGTools,

    Wonderful tool and one that we are using in our project.
    We have found that we need to be able to enable / disable destruction simulation to the entire scene or/and individually.
    Is this a feature available currently (that we just can't find) or do you have a suggestion on how we can implement it?
     
  39. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    When i make the build with unity 5.6 i get the errors

    (Filename: C:/buildslave/physx/build/Source/PhysXCooking/src/Cooking.cpp Line: 212)

    Failed to create Convex Mesh from source mesh "". Source mesh is likely have too many smooth surface regions. Please reduce the surface smoothness of the source mesh. Alternatively turn on Inflate Mesh and increase the Skin Width sufficiently for this mesh.
     
  40. ANTARES_XXI

    ANTARES_XXI

    Joined:
    Dec 23, 2014
    Posts:
    141
    Does it work with Skinned Mesh Renderer?
     
  41. lizardloop

    lizardloop

    Joined:
    Jun 3, 2017
    Posts:
    1
    Has anyone been able to serialise an object to disk after fracturing?

    The scenario I'm working on is destroying parts of a building and then saving the game state to disk so it can be loaded later.

    My original plan was to use a prefab. Then save a sequence of "mesh destruction events" so that the damage to the building could be played back on load.

    Would it be possible to use F&D to cause damage to part of the building then save the new mesh to disk and load it back later?

    I'm not interested in saving the state of chunks after they have disconnected from the building.

    Also what is the best way of constructing a building for use with F&D? I'm assuming just a collection of planes will be fine? Has anyone used F&D with something like https://www.assetstore.unity3d.com/en/#!/content/82220 ?
     
  42. raxel

    raxel

    Joined:
    Dec 12, 2014
    Posts:
    12
    Hey Guys I need some help!
    My character can go through a fractured object until I partially destroy it (it ignores the colliders when the object is whole)
    Anyone knows why this is happening?
    I'm using BPS, support is indestructible, always gen colliders, start as static
     
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    Does anyone know if this can do multi-layer fracturing? For example, the following asset has some pre-created assets that fracture in this way:

    https://www.assetstore.unity3d.com/en/#!/content/25699

    You'll see in the video as it can break off an outer layer of the object and then ultimately destroy the entire thing.

    [EDIT]
    I'm thinking I can probably fake this by having a smaller scaled version of the same/similar object within the main object, but it would be nice if it was a built-in feature.
     
    Last edited: Jun 8, 2017
  44. raxel

    raxel

    Joined:
    Dec 12, 2014
    Posts:
    12
    Why is no one answering =[
     
  45. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    If you need support, use the support email address. It's possible the forum has stopped notifications to the thread owner.
     
  46. raxel

    raxel

    Joined:
    Dec 12, 2014
    Posts:
    12
    I also send an email bit nothing came back
     
  47. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    The dev may be having health issues. He was away for a long while before due to a health issue, and he recently came back and said he thought he was well enough to continue supporting these assets. But I suppose it is possible he had a relapse of some sort and went back into the hospital.
     
  48. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I think multi layer fracturing is called compound fracturing in this asset.. should be covered in the doc.

    I think though that there still has to be a special ground support plane and some parts connected to that are supposed to be non breakable. So I decided to pair this kit with another "destroy it".
     
    Last edited: Jun 22, 2017
  49. jhanak

    jhanak

    Joined:
    Jun 20, 2017
    Posts:
    2
    Hi, everyone. I was playing with the asset for a few days and have been mostly successful in making it do what I want. However, I have not found a way to use this asset with LOD Groups. Does anyone have any experience with LOD Groups and Fracturable Objects?

    My setup is:
    - a parent object with LOD Group
    - a child with the fractured object script, based on the LOD0 object
    - a child LOD0 object (disabled, the fractured object single mesh takes its role in the LOD Group)
    - a child LOD1 object (active)
    - etc.

    This quite obviously means that the fractured object is only rendered when the camera is close enough, otherwise the next LOD mesh gets rendered. So a partially destroyed object will 'jump back into ship shape' when the camera moves away enough.

    I thought about using multiple child objects with the fractured script, each based on the different meshes for LOD purposes, but then the individual chunks would be quite different. I though about syncing the largest chunks across the LOD meshes, but it seems like there should be a better solution available.

    Any thoughts?
     
  50. Tommy-Core

    Tommy-Core

    Joined:
    Jan 24, 2014
    Posts:
    21
    Hey everyone. Just a quick question, because I couldn't find anything on that so far - Is it possible to break objects created at runtime? Say I have some procedural environment, buildings and the like. Can I simply add some component(s), configure them on the fly, and have said models go boom? Or is this asset strictly only usable with predefined fractures?
     
    Dwight_Everhart likes this.