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


    Hello everyone, today I want to reveal first beta preview video of RayFire plugin for Unity.

    3ds Max users probaly already know what is RayFire and when you may need it, but for those of you who hear about it first time here is short description: RayFire is a plugin for Runtime Demolition, Prefragmentation, Advanced Dynamic Simulation Control and several other tiny little features which will make your life a little bit less painful :)

    Asset Store: https://assetstore.unity.com/packages/slug/148690



    Online help: http://rayfirestudios.com/category/online-help-unity/

    YouTube playlist: https://www.youtube.com/playlist?list=PLcjScvftXufKA-dLmqvokYnU7zFfKYWk0
     

    Attached Files:

    Last edited: Sep 8, 2020
  2. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Rigid component
    Hey, so, here is second beta preview which shows RayFire Rigid component in action. It's main purpose is Advanced Physics Control, Runtime Demolitions and VFX support. Using Rigid component you can demolish 3d objects into thousands fragments and every fragment can be demolished further deeper and deeper. It also automatically creates particle Debris and Dust and make demolition looks even more awesome.

     
    Last edited: Jul 10, 2019
    Lahcene and Brian-Ryer like this.
  3. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Clusters component
    Third beta preview shows how to use RayFire Clusters component. It can be used to create parent/child hierarchy which later can be used for demolition. Also clusters allows to simulate dynamic concave objects which is impossible to do for now in Unity with regular rigid bodies.

     
    Last edited: Jul 10, 2019
  4. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    388
    hello,
    its awesome ...
    but, please keep minimum requirement version of Unity to 2018.2 :]
     
    Lahcene and Mir-vadim like this.
  5. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Activator component
    In this video you can see why and when you can use Inactive objects and how to activate them.

     
    Last edited: Jul 10, 2019
  6. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    171
    How does this handle texturing the new faces it creates?
    Lets say the fancy pillar had a texture, normal maps, etc. Can the new faces take a different texture of fractured stone?

    What an amazing asset. Wow.
     
    Mir-vadim likes this.
  7. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Thanks, yes, you can define inner material in Shatter and Rigid components in Interior group of properties. You aslo can define mapping scale. I show this in Rigid video at 32.35
     
  8. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    284
    I used to have this for 3ds Max. Absolutely wonderful to see it being implemented in Unity.
    How much will it cost when it releases officially?
     
  9. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Well, this is something I wanted to talk about with users when it will be almost finished, but I can say that it will not be less than $170.
     
  10. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Blade component
    This one shows how to use Blade component, it's purpose is to slice objects to two pieces in runtime.

     
    Last edited: Jul 10, 2019
  11. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Gun component
    This beta preview shows Gun component in action. Using Gun you can shoot objects, demolish them at Impact point, create Decals, Impact Flash, Particle Debris. Dust and Sparks, dynamically push them and activate.

     
    Last edited: Jul 10, 2019
    Lahcene likes this.
  12. gurayg

    gurayg

    Joined:
    Nov 28, 2013
    Posts:
    232
    Hello,
    Been watching your WIP videos and liking it. Looking really good.

    Do you have any release date ?
    When will you be starting the beta testing?

    There seem to be some upcoming changes in Unity Physics. Will you be making Rayfire compatible with those new physic systems?

    Any ways to freeze and keep fragmented objects after leaving the play mode? so they can be used as a regular object without physics or simulation.
     
    Last edited: May 12, 2019
  13. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Thanks.

    On next couple of days I will release here beta package in case someone wants to beta test it, and then release after a month or so, depends on how beta testing will go.

    Of course I will add support for all upcoming changes at some point, but it still will support 2018 build. Don't want to cut off all 2018 build users.

    Actually I have feature like you mentioned in 3ds Max plugin version, so yeah, later I will add something like this in Unity plugin as well, that will be easy.
     
  14. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,050
  15. Mir-vadim

    Mir-vadim

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

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Bomb component
    Using Bomb you can explode objects and trigger Demolition.


     
    Last edited: Jul 10, 2019
  17. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,050
    Cool, can I ask: Do you use multi-threading / new Unity C# Job system? What is the limit with number of debris / rigidbodies?
     
  18. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Nope, but we are going to make it multithreaded and add Job system support in later builds. For now main goal is to make it work stable, finalize features and provide comfortable and intuitive workflow. Then we will start optimize everything and make it work even faster.

    For particles and rigidbodies it uses Unity built-in systems, so, there is no exact limit, it all depends on system where it is used, in Rigid video it demolished Rock to 2000 fragments in a couple of seconds only because I set global limit to 2000, otherwise there could be much more fragments. In this example there are 2000 rigid bodies, particle debris were not used.

     
  19. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    8. Wind component
    Wind component creates turbulent wind zone for rigid body objects.

     
    Last edited: May 14, 2019
    Reanimate_L likes this.
  20. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,050
    Cool updates, I thought you mentioned about a beta version coming soon? Any news? :)
     
  21. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Yeah, sorry, last fixes, tomorrow you wll get it for sure.:)
     
  22. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    So, RayFire for Unity beta test officiall started, anyone who wants to participate in it, please send me a message with your email. After a week I will release beta package here for everyone.
     
    Lahcene likes this.
  23. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    171
    I'm doing photogrammetry for desert landscapes, and I'm also hoping to do some game-engine based movie shorts. I'm very excited about using your plugin. It does everything a person could hope for if I were to write a wish list. Great work! Cant wait to try it out. I'm not a great coder though-- I only do enough to write some character controllers to handle joystick input etc. Is this something that'll be easy for people like me to use?
     
  24. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi, friendly and intuitive workflow is what I want to implement. Of course experienced programmers will be able to use it in more advanced ways using API all components provide, but I want to make easy to learn and use workflow, so even users without programming expereince at all will be able to use it.

    As you can see in Rigid component preview all you need to do to start breaking objects is just add Rigid component and start Play mode, that is it. If you want to create something more complicated then you can start learn UI and properties and set up exactly what you need. With programming knowledge you will be able to create even more impressive and complicated demolitions and simulations.
     
  25. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    388
    @Mir-vadim

    hello,
    the beta is awesome :]

    also i modified the line 702 of RFParticles.cs as //renderer.shadowBias = 0.55f; to working with unity 2018.2!! :D
    and it would be great if particle materials that generated by RayFire be compatible with HDRP too ...

    thx.
     
    Last edited: May 16, 2019
  26. Dawar

    Dawar

    Joined:
    Dec 7, 2014
    Posts:
    124
    its Looking Good but ray cast shoot when hit at corner it destroy whole object. but how about destroy only those part where ray cast hit. like when hit a corner destroy only corner not the whole object.
    secondly it will be good to implement peel effect.
     
  27. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Yeah, particle system seems like the only thing which has problems with 2018.2, this can be fixed easily.
    I will send email with link to new package with all recent fixes to all testers from time to time.

    As for HDPR support, RayFIre doesn't generate material, it uses material defined by You, so, I guess it is already compatible, but I need to try this, never tried HDPR before, maybe I am wrong.
     
    Last edited: May 16, 2019
  28. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    We can do this, but such way to work is not good in terms of performance. Right now with Voronoi type we have to fragment whole object, we can't just cut small area out of it. This is boolean operations and it is not their time yet, they are too slow for games. What we can do is to fragment whole object, take fragments we want to hide or simulate and then Glue the rest fragments which we want to stay as solid object back to one element, an then we will need to optimize mesh and clear it from all edges and vertices from fragments, moreover, next time you will shoot this object it will have more polys than it has before first shoot. So after every shot it will be fragmented even slower.

    So, instead I decided that it is better and faster to frag object once and then just keep the rest fragments inactive, so they will wait until they will got shot to be only activated. Check out Gun component video, I used already prefragmented column there, but you can start with solid column defined as Inactive, so after first shot it will be fragmented and only fragments inside Impact radius will be activated and start fall down and it will looks like you shot only small portion out of it. At next shot it will activate another portion of already created fragments.

    Current way is good for small and middle size objects, for something big I want to write another feature like GeoMode from Red Faction, which won't fragment object, but will edit surface. But this won't happen anytime soon :)
     
    Last edited: May 16, 2019
    Dawar likes this.
  29. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    171
    Wouldn't we be able to define our own dust particle systems anyhow? Even if they had to conform to certain rules, I'd rather not use the ones I saw in your video. They're a bit generic and just create a 'haze' for a few seconds. Theres room for improvement there that artists will want to fill on their own.
     
  30. Glitch12

    Glitch12

    Joined:
    Mar 23, 2018
    Posts:
    29
    Hello looks good beta.

    Mir-vadim @I have a question, can you guide me how to do so my player when shoot to demolish the given object?

    I apologize for my bad English.
     
  31. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    If you want ot synchronize Gun Script with your shooting system, you need to add Gun Script to empty object with name "Gun" and set it as child to object which You use to shoot so object with RayFireGun script will shoot along defined shooting axis.
    Then you need to initiate shooting using public API every time when you shoot via your shooting system, something like this:

    Code (CSharp):
    1.         GameObject gunObject = GameObject.Find("Gun");
    2.         RayfireGun gunScript = gunObject.GetComponent<RayfireGun>();
    3.         gunScript.Shoot();
    I will create later a tutorial where I will add shooting support into FPS Shooter asset which was released recently for free.
     
    Last edited: May 16, 2019
    Lahcene and Glitch12 like this.
  32. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Yeah, as I said before, whole current particle generation system should be changed, what you see now is just a basic particles support. Later I want to change it and make more flexible.

    Oh, and buy the way, it creates such simple haze because I set one dust material with simple grey texture with noise alpha which I created in photoshop for 20 seconds, this is just a dummy visual of dust, you can set any material for your dust, even multiple materials for different dust VFX.
     
    Last edited: May 16, 2019
  33. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Last edited: Jun 5, 2019
  34. Glitch12

    Glitch12

    Joined:
    Mar 23, 2018
    Posts:
    29
  35. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Quast, Glitch12 and Vincent13122 like this.
  36. Quast

    Quast

    Joined:
    Jul 5, 2015
    Posts:
    513
    Great tool.
     
    Mir-vadim likes this.
  37. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    866
    Hi @Mir-vadim !
    I just discovered your RayFire plugin in the asset store and I have some doubts:
    I already have another fragmentation plugin for Unity but it seems it's not updated anymore, so I may be switching to RayFire in the future.

    I have seen there are some DLLs in your package, so there is no source code, I suppose?
    I'm always concerned by plugins without source code, since DLLs stop working when Unity gets updated (and that happens very very often)
    Right now I'm using Fracturing and Destruction from Ultimate Game Tools, and even if it's not updated anymore, I can still maintain it myself and fix any future incompatibilities because it includes the full source code.
    I understand you want to protect your IP, but sadly we really need the source.

    Also, do RayFire support structural supports like in this video? (the columns and archs demo)
     
    Mir-vadim likes this.
  38. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    866
    I'm also concerned by compatibility: since you're using DLLs, will it compile for every platform Unity supports?
    You don't specify it on the store.
     
  39. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi, there is no source code because it was written on C++ and it is huge amount of code.Originally we made all fragmentation in 3ds Max using it's SDK API, but 2.5 years ago decided to write our own mesh class with our own slicing algorithms, there are thousands lines of code and IP protection is not the reason why it is in DLL form. Now we can implement same fragmentation on any platform, it will only take 1-2 months to write mesh export/import and usable interface, right now we are writing the same plugin for Maya. As you can see there are two plugin files right now. One is common mesh fragmentation library and second just make all conversion between C# and C++. This is the only thing (sending one mesh and shatter info inside and getting a bunch of meshes back) which happens in these DLL files, the rest of the features are pure C# scripts, you can change them if you want.

    In last update I added feature you are talking about, but I didn't add yet any visual representation for all these connections. I will add them later.


    About compatibility for other platform, for now it supports Win 7, Win 8, Win 10 and OS X.
    It doesn't support fragmentation on Android and still not tested on IPhones, this only means that you can't do runtime demolition during game on these platforms, but you still can shatter geometry in Editor and prepare objects for demolition on Android and IPhones, because actual demlition script as I said before is pure C# script. We will add Android and IPhone runtime demolition later, the reason it is not there already because it probably won't be fast enough for runtime demolitions.

    In any case, this is our first release on Unity and obviously there probably something we will need to fix and adjust, but so far all beta testers are happy with what they see, so I decided that it is ready enough to release it to public.
    For now making RayFire for Unity plugin as stable and perfect as possible is my top priority task, any bugs, issues and problems users will find will be fixed very quickly.
     
    Quast and atomicjoe like this.
  40. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    866
    Oh, I see!
    Then it's OK!
    My current target builds are Win64, Android and hopefully Switch.
    I don't need realtime fracturing, only precached.
    Now I wonder, will a project using RayFire compile for Android?
    No realtime fracturing, only cached shards.

    Can you try it?
    I want to be sure there is no dependencies errors on build.
     
    Mir-vadim likes this.
  41. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    First of all.
    Precaching means that it caches only fragment meshes and store them inside Rigid component and
    Prefragmentation means that it creates fragments and keep them disabled.
    At demolition it activates fragments or creates them if only meshes were cached.
    There is also Preacached Prefab type, it works like regualr precache, the difference is that mesh data is stored in special format so it will be possible to store it in prefab asset.

    Second.
    There are two types of each. Default type is Preacache in Awake and second is Manual Precache. If you will just set it to Precache it will shatter object in Awake, so at demolition everything will be ready, but this means that you can't use this method for Android. What you need is Manual precache, you just need to select Preacache type and then manually click on Precache button in Editor mode in Rigid component inspector, in this case all mesh data will be created in Editor mode and you should be able to compile Android build and it will not need to use dll libraries at all.

    The only problem for now is that I myself didn't test it with Android to work in this way, for now I just marked Android as Not Supported because there are several more important things to do, like creating tutorials with scenes and some promo video.

    So, there might be some dependency issues with compilation because I didn't add yet any platform specific compilation instructions in code. But it will be pretty easy to fix in any case, I just need to try and see if it throw error somewhere and then make it not use whatever it may try to use but don't really have to. But again, this is something for near future because for now I don't even have simple promo where users may quickly see what it can do and simple tutorials so users will be able to learn how to use it.
     
    Quast and atomicjoe like this.
  42. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    866
    It's ok, I understand.
    Thank you very much for the sincerity!
    I will definitively switch to RayFire once it supports manual precache (in editor pre-fragmentation) on Android without any dependency issues.
    I'll be subscribed to this thread and keep up with the news :)
     
    Mir-vadim likes this.
  43. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    455
    can you how to do something like this ?

     
  44. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Hi, so I made a quick test with Android and make it work with manual Precache and manual Prefragmentation. In latest build 1.03 (which is already available in Asset store) I added Platform dependent compilation, so only standalone platforms will be able to use runtime demolition now, other platforms will not demolish objects unless they have precached meshes or deactivated fragments. Tried on my cellphone and seems like everything works ok.
     
    atomicjoe likes this.
  45. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    I will create tutorial about how to create something like this, for now I need to create a bunch of small tutorials to familiarize users with User interface, features and functionality. Later I will create tutorials where I will show how to add RayFire plugin in project and create something like in the video you shared.
     
  46. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,050
    I did not realise the asset is on the store already! The price is quite high, what makes your asset standout from the others that exist already to make it worthwhile buying?
     
  47. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
    Well, for some reason I expect it to be reviewed for 1-2 weeks and it took only 3 days, so it was a surprise for me as well. And this is why I still don't have proper promo video where users will be able to see all features, I guess this will explain high price a little bit.
    Also, it is not only me who work on this plugin, there are a couple of other guys and I need it to be profitable in order to continue development, we get only $120 from $170 and after all fees and transactions it will be even lower.
    And another reason is that, well, it is awesome :), it is extremely fast and as far as I know there is no such solution on the market for now, I mean 3d geomety runtime demolition (without precaching or prefragmenting anything) with further ability to demolish all new fragments again and again. It provides wide variety of features like runtime slicing, shooting, wind, bomb, vortex, advanced dynamic simulation control, etc..., as I said I need to create some promo with all features, otherwise I will have to mention all features every time.
     
    Vincent13122 likes this.
  48. Mir-vadim

    Mir-vadim

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

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    164
  50. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    110
    Hello,
    I bought RayFire and am trying to figure out the optimization:
    I created a sphere with a size of 4 in the new scene, deleted the collider, added the RayFireRigid component, added RayFireMan to the scene.
    At the moment of destruction, the profiler shows a 53 ms delay at the RayFireRigid.OnCollisionEnter () event.
    I did not change any settings, the sphere breaks into a small number of pieces.

    Unity version 2019.1.3

    I can’t find it in the documentation or in the video tutorials, how can I increase the optimization (since 53 ms is too much)?
     
unityunity