Search Unity

[RELEASED] RayFire for Unity. Runtime demolition and fragmentation plugin.

Discussion in 'Assets and Asset Store' started by Mir-vadim, May 8, 2019.

  1. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    97
    Ah, nice!
    Difficult question.
    Demolition Force/Pressure/Explosion?
    Fragments initial Force?

    Also, I just gave it a try and even entered 100 as collMult in RFPhysic, but I did not see any difference at all. I have the newest version. I let the bottle manually fall in scene view. It just collapses at the point of impact but the fragments don't fly away.
     
  2. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    117
    After it was changed in code you should remove Rigid and add new one or go to declaration of this property and erase it's [HideInInspector] so it will be revealed in UI, then change it in UI and try again. It should work.
    What about Fragments Dampening?
     
  3. bufothejig

    bufothejig

    Joined:
    Nov 24, 2013
    Posts:
    12
    Hey there, still having troubles getting rayfire to work properly with prefabs.

    What is the proper workflow for adding rayfire rigid and rayfire shatter to a prefab?

    Right now I'm getting strange behavior.

    For example, when I hit "fragment" in the prefab view it creates a new game object in my scene.

    The Scale preview button also doesn't work.

    I'm also getting empty mesh warnings and then the model goes pink.

    This plugin has so much potential but I've watched a ton of videos and spent many hours trying to make it work and I'm still struggling hard.

    My use case is to have prefabs that have rayfire rigid and rayfire shatter on them and are dormant, only awakening to then explode apart when they are in the aoe range of a grenade or rocket blast.

    Any help would be appreciated, thanks.
     
  4. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    117
    Hi, for now when you fragment object in Prefab view it creates fragments in Scene, not in prefab view. This is something I will try to fix in one of the next build. So solution for now is to fragment object in scene and then create prefab using fragments you got.

    But there is one important thing you should know, when you fragment object you create fragments with new meshes, but these meshes exist only in scene, there is no asset with mesh data. So, your meshes exist only in scene. If you will create fragment prefab and then drag it to scene you will see it without mesh, because prefab is just a text file with links to assets which it uses, it has no idea about scene where all these fragments meshes right now exist.

    So, before create fragment prefab you need to export all these meshes in asset file and the best way to do this is to use free FBX Exporter by Unity, you can find link to asset sore page in Shatter component at the bottom. After exporting fragment you need to delete original fragment with mesh which exist only in scene and drag into scene FBX asset you just created. Now you will have the same fragment but with mesh which referencing to fbx asset and now you can create prefab using this object.

    I show this in this video:


    When you get empty mesh warning and model goes pink, do you use Shatter in Editor or Runtime mode?

    Can you send this model to me? When users have problems with meshes we fix these issues but we need to get this mesh and try to fragment it and debug to see what is going on there.

    Also, I have discord channel so we can chat there, helping you here may take too much time.
    https://discord.gg/8G98JKj
     
  5. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    97
    That solved it! Just what I was looking for!
     
  6. bufothejig

    bufothejig

    Joined:
    Nov 24, 2013
    Posts:
    12
    @Mir-vadim Thanks for the help!

    That video resolved most of my problems and everything is working now in my game.

    I still had issues at first but I discovered something strange but also found a workaround.

    I had some models that were imported at the wrong scaling so I had their scale in unity real low like under 0.001. Turns out this breaks rayfire shatter and was giving me all kinds of errors.

    To fix the issue I set the scale to something reasonable like 1, then the did my rayfire shatter, then went to the created root and set the scale back to 0.001. After this I did the fbx export and assigned it to the original and everything worked.

    This might be a good tip for others in the future, if your model scale is very low then upscale it, shatter, then downscale it and all will work.

    This is kinda my problem I need to not be lazy and set my model scales properly on import. . .
     
  7. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    117
    New Reset feature in upcoming build 1.15

     
    HenryChinaski likes this.
  8. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    117
    Ok, this issue was fixed.
    In build 1.16 small objects should be fragmented without problems.
     
  9. songpwc

    songpwc

    Joined:
    Nov 6, 2018
    Posts:
    14
    @Mir-vadim
    hi great asset . do you have skinnedmesh runtime slice and demolition demo video. I am not sure how it looks like. can this slice arm, leg vertically and horizontally?
    thanks.
     
  10. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    117
    Hi, right now skinned mesh fragmentation and slicing not supported in Runtime. It could be done but for now it is not optimized for Runtime usage. Usually skinned meshes are mid\hi poly and has issues like open edges and interpenetrations. And such issues can not be handled well by our sensitive Runtime fragmentation mode, it needs simple and clean meshes without issues so it won't need to spend time on checking and fixing issues.
    For such meshes should be used Editor fragmentation mode which is slower but much more robust.
    Also slicing skinned meshes needs some additional support like proper riging after fragmentation so this feature is in our TODO list for now.
     
  11. songpwc

    songpwc

    Joined:
    Nov 6, 2018
    Posts:
    14
    @Mir-vadim
    thank you for your quick reply.
    The release note is a little bit misleading.
    " - Rigid. New SkinnedMesh Object type. Support for runtime demolition and slicing of SkinnedMesh objects."

    anyway, I am going to wait for this feature.
     
  12. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    117
    Yeah, sorry, I will edit this note.
     
  13. Rmzn0

    Rmzn0

    Joined:
    Jul 24, 2018
    Posts:
    9

    Is there any progress?
     
  14. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    117
    Hi, sorry, for some reason sometimes I get notifications about new posts and sometimes not. Also after I launched Discord channel people ask more questions there: https://discord.gg/8G98JKj

    As for your questions, weel I started to work on such tutorial, downloaded one of popular tool but I had some problems with it, Rider couldn't open project right, ate like 10 GIGs of RAM and then it was impossible to work further, it was impossible to find out where to inject RayFire code to make it work, and while I was trying to figure out what is wrong other users asked to add and/or fix something, and we had some problems with adding Mac support. So, long stroy short, I simplu forgot to continue with this tutorial and actually since then we added a bunch of new features so for now I have to recreate some old video tutorials because they become obsolete. Sorry again, but last month was really busy, I will start working on tutorial you asked tomorrow. I guess with other FPS project.

    Also, few days ago we finally compiled first build with Mac support, without multithreading support yet, but we are adding it right now. So, if anyone wants to test new build on Mac just let me know, but better to do this in Discord.
     
unityunity