Search Unity

Ultimate Fracturing Destruction editor extension for Unity 3D

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

  1. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    well, its pretty much the same way as with ”getting hit”..
     
  2. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Just wondering has the developer abandon this asset, I have not seen an update in a year, nor seen any posts. Just wondering Thanks.
     
  3. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    no. send to the support email.
     
  4. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    I've sent several emails to the support email over recent months...no response. He's gone.
     
    Flurgle likes this.
  5. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    sad to see, Unity should be involved when they do this very unfair to paying customers.
     
    mattis89 likes this.
  6. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    okay weird. Around december I sent an email and got a response.
     
  7. BigBoiii_Jones

    BigBoiii_Jones

    Joined:
    Aug 3, 2014
    Posts:
    40
    Does anyone have any idea why support planes aren't saving?
     
  8. BigBoiii_Jones

    BigBoiii_Jones

    Joined:
    Aug 3, 2014
    Posts:
    40
    Also how can we destroy objects with raycast bullets that don't have a mesh?
     
  9. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    raycast bullets without a mesh? well

    1. Raycast bullets its just a ray from the center of the camera...
    2. The actual bullets dont exist as objects
    3. Theres no mesh
     
  10. BigBoiii_Jones

    BigBoiii_Jones

    Joined:
    Aug 3, 2014
    Posts:
    40
    Got it to work by adding collisions and mesh renderer as well as a rigid body its so strange. However its really hard to activate the destruction which I'm trying to figure out how to make it activate easier.
     
  11. GrassWhooper

    GrassWhooper

    Joined:
    Mar 25, 2016
    Posts:
    109
    hey there,
    just a question, are there any plans for a sort of, bulk destruction?
    where i can select multiple objects, and just have them "baked" for destruction?
    selecting each object manually is a bit tough honestly.
    so any plans on that, ideas or updates?
     
  12. stevenwanhk

    stevenwanhk

    Joined:
    Jul 20, 2016
    Posts:
    113
    Any plan on supporting job system in 2018?
     
  13. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    That would be cool.. But at this point you might just want to be happy that its supported at all..!
    Been a year i think since last update unfortunately.
     
  14. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Hello

    work this with unity 2017.1.1f ?

    regarda
     
  15. Joshaba

    Joshaba

    Joined:
    Apr 15, 2017
    Posts:
    6
    That's what I'm using it with and works just fine =)
     
  16. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Thanks great i only asked because stand for 5.6 and last update 1 year ago and most people say dev not support anymore and no updates.

    works it as good as shown so worth its money or is their a better one ?

    thank you for help
     
  17. Joshaba

    Joshaba

    Joined:
    Apr 15, 2017
    Posts:
    6
    It defiantly works as good as shown on Unity 2017.1.1f and I feel it's worth the money if you need good fracturing. Just take into account that the dev is not supporting and any problem solving with the extension you'll likely be on your own.
     
  18. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    The dev is supporting the asset via mail. I've asked him some questions before buying (Unity 2018+ compatibility) and he told me that it works fine (I can confirm) and he still support the asset, even working on a big update.
     
    GrassWhooper, PolyMad and JBR-games like this.
  19. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    How long ago? My emails went ignored last spring, no forum post this year.
     
  20. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Was 3 days ago
     
  21. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    how to exclude layer for example (player) layer ... because when i touch the wall with the player body its fractured .. any idea how to fix this ??!!
     
  22. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I keep having an issue with this tool, and I'm wondering if there's a good explanation of how to avoid this: My support planes keep disappearing.

    I have a pretty simple setup: One large box which I'm fracturing using the Voronoi approach. I have support planes on the top, bottom, left, right, and back of the box, leaving the front/middle chunks to detach. When I first set this up, it works fine. But after a certain length of time, eventually it ends up looking like this:

    upload_2018-10-31_13-12-50.png

    Although the support plane data shows up properly in the inspector:

    upload_2018-10-31_13-13-37.png

    However, as you can see in the first screenshot, the planes aren't showing up in the scene view, and they're not causing any of the chunks to be flagged as a support chunk.

    I have "Enable Prefab Use" checked, and though I don't know if that's related. As far as I can tell, I'll just occasionally find that the support planes have broken at some point upon loading a scene with this object in it. The existing chunks retain their Is Support Chunk state, but if I try to recompute chunks, none will be support chunks.

    Any ideas?
     
    JBR-games likes this.
  23. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    As this was causing me massive problems and lost work, I spent some time investigating the issue I described in my previous post. I believe I have this nailed down, with a patch/fix for the problem. @UGTools , if you're still planning to make any more updates to this asset, please consider incorporating my attached changes, or considering them as a basis of a more appropriate fix if you don't think it's the right way to go.

    First, to describe the issue clearly, so that others know if this is affecting them, you might notice the following behavior:
    • You create a fractured object including one or more Support Planes.
    • You later load the scene, and find that the support plane no longer appears in the scene. The handle is still there, and the data is still listed in the inspector, but the rectangular plane is gone.
    • You try to press the "Refresh" button in the inspector for the support plane, but this completely resets the support plane, resetting its position/scale/rotation to default.
    There are two reasons for the cause of the issue:
    1. The "Refresh" button in the inspector, used to rebuild the support plane's mesh, simply calls the same method that generates a new support plane. This results in the position/scale/rotation being reset to default.
    2. This method, in computing the position of the support plane vertices, fails when the "Source Object" (the original object you fractured) is disabled. That's because the method depends on accessing the 'bounds' of the Source Object's renderer, and the bounds always has 0 extent when the renderer is disabled.
    My fix to this issue does two things to address these two issues:
    1. When pressing the Refresh button, pass a flag into the `CreatePlaneMesh' method that indicated we're refreshing instead of creating a brand new plane. When `refresh' is true, the method does not adjust the plane's position/scale/rotation, leaving it intact. (I also added a "Rebuild Support Planes" button in the inspector that is the same as pressing the Refresh button for each support plan individually.)
    2. If "Source Object" is inactive when calling this method, it is temporarily reenabled so that a valid `bounds' can be taken from it. It is disabled again immediately after getting the bounds.
    This appears to resolve the issue. A couple of improvements could be made to this, though:
    • It would be better if `CreatePlaneMesh' was automatically called when the object was loaded in the editor, so that the support plan meshes always exist. Not critical, but it would be nice not to have to manually refresh every time I want to work on an object.
    • The code that temporarily enables the Source Object should probably also check for the renderer itself being disabled. Empirically I didn't need to do this, but maybe there are cases where that could be an issue too.
    I've attached the two patch files that contain the fixes. If I run into more issues with this I'll update the post.
     

    Attached Files:

    Scifa, GrassWhooper, red2blue and 3 others like this.
  24. SIV

    SIV

    Joined:
    May 7, 2014
    Posts:
    219
    Hello,

    Can anyone please confirm if this works in unity 2018.2 ?

    Thanks !
     
  25. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Yes, I've been using it under 2018.2 for a couple of months.
     
  26. GrassWhooper

    GrassWhooper

    Joined:
    Mar 25, 2016
    Posts:
    109
    hey guys, so basically, that is my code, and this is my settings on the objects.
    when the game starts (that code should run on Start(and i made sure it does through a Debug.Log())
    what happens is basically....nothing.
    the object simply floats mid air, with nothing happening to it.
    it doesn't fall, it doesnt interact it does nothing.

    few things to note:
    1.i made sure, nothing is static.
    2.i tried different explosion forces, from too small such as 0.001 to too high such as 10000
    and varied the explosion radious a bit too, but no difference.
    3.i do note in my inspector once the game runs, a lot of objeccts, that appear to be chunks do get born, and float around, but they do not, have meshrenderers enabled. and sometimes, they are too far in the scene.
    4.i tried increasing the Total Mass on my Fractured Object, and then reComputing, but, no difference.
    5.i tried putting the built in, explosion source script on the same object, and disabling mine, and nothing changes too.

    any ideas? i am just, getting desperate at this point :D
    so, if anyone can help me, i'd be very thankful.

    GetComponent<FracturedObject>().Explode(transform.position, explosionForce, explosionRadious, false, false, true, true);



    upload_2018-11-29_18-17-12.png
    upload_2018-11-29_18-18-3.png
     
    Last edited: Nov 29, 2018
  27. GrassWhooper

    GrassWhooper

    Joined:
    Mar 25, 2016
    Posts:
    109
    for anyone interested in the solution to my problem i found a combination that works.

    then,


    Code (CSharp):
    1. private void Start()
    2.         {
    3.             if (onEvent == ExplosionEvent.Start)
    4.             {
    5.                 StartCoroutine(Callexplosion());
    6.             }
    7.         }
    8.  
    9. private IEnumerator Callexplosion()
    10.         {
    11.             if (called==true)
    12.             {
    13.                 yield break;
    14.             }
    15.             called = true;
    16.             yield return 0;
    17.             Explode();
    18.         }
    19. private void Explode()
    20. {
    21.                 o.Explode(explosionPos, explosionForce, explosionRadious, false, false, true, true);
    22. }
    and one more last note, if the game object, asks to explode on start, and at the same time, it is "there" once the level starts(scene gets loaded), what you'd need is to have it disabled, and enable it, after a very tiny bit.
    that is, if the game object is on scene, once the scene is loaded. not sure why
    but this is what worked for me.
     
  28. SIV

    SIV

    Joined:
    May 7, 2014
    Posts:
    219
    Thank you !
     
  29. partridge

    partridge

    Joined:
    Dec 8, 2014
    Posts:
    7
    I just bought this asset a few days ago, and literally the next day it was set as deprecated. Do I have grounds to get my money back?
     
  30. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    You can try contacting the developer and asking for a refund. I think you need to do that first, and if you don't get a response from the developer in a reasonable amount of time (which seems likely, as the developer doesn't seem to be working on this anymore) you can try contacting Unity customer support. (Not sure if they'll approve it or not.)
     
  31. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    So far there are major issues with this asset under 2018.3. As the previous poster said, the asset is now listed as deprecated under 2018.3. It's not completely unusable at this point, as it still does proper fracturing in the scene. However, prefab support appears to be completely broken. If you check the Enable prefab usage, and make a prefab out of your fractured object, then you edit the prefab in Prefab mode, none of the fractured objects will have a mesh anymore when you return to the scene. The "Mesh" on the mesh filter will simply show "missing".

    So at this point, it doesn't appear possible to use this in a prefab. I'll consider taking a look at the code to see if I can find a simple fix, but this might be the end of the line for this asset if the developer doesn't return.
     
    Artaani likes this.
  32. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Okay, I think I've got Fracturing working again with prefabs under 2018.3. I've attached a patch, but here's an explanation and some caveats.

    The reason the asset was broken for prefabs is because the changes made by "Compute Chunks" and "Delete Chunks" didn't cause the prefab to believe it had any changes. For this reason, if you hit Compute Chunks, and then immediately leave Prefab Mode, the prefab's changes won't be saved. This causes all instances to most likely break, since their Mesh data no longer aligns with their Prefab content.

    The "Fix" in my patch file is to call the following method after calling Compute Chunks, or other similar methods:

    Code (CSharp):
    1.         public static void UpdatePrefab()
    2.         {
    3. #if UNITY_EDITOR
    4.  
    5.             var prefabStage = PrefabStageUtility.GetCurrentPrefabStage();
    6.             if (prefabStage != null)
    7.             {
    8.                 EditorSceneManager.MarkSceneDirty(prefabStage.scene);
    9.             }
    10. #endif
    11.         }
    This will cause the Prefab Mode scene to realize it's dirty, and to save the prefab (if auto save is enabled). Upon returning to the real scene, you should find all the prefabs instances work fine.

    The caveat: You can't Compute Chunks for prefab instances. This was causing Unity to essentially lock up due to an exception the code was throwing, so I added some protection. Now, if you try to Compute Chunks on a prefab instance, it warns you that you can only do that in Prefab mode. So just pop over to prefab mode if you want to recompute/delete chunks. My changes still allow you to compute chunks for non-prefabs in the main scene.

    We'll see if I run into any other issues under 2018.3

    Also, remember I'm just some person who bought this asset and wants to keep using it. I'm not the developer, and I don't know the developer, and I'm not responsible if any of these changes break your whole project :)
     

    Attached Files:

    Last edited: Dec 15, 2018
  33. partridge

    partridge

    Joined:
    Dec 8, 2014
    Posts:
    7
    Thanks for advice, contacted them. Bit cheeky to have the asset on the xmas offers list then immediately deprecate it after the offer period ends.

    Thanks also for your efforts on the broken prefab stuff. Will probably need that if I don't get my money back.
     
  34. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    ya happen to others as well, it broke for 2018.3 as the poster said above for prefabs, etc. So Unity really need to be on the ball here, having a sale and have an asset gone a day later. So this is shady. he should of took it down before the sale. so more people don't buy it....as new support won't get help.. So I don't care of the asset is like 6 months old and taken down, but days after a sale is very shady.. and not cool since new customers will be left with a broken tool and out money..SO Unity should honor those that happen to.... or risk people not buying anymore...I talked about this before, crap like this causes people to slow down on what is bought.. This guy has been around for awhile, so surprised this happen, right after a sale.....he should know better..
     
    partridge likes this.
  35. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    Anyone has experienced chunks with transparent parts?, most are ok but some appear transparent and can see the interior of the object
     
  36. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    This is the problem i have, i used the fractured demo and just added a door to destroy, but shows hollow parts like can be seen in this picture. However the mesh of the columns work fine, seems some meshes work and others dont, i copied the fractured object component and replaced the source mesh for the one of the door. Also you can see the objects above doesnt go down. I am using the last version of the product. On most meshes i use it the asset doesnt work. I just set as support the parts below, the parts above are not support chunks
    upload_2019-2-10_17-54-54.png
     
    JBR-games likes this.
  37. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    Tried with Voronoi and works better but shows some transparent parts

    upload_2019-2-10_18-3-35.png
     
  38. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352

    Where is the Refresh button coming from on the Support Planes? Is that maybe something you added when you previously modified Fracturing? I don't see a Refresh button only the Delete button. And I looked into the code and theres nothing with Refresh. Im using version 1.24 (I think last before deprecated).
    I was having same problems with the support planes and I think there is a simpler solution. Just replace:

    Code (CSharp):
    1.  
    2. foreach (UltimateFracturing.SupportPlane supportPlane in ListSupportPlanes) {
    3.     if (supportPlane.GUIShowInScene && supportPlane.planeMesh != null) {
    4.         GizmosMaterial.SetColor("_Color", GizmoColorSupport);
    5.         GizmosMaterial.SetPass(0);
    6.         Graphics.DrawMeshNow(supportPlane.planeMesh, transform.localToWorldMatrix * supportPlane.GetLocalMatrix());
    7.     }
    8. }
    9.  
    in FracturedObject.OnRenderObject()
    with:
    Code (CSharp):
    1.  
    2. for (int i = 0; i < ListSupportPlanes.Count; i++) {
    3.     if (ListSupportPlanes[i] != null) {
    4.         if (ListSupportPlanes[i].planeMesh == null) {
    5.             UltimateFracturing.SupportPlane tmp = new UltimateFracturing.SupportPlane(ListSupportPlanes[i].fracturedObject);
    6.             tmp.v3PlanePosition = ListSupportPlanes[i].v3PlanePosition;
    7.             tmp.qPlaneRotation = ListSupportPlanes[i].qPlaneRotation;
    8.             tmp.v3PlaneScale = ListSupportPlanes[i].v3PlaneScale;
    9.             tmp.GUIName = ListSupportPlanes[i].GUIName;
    10.             ListSupportPlanes[i] = tmp;
    11.             tmp.fracturedObject.ComputeSupportPlaneIntersections();
    12.             tmp.fracturedObject.MarkNonSupportedChunks();
    13.         }
    14.         if (ListSupportPlanes[i].GUIShowInScene && ListSupportPlanes[i].planeMesh != null) {
    15.             GizmosMaterial.SetColor("_Color", GizmoColorSupport);
    16.             GizmosMaterial.SetPass(0);
    17.             Graphics.DrawMeshNow(ListSupportPlanes[i].planeMesh, transform.localToWorldMatrix * ListSupportPlanes[i].GetLocalMatrix());
    18.         }
    19.     }
    20. }
    21.  
    and it will also auto refresh the drawing of the planes
     
    Last edited: Apr 16, 2019
    GrassWhooper likes this.
  39. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    GrassWhooper likes this.
  40. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    Oh. From the post I got the impression that the Refresh button was in the tool.
    Still, if you don't want to have to keep doing it manually for the support planes to show up and show the affected chunks, the above post should be a simple way to do that.
    Its a shame they gave up on the tool.
     
    GrassWhooper likes this.
  41. bran76765

    bran76765

    Joined:
    Jul 14, 2018
    Posts:
    26
    Anyone know if there's a way to make particles cause destruction as well instead of just rigidbodies on colliders?
     
  42. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
  43. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    Hi Dgoyette; do you know if this fix works in 2019.1?
     
  44. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I'm using 2019.1, and haven't seen any difference in the tool compared to how it behaves in 2018.3. So, it seems to work as well under 2019.1 as it did in 2018.3. I still need all those code modifications I've describes earlier in this thread, but fortunately no new modifications when moving from 2018 to 2019.
     
    Necka_ likes this.
  45. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    Great, thank you for the response! I will add your code mods to my scripts and try it myself :)
     
  46. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Just to avoid confusion, and for anyone new, I made two different sets of patches, attached to two different posts in this thread.

    The first was a general bug fix thread that predated Unity 2018.3: https://forum.unity.com/threads/ult...sion-for-unity-3d.184170/page-19#post-3915529

    The second contained fixes to better support the Improved Prefab Workflow introduced in Unity 2018.3: https://forum.unity.com/threads/ult...sion-for-unity-3d.184170/page-19#post-3999430

    I believe the second set of patches probably has some dependency on the first, so I'd recommend applying them all. And again, I'm not associated with this asset, and I don't know the dev. These patches are just some changes I've made to my local code to get them working, as the original dev seems to have abandoned the package. Use at your own risk.

    Note: One of the patches refers to the local paths to the scripts on my own system, so you'll need to edit that (probably) to apply the patch. For example, the "diff --git a/Assets/3rd Party/Ultimate Game Tools/Fracturing/Editor/FracturedObjectEditor.cs", and similar statements, will need to be changed, unless your version of the script also happens to be played in Assets/3rd Party/etc...
     
    Last edited: Jun 25, 2019
    JBR-games and Necka_ like this.
  47. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    Excellent thank you!
     
  48. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    By the way, I am having trouble understanding how to apply your patch files. Is there any chance you can DM me the scripts or tell me how to use the patch files? Tried "git apply" but I get "Error: patch fragment without header at line 1"
     
  49. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    You might need to edit the patch files to point to the correct file paths on your system. I put the fracturing asset in "/Assets/3rd Party/Ultimate Game Tools/Fracturing" in my project, and that's what the patch file expects, so you probably have to find/replace all "/Assets/3rd Party/" with the path you have the asset in your project. I'm not sure if that would generate the specific error you're seeing.
     
  50. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    Thanks for the reply! Yeah, I figured that was a problem, so I tried doing that, but still getting the error. Is it possible to DM me a link to the updated .cs scripts or would we be breaking some copyrights?