Search Unity

Fragmentum - Mesh fragmentation shader

Discussion in 'Assets and Asset Store' started by Arkhivrag, Apr 16, 2013.

  1. quantumsheep

    quantumsheep

    Joined:
    Mar 9, 2013
    Posts:
    37
    Any updates, sir? :)

    QS =D
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    For Fragmentum no :oops:



    VacuumShaders - Facebook Twitter YouTube
     
  3. JoshKingsbury

    JoshKingsbury

    Joined:
    Jun 3, 2014
    Posts:
    2
    Hey Arkhivrag! I must say first that Fragmentum is an absolutely beautiful plugin. I'm using it for a game I've been working on and I'd like to make a few feature requests.

    A. A snapping option for the displacement amount instead of lerping between the two.
    B. An inverse sphere displacement toggle or accounting of negative displacement amount.

    Having access to these two options would be invaluable for my current game. I'm basically using it to swap between two terrains as you may be able to see in this vine: https://vine.co/v/ezrrKDlPEjj

    I believe the displacement is at about 10,000 for the white terrain to avoid clipping and make the lerp distance large enough so the player cannot see the white pieces moving into place. This is why I am requesting the snap.

    As for the inverse sphere displacement, my world is also abstract and ideally the day change would take place from the center of the world outwards so I would need one sphere expanding outwards to displace the dark, and another identical sphere expanding to bring the white pieces back into place.

    I'd also like to note that my game is incompatible with Unity 5 due to the physics updates so I'm hoping it's not too late for any Fragmentum 2 updates.
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Hi,
    An inverse sphere displacement is already there, just use negative value for 'Activator Radius'.
    As for 'snapping option' I am not quite sure if I understand it. If you do not want displacement to go above some value, you can use 'Lock Displace' option.



    VacuumShaders - Facebook Twitter YouTube
     
  5. JoshKingsbury

    JoshKingsbury

    Joined:
    Jun 3, 2014
    Posts:
    2
    Thanks for pointing out that I can use a negative value for the 'Activator Radius'! That is exactly what I was looking for.
    =D

    As for the snapping, it's not that I don't want the displacement to go above a certain value, it's that I need it to go directly to a certain value without being able to see the displaced face slowly move into its displaced position (but while the activator is being animated along its path) Does that help clarify? If not I can upload a vine or some images to illustrate.
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Currently I have stopped adding new features to the current version. I am working on upgrading my other assets, but I can help you to manually edit shader.
    1. Open 'FragmentumCG_MOBILE.cginc' file. It's inside shaders/cginc folder.
    2. Go to line number 210. It will have:
    half disAmount = V_FR_DisplaceAmount * fragmentArea * fragmentFactor;​
    3. On the next line add:
    disAmount = disAmount < YOUR_DESIRED_VALUE ? 0 : YOUR_DESIRED_VALUE;
    for example
    disAmount = disAmount < 100 ? 0 : 100;
    It means that disAmount will be zero if it is less then 100, otherwise it will be 100.​
    4. Save file and recompile shaders(right click Shaders folder and choose Reimport)


    EDIT
    Actually you can write:
    disAmount = disAmount < V_FR_DisplaceAmount ? 0 : V_FR_DisplaceAmount;

    V_FR_DisplaceAmount - it is variable controlling displace amount inside material editor.​

    Modifying cginc files effects all shaders. If you want snap effect only for specific shaders than
    write:
    #if defined(SNAP_ON)
    disAmount = disAmount < V_FR_DisplaceAmount ? 0 : V_FR_DisplaceAmount;
    #endif​
    It means that snap effect only will be available for shader where is defined - SNAP_ON
    How define snap in shaders?
    Open shader that you want to have snap and add line:
    #define SNAP_ON
    Everywhere inside file before line with:
    #include "../cginc/FragmentumCG_MOBILE.cginc"​



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jun 29, 2015
  7. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    Lanre likes this.
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,929
    He's busy finishing off Curved World 2, I think.

    EDIT: Which is looking awesome, by the way. :)
     
    Last edited: Jul 27, 2015
    twobob likes this.
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Begin working on Fragmentum 3 from next week.


    99.999% done.




    VacuumShaders - Facebook Twitter YouTube
     
    twobob likes this.
  10. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    382
    Good news that you are going to start on Fragmentum 3 update.

    I think that your Fragmentum asset is a really great idea, giving great effect, and very nice, BUT the problem I find with it is that the fracturing is made always with flat 2D polygon triangles, and so if you break a 3D object with 2D flat triangles without any width, it does not feel for me that it is really breaking or exploding, or even disintegrating, because there should be some 3D on the fragments themselves.

    So I wonder what you have in mind for Fragmentum 3 and what will be the possible new features (if possible and they are not a secret that you want to keep), and if you will include some kind of 3D triangles or 3D polygons for fracturing.

    Thanks for your help and hope to be able to see the new Fragmentum 3 soon
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    There will be 'many' new features. For example new fragmentation types:

    Fragment mesh using its smooth groups.


    Fragment mesh by its own compound meshes.


    Fragment mesh by its material ID.




    VacuumShaders - Facebook Twitter YouTube
     
    twobob and hopeful like this.
  12. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    382
    Thanks for these 3 teaser examples of new features, they are cool, interesting and useful

    I wonder if the Fragment mesh using its smooth groups will keep being using 2D polygons for the fragmentation, or will also be possible to have the same ones BUT with a little width, so they are not looking so flat

    I like much the new Fragment mesh by its own compound meshes, this can be very good and useful for many things

    Thanks and I wish you the best on the process of working on this new update and that you do not have and find many problems in the way and have a good workflow
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Fragmentum uses only mesh vertices and triangles, no new ones are generated (if you mean that).
    More details may be added by particles or cutout shaders.



    VacuumShaders - Facebook Twitter YouTube
     
  14. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
    I'm curious how we can apply particles per fragment that would follow each fragment. Is this currently possible with the current version of Fragmentum?
     
  15. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Of course you can not apply particles per fragment. But it may be used as part of the whole effect for adding additional details to the mesh fragmentation.



    VacuumShaders - Facebook Twitter YouTube
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    hopeful likes this.
  17. Wim-Wouters

    Wim-Wouters

    Joined:
    Sep 26, 2012
    Posts:
    18
    YAY!!! :)) So happy! Have been thinking about downgrading my project just for this, glad I might not have to... any timeframe you have in mind?

    Cheers
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    No ETA, just working on it.



    VacuumShaders - Facebook Twitter YouTube
     
  19. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    What about now?
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Developing progress of Fragmentum 3 is faster then on Curved World 2.
    Most of required shaders features I've already done in Curved World 2 and have just copied here.
    About 75% is already done.
    I think Fragmentum 3 will be ready for the second half of September.



    VacuumShaders - Facebook Twitter YouTube
     
    hopeful and twobob like this.
  21. klund

    klund

    Joined:
    Mar 21, 2011
    Posts:
    33
    Hi will Fragmentum 3 be able to subdevide a low polygon mesh during fragmentation this would be much nice for large buildings like churches etc. For example fragment 2000 tris from a mesh with 200 .
     
    Last edited: Aug 31, 2015
  22. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    What about now?

     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    It will be cool but I'd like to spend time on shader functionality rather then mesh subdividing/tessellation/splitting api. So currently such things will not be included, you will have to provide ready mesh yourself. I'll add it to a 'wish list'.



    VacuumShaders - Facebook Twitter YouTube
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    overthere and twobob like this.
  25. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    Okay Okay, it looks worth the wait ;P
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Fragmentum 3_Intro.png


    Some technical info about Fragmentum 3 teaser video.
    • Rock mesh is fragmented inside 3Ds max using Fracture Voronoi plugin.
    • After fracturing each element (fracture piece) is assigned unique ID using randomElemetsMatIDs plugin and combined into one polymesh.
    • Final mesh has about 1200 pieces (same amount of material IDs) and about 20.000 vertices.
    • Inside Unity mesh has disabled option 'Import Materials', to avoid 1200 materials import. Mesh has only one material.
    • Fragmentum 3 has new fragmentation option - By Material ID. That option is used for detecting mesh pieces.
    • Fragmentum mesh is generated inside editor (new in Fragmentum 3).
    • Scene contains 20 duplicate of that fragmented mesh, with total 1.2M vertices.
    • Meshes use Unity Standard shader (new in Fragmentum 3).
    • And are lit by point lights per-pixel (new in Fragmentum 3).
    • After vertex transformation new normal is calculated inside vertex shader (new in Fragmentum 3) for correct lighting inside pixel shader.
    • Scene is not optimized, it's just for demonstration of beauty and power of Fragmentum 3.
    • Rendered in Deferred mode with max quality - Unity produced 8.6M vertices.
    • During recording video inside Unity Editor FPS was 36 - 46 (GTX 660M)


    (FPS and quality of this GIF is low because of screen recording and gif converting)




    VacuumShaders - Facebook Twitter YouTube
     
    KingOfSnake and twobob like this.
  27. yandrako

    yandrako

    Joined:
    Dec 2, 2013
    Posts:
    26
    I will buy it for sure, but I have to ask; will be any change on the price? To buy now or when you release the Fragmentum 3
     
    Last edited: Sep 7, 2015
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    All I can say about price now - It will be free update.



    VacuumShaders - Facebook Twitter YouTube
     
  29. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    upload_2015-9-17_15-52-43.png

    Not that I am desperate or nothing... ;)

    How's it going?
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
  31. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    Ah. I did note a few issues around 5.2, fair enough mate, thanks for the upate :)
     
  32. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773


    We are totally ready...

    upload_2015-10-1_8-55-23.png

    Have rock. Will SMASH!!!
     
    Last edited: Oct 1, 2015
  33. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    So, we were thinking of you....

    Hope it all goes well..

    PestLife.jpg
     
  34. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    260
    Dude got your awesome asset Curved world which is totally cool.. This looks frikin awesome too and thinking of getting it.. would just like to know if there will be an update cost from the current version.. should i get it now or once released?

    One other asset by you which i want to get but not sure if its unity 5 compatible, is your Flow asset?
    Will this work with unity 5.2? also your next version will that be a free update or additional fee.

    Dude you have created some amazing stuff..

    Thanks

    Daniel
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    All updates for my assets are free.
    As for Flow, it is done in Unity 4 and currently is not updated for Unity 5, some features work others no.



    VacuumShaders - Facebook Twitter YouTube
     
  36. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    260
    cool cheers will be purchasing shortly

    Daniel
     
  37. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    So we were playing with ideas and it would be helpful if you could make the material support transparency when it is beyond a certain world Z. (or oher constraining collider perhaps).

    This would be useful for smashing stuff towards the camera.

    We implement this currently by swtiching the material but a shader level solution would be cool

    upload_2015-10-16_0-35-14.png

    Many thanks
     
  38. yandrako

    yandrako

    Joined:
    Dec 2, 2013
    Posts:
    26
    Any updates for that awesome fragmentum roadmap? :D
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Unity 5.2 contains several critical bugs and I have temporarily paused developing.
    Waiting for Unity 5.3

    Unity 4 was much more stable for developing :(.



    VacuumShaders - Facebook Twitter YouTube
     
    twobob likes this.
  40. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    Ouch, sorry to hear that mate
     
    Last edited: Oct 28, 2015
  41. klund

    klund

    Joined:
    Mar 21, 2011
    Posts:
    33
    yes 5.2.x is pretty hopeless so i reverted to Unity_5_1_3p3 wich works well.
    So please get back to work :)
     
  42. s0phist

    s0phist

    Joined:
    Mar 30, 2011
    Posts:
    28
    I'm very happy with the shader effect in the editor, but after building I realized it requires .net 2.0 full instead of subset. This creates an unacceptable memory load for older iOS devices as we're right on the edge of our memory budget.

    Is there any chance we can use this shader with ".net 2.0 subset" enabled when building for iOS? Thanks!
     
  43. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,773
    something to do while we wait:


    I challenge someone to do:

    Arkhivrag


    Good LUCK!
     
  44. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,712
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Send Fragmentum purchase invoice number to vacuumshaders@gmail.com for farther custom support.



    VacuumShaders - Facebook Twitter YouTube
     
  46. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    414
    Fragmentum was my first asset store purchase when I started up with Unity earlier this year because it looks so stinking cool. I was wondering. Is it possible to have a 'reverse activator?' Basically lets say most everything is under global control and fragmented, but as the activator object approaches individual objects it actually causes the fragmentum influence to move towards zero. Thx. Anxiously awaiting Fragmentum 3. :D
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    For plane activator - you can just rotate it 180 degree and it will have invert effect.
    For sphere activator - use Activator Radius with negative value. Unity editor gizmo does not go into negative value so you have to manually type it inside inspector.



    VacuumShaders - Facebook Twitter YouTube
     
  48. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    414
    10 times more simple than I expected it to be! :)
     
  49. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Hi, is there any webplayer demo?
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,155
    Only demo videos on the first page and this webplayer demo.
    Note, Fragmentum is not ready for Unity 5.

    And here teaser video for WIP version 3.0




    VacuumShaders - Facebook Twitter YouTube
     
    ksam2 likes this.