Search Unity

Ultimate Fracturing Destruction editor extension for Unity 3D

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

  1. sentar

    sentar

    Joined:
    Feb 27, 2017
    Posts:
    44
    Hi everyone,

    I am a novice still with Unity and wanted to try out this asset! For a melee weapon to break down a wall. Is this the right script? If so, where would I add this script into?
    void Impact(Vector3 v3Position, float fExplosionForce, float fRadius, bool bAlsoImpactFreeChunks)

    Sincerely,
    Sentar
     
  2. sancha-km

    sancha-km

    Joined:
    Jun 5, 2016
    Posts:
    41
    Hi, i use Character controller in my game and fractured objet before destruction is without colliders.
    So my character just go through it, how can i fix it?
     
  3. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    Hello! I'm using this cool asset along my project and thought something like "what if" :) What if I could use joints during destruction? E.g., on a vertical long pile or pole?

    What is the best method to create a joint inside fractured structure?
     
  4. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    Another question, maybe to replace previous: how to keep monolith parts after destruction? For example, I shoot at bottom of the pillar, small part from bottom goes out and pillar falls as monolith.

    I found the chunk connection graph allows to keep only a root nodes. Is there a way to keep some shards together after explosion, to fall as one big chunk and then for example break into smaller chunks once it hits the ground.
     
  5. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    147
    Hello @UGTools ,
    it looks like Destruction is using same Poly2Tri library as ProBuilder, so I am getting a bunch (~30) of warnings in the console, like this:

    Assets/Standard Assets/Ultimate Game Tools/Fracturing/CDT/P2T.cs(50,40): warning CS0436: The type `Poly2Tri.Polygon' conflicts with the imported type of same name'. Ignoring the imported type definition

    Is there a way to fix this?

    Thank you
     
  6. Hoonbag

    Hoonbag

    Joined:
    Jul 18, 2017
    Posts:
    14
    Hey how is everyone, im having some trouble with adding a support base every time i do i can just walk through the object (wall) but if i dont have one the wall just holds together if i put it on a flat bit of terrain, anyone know what i could be doing wrong i copy the sample scenes but still no go sadly :(

    or if someone can make a how to for this asset would be nice!
     
    Last edited: Jul 20, 2017
  7. Hoonbag

    Hoonbag

    Joined:
    Jul 18, 2017
    Posts:
    14
    anyone know why my object explodes when i push play?
    .
    and anyone know how to make every think lock in to place like the support bits do and can destroy them still ?
    .
    Having no luck :(
     
  8. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    147
    Does anyone know how to create ExplosionSource, but having it affect the whole mesh (destroy connected fragments as well)?
    Right now it destroys only fragments withing radius, but my object uses 'chunck interconnection'. How to apply it to ExplosionSource.cs script?

    Thank you
     
  9. TotalDistraction

    TotalDistraction

    Joined:
    Jul 27, 2017
    Posts:
    3
    Hi,
    Been using this tool for almost a week now, and found that the output meshes for the fracturing have much higher poly-counts than expected due to poor vertex optimisation. (See attached image) Even co-planar faces are not optimised and is leading to 10's of un-needed vertices being added.

    Do any of you know of a way to optimise the meshes being generated?
     

    Attached Files:

  10. jhanak

    jhanak

    Joined:
    Jun 20, 2017
    Posts:
    2
    Predefined only (at least it was stated in the thread previously). Too costly to run at runtime.

    Edit: Failed to include the previous post I was answering :D
     
    Dwight_Everhart likes this.
  11. SVTeam

    SVTeam

    Joined:
    Jul 2, 2017
    Posts:
    10
    I'm having an issue, some please help?

    When I create "islands" on my object, it knows to separate the windows from my structure, but the windows then float in the air when the surrounding structure is broken. No matter what I do, I can't make the islands break when their supporting structures break, and when I use Support Planes, it is impossible to make the entire structure collapse when its supports are destroyed, everything just floats in the air. What gives?

    When I don't use "islands", I can make everything work fine, when the support chunks are destroyed the entire structure collapses correctly. However the windows then are considered part of the walls and they break strangely, so I really need to use the island feature, but I really need the entire structure to collapse correctly in island mode. Can someone please help me solve this issue?
     
  12. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    I let the player build castles by connecting models supplied by modders. The models won't be prefractured. I understand this asset cannot fracture at runtime, but can the game fracture the models during the scene load and save these in memory?
     
  13. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    how to integrate with Realistic fps
     
  14. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    any help .... please
     
  15. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    I have this exception too. Unity 5.6.2f1. Without support plane less often, but with support plane - always.
     
  16. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    It's easy with two fractured objects, inner one inside an outer and activated on outer has exploded .

     
    mccann and neuroTrophy like this.
  17. neuroTrophy

    neuroTrophy

    Joined:
    Jan 22, 2015
    Posts:
    11
    Hey, Awesome assets! I snagged the complete package and am not regretting it at all. Very good stuff.

    Anyway, I ran into a problem where if I toggle the bool "use concave collider" setting, upon runtime, it throws an error because the bodies (body1, body2, etc.) do not contain colliders (because the colliders belong to the created hull objects nested within them.).If I turn the concave collider toggle to false, then the colliders are placed within the body objects, and everything runs great.

    If it's possible to get the concave collider setting working (whether I am missing something or there is a bug) I would be very pleased. Also, would you predict a significant impact on performance if using the concave colliders (given I get them working) compared to the stock colliders? I am developing in VR, so with that massive handicap, every little thing helps.

    Thanks!
     
  18. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    Hi everyone.. How to get this asset work with realistic fps prefab please help me i am weak in coding ....
     
  19. kawon

    kawon

    Joined:
    Nov 1, 2016
    Posts:
    3
    Hi, any idea why it is creating chunks like on the screenshots. It is an interior of a house, highlighted chunks are not required (the red ones).

    meshes3.png meshes1.png

    Also I have other problem. Unity is crashing during chunk computation, not always at the same time and about 8 from 10 tries.

    Thx for help.
     
  20. Santa

    Santa

    Joined:
    Dec 4, 2009
    Posts:
    42
    Hello,

    I'm using Fracture and Destruction with Concave Collider.
    There is exception when object destroying: "MissingComponentException: There is no 'Collider' attached to the game object, but a script is trying to access it."


    It is in FracturedChunk.CS

    public void DetachFromObject(bool bCheckStructureIntegrity = true)
    ...
    GetComponent<Rigidbody>().isKinematic = false;
    >>> GetComponent<Collider>().isTrigger = false;

    The reason is that Concave Collider creating collider inside child of each chunk of fractured object. And there is no more collider in object with FructuredChunk.


    FracturedObject settings are standard:


    Can't find how to automatically create chunk colliders right inside them with Concave.

    How to do it? Or is it bug in FracturedChunk.CS?
     
  21. rotsin

    rotsin

    Joined:
    Feb 22, 2013
    Posts:
    15
    Hi @UGTools!

    First of all this seems like a great asset. I've been pondering whether to buy this or not. For what I've seen it should be able to handle destroying a plaster wall layer over a non-destructible brick layer (for greater effect). What I would like to know before buying is do you have a timeline for the 2.0 version and whether I will need to buy an upgrade to 2.0 if I purchase the current version.

    Thank you and keep up the good work! :)
     
  22. kawon

    kawon

    Joined:
    Nov 1, 2016
    Posts:
    3
    Hi,

    looks like I found the Unity crashing error during chunk computation.
    Like mentioned at Ultimate Game Tools web page:

    "Q: The utility crashes when computing the chunks!
    A: We found some cases where this happened. We use an external library for mesh capping that in some very specific cases makes Unity crash, even if it should handle the exception....."

    The problem is in Poly2Tri.DTSweep class in method
    Code (CSharp):
    1. void EdgeEvent(DTSweepContext tcx, TriangulationPoint ep, TriangulationPoint eq, DelaunayTriangle triangle, TriangulationPoint point)
    (line somewhere around 650) It is an infinite recursion, thats why Unity si crashing without catching an exception.
    Almost at the end of the method is condition:
    Code (CSharp):
    1.  
    2. if (o1 == o2)
    3. {
    4.     // Need to decide if we are rotating CW or CCW to get to a triangle
    5.     // that will cross edge
    6.     if (o1 == Orientation.CW)
    7.     {
    8.         //FIX - Change this for NeighborCCWFrom
    9.         triangle = triangle.NeighborCWFrom(point);
    10.     }
    11.     else
    12.     {
    13.         //FIX - Change this for NeighborCWFrom
    14.         triangle = triangle.NeighborCCWFrom(point);
    15.     }
    16.     EdgeEvent(tcx, ep, eq, triangle, point);
    17. }
    18.  
    I just switched those NeighborC[C]WFrom methods.
    I dont know if it is correct solution for this problem, maybe it is not and it can generate some weird chunks, but it helped and now it is not crashing.

    Edit:
    Yes it was not good solution... So I reverted those methods back and just modified the method to limit the number of recursion calls. But it would be nice, if someone who knows what is going on, to fix that :-D
     
    Last edited: Oct 6, 2017
  23. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello! This looks promising? Only static? .. does it work on fences and tree creator trees? What about furniture? :)
     
  24. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Dead forum?
     
  25. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Just an ill author atm - go up a few pages and he posted a status report
     
  26. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Only unchangable meshes at least - you cannot do it on a running goblin fx. but you can do it on a chair or fence and move it with tweening if you wish to. Dont know about the tree creator trees - but if they create a mesh then i guess it does (or can be tweaked to).
     
    mattis89 and Stormy102 like this.
  27. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Hi

    I just imported the latest version into my Unity 5.5.4 project and got this error:

    MeshData.cs(1132,18): error CS0619: `UnityEngine.Mesh.Optimize()' is obsolete: `This method is no longer supported (UnityUpgradable)'

    Any suggestions?

    thanks

    Nalin
     
  28. staron82

    staron82

    Joined:
    May 22, 2017
    Posts:
    19
    Hi,
    Does this work with unity2017?
     
  29. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    how to integrate with UFPS .. I have no code knowledge I hope someone help me
     
  30. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    How can I stop the detached chunks from responding to the impact? When laying on the ground I can shoot the chunks and if one is shot the entirety of the chunks laying on the ground respond. I've set the min Impact Mass and Velocity to the detached chunks to Infinity but obviously its not doing anything. Any help would be appreciated. Thanks
     
  31. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    I found the answer. In the Impact call set bAlsoImpactFreeChunks to false.
     
  32. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I did test if the rigidbodys velocity is lower tan a value and then remove rb.

    You should add some code in case is not to recheck after n seconds.


    Code (CSharp):
    1. Rigidbody rb = transform.getcomponent<Rigidbody>();
    2.  
    3. if(rb.velocity.magnitude>your speed limit) {
    4. destroy(rb);
    5. }
    6.  
     
    JBR-games likes this.
  33. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    Thanks for the help
     
  34. Vertexpoint

    Vertexpoint

    Joined:
    Apr 27, 2017
    Posts:
    3
    Hi! I have a problem,
    All the chunks created with the fracture script are missing mesh-filter names. This creates a problem since the chunks meshes dissapear if I later try to create a prefab out of them. Help would be very much appreciated.
     

    Attached Files:

  35. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    You might find them all in the output folder within the Fracturing And Destruction folder -not sure if it's called output.
     
  36. CodeStarrk

    CodeStarrk

    Joined:
    Jan 5, 2017
    Posts:
    37
    Does anyone know how I can make a fractured object NOT detach by physics ( by getting hit) but by a script command?

    I want to put a switch in my game where if its pressed a tower collapses.

    I know how to do this without the fracture script, its simply putting mass required for detach to infinity and then toggle IsKinematic, but is there a premade way to do it?
     
  37. CaptCanada

    CaptCanada

    Joined:
    Feb 3, 2013
    Posts:
    272
    Can this asset be used to design already broken/fractured meshes? I am looking for a tool that will allow me to create broken walls.

    Thanks!
     
  38. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    Yes, you can generate shards as well as use a prefractured object (in this case you need Combined Mesh tool
    )
     
  39. Joshaba

    Joshaba

    Joined:
    Apr 15, 2017
    Posts:
    6
    Hello. I am experimenting with GPU instancing and one thing that would really ramp up my project would be the ability to connect two different fractured objects in order set the support of one object inside another. Is there anyway to form a connection between 2 different fractured objects? Currently when I try I receive the prompt that this is not allowed. Combining the meshes of 2 objects then fracturing is a nice short cut, but doesn't help my case for trying to push the same meshes to the GPU. Any help would be much appreciated.
     
  40. smBae

    smBae

    Joined:
    Oct 18, 2015
    Posts:
    1
    Hi,
    I bought it today and the version is 1.24.

    Everything is good but there's no mesh about weapon.

    Where is it??

    upload_2018-3-24_21-51-41.png
     
  41. mostlyhuman

    mostlyhuman

    Joined:
    Mar 16, 2013
    Posts:
    53
    Did you ever get this figured out? Im having the same issue.
     
  42. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    147
    I did, kind of. I removed Destruction plugin from my project.
    Sorry I can't be more helpful.
     
  43. jonjoefischer

    jonjoefischer

    Joined:
    Feb 15, 2018
    Posts:
    1
    Hello-

    I'm aware this is my first posting, and I'm a relatively newer Unity developer in the middle of my coursework. I'm using UGT to respond to melee weapons in a game, and I believed I had followed the instructions properly in that I have:

    1) Created the new FracturedObject in the hierarchy.
    2) Assigned the source object at the original game object.
    3) Enabled the bool Start Static
    4) Enabled prefab usage and assigned a folder
    5) Computed chunks

    What's occurring is, the weapons I'm using with a rigidbody and box collider on the end does not seem to function or interact with the Fractured Object at all- passes right through it.

    However, I know that the Fracturing and the weapon both do work because when the object is not set to start static, it fractures instantly and I can knock the pieces around with the bat all day. Attached is the shot of the settings.

    I know I'm relatively new to this, but I feel as if I followed all the instructions correctly, yet may have just simply missed a critical setting. Let's face it- there's a lot of them.

    Thanks!!



    FRACTURED2.JPG
     
  44. lpp12

    lpp12

    Joined:
    Mar 17, 2017
    Posts:
    1
    Have you solved it?
     
  45. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi,

    I have very basic question. I don't know how to explode Fractured Object with C#. I tried this.

    Code (CSharp):
    1.     public FracturedObject FracturedObject;
    2.     public Transform ExplodePoint;
    3.  
    4.     void Start () {
    5.         FracturedObject.Explode(ExplodePoint.position, 10f);
    6.     }
    But nothing happens. The Fractude Object is set as "Start Static".

    Any help?
     
  46. Stage64

    Stage64

    Joined:
    Jul 27, 2016
    Posts:
    11
    Hey, I just bought the asset and it doesn't work with the new Unity 2018.1. Already when importing Unity crashes, same happens when trying to play the sample scenes. Can someone confirm this or help me?
     
  47. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    Get a refund...author has been gone for months. Abandoned all his assets.
     
  48. Stage64

    Stage64

    Joined:
    Jul 27, 2016
    Posts:
    11
    I am using a Mac and now I tried the asset on a PC and it works :(
     
  49. HBGFloran

    HBGFloran

    Joined:
    Feb 27, 2018
    Posts:
    1
    Hello Ultimate Game Tools team !

    First of all, i wanted to thank you for your awesome fracturing asset.

    I just encountered an issue and I couldn't find a solution yet.

    In the game we are developping, we need to instantiate fractured objects continually.
    If the fractured objects were instantiated before the GameObject I want to collide with, there is no problem. But fractured objects that are instantiated after it don't collide with it.

    Video 1 : a fractured object (leftmost white cube) and the projectile (yellow cube) are in the scene, and I instantiate a new fractured object at start (rightmost white cube).


    Video 2 : a fractured object (leftmost white cube) is in the scene. Then, a new fractured cube (rightmost white cube) is instantiated and after a second, the projectile is instantiated (yellow cube).


    I configured my fractured object like this :
    • Start static : true
    • Enable prefab usage : true
    The projectile has a Explosion source script attached to him, allowing him to destroy the fractured objects.

    I took a look on the example scenes and the home page of your site, but I couldn't find something similar to my problem.

    Any thoughts ? Thanks in advance !
     
  50. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    just down grade.. theres no point using latest unity... authors dont keep up the update..