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. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi,
    1. You can decrease amount of fragments in Demolition properties.
    2. You can set Demolition type to Precache or Prefragment, in this case amount of fragments could be higher.

    Check out this overview:


    And also keep in mind that Sphere has more than 750 tris, this could be too much for high amount fragments for Runtime demolition. Takes 60ms on my pc.
     
    Last edited: Jul 12, 2019
  2. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    145
    I use pre-calculated fragments (prefabs) for my game. However, when the object is already destroyed, I want to give the player the opportunity to destroy them into smaller parts. And in this case, to calculate in advance is a bad idea, because there are too many unique fragments.

    I tried to destroy the already destroyed piece of the column (60 triangles) - it took 24 ms.

    Before that, I used another tool with a much higher performance, which imposed great restrictions (first of all, only 1 material), so I wanted to use RayFire instead.

    Is this tool multithreaded? Perhaps it is possible to perform calculations over several frames so that the user does not notice lags? Wait 2-3 frames before the destruction is not as critical and noticeable as large enough lags during the game.
     
  3. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    145
    Well, it seems that I did not correctly understand the essence of Precached work. This seems to be doing just that. It is not clear how this will behave with a large number of newly created objects. I will conduct some tests and look at the tutorials again and write again.
    Thanks.
     
  4. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    145
    As I understood from tests and tutorials, Prefragmented (Precache) does about the same (in terms of optimization) as Runtime, but does it in Awake. That is, the optimization problem remains, but it is transferred to the first frame.
    However, this does not solve the problem in the case when the object does not exist at the start of the game. That is, it is either created during the game, or it is a fragment that must then be destroyed again.
    That is, when I create (for example, in editor during pause) a RayfireRigid component with demolitionType = Prefragmented (Precache), the same problems appear in the profiler as during Runtime (10-15 ms on cube).

    I missed something, and it needs to be done differently?
    If not, then the same question: is it possible, at least Prefragmented (Precache), to calculate not for 1 frame, but for several?
     
  5. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    This optimization among first features in my TODO list. We wanted to add it in release, but at some point I just had to stop add new features and release what was already done and worked. For now, unfortunatelly, it can not spread fragmentation over few frames. And when we will add such feature it will work for all types, not only for Runtime. I guess now this major will go to the first place to be added next.

    Also, if you create in editor during pause a RayfireRigid component with demolitionType = Prefragmented (Precache), then you should also manually click on Precache/Prefragment button as well, to create all meshes/fragments. Because just changing demolitionType manually will not make it precache anything because default demolitionType property when Rigid component was created was Runtime. If you want to add Rigid component in play mode for now you need to deactivate object, add Rigid component, change it's properties and then activate object so Rigid will do all stuff it does in Awake and Start using properties you just set.

    As for multi-threading, to save some time I will use my comment from Youtube. We added it at first, but it was not much faster with multi-threading (in some cases even a bit slower), but made everything much more complicated and unstable. It was useful when we fragmented object into hundreds of fragments, but fragmenting in runtime to hundreds of fragments takes too much time, more than 100 ms, so we removed multi-threading support, because in editor such speed increase irrelevant.

    EDITED: Well, technically it uses multi-threading, but deep inside mesh slice and cap ops. I ment we tried to spread every fragment generation over threads, and this was not usefull too much.
     
    Last edited: Jul 12, 2019
  6. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    145
    Ok, thanks.
    Is there a very approximate time frame when this version will be released (week / month / half a year) so that I can plan my project (unfortunately, 10ms per simple fragment for my project is very much)?
     
  7. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    For now I can tell that it definitely will not take a week and half a year. I myself work on everything Unity related and another guy handle everything library related, I need to talk with him first before share approximate time it will take. I will reply to you in a couple of days.
     
    Last edited: Jul 12, 2019
  8. LeftTurnWorkshop

    LeftTurnWorkshop

    Joined:
    Jul 10, 2018
    Posts:
    5
    Rayfire has saved me so much time in the past two weeks it's insane. But I'm also getting a lot of "bad input mesh" warnings like this:
    Bad input mesh: Toilet
    UnityEngine.Debug:Log(Object, Object)
    RayFire.RFFragment:SetFragmentCommon(Int32, MeshFilter, RFSurface, Boolean, Int32) (at Assets/RayFire/Script/Class/RFFragment.cs:241)
    RayFire.RFFragment:CacheMeshes(Mesh[]&, Vector3[]&, RayfireShatter, RFSurface) (at Assets/RayFire/Script/Class/RFFragment.cs:31)
    RayFire.RayfireShatter:Fragment() (at Assets/RayFire/Script/RayfireShatter.cs:106)
    RayfireShatterEditor:OnInspectorGUI() (at Assets/RayFire/Script/Editor/RayfireShatterEditor.cs:90)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)​
    As a Playmaker-abusing non-coder I'm just wondering what makes a "good" input mesh. Thanks a million! You're a genius.
     
    FlightOfOne likes this.
  9. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, I will reply to you with more info tomorrow, for now I am workin on update with few new properties in Shatter which will significantly decrease amount of such warnings and will make it less sensitive to mesh quality.
     
  10. therewillbebrad

    therewillbebrad

    Joined:
    Mar 2, 2018
    Posts:
    151
    Is it possible with this to dynamically crack a building but keep it intact until let say it reaches a 0 health state?
     
  11. therewillbebrad

    therewillbebrad

    Joined:
    Mar 2, 2018
    Posts:
    151
    Also does this work with baked lightmaps? I think the inactive mesh is what I was looking for as far as cracks go.
     
  12. therewillbebrad

    therewillbebrad

    Joined:
    Mar 2, 2018
    Posts:
    151
    Also I see an option for decals does that include bullet holes and how does that work with the chunking system? And are the smaller pebbles a particle effect oor is that being dynamically made as well in the gun example? Sorry for all the questions I've been fascinated by this asset and my brain is racking.
     
    Last edited: Jul 16, 2019
  13. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Bad mesh means that object has open edges / unwelded vertices / negative volume / interpenetrated surface / double faces. And there is a high chance that attempt to fragment it will provide fragments with the same artifacts.

    Our shattering engine has algorithms which try to fix all those problems and in build 1.03 they were always On. But it was developed to fix basic problems, like when artist forgot to weld some vertices or some open edge is not capped which means that object has no closed volume. When such object sliced it should cap sliced border and if there are other open edges it will cap them in wrong way. Every fragment usually should perform 10-30 such slices, so at the end you may end up with pretty ugly fragment.

    But game objects may have a lot of open edges to save some poly, so our "fixing" made them even worse and this is why you got bad mesh warnings so much. I added "Repair" checkbox in Shatter component in latest build 1.04 which is already available. It is On by default like in previous build, but now you can turn it Off if you get bad mesh warning and try to fragment object without all these fixing operations. But you should know that results could be also bad if input mesh has problems I mentioned.

    For last several years we used to work with VFX artists who used it in movies and CGI, so, bad output fragments was not an option for us and for them, I mean having even one tiny artifact on final render could force artist to redo everything he done. Game developers are not so sensitive to final quality, so in some case you can turn Off repair property and try to frag object without fixing ops.

    Not like we are ok with this, for some time, while we are fixing bugs you can use this way to fragment your objects which can't be fragmented otherwise. But later we will try to impove these fixing operations so they will be more game geometry friendly.
     
  14. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Runtime fragmentation is suitable for simple low poly objects, up to 400 polys.
    If you want to demolish build you should use Connected Cluster object type. In this way it will be demolished at impact or damage points and not connected anymore parts will be simulated as separate clusters.
    This feature for now implemented for dynamic objects and I need to spen some time to make it work well with static objects, so user will be able to define cluster area which stay on the ground, so any part which is not connected anymore to this part will fall down. Such support will be added a bit later, for now we are concentrated on fixing bugs.
     
  15. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    This Gun video you saw was created with beta version of this component. In released build there is no support for Decals, it will be added later when it will be properly implemented. As for creating holes, it is not actually holes. When you shoout object you can demolish it in Runtime and convert into a bunch of fragments. If this object is Inactive all fragments also will be Inactive and shooting to some fragment you can activate it so it will fall down and it will looks like you just created a hole. ALso you can start with a bunch of Inactive fragments and activate some of them by shooting. But it doesn't create hole in solid object.

    I can send you a package so you will be able to try it and decide if this is what you need. let me know if you want to try.
     
  16. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    And sorry, but I didn't test it with baked lightmaps. Always used dynamic lighting.
     
  17. sssteveshao

    sssteveshao

    Joined:
    Oct 10, 2017
    Posts:
    2
    Hi,
    So far it seems the plugin requires .NET 4.0 + C# 7.0 to be correctly compiled. The project I'm working on is targeting .NET 3.5 and C# 4.0. While I could edit the C# scripts to fix the incompatible syntax, I wasn't able to edit the RayFire.DotNet .dll file. Thus the plugin becomes unusable. It would be a pain in the ass if I have to update the assembly and language settings for my 2-year-old project, so is it possible if you can provide a version that is compatible with earlier assemblies?
    Cheers.
     
  18. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Yes, it is mentioned in requirements section. I don't think it will be hard to make it work with .NET 3.5, we planned to do this later. I will provide some more info about this tomorrow.
     
  19. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256

    Hi, sorry for delay, we were busy with one nasty bug which was just fixed.
    On monday we will try to add .NET 3.5 support.
     
  20. sssteveshao

    sssteveshao

    Joined:
    Oct 10, 2017
    Posts:
    2
    Appreciated! Heads-up for your update :p
     
  21. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi. we made it work with managed plugin, now I am working on fixing code on C# scripts. Tomorrow or later today I will send you link to new build with .NET 3.5 support.
     
  22. Filhanteraren

    Filhanteraren

    Joined:
    May 14, 2014
    Posts:
    47
    Was about to start doing some R&D for destruction for my new project today and just found out that this was released.
    Have used RayFire for 3dsmax since it first came out ( how long ago was that?)

    Looking forward to try this out.

    I have question about the fracture feature; Is it possible to fracture objects into hollow objects?
    Without the need for the original object to be hollow. I find this feature missing for a lot of fracture system.
     
  23. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    That was too long ago :)
    Well, for now ther is no such feature, but I know that some users need it and we will add it later, but not soon, still need to do a lot of other stuff.
     
  24. YoniLLS

    YoniLLS

    Joined:
    May 7, 2017
    Posts:
    1
    Hi,

    Great plugin , Will there be a support for multi material objects?
    Cause right now its copy the materials but the fragments are only uses the first material
     
  25. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    This is what we are working on right now. It can apply second material for inner faces, but if object has more than 2 materials then it doesn't work as it should. Main problem is that if you have object with several materials/submeshes one of it's fragments may have only few of these materials, so we can't just add another material or keep original material list, we need to create material list for every fragment by it's own submeshes and they can be different for every fragment. This should take a week or so, hopefully.
     
    Last edited: Jul 31, 2019
  26. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Build 1.05 released and here is changelog:
    • Common. DotNET 3.5 support.
    • Shatter. Multi-material object fragmentation.
    • Shatter. SkinnedMesh fragmentation support.
    • Manager. Material Presets. Customizable material density, solidity, friction and bounciness.
    • Rigid. Destructible state check. Demolish only objects with Destructible material.
    • Rigid. Tooltips for properties.
     
    Vincent454 likes this.
  27. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
  28. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, just want to let you know that this feature is almost finished and will be available in build 1.06 in 1-2 weeks.
     
    Elfinnik159 likes this.
  29. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    145
    Hi, this is great news, I look forward to it.
     
  30. 41395

    41395

    Joined:
    Jun 16, 2013
    Posts:
    13
    Hi, does this work in the Mac Editor or Windows Only? thanks
     
  31. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    It was working during beta test, but we added a lot of stuff since then and I didn't test it yet. I can send you package to test it if you want.
     
  32. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    So, I already added ability to spread runtime demolition over defined amount of frames and it works great, finally it is possible to increase amount of fragments or use objects with higher amount of triangles.
    Now I am going to add the same support for Precached mode and manual Caching initiation, so it will be possible to start fragment objects some time before it should be demolished, in this way it will start create by several fragments every frame and at demolition moment all fragments will be ready.
    This feature perfectly fills gap between Runtime and Precached demolition types.
     
    Elfinnik159 likes this.
  33. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Build 1.06 released and here is changelog:

    - Combine. New Rayfire Combine component. Combines meshes into single mesh. Supports Multi-Material and SkinnedMesh objects.
    - Rigid. Runtime caching. Allows to cache fragment's meshes over multiple frames to prevent FPS drop in case of high amount of fragments or hipoly mesh.
    - Rigid. New SkinnedMesh Object type. Support for runtime demolition and slicing of SkinnedMesh objects.
    - Rigid. Removed Exclude Object type.
    - Rigid. Demolition type Precached was renamed to Awake Precache. Precache fragment's meshes in awake.
    - Rigid. New Demolition type Manual Precache. Allows to demolish objects to manually precached fragments.
    - Rigid. Demolition type Prefragmented was renamed to Awake Prefragment. Prefragment object in awake.
    - Rigid. New Demolition type Manual Prefragment. Allows to demolish objects to manually prefragmented objects.
    - Rigid. Helpful console messages. Will notify if you have wrong setup.
    - Manager. Drag and Angular Drag properties in Material Preset.
    - Fixed bug. Fragmentation of objects with normal map.
    - Fixed bug. Fragmentation of objects with several materials and negative scale.
    - Fixed bug. Manual Prefragment creates Manager (if it is not created) and setup physics accordingly to Material Presets.
    - Fixed bug. Manager / Advanced demolition properties / Shadow Casting size threshold property now work correctly.

    And here is Runtime Caching feature in action:
     
    Elfinnik159 and Vincent454 like this.
  34. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    145
    Hi, firstly, thanks for adding this feature.

    I create a simple build with a stone from the new demo scene, and was able to test on different computers.
    In the editor, the profiler shows the delay:
    3-7 ms per frame during setup: 20 fragments, 1 piece per frame;
    5-8 ms per frame during setup: 20 fragments, 2 pieces per frame;
    7-12 ms per frame during setup: 20 fragments, 4 pieces per frame.
    Also, everywhere there are peaks + 2-4 ms around the middle or end of the process.

    However, in the build, it seems that the delay is much less (2 times) than in the editor. So, on the average device (core i3), rare FPS subsidence begins on several stones of 20 fragments, 1 piece per frame. And very frequent subsidence while simultaneously fragmentation 2-4 stones of 50 fragments, 2 pieces per frame.

    Of course, dividing the entire fragmentation process into several frames greatly increases the optimization, however, if this is not performed asynchronously, the load can interfere with other processes. Also, this means that it is impossible to start 2-3 processes at once on weak devices, since the delay simply increases several times.

    In an empty project, I can destruct several stones without lags (20 fragments, 1 piece per frame). I am afraid that in a project in which many processes are already running, an additional few milliseconds may create lags. But maybe this is not so. I need time to integrate this into my project.

    Although, maybe I did not find it, and asynchrony can be used somehow?

    P.S. I have almost all plugins for fragmentation in runtime from the Asset Store. In any case, even in this state, without asynchrony, this is the fastest plugin at the moment, if I need fast fragmentation of 25+ pieces and support for several materials, and without random GC spikes. I will embed it in my project and will return here for a review.

    Is there a reason why the library does not work on x86, but only works on x86_64 builds?
     
  35. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, thanks for feedback, this is what I really need right now to make it better.

    About spike at the End, it happens because at the end it finally creates all frament gameobjects, applies meshes, creates convex sim colliders, etc. I will fix this by optional choice to not only cache meshes every frame, but also creating fragments, so fragments also will be created every frame and not at once at the end.

    About asynchrony, yes, this is also will be added in next build, right now every Rigid have no idea about other Rigid components going through Runtime Caching. In next build there also will be optional feature which will make sure that there is no more than one Rigid which cache fragments atm, other will wait they turn in queue.

    About x86, well, to be honest no one asked yet about x86 support and so far I try to add what people need the most, so it also will be in next build.

    That was first Runtime Caching implementation, I just wanted to make it work with basic functionality and improve later after getting some feedback from real game developers, well, didn't expect to get it so quick. :) Adding all these little impovements will not be too hard.
     
  36. bufothejig

    bufothejig

    Joined:
    Nov 24, 2013
    Posts:
    13
    @Mir-vadim I have a question about the basic workflow to create a basic cube, set it as a prefab precache and then hit play and press demolish.

    I've been struggling to get prefab precache to work in my level so I am starting with just a simple cube and trying to nail down the process so I can implement RayfireRigid into my existing level prefabs.

    Here is my attempt so far that do not work :
    1. Create a new cube
    2. Add RayfireRigid component to cube
    3. select Demolition Type Prefab Precache
    4. Press Prefab Precache button
    5. Get Error
    UnassignedReferenceException: The variable transForm of RayfireRigid has not been assigned.
    You probably need to assign the transForm variable of the RayfireRigid script in the inspector.
    UnityEngine.Transform.get_rotation () <0x2e2b272f7c0 + 0x00072> in <2ce230928a98496ba12ca183760fb5f6>:0
    RayFire.RFFragment.PrepareCacheMeshes (RayFire.RayfireRigid scrRigid) (at Assets/RayFire/Script/Class/RFFragment.cs:77)
    RayFire.RayfireRigid.CacheInstant () (at Assets/RayFire/Script/RayfireRigid.cs:490)
    RayFire.RayfireRigid.PrefabPrecache () (at Assets/RayFire/Script/RayfireRigid.cs:422)
    RayfireRigidEditor.OnInspectorGUI () (at Assets/RayFire/Script/Editor/RayfireRigidEditor.cs:78)
    UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Would love to know what I am doing wrong and what the process would be. Great plugin overall and I look forward to figuring out how to make it work and implementing in my game.
     
  37. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, sorry, but this is a new bug in build 1.06, I rewrote almost whole Rigid component to add Runtime caching and added new bug, tomorrow I will send you a link to fixed package.
     
  38. rotsin

    rotsin

    Joined:
    Feb 22, 2013
    Posts:
    15
    Hi,

    This is a great looking asset, have been drooling over it for a few hours now. I only take up Unity development as a hobby and it's rather hard to justify spending so much on an asset (it does seem to be worth it tho). So before I make a purchase I do have 2 questions:

    1. Is there a lite/limited/watermarky/timebombed version that I can try before I buy?

    and

    2. Is it possible to have a building collapsing when say one of the pillars is broken or a side wall is collapsed? I have seen callouts here and there but have not seen a video example. Don't actually need a video, just a (semi)-detailed description if available.

    Thank you!
     
    Last edited: Sep 26, 2019
  39. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Since I can't reach the developer via mail.
    Could someone maybe tell me if this asset works with Unity 2018.1.1?
    The store page states that you would need Unity 2018.4.6, but another user already confirmed that it also works with 2018.2.2 if you apply a little fix.
     
  40. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hey, sorry for delay, we worked hard here on next release which will improve fragmentation process, some users complained that they can't fragment complex hi poly meshes, so we basically wrote second fragmentation mode for such objects for in Editor fragmentation. I was so busy that forgot to reply to emails all the time. It will be released on next few days.

    Yes, it works with any 2018 build.
    And by the way, I can't find email from you, where did you send it and when?
     
    Last edited: Oct 16, 2019
  41. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Thanks for the info! We will heavily consider buying it then.
    I wrote one via the form on your homepage last week and one to the email address published at your homepage yesterday.
     
  42. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    We bought the asset but instantly struggle a bit, integrating it into our project.

    We have our own projectile system. On collision between a RayFireRigid and our projectile we simply call:
    co.gameObject.GetComponent<RayFire.RayfireRigid>().DemolishObject();

    That demolishes the object, but it just collapses and does not get blown away like we want to. We tried to recreate the RayFireGun behavior but were not able to do so. How can you locally apply force when demolishing an object?
     
  43. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    We were able to solve the issue by using the RayfireBomb component with small values at the impact point of the bullet.

    EDIT:
    My next question is:
    Is it possible to have - for example - a big shelf, that the player can push around like a normal Rigidbody and as soon as the bullet hits a part of the shelf, only those parts get demolished and fall down?

    If not - is it at least possible to have - for example - a big shelf, that is static in the world and can not be pushed by the player in any way, unless he shoots at it, so that parts of it fall off? The only way for me to get this working was to set the RayfireRigid to Kinematic, but then the player cannot collide with the object anymore. The column in the gun tutorial scene, for example, does not need to be shot to collapse, you can just walk into it.

    And lastly a quick question:
    If you shatter an object and then assign a RayfireRigid to the root, all the fragments get rigidbodies assigned at startup. In our case, their mass is way too low. How can you modify the mass of the created fragments?

    Sorry for all the questions, but at the assets price point, I think it's fair to ask them. Your product makes a good first impression, but I think that there are many missing or not well enough explained features, that you could improve on.
     
    Last edited: Oct 17, 2019
  44. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Next question. I don't really get how I am expected to use the asset.
    I shattered a simple cube object with the shatter component in 150 pieces. Then, I assigned a RayfireRigid component to the newly created root object and set it to: Kinematic, MeshRoot, No Demolition.
    Every one of those objects reduces the FPS noticeably. Five such objects reduce our FPS from 80 to 45.
    All of this is without demolishing anything - nothing even moves.

    Profiler shows 2400 calls at the RayfireRigid.DemolishableCor coroutine what can be explained if you look at the pre-fractured fragments in play mode - they all got RayfireRigid components attached. Is it really necessary to have a coroutine running on every single fragment? Or am I missing something?
     
  45. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    That is very cool asset. Is it possible to have deterministic destruction for multiplayer usage? Ideally with slicing object at runtime. The idea is that you would send only needed input for destruction(for example point of impact and force), and it would create the same result in all clients.
     
  46. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Did you increase Impact Strength and Radius in Gun properties? These are the properties which allows to push objects at impact point. With 0 radius Gun will push only object which was shot, with bigger radius it will explode objects in radius.
     
  47. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    You should use Clusters to simulate whole group of fragments as one and being able to shoot out fragments out of it, but I just got report about a bug in this system and will work on a fix tomorrow, I will let you know here when this bug will be fixed and new build 1.09 will be released. If you need it urgently, send me your email and I will send you new build.

    To change objec's mass you need to change their material type in Rigid/Physics to something heavier. To change default material density for picked material you need to create empty gameobjecta and RayFireMan component, it will be created anyway at start unless you already have it in scene. In RayFireMan component you can find Material presets group, open picked material and increase Density property.

    Sorry for not answering for so long, got distracted by another project which was need my attention for too long. Of course you can ask me any question any time, to get reply quicker it is better to email me directly.
     
  48. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Are you sure Demolition is set to None?
    DemolishableCor can be started only in demolition type is not None.

    As for reduced FPS, well, you have 750 objects which have to be checked for demolition every frame, but I will take a look how to optimize it for such simulations.
    Also, can you send me package with your setup? I tried to recreate it and didn't got such FPS drop, maybe there is some bug, your setup will help me to find it or at least find out why FPS drops so much.
     
  49. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    This is the way Slicing works right now, you can initiate it by sending list of Vector3 points to RayfireRigid.demolition.slicePlanes list.
    First point is slicing plane position, second is normal, third point is position of second slicing plane, fourth - it's normal and so on. So you can send several slicing planes and at next frame object should be sliced by them.
     
  50. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Hi,

    Very excited to see this, and will probably buy. Does your system use rigidibodies at all, or did you do a custom way of processing physics?

    Also, can we see a vortex example video?

    Thanks.