Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

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

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

  1. paulraubic

    paulraubic

    Joined:
    Dec 27, 2013
    Posts:
    3
    I tested latest version from Feb 8, 2021 and it's still broken. Can you please provide a more accurate ETA for fix?

    Update: I created a workaround to pre-slice the object and use the sliced fragments at runtime so it's not very urgent for now.

    Code (CSharp):
    1. Obtained 9 stack frames.
    2. #0  0x000001eb957eea in RayFire::RFFaceData::RFFaceData(RayFire::RFFaceData const&)
    3. #1  0x000001eb939c5b in RayFire::RFFace::operator=(RayFire::RFFace const&)
    4. #2  0x000001eb9454d7 in RayFire::RFMesh::deleteFlaggedF(unsigned long)
    5. #3  0x000001eb949376 in RayFire::RFMesh::slice(RayFire::RFSliceParams&)
    6. #4  0x000001eb8f72b7 in RayFire::Shatter::ParallelBrickSimpleSlice::operator()(RayFire::base_range<int> const&) const
    7. #5  0x000001eb8e2872 in RayFire::Shatter::ParallelBrickSimpleSlice::ApplyProc()
    8. #6  0x000001eb8dfeca in RayFire::Shatter::RFShatter::SimpleFragment(int, RayFire::Shatter::RFShatterMode, std::__1::map<int, bool, std::__1::less<int>, std::__1::allocator<std::__1::pair<int const, bool> > >&, bool, bool)
    9. #7  0x000001eb8c2984 in RayFire::Shatter::RFShatter::ModifyObject(int, std::__1::map<int, bool, std::__1::less<int>, std::__1::allocator<std::__1::pair<int const, bool> > >&, bool, bool, RayFire::RFInterval)
    10. #8  0x000001eb989afd in Sl_Compute
     
    Last edited: Feb 14, 2021
  2. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    Hi, it is fixed now, new build will be released in few days. Butyou can contact me in Discord or via email so I will send you full package directly.
     
  3. ruanfeng

    ruanfeng

    Joined:
    Nov 6, 2013
    Posts:
    2
    Hi, how about the skinned mesh fragmentation and slicing in Runtime? Does the 1.3.2 release support that? I noticed that the newest release has this note: "- Rigid. Skinned Mesh demolition by Damage Apply." thank you!
     
  4. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    This is exactly what we are working on right now, special slice support for skinned meshes.
    For now, our current released Slice works only for Rigid objects, you can slice skinned mesh in Editor but you will get two rigid pieces that won't be skinned back to the bone. So now we are working on slicing skinned mesh and get meshes with bone weights so it will be possible to skin them back. This probably will take 2-3 weeks because we just started and there are a lot of RnD that should be done.
     
    Recon03 likes this.
  5. alejoDM-08-12

    alejoDM-08-12

    Joined:
    Mar 31, 2021
    Posts:
    3
    Hola, quería preguntarte si podrías hacer que rayfire se pueda usar para uso multijugador, ya que sería una mecánica con la que muchos usuarios querrían poder jugar.
     
  6. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    Hi, I myself never tested it in multiplayer environment yet, but I can send you full package to try it if you want.
     
  7. enikey87

    enikey87

    Joined:
    Jan 8, 2014
    Posts:
    2
    Just purchased Rayfire to slice skinned meshes. I'm sad cause it's not supported. Is there any ETA for this feature? It should slice skinned mesh into 2 separate skinned meshes and it slice skeleton too as an option.
     
  8. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    Hi, this is something we are working on right now but it seems like this feature won't be so easy to add, I mean make it work fast and stable enough to be usable in production. I wish to provide the exact date when it will be finished, but to be honest unfortunately for now I am clueless, we have a lot of other requested features to add as well and can't spend all time only to skinned mesh slicing development.
    If this is the only feature you need from RayFire For Unity then I can only suggest to ask for a refund for now, I always participate in Sales so you will be able to get it later when Skinned Mesh slicing will be finished.
     
  9. alejoDM-08-12

    alejoDM-08-12

    Joined:
    Mar 31, 2021
    Posts:
    3
    hello good afternoon, I have a question:
    When I buy rayfire, how or what do I have to do to update it to the latest version?
     
  10. alejoDM-08-12

    alejoDM-08-12

    Joined:
    Mar 31, 2021
    Posts:
    3
    I was looking in many places and couldn't find anything on how to update it to the latest version after purchasing it.
     
  11. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    7,238
    In the package manager, when the asset has a new version you will see an Update button like this:
    screenshot1.png
     
  12. bukanyijixyz

    bukanyijixyz

    Joined:
    Apr 13, 2019
    Posts:
    2
    Hello, @Mir-vadim
    Can it be done like carving plaster? For example, a knife can be carved into any shape on a model
     
  13. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    No, for now it is instant lice over a plane.
     
  14. enikey87

    enikey87

    Joined:
    Jan 8, 2014
    Posts:
    2
    No, this is not the only feature I need. Keep going. Great work.
     
  15. feilangyue

    feilangyue

    Joined:
    Sep 27, 2018
    Posts:
    3
    Code (CSharp):
    1. RFLib::Cl_Compute() failed. Error code: 2. Reason: RFLib_CNative_2018::RFShatter::ModifyObject() returned false
    2. UnityEngine.Debug:Log(Object)
    3. RayFire.DotNet.RFShatter:Compute(Transform, Mesh[]&, Vector3[]&, Mesh, Int32, List`1&)
    4. RayFire.RFFragment:Compute(Int32, RFShatter, Transform, Mesh[]&, Vector3[]&, Mesh, Int32, List`1&, Object, List`1) (at Assets/Packages/RayFire/Scripts/Classes/Shatter/RFFragment.cs:445)
    5. RayFire.RFFragment:CacheMeshes(Mesh[]&, Vector3[]&, List`1&, RayfireShatter) (at Assets/Packages/RayFire/Scripts/Classes/Shatter/RFFragment.cs:85)
    6. RayFire.RayfireShatter:Fragment(Int32) (at Assets/Packages/RayFire/Scripts/Components/RayfireShatter.cs:261)
    7. RayFire.RayfireShatterEditor:FragmentUI() (at Assets/Packages/RayFire/Scripts/Editor/RayfireShatterEditor.cs:128)
    8. RayFire.RayfireShatterEditor:OnInspectorGUI() (at Assets/Packages/RayFire/Scripts/Editor/RayfireShatterEditor.cs:87)
    9. UnityEngine.GUIUtility:ProcessEvent(Int32, IntP
    no matter SkinMeshRender or MeshRender same Error whats wrong?
    @Mir-vadim
     
    Last edited: Apr 21, 2021
  16. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    651


    This is the second post I seen related to this, and yet to see a reply related to this... This has stopped me from buying this asset... I do a lot of destruction in Maya, and Unreal..... with the new choas physics engine..

    I have done a fair about with Houdini inside Unity and out as well, it would be nice to find out if this asset supports other platforms and IL2CPP......
     
  17. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    Hi, we had several issues before with compiling plugin for Mac and iPhone platforms because this is our first project for these platforms but all these issues in the past now with build 1.35. Later we will add support of other platforms as well.
     
  18. Fyxe

    Fyxe

    Joined:
    Nov 9, 2016
    Posts:
    1
    Hello there, I've just imported RayFire into a new project and I'm just trying to get mesh object to break at runtime. I'm following the demo in the How-To (1a) and have attached the component and changed the variables accordingly.

    For some reason, then the rigid initializes, the Demolition Type changes to None and then won't demolish on collision. However, this does NOT happen if I use a unity basic Cube, where it stays at Runtime like I chose.

    I've messed around with quite literally every setting but I cannot figure out what I'm doing wrong. The mesh I'm using is quite simple, 270 verts 156 triangles. Any ideas what I might be missing?

    EDIT: IGNORE ABOVE, keeping post for visibility.
    I had my logs disabled and had not realized it, yay. I did not have my mesh set to Read/Writeable which was resetting the demolition type. Rayfire has a wonderful log about it that I was unintentionally ignoring. Working wonderfully now!
     
    Last edited: Apr 27, 2021
    Mir-vadim likes this.
  19. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    651
    right not to worried about mac, or IPhone, more worried about PEOPLE have issues with IL2CPP......


    Edit: I will wait until I see if these issues are fixed, its useless to me with out support for IL2CPP..

    I can netcode it myself.. but support for IL2CPP.... is needed. Maybe next sale.. I will check this asset again before buying. Thanks anyways.
     
    Last edited: Apr 29, 2021
  20. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    798
    Hi. Is this volume movable with the camera or an car. Lets say attach it to the an car to move leaves on the ground with some turbulance where you drive? When objects leave the influence volume they simply drop to ground?
    Main use case would be to move little stones and leaves where the car or camera is.
     
    Last edited: Apr 28, 2021
  21. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    651

    Like anything, you would need to handle that your self, this can vary from networking library and your experience.... Out of the box it don't... but you can add it your self, its that way with most assets. since there are so many different networking libs out for Unity... This is a problem for Unity.... Unreal its a piece of cake....

    Unity I just find the right networking lib that fits your needs and add it , its mostly replication, sync the objects. etc.. which is easy to do anyways... if you understanding networking in general.
    but this can vary depending on your networking architect....


    most asset devs don't add multi player support, due to so many libs....for networking, or they lack the experience. ( nothing wrong with that. but its out of scope normally for the asset to begin with... So my point, you can do it, if you have the experience and understand netcoding..
     
  22. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,787
    Minor bug report, or possibly by design:
    RFPhysic.CopyFrom
    doesn't copy
    planarCheck
    . This means child rigidbodies don't use the setting on the parent object. Maybe an overlooked property. (I wonder if reflection could be used to make that code less error prone, unless reflection breaks support for certain platforms.) Easy enough to manually add to the code for now.
     
  23. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,787
    I noticed something was taking a really long time loading a scene. Profiling it, it seems to be a neib calculation taking a very long time. This is from having 14 instances of a prefab that each containing 80 fractured pieces:

    upload_2021-5-9_21-54-50.png

    This seems pretty excessive to me. Not sure if it's due to something being misconfigured on my end.

    One other unrelated thing I noticed, in SetShardNeibs:

    Code (CSharp):
    1.                                 if (type != ConnectivityType.ByBoundingBox)
    2.                                     area = // something...
    3.  
    4.                                 if (type != ConnectivityType.ByMesh)
    5.                                     area = // Something else...
    The thing is, "type" can be one of three values in this case, so in that case that it's neither ByBoundingBox nor ByMesh, it's doing both area calculations, unnecessarily. That's not apparently an issue for me, but just something I noticed which you might one to improve.
     
  24. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    Hi, first of all, you probably use ByMesh or ByBoundingBoxAndMesh connectivity type. Yeah, these types are slow and were added for better quality if you can set up cluster in editor and cache this data. In this case, you won't spend any resources when prefab with cached data will be instantiated. So, open your prefab and click on Setup Cluster button to cache all necessary info.

    And you can change the connectivity type to ByBoundingBox, in this case, it will be very fast.

    As for the part of the code you noticed, yeah, I added few fixes there, thanks for pointing to this code.
     
    dgoyette likes this.
  25. terrycheung

    terrycheung

    Joined:
    Oct 9, 2014
    Posts:
    9
    So i'm trying to setup my prefragmented 3d model like the "columns_root" 3d model in the "2 Connectivity.Activator" scene. I copied the Rayfire Rigid and Rayfire Connectivity components values over from the columns_root obj however my model doesn't start/initialize perfectly together like yours does.

    I'm assuming its because of the way I shatter my model?,
    What settings do I need to use (i used the default Voronoi)
     

    Attached Files:

  26. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    It seems like you have overlapping fragments so when you start sim them they push each other.
    First of all, you can try to shatter your object again with Decompose property off in Advanced properties, this should decrease the number of fragments and decrease overlapping.

    There will be a new feature in the next build that will allow to ignore close colliders each other to avoid such weird simulation.
     
    terrycheung likes this.
  27. terrycheung

    terrycheung

    Joined:
    Oct 9, 2014
    Posts:
    9
    That setting helped with the overlapping issue, the bin now stands on its own, however when I add the lid back in it doesn't work. But I can now see whether or not the model stands up is a bit dependent on how Unity generates the colliders, so it's not realistic for me to expect this to work in every case. Thanks for your help though.
     
  28. dinlinwin

    dinlinwin

    Joined:
    May 7, 2021
    Posts:
    1
    Hello,

    Nice work with ur Asses. I am currently interested to use it for mobile. Is it possible to get a Android demo with FPS counter ?

    Thanks
     
  29. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    666
    Noob here who wants to get started by exploding a crate during runtime but don't want it to interact with the player or the world. Does Rayfire have this ability.

    What options do I have and does Rayfire have the ability to save this simulation as an animation?
    Any links or tutorials to get into it would be of great help thanks.
     
  30. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    54
    Hello! I wanted to ask... The 3D model set-up needs something special to work?
    Most of other solutions have problems with some models where you can see a los of artifacts/bad texturing...
    Thanks!
     
  31. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    62
    I'm using Rayfire Rigid to create a barrel with a metal frame.
    I want to make the wooden part of the barrel broken and the metal frame to only Fade after falling to the ground.
    Is it possible to set only Fade?
     
  32. GamerNZnick

    GamerNZnick

    Joined:
    Jan 9, 2019
    Posts:
    5
    Hi,

    I've downloaded your RayFire v1.39 packages using Unity 2020.3.1f1 and for some reason when I'm importing one file doesn't get imported. I've tried reimporting, deleting the package, creating an empty project etc. Nothing seams to work.

    The mystery file is: Editor/RFMeshAsset.cs

    Is there some way I can download this file else where.
     
  33. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    This is ridiculous, I just uploaded a new build, and seems like it was corrupted during upload, I just don't have any other explanations. I have a copy of the uploaded package and when I import it all is fine, the file is in its place, but when I download the package from the Asset store then it shows it in the import list but doesn't actually import in the project. I will send you a link to the full package for now, getting approval for new upload will take some time
     
  34. GamerNZnick

    GamerNZnick

    Joined:
    Jan 9, 2019
    Posts:
    5
    Hi, This may well be me doing something funky. But I've followed the documentation for using Reference Demolition and I seam to have an issue when shattering my game object and adding colliders.

    When I export the fragments the colliders are added and I can see that there is the mesh collider component, but the mesh for the collider is empty. If I manually add the mesh fragment to the collider its all Ok.

    Now I know its OK but just thought you'd like to know.

    This Unity 2020.3.1f1 RayFire 1.39
     
  35. GamerNZnick

    GamerNZnick

    Joined:
    Jan 9, 2019
    Posts:
    5
    Hi

    The other thing I noticed when working with reference demolition. Is that on the rigidbody, if you set it to have a mass of say 10. When it applies the rigid body to the fragments they all have a mass of 10 rather than a percentage of the parents mass. Which makes for very heavy fragments.
     
  36. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    When you say "When I export the fragments the colliders are added" do you mean Export to asset feature in Shatte component? Or something else? Colliders may have empty meshes only if you add these colliders when the object's meshes were not referencing any mesh asset. I need some more info to figure out why colliders lost their meshes.
     
  37. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    Again, where exactly you set mass of 10? In original Rigid/Physics properties of object which is going to be demolished?
     
  38. SebaGioseffi

    SebaGioseffi

    Joined:
    Oct 18, 2013
    Posts:
    6
    Hi! I've been trying to use the Fragment component with clusters. It works great without clusters or when testing it with primitive shapes, but when I try to use it with our custom meshes I get the following error:

    RFLib::Cl_Compute() failed. Error code: 2. Reason: RFLib_CNative_2018::RFShatter::ModifyObject() returned false


    Any ideas about what could be the issues with the models?
     
  39. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    This probably means that your mesh has topology issues like open edges and unwelded vertices, which mode do you use in Shatter component? Runtime or Editor? Can you send me your object to test it with Shatter properties you use?

    Also, check out these two videos:

     
    SebaGioseffi likes this.
  40. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    62
    Is it possible to set only fades?
     
  41. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    225
    Oh, I am sorry, didn't notice your message. Yes, you can use Fading By Distance, it will initiate fading if the object will be moved for a defined distance relative to the position where its Rigid component was Initialized.
     
  42. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    62
    I was able to find a fade over time.
    It worked fine with RayfireRigid.Fade ().
    thank you.
     
  43. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,009
    @Mir-vadim Are any of your customers using RayFire in a Photon MP environment? Looking for any examples on how to use destruction in a Photon based MP game.

    Thanks
     
  44. Enigma229

    Enigma229

    Joined:
    Aug 6, 2019
    Posts:
    62
    Interested in buying this for some Unity cinematic work in the HDRP. Does this plugin work in URP/HDRP or does it not matter?
     
  45. CornerCase_Studio

    CornerCase_Studio

    Joined:
    Nov 17, 2016
    Posts:
    5
    It doesn't matter. Rayfire doesn't care what render pipeline you're using.
     
unityunity