Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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:
    236
    Sorry, but for now there is no support for feature you need. It cuts over infinite plane or fragment object to pieces, you can cut holes using plugin.
     
  2. villaman

    villaman

    Joined:
    Apr 21, 2021
    Posts:
    68
    ok, thank you.
     
  3. vlastan

    vlastan

    Joined:
    Nov 15, 2015
    Posts:
    40
    Hi, i am using rayfire to produce a series of video shots. I use Unity Recorder to record 4k frames with raytraced graphics. As a result, the rendering is quite slow and as a consequence, rayfire demolitions are not triggering during the sequence. I think the physics calculations are somewhow dampened by the lower number of fps during record.
    Is there something that can be done to ensure Rayfire would work framerate independently?
    Or a way to precalculate the demolitions and bake into an animation, so that it won't be needed to perform any calculation during the recording process?
     
    Last edited: Nov 18, 2021
  4. mikeohc

    mikeohc

    Joined:
    Jul 1, 2020
    Posts:
    174
    I've watched the demo of Rayfire and is wondering if it can partially break the mesh instead of breaking the entire mesh.
    Screenshot (392).png

    Is this possible? Or would I need to divide the wall into chunks beforehand?
     
  5. suppertbw

    suppertbw

    Joined:
    Mar 16, 2016
    Posts:
    17
    I follow the tutorial of Connectivity.Basic to set all scripts. Then I find that all of my models will collapse if the game runs. However, the object "columns_root" in that scene won't collapse, why?
     
  6. wechat_os_Qy0zogmDOnzC_8QfK6-F-QgLo

    wechat_os_Qy0zogmDOnzC_8QfK6-F-QgLo

    Joined:
    Aug 30, 2021
    Posts:
    1
    Please update the document
     
  7. LagSik

    LagSik

    Joined:
    Apr 6, 2020
    Posts:
    5
    Sorry for that maybe dumb question (can manage to find answer online), but is this Unity plugin compatible with all Unity render pipelines? I'm working on the Universal Render Pipeline and I just want to be sure the RayFire will work in my workflow before buying. Thanks.
     
  8. hm2337

    hm2337

    Joined:
    Jun 9, 2019
    Posts:
    9
    Does this have impact deformation? If so, can you do it onClick, where cursor clicks?
     
  9. Davain

    Davain

    Joined:
    Dec 20, 2009
    Posts:
    25
    Hi, there seems to be something wrong with mass calculation for "cluster mass by shards". For example for a box of 2x2x2 scale with "Rayfire Rigid", I get a mass of X. If I shatter that box and place "Rayfire Rigid" set to "Connected Cluster" then at start (box is still intact, all shards are together) I will get much higher total mass. The more shards the higher the mass. But here comes the interesting part, if I will demolish this box so all the shards are separate and then sum up their mass I will get the original X.
     
  10. Steedalion

    Steedalion

    Joined:
    Jul 6, 2020
    Posts:
    49
    No this is not a deformation tool. There is impact based fracture called contact bias.
     
  11. Steedalion

    Steedalion

    Joined:
    Jul 6, 2020
    Posts:
    49
    Make 3 separate walls yes. Also there are zone where demolition can be limited, see YouTube videos.
     
  12. gRtVnAUoolam1492

    gRtVnAUoolam1492

    Joined:
    Sep 17, 2016
    Posts:
    78
    hello developer, ive recently decided to purchase your asset for simulation on a project dealing with erosion (mostly as an experiment on the side)

    everything is perfectly fine

    but as I am curious to see how far I can push it, your assets functionality, I wanted to see the effect putting the Rayfire Rigid component on a animated Skinned mesh would have.

    However, I am seeing that on the skinned mesh renderer containing game object, where the script is, it shows:
    "Info
    WARNING: Object excluded from simulation."

    Funny enough, I can still demolish the entire mesh, but I can't cut the mesh.

    Is there something I'm missing or doing wrong? Either way your asset is great thank you for your time.
     
  13. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    236
    Hi, yeah. skinned mesh demolition is not fully implemented since our focus is mostly rigid body simulation and demolition. As for excluded from simulation, it means that Skinned Meshes can be demolished by manually evaluating Demolish() method, it can't be demolished by collision with something. So, it is fine that you see this message, but I probably need to make it less scary for skinned meshes.
    In order to slice such object, you should enable Slice By Blade in its Rigid/Limitation properties and enable Skin checkbox in Blade object properties.
     
    gRtVnAUoolam1492 likes this.
  14. gRtVnAUoolam1492

    gRtVnAUoolam1492

    Joined:
    Sep 17, 2016
    Posts:
    78
    I tried but it still didn't work,

    thanks again, i can live without this feature
     
  15. gRtVnAUoolam1492

    gRtVnAUoolam1492

    Joined:
    Sep 17, 2016
    Posts:
    78
    Hello again Dev,

    on this post:

    https://forum.unity.com/threads/rel...agmentation-plugin.674593/page-5#post-5782726

    you explain how to set Mass on fragment creation, I want to know how it is possible now?

    im trying to customize Mass on generated fragments rigidbody, is there a way to attach code event or behaviour for all generated pieces maybe by physic tag or material setting?

    how could I best implement this if it is not in your asset already?

    I want to basically have rigidbody settings for mass, friction, etc, per each object types fragments. but customizable way
     
  16. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    184
    what should I do if I want to trigger by code not by physic?
    for example,i have a tree in the scene,and when it be chopped down,i want to trigger to destory it,so there is no physic behavior,how to achieve it? thanks
     
  17. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    236
    Hi, not sure what exactly you want to trigger, but you can dmeolish object to fragments using public Demolish() method, if your Simulation type set to kinematik then after demolition they won't be simulated. Or do you want resulting fragments no to have any of physics related components like RigidBody and Collider?
    You can use Reference Demolition type if so, it allows to replace demolished objects to defined reference which can be root with fragments created in Editor, disable Add Rigid property and you will just replace original object with defined reference without physics.
     
  18. Hex0dus

    Hex0dus

    Joined:
    May 2, 2018
    Posts:
    5
    Dear Vadim, thanks for this wonderful Unity plugin!
    As I see here in the forum, you also give very good support. This is not a common thing, so that stands out positively from the crowd.

    Please allow me two own questions.

    I have meshes with baked AO into vertex color which is used by the shader to display the redish layer in darkend areas. After using shatter the vertex color disappears.

    1) Is there a setting to preserve vertex color?
    2) The clusters were grouped in the hierarchy in earlier versions - seems to not be the case any more? This makes it very difficult to select all the parts

    upload_2022-5-15_19-29-6.png

    upload_2022-5-15_19-29-23.png
     
  19. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    236
    1. Sorry, but there is no support for vertex color tranfer yet, we will work on this in one of the next builds.
    2. As I see you have positive Debris value, this is why you get so much additiona objects, debris allows to get tiny fragments near grouped fragments.
     
  20. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,070
    Hi. I have a quick turnaround project and thinking of purchasing this asset to assist.

    I have a building in Unity (an fbx file exported from 3ds Max, with the original file coming from Revit, so its an fbx with many components to it)

    I need to collapse the building into ruble/rocks/junk (in HDRP, preferably with Unity 2022.2.a13)

    Is this an easy enough excerise for the software, or does it need to be a single mesh?
     
  21. Hex0dus

    Hex0dus

    Joined:
    May 2, 2018
    Posts:
    5
    Thank you for the fast answer. Then I will look forward to the next build - this would certainly make my work much easier.

    2. I meant that on the left side of the screenshot the hierarchy isn't grouped. I've seen in your video that there was grouping to be seen but it's not in my case.
     
  22. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    236
    In which video? Shatter component put all fragments as children for empty root, it do not creates deep children.
     
  23. yokenstein

    yokenstein

    Joined:
    Sep 19, 2017
    Posts:
    84
    Does the Rayfire Recorder record particle system Debris? It doesn't seem to record them
     
  24. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    236
    Yeah, Recorder only records transformation of children.
     
  25. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,070
    Can I do the following with Rayfire for Unity, and how easy is it? - Fracture a solid object and have it fall into a pile of rubble, then have the pile of rubble, form a new shaped object? So to simplify what I need: Take a "cube" with all same length sides, pile it into rubble, then turn the rubble into a flatter cube or rectangle, almost like I squashed the original cube down and made it wider and longer, but flatter..... (but that is just simplifying my explanation of what I need)
     
  26. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    236
    Hi, you can do only first half, turn cube into a pile of rubble, there is no components to turn this rubble into something else later.
     
  27. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,070
    ok thanks
     
  28. IGORb93

    IGORb93

    Joined:
    Jan 29, 2020
    Posts:
    1
    Hi !
    There is an issue, when i build project on Android.
    I have a kinematic Rayfire Rigid which collides with Sleeping-ConnectedCluster-Runtime bulding.
    The problem is that works fine in the editor but when i start apk, that i builded, it doesn`t work there.
    Would be grateful for help !!!
     
  29. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    184
    hi vadim,is there any way create shatter in runtime with multiple thread or async way?
     
  30. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    236
    hi, there is only Runtime Caching support for now, it allows to spread runtime fragmentation over several frames. Every frame it generate few fragments until all fragments will be created, then object can be demolished. So you can initiate caching for few seconds before object should be demolished and at this moment all fragments should be created without significant fps drop
     
  31. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    210
    Is there a replacement for RayfireRigid.SetGravity()?

    EDIT: I think maybe rayFireRigid.physics.useGravity = <bool> might do it.
     
  32. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    236
    yeah, it enables/disables gravity for object.
     
    Ghosthowl likes this.
unityunity