Search Unity

Exploder [RELEASED]

Discussion in 'Assets and Asset Store' started by reindeer-games, Jul 12, 2013.

  1. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Is it possible that the Exploder radius hit other objects? You can try to update to latest version and use ExplodeObject(...) instead of Explode(...).
     
  2. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Thanks for reminding me, I hope it didn't cause much troubles!
     
  3. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    Hi,

    1. Is it possible to reuse fragments for another mesh exploding?
    Suppose we have several (same) skinned meshes that are animated in the scene. We explode first one. Will these fragments be used for next explosion or each time fragments are generated from scratch?

    2. How it works in background? Does it creates a new set of meshes and hides source skinned mesh or destroy it?
     
  4. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi, thanks for the late reply, I missed the notification!

    Yes and no, the fragments will be used for the next explosion but the calculation will be done again. To explain, there is a fragment pool, by default set 200, these fragments are game objects ready to be used for a new explosion. When you explode object some of the fragments are taken from the pool and a new mesh is assigned to them.
    The new mesh (fragment mesh) is calculated always. So there is a cache for fragment game objects but not for the meshes.

    In case of skinned mesh the mesh is first baked into a normal mesh and then processed in a standard way. It hides or destroys the mesh based on the Exploder params.

    http://docs.unity3d.com/ScriptReference/SkinnedMeshRenderer.BakeMesh.html
     
  5. diegoadrada

    diegoadrada

    Joined:
    Nov 27, 2014
    Posts:
    59
    Hi, I'm about to buy this asset, I have just one question, and it's about performance, there is much resource use? Because I see a few lag in the Youtube videos.
    Thanks a lot for your answer!
     
  6. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi!

    This depends entirely on the Exploder settings. If you set it to 300 target fragments and high frame budget, you can expect some CPU spikes. But if you set it to some reasonable settings, for example <50 fragments and some 15-30 ms for frame budget, you won't notice much. Exploder spreads calculations over frames in time and it is fully configurable, so you can adjust it for your needs. I got many positive feedback from developers using Exploder on mobiles, so it's definitely working in production.

    Regards,
    RG
     
  7. Jonary

    Jonary

    Joined:
    Oct 29, 2014
    Posts:
    2
    Hi, is it possible to fragment the object couple of times before exploding it?
     
  8. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    there is an option to pre-fracture an object but only one at a time
     
  9. ParallaxRealms

    ParallaxRealms

    Joined:
    Apr 2, 2013
    Posts:
    2
    I bought this asset a few days ago, works well except I'm running into problem exploding assets I create in Blender. Whenever I have a custom model and I try to explode it I'm getting this error:

    IndexOutOfRangeException: Array index is out of range.
    Exploder.Core.MeshCutter.Cut (UnityEngine.Mesh mesh, UnityEngine.Transform meshTransform, Exploder.Core.Math.Plane plane, Boolean triangulateHoles, Boolean allowOpenMesh, System.Collections.Generic.List`1& meshes) (at Assets/Exploder/Exploder/Core/MeshCutter.cs:243)
    Exploder.Core.MeshCutter.Cut (UnityEngine.Mesh mesh, UnityEngine.Transform meshTransform, Exploder.Core.Math.Plane plane, Boolean triangulateHoles, Boolean allowOpenMesh, System.Collections.Generic.List`1& meshes, Color crossSectionVertexColor, Vector4 crossUV) (at Assets/Exploder/Exploder/Core/MeshCutter.cs:173)
    Exploder.ExploderObject.ProcessCutter (System.Int64& cuttingTime) (at Assets/Exploder/Exploder/ExploderObject.cs:1241)
    Exploder.ExploderObject.PreAllocateBuffers () (at Assets/Exploder/Exploder/ExploderObject.cs:665)
    Exploder.ExploderObject.Awake () (at Assets/Exploder/Exploder/ExploderObject.cs:632)
     
  10. Jonary

    Jonary

    Joined:
    Oct 29, 2014
    Posts:
    2
    I can't find this option (pre-fracture) is it accessible from inspector of from a script?
     
  11. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    Jonary, this is straight from the docs... hope it helps

    6 Cracking object (pre-calculated explosion)

    Cracking the game object is another feature that allows you to run explosion calculation = prepare the object for explosion and later immediately execute the explosion.


    The advantage of using the crack is PERFORMANCE. You can simply run the expensive calculation a long time before the explosion and then execute the explosion instantly. This can be useful especially on mobile devices, where the performance is lower than on desktop machine.


    Usage:

    Usage is similar to calling Explode(), you only need to call Crack(…) for cracking the object and later call ExplodeCracked(…). For script reference please see the attached example:


    DemoClickExplode.cs


    You only need to uncomment the macro ENABLE_CRACK_AND_EXPLODE on the third line to see cracking in action.


    The disadvantage of using crack is that you cannot use more than one cracked object at the same time. You can crack only one object at the time, explode it and then crack a new one.
     
    Jonary likes this.
  12. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    I have never seen this error before, is it possible you can send me the model to my email gamesreindeer@gmail.com?
    Could you also try to enable in settings "OpenMeshCutting"? It will ignore triangulation part of the algorithm and it might help.
     
  13. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    sorry i have never used this option myself and now code for mobile only and do not use exploder anymore, the full documents are in the exploder folder in your project folder,, or contact reindeer games at their website
     
    Jonary likes this.
  14. malosal

    malosal

    Joined:
    Jun 22, 2013
    Posts:
    151
    Hello, I just bought this asset and downloaded it, but the link to the documentation is broken! Can someone help?
     
  15. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
  16. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    using firefox the docs are unobtainable with this error

    The owner of docs.google.com has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.

    This site uses HTTP Strict Transport Security (HSTS) to specify that Firefox only connect to it securely. As a result, it is not possible to add an exception for this certificate.

    thought id let you know

    for above person, the docs are included in your exploder folder after import to your project
     
  17. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Thanks for the info. I only know that the docs.google.com is blocked in China as everything from google. I'll check the firefox issue.
     
  18. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    I was interesting in purchasing Exploder and wanted to know how hard it would be to modify it to not explode all objects within the radius. I want an RPG explosion to damage a building and explode any crates or small objects within the radius. I don't want the building to explode until it's damage goes to 0.

    What would be ideal is for exploder to have a damage value I pass in that tells us how much damage this explosion delivers. I would then want it to down count the health of all explodable objects in the raidus by that amount and explode objects whose health goes below 0.
     
  19. MrGistarb

    MrGistarb

    Joined:
    Feb 5, 2016
    Posts:
    1
    Great plug-in but I'm having a hard time using it in the way that I was expecting to. Is it possible to use an enemy player as a exploder trigger to destroy platforms that the player walks on?
     
  20. XanderHD

    XanderHD

    Joined:
    Mar 9, 2016
    Posts:
    3
    Hi, im working on a game where i shoot an object out of my character, and need the object that it lands on to explode. Could you point me in the right direction to accomplish this? Ive spent the past 2-3 hours sifting through the code but cant get it to work
     
  21. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    in your case I would use collision response, for example OnCollisionEnter.

    Let's say your object is a sphere, you add a sphere collider and add script component with method OnCollisionEnter, where you apply Exploder, for example like this:

    http://pastebin.com/LDnzJUtZ
     
  22. Serkanj

    Serkanj

    Joined:
    Aug 10, 2013
    Posts:
    1
    I had similar problem, i've tried your last scripts but i saw this error message.

    Assets/EasyTouchBundle/EasyTouchControls/Examples/FPSExample/FPSPlayerControl.cs(116,50): error CS1061: Type `Exploder.ExploderObject' does not contain a definition for `ExplodeObject' and no extension method `ExplodeObject' of type `Exploder.ExploderObject' could be found (are you missing a using directive or an assembly reference?)
     
  23. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    can you give us a list of the minimum items needed to import from the package to make exploder work instead of importing the whole package as some items do not get rejected by unity when using build and the file ends up bigger than i need it.

    thanks
     
  24. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Hi,

    Had a question about what mesh shapes are supported. I modeled a simple capsule type shape, but made it hollow, so that when it explodes, the chunks look like pieces of a canister. It's got a set of inner polygons in other words.

    When I try to use Exploder to explode it, I get this:

    IndexOutOfRangeException: Array index is out of range.
    Exploder.Core.MeshCutter.Cut (UnityEngine.Mesh mesh, UnityEngine.Transform meshTransform, Exploder.Core.Math.Plane plane, Boolean triangulateHoles, Boolean allowOpenMesh, System.Collections.Generic.List`1& meshes) (at Assets/Exploder/Exploder/Core/MeshCutter.cs:243)
    Exploder.Core.MeshCutter.Cut (UnityEngine.Mesh mesh, UnityEngine.Transform meshTransform, Exploder.Core.Math.Plane plane, Boolean triangulateHoles, Boolean allowOpenMesh, System.Collections.Generic.List`1& meshes, Color crossSectionVertexColor, Vector4 crossUV) (at Assets/Exploder/Exploder/Core/MeshCutter.cs:173)
    Exploder.ExploderObject.ProcessCutter (System.Int64& cuttingTime) (at Assets/Exploder/Exploder/ExploderObject.cs:1241)
    Exploder.ExploderObject.Update () (at Assets/Exploder/Exploder/ExploderObject.cs:1031)


    Is there something I can do on the modeling side that would make Exploder happy?

    Thanks!

    EDIT: OK, I figured it out. Apparently Exploder like meshes with UV's. :) Did that, and it appears to work fine now.
     
    Last edited: Apr 11, 2016
  25. aurel_unity

    aurel_unity

    Joined:
    Jun 21, 2015
    Posts:
    18
    Hi, thanks for making this great asset, we're having tons of fun with it here : )

    I'd just like to know how to set the off-screen fragments so they disappear only when absolutely offscreen. For now, we can see them being zapped on camera, because of our FOV i guess.

    Would you have an advice by any chance ? Thank you !
     
  26. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Anybody here ?
    Sometimes player body explodes too far from current body position, please fix that. I'am using crack when player connects and crackexplode when it dies.
     
  27. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    Sometimes thread owners don't get a notification that there's a new post in their thread. If you need to get support right away, contact @reindeer games through the support email address or by PM.
     
  28. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Hi, I am using your asset to great effect in an upcoming game, one problem I am not sure of is how to exploder trees (I want that), if a tree is added to a unity terrain how can exploder destroy it? tree has the exploder tag assigned so I am not sure why it does not work.. also the same goes for speedtrees.. any feedback would be most welcome.
     
    Last edited: Jun 2, 2016
  29. fredmiller12345

    fredmiller12345

    Joined:
    Mar 19, 2015
    Posts:
    4
    Hi... Can the SFX Audio part of the Exploder Object Script be turned off? I have my own audio I want to use that is accessed through my script... The Audio in the SFX part(Explosion Sound) of the Exploder Object Script will not let me play my Audio... Thanks for any help u can give me and this great Asset...
     
  30. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    Can this asset be used to destroy a part of a skinned mesh?

    Thanks :)
     
  31. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Have you tried it... read the 1st page... it supports "
    • skinned mesh support
    "
     
    Flurgle likes this.
  32. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    @khos, please re-read my post. I asked if it can destroy a part of a skinned mesh. For example, the top corner of a house, or the leg of a mecanim animated robot or something. From what it looks like, it destroys the whole mesh.

    Let's say you want a projectile to make a hole through any given mesh for example, shattering a little bit of the outside.
     
  33. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Is this product still active...I sent two emails to the dev? On holidays or?
     
  34. andoo001

    andoo001

    Joined:
    Jul 19, 2016
    Posts:
    21
    ive tried many configurations for exploder but keep running into a problem. by the third or fourth explosion from the exploder it doesnt seem to recognise tags anymore. ive tried the 'move to' method, ive tried creating and destroying exploders on impact, ive tried having the 'trigger' exploder on objects from both sides of the equation but by the third or fourth explode call. no more explosions. any suggestions?

    edit: ive also just tried 'ignore tag' with explodable script on every object. same problem
     
  35. andoo001

    andoo001

    Joined:
    Jul 19, 2016
    Posts:
    21
    no. unless your mesh is made of voxels or smaller meshes it will just explode the whole mesh. period.
     
  36. LVBen

    LVBen

    Joined:
    Apr 1, 2013
    Posts:
    16
    Is there a way to explode objects, but only disable the MeshRenders and not deactivate the entire object?

    I want to be able to explode a GameObject and have some of the MonoBehaviours on the GameObject continue to operate after the explosion.
     
  37. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    hi I got exploder package, now there is a exploder2d is it any better or what does it differently?
    best,rob
     
  38. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
  39. Rogalog

    Rogalog

    Joined:
    Jun 18, 2016
    Posts:
    23
    Hi reindeer-games,

    As you've probably heard, Unity are removing their 'ParticleEmitter' codebase and being replaced by ParticleSystem. As you've used ParticleEmitter throughout your asset, I'm currently running into quite a few problems with Unity.

    I'm getting errors such as:
    They're warnings, but they're appearing as compilation errors and it prevents me from continuing development on my game. I've fixed it once before by deleting and re-importing the entire asset pack, but that lasted only a day before the errors started appearing again.

    Does anyone have any fix for this?

    Thank you.
     
    RakNet likes this.
  40. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hello everybody,

    I have just released version 1.5 with some major changes:
    • code was massively refactored & cleaned
    • added multi-theaded support (up to 3 extra workers)
    • changed ParticleEmitter to ParticleSystem

    Any feedback or bug reports will be appreciated!
     
    montyfi, hopeful and JoeStrout like this.
  41. g-hoot

    g-hoot

    Joined:
    Apr 18, 2015
    Posts:
    69
    Hello,
    Just bought this tonight and imported it and get this error:

    Assets/Exploder/Exploder/Core/ArrayDictionary.cs(98,21): error CS0029: Cannot implicitly convert type `T' to `T'

    Could this be a bug in the 1.5 that was just released, or an issue on my end?
     
  42. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi, very strange, this piece of code hasn't been changed and I have tested it on Windows & Mac Editor, what version of Unity and OS do you have? Could you also try to import Exploder to an empty project and try to run?
     
  43. g-hoot

    g-hoot

    Joined:
    Apr 18, 2015
    Posts:
    69
    Hmm, Importing to a new project works fine. Any ideas? Win 10, Unity 5.4.2f1 personal.
     
  44. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    It looks like it clashes with other scrips in your project, it is possible that there is another project using ArrayDictionary class and Unity tried to "merge" them during import. Can you try to do this:

    1) import Exploder to empty project and copy the Assets/Exploder folder somewhere to temporary dir
    2) open you project (without Exploder) and copy the Exploder folder into <your project>/Assets directory
    3) see if it works

    If it doesn't work I would recommend you to look on your other assets, maybe you can share with me the whole project if it's not too big.
     
  45. g-hoot

    g-hoot

    Joined:
    Apr 18, 2015
    Posts:
    69
    I've been messing with this, and I think it has something to do with my game being VR. I can delete the plugins folder and the error foes away. I think that folder came from Steam when I was setting the project up for the Vive. What's strange though, I have another folder with some VR scripts in it, and I can delete it and leave the plug ins folder and the error goes away that way too. Of course I have other errors after deleting either of the folders. Do you have any VR projects that you could drop it in on? There's one big script in the plug ins folder that could be the culprit. It's called openvr_api.cs. If you don't have that I can send it to you.
     
  46. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    I have imported SteamVR and other UnityVR projects and I still don't see any errors :(. The only difference is I am using Windows 7, also another question what is your target platform? I have tried Standalone and Android.
     
  47. g-hoot

    g-hoot

    Joined:
    Apr 18, 2015
    Posts:
    69
    Target platform is Windows 64 bit.
     
  48. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Hey everyone, I;m seriously looking at exploder - my question is can you modify the asset you shoot the break at the parts the player shoot? For example, if the player has a shotgun and shoots the left arm and left right, only those limbs will be shot off? Also, can you modify the sizes the pieces are blown off? Instead of tiny fragments you can change them to chunks? Any way to apply a particle effect to each fragment like in Half Life 1 gore?

    I'll be using Realistic FPS pack, anyone know if this is compatible or has any docs on setting up??

    Thanks for the info and help! S!
     
    Last edited: Oct 27, 2016
  49. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    partial explosions are not supported, Exploder works only with the whole mesh. But it is something I would like to work on in the future, but it's quite complex problem to do properly in real-time, so it will take some time and research, I can't promise anything now.
     
  50. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Exactly that would be my question. Partially destroying objects would be an awesome feature. Maybe with a range value or defining a collider (in the damage/bullet) and fracture a part of the meshes (can be more) around first. The mesh cutting must be randomized too, to provide an uneven fractured hole (maybe a randomized convex mesh collider). Then just explode that part. The only one problem is to pre-cut the mesh(es) that should be destroyed.