Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
     
    Last edited: Jun 3, 2020
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,626
    When you complete the mobile support, could you please share which devices you have tested on (both iOS and android) as well as what kind of detail levels (amount of fractures, runtime or only pre-baked) and performance you get, that would be awesome, and I would be much more likely to purchase! :)
     
  3. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi, ok, but if you want I can send you full package to try it by yourself to see and if you will see it misses something you can share your ideas so I will add them in next builds.
     
  4. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,626
    I'd be more than happy to test it out! Feel free to PM me.
     
  5. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    42
    What additional setup needs to be done to get the blade component working? The blade demo scene is missing prefabs. Does the target need a rayfire rigid body to be sliced?
     
  6. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Sorry, this whole Blade scene shouldn't be in package, I forgot to remove it. Make sure that object which you want to slice has Slice by Blade checkbox on in Rigid/Limitations group of properties, as well as Runtime demolition type. We can talk in Discord ( https://discord.gg/8G98JKj ) if you will need my help.
    I was planning to add Slice support for Connected Cluster object type as well and create Slice tutorial and scenes after this. And in current WIP build 1.22 I added such ability, so next build will have finished tutorials scnes and new video tutorial.
     
    Last edited: Jul 16, 2020
  7. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    A few quick tests I did for video tutorials with new features for Connected cluster and Connectivity component in upcoming build 1.22
     
    MD_Reptile and Monil like this.
  8. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
     
    Akshara likes this.
  9. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  10. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  11. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  12. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  13. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  14. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  15. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  16. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  17. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  18. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  19. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  20. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,363
    Hi there. I've just started implementing RayFire in my project, as a replacement for the old fracturing package I was using (which has been deprecated for quite some time). So far, I've been very impressed with the behavior and performance of RayFire. Very good work. As I'm starting out, I do have a few beginner questions I wondered if you could answer, and a bit of feedback.

    For feedback, one thing that would help is if the Demo scenes had some instructions. I found that some of them didn't do anything when I hit Play, and it wasn't clear to a beginner how I was supposed to interact with the scenes. Maybe just some UI text on those scenes telling me what to do would help.

    Other feedback: Using Shatter, one minor problem was that it didn't copy some of the characteristics of the main renderer to the child "_sh" objects. Specifically, the object I shattered has a renderer whose "Show Shadows" is set to "Off". But all the fractured pieces have Show Shadows set to On. I'm not sure what a good, general solution to this would be, but maybe there should just be some additional settings that carry over to the child objects.

    Now, some questions:
    • I have a Rayfire Rigid where I wanted an object to shatter only at a specific time, when I call a method. It won't allow me to set Simulation Type to "Static" (it complains about that), and it seems any other simulation types cause the object to break from damage. What's the approach to making a breakable object not shatter until I explicitly shatter it?
    • In some cases, I want to pre-shatter an object, and use it as a prefab. It seems I can mostly do this, but there's an awkward step. It seems that to use the shattered object as a prefab, I need to use Rayfire Shatter, and use "Export Last Frags" to save the meshes as an asset. That's fine. But let's say I want to change an existing prefab,and fracture it differently. When in Prefab mode, Shatter doesn't seem to work. And when not in prefab mode, shattering again just creates a new sibling object containing the fractured objects. Is there a better workflow for pre-fracturing objects that I'll use as prefabs?
    Thanks.
     
  21. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi.

    Yeah, I used these scenes in Video tutorials and expected that users will try them while they watch tutorials, but you right, some users will try them not watching the video, so I will add some instructions in the next build. Also, I just updated help pages with all available video tutorials, so you can click on little book icon at the component, it will open page with all video tutorials for this component.

    Copy Renderer properties, yeah, for some reason I missed this option, will be in next build.

    If by breaking from damage you mean by collision then you can increase Solidity property. But being able to manually demolish Static objects by the method also a good idea, will fix this as well.

    And I will reply a bit later to your last question about prefab fracturing.
     
  22. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,363
    One other small thing: I was using Connectivity today on an object. I found that if something outside of RayFire caused one of the pieces of the graph to be destroyed, there were two issues with RayFire Connectivity:
    1. CheckConnectivity doesn't get called, which can result in floating chunks.
    2. RayfireConnectivityEditor starts throwing Null Reference exceptions if I have the RayFire Connectivity object selected, because one of the objects in the graph is missing.
    I worked around this by manually setting up some behavior to call CheckConnectivity on the RayFireConnectivity any time a child object is destroyed. But it seems like it would be nice if that happened automatically when RayFireConnectivity detects a change to the children maybe?
     
  23. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,363
    Regarding the prefab workflow, I'll explain the process I'm using, in detail. You can either tell me I'm doing things, or maybe this will lead to some improvements to make this sort of thing easier.

    I should also mention that I'm mainly using Rayfire to pre-shatter objects ahead of time, and then switch from the solid object to the shattered objects at runtime. I'm generally not using fully-dynamic runtime shattering right now.

    Here's an example of how I've set up a breakable wall in my game. Starting with a custom model, I add a RayFire Shatter component to it:

    upload_2020-8-14_22-37-20.png

    I shatter this object, which created a sibling object that contains all of the fragments:

    upload_2020-8-14_22-38-51.png

    On the RayFire Shatter, I now "Export Last Fragments", saving the meshes as an asset in the project.

    Now,on the FragmentWrap object, I add three RayFire components:
    • RayFire Rigid
    • RayFire Connectivity
    • RayFire Unyielding (possibly several of these)
    I can now drag this object into the Project view and make a prefab out of it.

    Now, the difficult part comes later, if I decide I need to change the Shatter results. It seems I need to click on "Delete Last" on the RayFire Shatter. However, that fully deletes the entire FragmentWrap object, which deletes the RayFire Rigid, Connectivity, and all the Unyieldings I have on it. So then I have to set those all up again, and then make sure I "Export Last Fragments" again. What would be much nicer is if there was an option not to delete the object that holds all of the child fragments; just delete the contents. That way, if I've added something to the wrapper object, they won't get destroyed. Maybe there's already a way to do that, but I haven't found it yet.

    Anyway, after having been working with this asset for a day now, I'm still really impressed with it. It's very simple to use, and the quality of the shattering is really great compared to what I've been using before this. Thanks again.
     
  24. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Thanks, I tried to make it as easy to use as possible. And previously I didn't answer your last question because I actually didn't know what to answer :) for now, current Shatter workflow is the best I could think of back when I worked on it last time. But I didn't make it better because no one complained about how it works. Now I see that in case of a decision to change fragments there will be a problem with the existing setup. So yeah, I will try to think up something to avoid this issue you have right now.
     
    dgoyette likes this.
  25. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Yeah, this bug also will be fixed, thank you very much for all your reports.
     
    dgoyette likes this.
  26. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,363
    Thanks. It's definitely not a big issue. It's just the sort of thing where eventually I'll make a mistake setting everything back up again, and it will be confusing.
     
  27. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,363
    Here are a couple more small things after some more time using this asset:

    First, in RayFire Shatter, showing the "Center" handle is a bit hard to use. Usually, this handle starts off at the same position as the object's pivot point, so when I try to drag it, I end up dragging the object itself, and not the Centering widget. I'm not sure if there's any way to make the handle look a little different. Currently, I change the object's "Tool Handle Position" to "Center" before using this, which usually works, but it's a little annoying.

    Second, with RayFire Shatter, I'm seeing a weird behavior any time I save a scene where a RayFire Shatter has a mesh that I've saved as an asset. The behavior is, the Mesh asset keeps getting updated, renaming the names of the child meshes, once per save, from its original name to the name of the parent object. Reproducing this is prettyg easy:

    Add RayFire Shatter to an object, and shatter it:

    upload_2020-8-15_20-34-30.png

    Choose "Export Last Fragments" and save the meshes as an asset.

    Inspecting the saved asset, it shows mostly the expected names for everything:

    upload_2020-8-15_20-37-34.png

    But every time I Save the scene, another of the "Cube_sh_x" submeshes gets renamed to the name of the file. Here's what it looks like after saving the scene a few times:

    upload_2020-8-15_20-39-19.png
    It renamed one submesh each time I save the scene. Eventually it stops doing this once all the submeshes have been renamed.

    This isn't a big deal, but it's weird, and it takes a bit of extra time whenever I save, as it's modifying the asset.
     
  28. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi, yeah, the center helper will be positioned at the center of the object, not at the pivot and I will try to change its visual representation.

    As for renamed assets, this is really weird, but I can't get such behavior. Also, after you saved asset it should get name which you just gave to it, it shouldn't be named as the scene and As I see it gets scene name. Which Unity version you use? Maybe this happens because of some API differences.
     
  29. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,363
    I'm using 2019.4.8f on an HDRP project (not that HDRP should matter here). I'll see if this occurs in a brand new project as well.
     
  30. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    I will try to test this build today.
     
  31. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Justed tested it in 2019.4 and all works fine, let me know how it will work in a new project.
     
  32. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    7,051
    Was it Caronte? How does RayFire compare?
     
  33. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,363
    It works fine in a brand new project as well. So, it must be some weird interaction with something else in my (fairly large) main projects. I'll let you know if I figure out what's renaming the meshes. But it sounds like it might not be related to RayFire at all.

    No, I had been using this previously: http://www.ultimategametools.com/products/fracturing But the developers of that package stopped updating it years ago, and it's no longer even on the Asset Store. RayFire ended up being better in all the ways I was using it. The performance is better, the fracturing has more options, the quality of the fracturing is better, and all of the editor components with RayFire are simply better thought out and easier to use.
     
    AcidArrow likes this.
  34. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Just wanted to let you know that I added all fixes we talked before.
    • Shatter center now at bounds center by default, not at the pivot.
    • There is a new button "Fragment to Last", it deletes the last fragments but not root and adds new fragments to this root.
    • Rigid static objects possible to demolish using Demolish button in UI or by Demolish() method.
    • Connectivity allows to delete fragments and check for connectivity when it happens.
    All these fixes will be in next released build, but if you want I can drop new build to you to try it.
     
    MD_Reptile and dgoyette like this.
  35. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,363
    Very cool. I can wait for the next release to try these things out. I continue to be impressed with this asset.
     
  36. spelafort

    spelafort

    Joined:
    May 8, 2017
    Posts:
    34
    hi,

    this asset looks really great, especially if you're looking to shatter at runtime. But: I've already used Houdini to set up some complex shatter operations for my procedural meshes. I'm wondering how easy it would be to use these existing assets with Rayfire? What I'm looking for is a custom constraints system so that I don't need to jerry rig something out of Unity's physics components. (Does that make sense?)
     
  37. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi, to be honest, I am not familiar with the way Hoidiny set up complex shatter operations, so I can't say how it differs from what RayFire provides, but I can say that you don't need to use any Unity components (unless you want to), only RayFire components could be used and they will do everything you need. Check out some basic video tutorials to see how it works to compare it with Houdini setup. Also, I can send you a full package to try it by yourself to see if this is what you may need.
     
  38. adityadroid29

    adityadroid29

    Joined:
    Sep 4, 2020
    Posts:
    2
    Hi Dev,
    Thanks for the great plugin. I am a bit stuck here as I was trying to create a house that could be demolished but I am not able to use the Manual prefragmented feature as it is not creating any fragment at all of my house/mesh, I tried it on a simple sphere with no luck. I tried to see videos from your youtube channel but I was not able to find how to pre-fragment my house on those videos as in all the videos the meshes were pre-fragmented. Hope I was clear enough, please help.

    Plus I also want to know if Rayfire is available for unreal also, if not, will it be in future ?
     
  39. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164

    Hi, I suggest you to use Reference Demolition type to demolish your house.
    Manual Prefragmentation demolition type is kind of already a bit obsolete, it keeps all fragment data inside the scene and suitable only for unique objects which exist only in one scene. Objects which will be demolished in many scenes should be prefragmented using Shatter component, then you need save fragents meshes into assets, then create a prefab with all fragments and then use this prefab as a reference for Reference demolition type.

    Check out this videos:



    As for Unreal engine, it is not available, but maybe we will develop it later, we want to finish with all necessary features for Unity first.
     
    Last edited: Sep 4, 2020
  40. adityadroid29

    adityadroid29

    Joined:
    Sep 4, 2020
    Posts:
    2
    Thanks a lot for the reply and the videos and I hope to see this plugin on Unreal soon as I am shifting to unreal full time now and I cant think of other plugins than Rayfire when it comes to destruction.
     
  41. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
     
    Monil and dgoyette like this.
  42. DMCH

    DMCH

    Joined:
    Nov 6, 2012
    Posts:
    85
    Hi Mir. I've recently updated Rayfire, and I'm having difficulty shattering an object in a way I used to. My understanding was that if the object is a closed volume, the shattered object would be created as a solid volume. However, if the volume was open, the shattered object would not be solid. This was handy as it allowed pieces of a mesh to be cut away to make a volume open.

    I just tried this and it no longer seems to work. Am I missing something?
     
  43. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi, now this is optional, turn off Input precap checkbox in Advanced properties.
     
  44. DMCH

    DMCH

    Joined:
    Nov 6, 2012
    Posts:
    85
    I was just about to post that I'd found the setting :) Thanks for the fast response!
     
  45. Chironyx

    Chironyx

    Joined:
    Jun 5, 2019
    Posts:
    1
    Heya, does RayFire work for slicing rigged & animated characters with that have a skinned mesh?
    I saw the store page said RayFire supports skinned meshes, but couldn't find a demonstration on a character.

    Case example - a blade slices a running character, the character is rigged and has a configured ragdoll.
    After the slice, the character is split in half along the cut and the body parts go "limp" thanks to the ragdoll.

    Is this achievable in RayFire? or is that far from the focus of the plugin?
    The "Mesh Slicer" plugin seems to offer this.
     
  46. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi, there is no demonstration because this feature is not fully implemented yet. It can slice skinned meshes in Editor but it is not fast enough to use it in runtime. Also for now it simply creates static meshes after slice, without rigging them back to bones. Our algorithms were not designed for skinned meshes and we need to rewrite some code so it will consider additional info like bone weights. I can't say when we will work on this because as you already said this is slightly off focus, but a lot of people ask about such support so we definitely will add such functionality later.
     
unityunity