Search Unity

Fragmentum - Mesh fragmentation shader

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

  1. victorMaje

    victorMaje

    Joined:
    Jan 7, 2013
    Posts:
    6
    Thanks :)
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Last edited: Feb 14, 2015
  3. QuantumCalzone

    QuantumCalzone

    Joined:
    Jan 9, 2010
    Posts:
    262
    Is Fragmentum 2 going to be a new product? I just bought Fragmentum before seeing there would be a new one.
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Fragmentum 2 will be free update.
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Fragmentum 2 will be available in several days.
    It has sm2 and sm3 support. No DirectX 11 any more :)
     
  6. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Wait a minute!. works with Dx9/10 and OpenGL?
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Exactly ;)
     
  8. GMM

    GMM

    Joined:
    Sep 24, 2012
    Posts:
    301
    Fragmentum seems very cool and i may buy it, but the current free project does not seem to work on Skinned Meshes. Does only the full version work with skinned meshes or is this something that is added to Fragmentum 2?
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    SkinnedMesh renderer works only with full version and only with dx11.
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Last edited: Apr 14, 2014
  11. EchospawnStudios

    EchospawnStudios

    Joined:
    Oct 13, 2013
    Posts:
    5
    We have been following Fragmentum for a while now and your progress is just remarkable. We currently are in need of these features for one of our mobile games. With this new update, do you guys have any ideas on when it will be mobile friendly, and exactly what type of mobile devices will be able to handle it? Thanks!!
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    With new Fragmentum 2 you can choose sm2, sm3 or sm5. So for mobiles you can use sm2 version. Fragmentum 100% works per vertex. More vertexes, more calculations :). I made all key features of Fragmentum optional, in this case you can also control how "heavy" your shader would be.

    Here is scene with about 22.000 triangles runing on Kindle Fire.

    frag2_mobile_demo_1.png
     
    Last edited: Feb 14, 2015
  13. EchospawnStudios

    EchospawnStudios

    Joined:
    Oct 13, 2013
    Posts:
    5
    o wow, looking good! Ok cool, well this is something we will have to purchase soon!
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Little example of Fragmentum 2.

    Try webplayer



    Shader in current scene is one of the "heaviest". Full forward rendering (directional and point lights per pixel) and with fragmenting shadow casting/receiving.
     
    Last edited: Apr 18, 2014
  15. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Hi!

    Does Fragmentum 2 work on OSX? I see the free version doesn't..
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Fragmentum 2 works on all platforms :)
    Free version is only for DX11.

    Try Statues deconstruction web player
     
    Last edited: Apr 24, 2014
  17. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Perfect, thanks!

    One final question - do you know if there's any issues with Fragmentum 2 and Oculus Rift?
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    I do not have OR, but there shouldn't be any problem. Fragmentum is just a shader. Cool shader 8)
     
    Last edited: Apr 24, 2014
  19. Leight

    Leight

    Joined:
    Feb 27, 2014
    Posts:
    8
    Hi!
    Demo's are really impressive, so i thinking about purchasing, but there is one thing i would like to ask:
    I saw objects divided mostly by triangles. But in my project i need objects to "construct from nothing" from specific parts. At least quads/rectangles if there is no other options.
    Can i configure shader for quad based(or define some geometry parts) effect?
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Hi,
    In Unity mesh is constructed by triangles, Fragmentum uses that triangles to create fragmentation effect. Quads/Rectangles are not supported yet.
    To add more "non triangle" appearance, I have added cutout shader to the package. Cutout effect is only applied to the fragmented parts of the mesh.
     
  21. Leight

    Leight

    Joined:
    Feb 27, 2014
    Posts:
    8
    // Before start Fragmentum script prepares mesh for shader - generating some additional data and thus rebuilds it (only once).

    If i understand correctly, with "cutout shader" Fragmentum script makes these fragmented parts on "preparing stage" by its own algorithm and then uses them as "parts" at final effect(instead of triangles)?
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Fragmentum script rebuilds mesh and generates some data in a very specific format required by the shader. All meshes which have Fragmentum shader, require Fragmentum script attached. Cutout shader also fragments mesh by triangles, but pixel shader adds more "holes" to the final rendered effect.
    Cutout effect is completely separate from the fragmenting effect, which creates Fragmentum.
     
  23. Leight

    Leight

    Joined:
    Feb 27, 2014
    Posts:
    8
    Thanks, now it's clear :)
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Fragmentum 2.1 has been released.

    List of new features and improvements:
    • Fragmentum has been completely redesigned and rewritten.
    • New Fragmentum script prepares and rebuilds mesh for Fragmentum faster and much more accurate, according mobile shaders request
    • New improved Fragmentum shader generator.
    • Added shader auto recompile option.
    • Added multiple object editing support.
    • New improved Framgentum material editor.
    • Added Fragmentum Influence global controller.
    • Added Fragmentum Influence randomizer.
    • Added Displace amount randomizer.
    • Added new rotation type: Around custom point.
    • Improved Radial Displace and Fragments scale.
    • Added option to switch shader to double sided.
    • Added option to calculate light per vertex, instead of per pixel.
    • Pow function for Fragmentum Area Texture now is optional.
    • Added easy shader type changer.
    • Shader type now is visible inside material editor and inspector.
    • Added Fragmentum Influence slider inside material editor.
    • Main Color and Reflection Colors now are optional.
    • Fixed main bugs for mobile shaders:
    • Fragments stretching when using Fragment Area texture.
    • Light calculation for sm2 shaders.
    • Reflection vector calculation for sm2 shaders.
    • Fragmentum native shaders now are hidden and does not require compilation when importing into new project.
    • Many other micro optimizations and improvements.

    • New Documentation and example scenes

    • Fragmentum Free has been updated. It contains several sm2 version shaders instead of DX11. Does not contain Fragmentum shader generator.

    Note: New Fragmentum is not compatible with the old version, but it is easy to recompile new shader with Fragmentum shader generator.
     
    Last edited: May 21, 2014
  25. temo_koki

    temo_koki

    Joined:
    Jul 14, 2009
    Posts:
    308
    Congratulations, Great tool ;)
     
  26. popawheelie

    popawheelie

    Joined:
    May 27, 2013
    Posts:
    23
    Hello,

    I am wondering if it is possible have a game object use a directional displace to fragment in and out just through with script? Currently I am trying to do this by switching models, which isn't very effective. I was hoping to look at that sculpture demo, but it wasn't included with the update.

    Any help would be appreciated.

    Keep up the good work.
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978

    Hi,

    Fragmentum script has public functions to update activators, displace and rotations.
    • public void UpdateActivatorPlane(Vector3 _activatorPlanePosition, Vector3 _activatorPlaneNormal);
    • public void UpdateActivatorSphere(Vector3 _activatorSpherePosition, float _radius);
    • public void UpdateDisplaceDirectional(Vector3 _direction);
    • public void UpdateDisplaceRadial(Vector3 _pointPosition);
    • public void UpdateRotateCustomPoint(Vector3 _pointPosition, Vector3 _pointNormal);

    You can manually update any data in material, but first you must get Fragmentum material - GetMaterial();

    As for sculpture demo, there are two separate objects but with similar Fragmentum parameters.
    • Activator - Plane
    • Displace Type - Directional
    • Scalable fragments
    • + some randomizes

    Anubis parameters and activator position/rotation


    Venus parameters and activator position/rotation



    Difference is activators rotation (normal direction) and "Displace Amount" value.
     
  28. LividTheDream

    LividTheDream

    Joined:
    Sep 29, 2012
    Posts:
    17
    Hi,

    This shader looks great! I'm developing something for mobile and I have a couple of questions.

    1. I downloaded the latest Fragmentum free to test since I read that the free version supports mobile shaders. However, when I deployed it to my Samsung S3 the meshes were solid and pink in all of the example scenes, even the simple scene. Is there a missing step to get it to work on mobile?
    2. Would this work with a skinned mesh renderer? I.e. can I animate my mesh and have the effects still apply?
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978

    Hi,
    1. Fragmentum Free does not contain mobile(gles) shaders. DX11 shaders were replaced with sm2 shaders.
    As Fragmentum Free is without Fragmentum shader generator, shaders are precompiled and you can not generate shaders with gles support.
    2. Only DX11 shaders can fragment skinned mesh.
     
  30. 3

    3

    Joined:
    Sep 16, 2012
    Posts:
    387
    So will this work on Macs? And how is indie different?
     
  31. MikeLan

    MikeLan

    Joined:
    Jul 3, 2014
    Posts:
    4
    Hi!

    I recently bought fragmentum pro - very cool tool! I have a question: I want to create an effect that should make certain parts of an invisible mesh to become visible. By moving a sphere attractor towards the invisible mesh the triangles that collide with the attractor should appear (the effect should be within a limited spherical area).
    Until now I have achieved a kind of inverted effect: the triangles within the influence of the attractor disappear while the mesh is visible (see screenshot). Is there an easy way to achieve this effect?
     

    Attached Files:

  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @MikeLan
    I think you can try negative value for sphere activator radius.
    Dragging activators sphere's radius handles inside editor does not allow entering negative values, so just type it manually.
     
  33. MikeLan

    MikeLan

    Joined:
    Jul 3, 2014
    Posts:
    4
    Thanks a lot - that solved the problem!
     
  34. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    I can see on a graph that Indie version doesn't support deferred and forward rendering, but I suppose it does as a free version does, am I right?
    If it works with deferred, does also image effects work (SSAO) in indie version?
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Indie version can be used in Forward and Deferred rendering, but it supports only one directional light.
    Currently not all image effects can be used with Fragmentum, as they can not see vertex displacement.
     
    Last edited: Aug 21, 2014
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978

    Fragmentum 3
    (for Unity 5 only) brings lots of new features and improvements.

    There is no more shader groups (Mobile, SM2, SM3, DX11).
    Fragmentum 3
    runs on all platforms and devices using just one shader.
    Built in fallback system.
    Fragmentum 3 runs inside Editor (not only in Game mode).
    Added memory management system, which dramatically reduces memory usage.
    Skinned Meshes - YES
    Specular and Bumped effects - YES
    Image based lighting and Spherical harmonics.
    Mesh vertex color.
    New improved shadow casting/receiving system.
    Support of non-uniform scaling meshes.
    New fragments rotation effects: LookAt target and LookAt Direction.
    New mesh fragmentation options: Triangle, Quad, Smooth Group, Material ID, Compound Mesh.
    Fragments emission and glow effects.
    and many other cool features.

    Completely new core of Fragmentum 3 brings new level of optimization.
    Fragmentum 3 reuses already fragmented meshes, that dramatically reduces memory usage and avoids mesh fragmentation calculations.

    Current scene contains about 800 tree mesh. Current version fragments all meshes individually, while Fragmentum 3 fragments only one of them.
    Compare mesh count and used memory.
    Memory_Save.png




    Currently Fragmentum divides mesh into triangles and manipulates them.
    In Fragmentum 3 will be additionally available 3 new mesh fragmentation options.

    1. Fragment mesh using its smooth groups.
    Frag_SmoothGroup.gif

    2.Fragment mesh by its own compound meshes.


    3. Fragment mesh by its material ID.



    Skinned meshes work with all fragmentation types.



    VacuumShaders
     
    Last edited: Mar 4, 2015
  37. MikeLan

    MikeLan

    Joined:
    Jul 3, 2014
    Posts:
    4
    Hi!

    I am really impressed by your work - congrats!
    Based on your shader I created a small prototype called "Fractile". In the game prototype the player is confronted with lost memories - your shader was very helpful in this context!
    The game mainly focuses on exploration and uses the Tobii EyeX Eytracker (http://www.tobii.com/buy-eyex?gclid=CKGusvjw78ACFUoUwwodNrAA3A) in combination with your shader. Based on the current gaze postion of players (in other words: where you currently looking at) NPCs will appear.
    How it was done: I used the first person shooter prefab in Unity, parented a fragmentum helper (negative attraction value) several meters in front of the camera, and let the gaze position drive the current position of the helper.

    In order that you can get a better impression I made a short video that shows the prototype (as well as a second one):




    By the way - I have a feature request:): it would be really awesome if the shape of the attractor could be defined - currently only a sphere and a plane can be selected. Custom shapes would really help to improve my game prototype
    as I could create shapes that represent the players's view (camera) angle.

    All the best,

    M.
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @MikeLan
    Thanks. I am very interested to see projects where my shaders are used and hear opinions and suggestions about them. And good luck with your work.



    VacuumShaders
     
    Last edited: Sep 20, 2014
  39. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Hi,

    One question; When i buy the pro version now, does this also includes the future planned Fragmentation 3 (or a discount) when it gets released?

    Thanks,

    G
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @gpvd
    Fragmentum 3 will be free update.
     
  41. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Ok, sold!
     
  42. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Hello,

    Recently i bought both Flow and fragmentation from you. Great packs.
    I'm a bit curious; Do you have an eta of the upcoming fragmention 3?

    Greetz,
    G
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @gpvd
    Fragmentum 3 requires Unity 5, so it will be available after releasing Unity 5.



    VacuumShaders
     
    Last edited: Oct 24, 2014
  44. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Ok,
    tnx for the info.

    Greetz,
    G
     
  45. radjudy

    radjudy

    Joined:
    Oct 23, 2013
    Posts:
    13
    Hi, i have this awesome asset, but im trying to use it on a large mesh. When i import the mesh Unity splits it into submeshes, but does so with more triangles than Fragmentum can handle. Do you know if there is a way to limit the triangle count on import so i can resolve this problem?
    Thanks!
    -- Judy


     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    @radjudy
    Unity can handle max 65000 triangles per mesh. if it has more vertices Unity will split it into sub meshes.
    Fragmentum can handle max 21000 triangles per mesh.
    There is no built-in tool in Unity to reduce triangle count. You have to manually edit your mesh in 3D modeling program - Maya, 3ds Max, Blender.



    VacuumShaders
     
  47. Axiomatic

    Axiomatic

    Joined:
    Feb 7, 2014
    Posts:
    30
    Can this be used in conjunction with the Unity 5 standard shader?
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Currently no. I will be able to add Unity 5 features after releasing Unity 5.
     
  49. jwyz

    jwyz

    Joined:
    Mar 18, 2013
    Posts:
    6
    Hey! This plugin is awesome! But I'm getting an error when building for iOS. It is saying "cross compilation job VacuumShaders.Fragmentum.dll failed"

    Any advice?
     
  50. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    :p:cool: