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. PixelPounder

    PixelPounder

    Joined:
    Feb 11, 2014
    Posts:
    56
    Actually I just bought it (before your response)... but I'm now concerned. Are you saying your asset can't slice in the actual game ie. a character slicing off the enemy's head? Do you plan on sorting that out so it can do that?

    Are you saying that it can't shoot pieces off a building with the gun feature in the game? I wouldn't think a building, barrel, car, etc. would have a character skin mesh?

    Working just in the editor and not working in the game itself... isn't helpful when we're trying to make a game.

    And if it takes me a few weeks to test it... the sale would be over by then... and it's already a bit pricey in comparison to most assets in the asset store (especially if the asset is still in beta). If it does what I need - it's worth it all day long... and it sounds like you're working on it and trying to make it better but I wonder how long will it take to be a fully formed asset... and then I wonder if when you do get it there... will you come out with Rayfire 2 where we would have to then buy that.

    And the other question... about integrating it with a character controller to use the "gun" feature still remains as I think your response was more towards slicing enemies up. I would imagine everyone that is going to use your asset for the "gun feature" is going to want to know how to integrate it with a controller.

    And I didn't bring up about demolitions, but since you brought it up... I thought your asset pre-fractures them in the editor and then "blows up" the object in real time?

    And now I'm wondering... if that was the reason why most, if not all of your videos shows everything in the editor but not being used in an actual game / scene being played. What actually works in the game... and what doesn't... the limitations and such aren't really talked about in your product description in the asset store.
     
    Last edited: Dec 12, 2019
  2. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    Just wanted to say that I've used RayFire for years as 3DS Max plugin. This existed in forms for content apps like that for a many years, so it's a very solid and professional tool. Making it accessible within Unity like this is the new(ish) thing.

    So anyway, wanted to vouch for this as a fantastic pre-fracture tool.
     
    PixelPounder likes this.
  3. PixelPounder

    PixelPounder

    Joined:
    Feb 11, 2014
    Posts:
    56
    That's what my researched showed... that Rayfire is a legit asset maker... and why I'm not too worried about him eventually making this asset work as is implied in the product's description. If he wasn't already established like he is (although in another platform)... I would be more worried. Although paying a premium price for what is essentially still in beta is a concern for near-term projects.

    And for the record, I'm not concerned with Rayfire or this asset not being completed at some point but it seems to be in Beta and for the price... and how it's presented in the asset store... I was thinking it would be able to do what I need it to do... and perhaps it can do some of it... and maybe in the near-future, all of what I need it to do.

    And what I'm asking it to do isn't something crazy or out of this world... just an integration and ability to use the "gun feature" with a character controller (which is how just about everyone will that feature) such as Opsive's controller (which is a very popular controller)... and to use the slice feature to be able to be used on enemies, which I'm thinking how most people will use that feature.

    So, not trying to be critical... and I bought the asset and have faith that it will eventually do what I need it to do.
     
    Last edited: Dec 12, 2019
  4. PixelPounder

    PixelPounder

    Joined:
    Feb 11, 2014
    Posts:
    56
    and if he can make this asset how I think he wants it to... and he can document it better... have a well written & thorough manual (which is the "standard" from high quality asset developers) and have some integrations out there with controllers, weapons (ie. show how the slice can work with swords) and such... this will be a must-buy asset... and the only one of its kind in the asset store... and will become quite popular.

    The developer seems open to insight and feedback... the above is my feedback.

    This kind of tool, when fully realized can help smaller indie developers take their game to the next level and do stuff that usually are only able to be done by mid level and higher game studios... and/or well funded indies. It could be a "game-changer"... and get people who otherwise couldn't have these type of AAA effects and such in their games... now be able to do it.
     
    Last edited: Dec 12, 2019
  5. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Hi there,

    Could you confirm whether this asset has any issues with HDRP? There was brief mention of HDRP on the first page of this thread, but that was a while ago. I wouldn't think it should be a problem, given that it's manipulating the mesh, and just using materials as-is, but it would be good to confirm this. Thanks.
     
  6. PixelPounder

    PixelPounder

    Joined:
    Feb 11, 2014
    Posts:
    56
    I checked out this video:


    And I tried to reproduce the simulation on the first table... the one on the far left... I made a cube to be the "rock"... I made a little table from the primitive 3d objects. I put the Rayfire Rigid component on both the cube and the table that I made. I have the components setup the same way it's done in the video (I think)... I hit play... then I go to the cube that's about to fall on the table... I hit initialize... it falls on the "table" and nothing.

    Now, when I finally moved the "rock" really high it worked, so I wonder what the setting is so I can control it so I don't have to put the rock so high... also, what's the setting so I can get the "table" to shatter easily as it doesn't shatter a bunch.

    If you're going to do tutorials... there should be some videos that start from a blank screen and just use primitive objects - ie. cubes, spheres, etc. and go from there. The videos seem to have an assumption on a few things... my feedback is to have a few tutorials that assume nothing and perhaps have a series of "beginner" tutorial videos which start from a blank screen and then put in the various objects... set them up with your scripts and maybe add some tips to let us know if "ABC" isn't happening or working... it's probably because you forgot this or that.

    Now, I was able to take the column nolumn_cls_conn, that's in the demo scene prefabs... brought it into the scene... put a cube over top of it... threw on the Rayfire Rigid script on to the cube and it did break up the column... and when I look at the Column in the Hierarchy... it already had a bunch of child objects, which I guess are the fragments... so it looks like for some things... we have to "prepare" the object to put in our scene... so, which video explains exactly how to do that? I must have missed it.
     
    Last edited: Dec 13, 2019
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I haven't purchased the package yet, so sorry if this isn't helpful, but are the scenes in the video the same ones included as tutorial scenes in the package?

    upload_2019-12-12_20-20-24.png
     
  8. PixelPounder

    PixelPounder

    Joined:
    Feb 11, 2014
    Posts:
    56
    yes, it appears that some of the scenes in the tutorial videos are in the asset... but I can't seem to duplicate some of those demos from scratch... so I'm clearly missing something... I don't know if it's a step or what... hopefully the developer can hop into this thread and sort me out.
     
    Last edited: Dec 13, 2019
  9. PixelPounder

    PixelPounder

    Joined:
    Feb 11, 2014
    Posts:
    56
    the good news is I think this asset has a lot of promise... especially when he sorts out how to slice up characters and enemies... when there is more documentation supporting the asset and when we can use the "gun" feature with character controllers... and I think we need some video tutorials as I outlined above.... that start with a "blank scene" and he goes through adding the various objects, putting the right script on them, etc.

    And also, maybe the developer can use the Cyber Sale that ends tomorrow and gets this asset: https://assetstore.unity.com/packages/templates/systems/third-person-controller-126347 which is on sale right now... or this one: https://assetstore.unity.com/packages/templates/systems/first-person-controller-92082 (one is first person and the other is third person but functionality speaking in this context - making those 2 controllers work with Rayfire would be the same on either controller as they share a lot of the same code and functionality... or get both controllers at the same time: https://assetstore.unity.com/packages/templates/systems/ultimate-character-controller-99962) and these 2 controllers are arguably the best / most popular controllers in the asset store and do a tutorial on how to integrate Rayfire Gun feature... with that controller.

    And for people who use other controllers... you should be able to get the concept from that tutorial that Rayfire could make and sort it out for your controller. I'm thinking most people using the Gun feature of Rayfire are going to use it to integrate it with a controller... and I think the Rayfire gun feature could be very useful.

    and I just want to say... I'm not trying to be critical of this asset by Rayfire... I'm just excited about it... and I think I could find uses for it in almost every game that I would want to make and I want to master it... or at least get good with it - LOL.. there are just some things about it that I rambled on about in other comments that need to be worked out.

    PS - I don't work for Opsive nor get any credit from listing them above... I just use those controllers as do a lot of folks... and it would make sense to do a tutorial using those as they are probably the most popular in the asset store.

    One final feedback for the developer... and then I will stop bloviating - LOL...

    After talking with some fellow game devs and my own thoughts... I think the 3 things most people will use this asset for are:
    1. Using the Rayfire Gun component with a popular character controller when shooting up the environment and other things.

    2. Using the Blade/Slice component to chop off enemies heads and body parts.

    3. To destroy and damage the environment such as vehicles, barrels, chests, buildings, walls, etc. with bombs, natural disasters, weapons, spells, etc.

    I would focus on those 3 things if I were developing this asset and make it as user-friendly as possible... and provide videos on how to do the above items with this RayFire asset.

    I wonder how much of the destruction in the following video could eventually be done using RayFire:

     
    Last edited: Dec 13, 2019
    Lars-Steenhoff likes this.
  10. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    First of all, do not worry, you always can ask for refund, no problem with that. ALso I always participate in sales so for now most of the time it's price was 30-45% cheaper.

    About character slicing, for now I added base ability to fragment skinned meshes in Editor because fragmenting them in Runtime will take too much time, depends on how many tris they have, and characters usually have a lot of tris. So, this feature have to be optimized a lot.

    I spend a lot of time optimizing and improving Rigid objects fragmentation and demolition, added a lot of features per user request because they already could use it. If you compare it with first versions you will see that it is much better now. But fragmenting and slicing skinned mesh characters for now implemented only in a base, so users will be able to start use it, provide feedback and I will know in which direction to move it further. Like it was with simple mesh demolition feature.

    I just can't implement such complex feature in one go not knowing how exactly game developers going to use it and what kind of problems they will get since I myself is not a game developer (yet).

    For the same reason there are no game tutorials yet. Current videos I just released are basically UI overview, just to show how every property work. When I will finish with these overviews so users already will be able to see how it works then I will update text documentation and website section. I agree, there are just too much features wich are poorly documented for now, but only because I spent all my time on working on features and not by documenting them. As you probably heard my English is not good so documenting things is always a pain for me :) But this is what I am planning to do for next two weeks at least. We also going to add Mac support for Editor and Standalone till the end of the month.

    About tutorial scenes, there could be some differences, I worked on videos after 1.14 was released and had to tune some properties here and there. But again, these are just UI overviews, it is better for you create them from scratch instead of just start Play mode and see how they do the same on your PC.
     
    Last edited: Dec 13, 2019
  11. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Well, this is one good piece of feedback :) This is what I need right now.
    RayFire for Unity for now kind of establishing it's roots, we just started, therefore, any constructive criticism will be welcome.
    If you see that something is working not right and can be made in a better way from game developer's point of view just let me know.
     
    Lars-Steenhoff likes this.
  12. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
  13. seldemirov

    seldemirov

    Joined:
    Nov 6, 2018
    Posts:
    48
    Hello, I want to add a trigger collider but if I do it the reyfire rigid don't create a sphere collider. How can I use two colliders? custom and automatic create.
    Maybe you have a tutorial if other documents about used your product in the real game developing?
     
  14. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi
    Hi, seems like I forgot to mention this in recent Physics video. You can set Collider type to None in Physics group. In this case it will not create anything and will use only what you applied manually, but you will need to create both colliders: the one which will collide and the one which will be trigger.

    In any case, this is a good idea to check if existing coolider is just a trigger and create automatic if so, I will add this fix in next build.
     
    seldemirov likes this.
  15. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
  16. seldemirov

    seldemirov

    Joined:
    Nov 6, 2018
    Posts:
    48
    Great! It is very comfortable.
     
  17. seldemirov

    seldemirov

    Joined:
    Nov 6, 2018
    Posts:
    48
    Where the calculations are made in the ReyFire asset? How the CPU, GPU and GPU memory are used?

    I make media-installations and want to get difficult calculations in the real-time. What hardware do you recommend?
     
  18. alsomitra

    alsomitra

    Joined:
    Aug 31, 2017
    Posts:
    33
    How long are you going to support macOS?
     
  19. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    It uses only CPU with multithreading support. I can't recommend anything specific, we didn't make any test on different CPUs yet.
     
    seldemirov likes this.
  20. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    We are working on right now, this is something new for us but I think we will should get builds with Mac support at the end of the month if we will not face anything unexpected.
     
  21. Mir-vadim

    Mir-vadim

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

    Mir-vadim

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

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
  24. seldemirov

    seldemirov

    Joined:
    Nov 6, 2018
    Posts:
    48
    Okay. Would want to see the RedFire test with a new Threadripper CPU.
     
  25. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
  26. lorddesu

    lorddesu

    Joined:
    Aug 20, 2014
    Posts:
    31
    Does it work for mobile? Can you upload Android demo with fps counter please.
     
    Last edited: Dec 31, 2019
  27. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Hi!
    Thanks for the updates. I had some minor problems some months ago, but they are all gone now!
    Performance is incredibly fast in our use case (Player interaction / destruction).

    Still, I am facing something I need your help with. I use
    Rigid Component with Dynamic - Mesh - Runtime - Solidity 2 - and Damage enabled

    I want to play a sound effect as soon as the destruction takes place and I want to use your internal damaging system, since it works perfectly for us. I would imagine that it is quite easy to implement that into the code and that many people will eventually ask for it. Otherwise, could you hint me at a place in the code where I can safely integrate something myself?

    Regards,
    Daniel
     
  28. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, sorry, I didn't get any notification about new message.

    First of all there is Demolition Event support, You can subscribe to specific object demolition or to any demolition.
    In next video I show how to subscribe to this event and basically do anything you want when demolition happens.

    Try and let me know if you need anything else.

    Also, Sound support is something I want to add in Rigid as well, but didn't made much RnD yet,
    what exactly you wish to be able to use/control? I mean it is obvious there should be a sound clip field, maybe list of clips so it won't be the same sound every time, sound volume, maybe size threshold so small objects won't generate sound at all.
    Anything else? Maybe you want to play sound not only at demolition but at collision or activation?


    And I just launched Discord channel:
    https://discord.gg/8G98JKj
     
  29. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Fow not it can fragment object only on windows platform, we are working on adding Mac support soon.
    If you fragmented your object in editor then you can demolish it to fragments on any platform.
    I will release Android and iOS demo with fps counter when we will add runtime fragmentation for these platforms.
     
  30. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Hello,

    Very cool asset. I recently purchased this, and I've been working on trying to figure it all out from the videos and the tutorials. I have a couple of questions on how I should be approaching some things.

    I'm trying to create a specific kind of object: A wall segment where some chunks are static and some are dynamic. Here's an image:

    upload_2020-1-12_19-34-38.png

    In this case, I want all the materials around the edge to remain static, and all the pieces in the middle to be dynamic. Is there a simple way to support this? I thought I could put Rayfire Unyielding components all around the edges, but they don't seem to keep the pieces on the edges from breaking. Is there currently a way to allow some of the pieces to be static and some to have dynamic rigidbodies?

    Thanks.
     
    Last edited: Jan 13, 2020
  31. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    A few more questions.

    I mainly work with prefabs, so it seems my only option is to use "Manual Prefab Precache" for the Demolition Type. Does that still support Connectivity and Unyielding? I've tried setting things up, placing Connectivity and Unyielding on sibling objects to the one with the Rayfire Rigid component, but I just get this warning: "RayFire Connectivity: Connectivity has no objects to check for connectivity. Object Excluded from simulation." The examples I saw for doing connectivity all seem to assume that all of the child objects are sitting in the scene directly as children of a Mesh Root object, but that doesn't seem to work for prefabs.

    upload_2020-1-13_0-45-11.png

    Another question, when working with a prefab like this, how can I get additional components to be placed on each of the fragment objects? With Prefab Precache, I never actually see the fragment objects until runtime, so I don't know how to add more components, unless I do so via scripting.

    Thanks.
     
  32. peterhowell

    peterhowell

    Joined:
    Mar 7, 2015
    Posts:
    7
    @Mir-vadim, I'm not able to get many of the tutorials to cause any fragmentation by default on Unity 2019.2 or 2019.3. In particular in the 2.2 Rigid. Demolition Types scene, the Runtime, AwakePrecache & AwakePrefragment prefabs are not fragmenting at all and I've not modified them. Here's a vid: https://drive.google.com/open?id=136MFddqcVZWAvKFqjuGXL3ce3_Qr3gPj

    Can you please help?

    Edit: Also I'm not able to get Manual Precache to work with my own objects since when I click "Scene Precache" I receive messaging that "Warning" No Meshes Precached Yet"
     
  33. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, as I see all runtime fragmentations don't work and you can't fragment. On Which platform you use plugin? Is it Windows or Mac?
    Mac is not supported yet, we are working on Mac support right now, it should be ready by the end of the month if there will not be any unexpected problems.
     
  34. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, first of all, Unyielding property doesn't make objects static, it helps Connectivity component to figure out from which objects start to check for connectivity and activate objects which are not connected with Unyielding objects.
    To make objects Static at the edges you can simply select them and set their Simulation Type to Static or Kinematik.

    But I suppose you use Mesh Root object type and can't control every object property separately, so I think I will need to implement some kind of Physics helper which will work like Unyielding component but will allow to set any Physics properties based on it's gizmo interpenetration, like Uhyielding component, maybe it is even better to add all this functionality into Unyielding componenet and rename it to something more common, like RayFire Physics. Let me know what do you think, maybe you have a better idea?
     
  35. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    In last build 1.14 I added Reference Demolition support and I think this is what you need to use for complex setups. Prefab precache was designed for small, low poly, kind of "not so important" object objects, like brick whic will be demolished for a few pieces and then they will disappear quickly.

    For big, hi poly objects with complex setup it is better to use Reference demolition, in this case you can prefragment object using Shatter and see how exactly fragments looks like, then export them into FBX asset, then create scene object using this asset, setup it as you want with other components and then create prefab of this setup, then using Reference demolition you can instantiate this prefab at demolition. I didn't test such workflow with complex setups yet, but I think it should work. I will do some tests a bit later. But let me know what you will get with your setup.
     
  36. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Thanks. I'm not sure who common a use-case it would be, so maybe not something that it makes sense to add as a new feature. I was thinking I would just run some code of my own to look at the fractured pieces at Start, see which are Unyielding, and manually mark those as Kinematic, while leaving the others non-kinematic. Basically, using the Unyielding widget to conveniently flag chunks. Probably not something most people are doing.

    I'll look at reference demolition.

    One general question: When using Prefab Precache, is there any way to see the pieces? It seems like the pieces are fully generated within the object/prefab, they just don't show up in the scene for me to preview. Or, to put it another way, is there a way to use the Shatter component to create a bunch of pieces, and then create a prefab out of the results?
     
  37. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    You can use Shatter to precache meshes. You just need to add Shatter, setup it as you want and then in Rigid / Mesh Demolition turn on Use Shatter checkbox. In this case it will not use Rigid Fragments properties but will use Shatter properties. Rigid Fragments properties provide just a basic Voronoi properties, I didn't want to overload Rigid UI with all Shatter properties.
    In case you want to cache for instance splinters or other fragmentation types or demolish object in Play mode using Shatter setup then you need to add Shatter componenet and turn on Use Shatter checkbox in Rigid
    In this way you can see what will be cached, Fragment object using Shatter to see how fragments looks like, then if they looks good for you delete them and Cache the same meshes via Rigid.

    Also keep in mind that just changing Simulation Type property to Kinematik will not make object Kinematik, this is just a filed which is used at Initialization, so if you want to change Rigid properties via your script make sure object's initialization type set to Manual, change properties as you want and then use (Rigid).Initialize() method.
    .
     
  38. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Okay, that's the detail I was missing. I can use Shatter to sort of preview how the pieces will look, but ultimately I then delete the shattered pieces and then precache it. Thanks.
     
  39. peterhowell

    peterhowell

    Joined:
    Mar 7, 2015
    Posts:
    7
  40. Rmzn0

    Rmzn0

    Joined:
    Jul 24, 2018
    Posts:
    9
    How to integrate a fps shooter?
     
  41. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, I will try to create such video tutorial on next week.
     
  42. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Thanks for the help!
    I didn't know about the demolition event support.

    Regarding the audio. If you plan to include it anyway, I will wait for your solution. For our use-case it would be enough to have multiple audio files and some volume and pitch randomization.

    One last question:
    I have a glass bottle that can be kicked by the player. The bottle flies through the air and lands on the ground. The bottle gets demolished very nicely but the fragments don't seem to have much of the bottle's force/velocity. I would like to have more "energy" in this collision, glass fragments crushed and partly flying away, like a real bottle hitting the ground from such a height. I know that I can spawn a RayFire Explosion at the demolition point but I was unsure if I am just missing something. If not I think some auto options regarding this would be a nice addition to the current feature set. My mass in the Rigid component is set to 7, which looks fine before demolition.
     
  43. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    I already have hardcoded multiplier property for adjusting demolished fragments velocity and it is 0.8 by default, in next build I will put it in UI so you will be able to change it.
    It's name is collMult, you can find it in RFPysics.cs file if you want to change it right now.
    Probably need to change it for UI to something more meaningful, any ideas?
     
    Last edited: Jan 15, 2020
  44. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Ah, nice!
    Difficult question.
    Demolition Force/Pressure/Explosion?
    Fragments initial Force?

    Also, I just gave it a try and even entered 100 as collMult in RFPhysic, but I did not see any difference at all. I have the newest version. I let the bottle manually fall in scene view. It just collapses at the point of impact but the fragments don't fly away.
     
  45. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    After it was changed in code you should remove Rigid and add new one or go to declaration of this property and erase it's [HideInInspector] so it will be revealed in UI, then change it in UI and try again. It should work.
    What about Fragments Dampening?
     
  46. bufothejig

    bufothejig

    Joined:
    Nov 24, 2013
    Posts:
    13
    Hey there, still having troubles getting rayfire to work properly with prefabs.

    What is the proper workflow for adding rayfire rigid and rayfire shatter to a prefab?

    Right now I'm getting strange behavior.

    For example, when I hit "fragment" in the prefab view it creates a new game object in my scene.

    The Scale preview button also doesn't work.

    I'm also getting empty mesh warnings and then the model goes pink.

    This plugin has so much potential but I've watched a ton of videos and spent many hours trying to make it work and I'm still struggling hard.

    My use case is to have prefabs that have rayfire rigid and rayfire shatter on them and are dormant, only awakening to then explode apart when they are in the aoe range of a grenade or rocket blast.

    Any help would be appreciated, thanks.
     
  47. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    Hi, for now when you fragment object in Prefab view it creates fragments in Scene, not in prefab view. This is something I will try to fix in one of the next build. So solution for now is to fragment object in scene and then create prefab using fragments you got.

    But there is one important thing you should know, when you fragment object you create fragments with new meshes, but these meshes exist only in scene, there is no asset with mesh data. So, your meshes exist only in scene. If you will create fragment prefab and then drag it to scene you will see it without mesh, because prefab is just a text file with links to assets which it uses, it has no idea about scene where all these fragments meshes right now exist.

    So, before create fragment prefab you need to export all these meshes in asset file and the best way to do this is to use free FBX Exporter by Unity, you can find link to asset sore page in Shatter component at the bottom. After exporting fragment you need to delete original fragment with mesh which exist only in scene and drag into scene FBX asset you just created. Now you will have the same fragment but with mesh which referencing to fbx asset and now you can create prefab using this object.

    I show this in this video:


    When you get empty mesh warning and model goes pink, do you use Shatter in Editor or Runtime mode?

    Can you send this model to me? When users have problems with meshes we fix these issues but we need to get this mesh and try to fragment it and debug to see what is going on there.

    Also, I have discord channel so we can chat there, helping you here may take too much time.
    https://discord.gg/8G98JKj
     
  48. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    That solved it! Just what I was looking for!
     
  49. bufothejig

    bufothejig

    Joined:
    Nov 24, 2013
    Posts:
    13
    @Mir-vadim Thanks for the help!

    That video resolved most of my problems and everything is working now in my game.

    I still had issues at first but I discovered something strange but also found a workaround.

    I had some models that were imported at the wrong scaling so I had their scale in unity real low like under 0.001. Turns out this breaks rayfire shatter and was giving me all kinds of errors.

    To fix the issue I set the scale to something reasonable like 1, then the did my rayfire shatter, then went to the created root and set the scale back to 0.001. After this I did the fbx export and assigned it to the original and everything worked.

    This might be a good tip for others in the future, if your model scale is very low then upscale it, shatter, then downscale it and all will work.

    This is kinda my problem I need to not be lazy and set my model scales properly on import. . .
     
  50. Mir-vadim

    Mir-vadim

    Joined:
    Apr 18, 2017
    Posts:
    256
    New Reset feature in upcoming build 1.15

     
    HenryChinaski likes this.