Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Impact Deformable - Dynamic mesh deformation by collision [released]

Discussion in 'Made With Unity' started by L-Tyrosine, Oct 22, 2012.

  1. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    Impact Deformable implements an automatic system of dynamic mesh deformation by impact in a single script.

    Demonstration:

    Cube and Sphere: Video / Live

    $Screen1.png

    Metal Rain: Video / Live

    $Screen2.png

    Car Derby: Video / Live

    $Screen3.png

    Features:

    - Individual object hardness configurable.
    - Mesh can be repaired (restored) by specified amount with a single function call.
    - Repair can also be delimited inside an area (think of a robot that repairs sections of a starship one at a time).
    - Works with any kind of collider.
    - Optionally updates MeshColliders components.
    - Delayed mode for low-end cpu targets (mobiles).
    - Maximum vertex distance from original position can be specified.
    - Deformed vertex color change.

    Released at asset store
    http://u3d.as/content/arcadium-playware/impact-deformable
    Price: 20$

    Thank you.

    L-Tyrosine
    Arcadium Playware
    l-tyrosine@arcadiumplayware.com
     
  2. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,145
    WOW ! Fantastic !
    I like the effects and the videos for a perfect advertisement on your product...

    6R
     
  3. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,068
    Impressive, does the $20 include full source code?
     
  4. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,926
    Really cool!
     
  5. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    Thanks =)

    Yes. There is a single script and is all that is needed to work.
     
  6. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
  7. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    241
    first of all nice work. can we adjust the amount of subdivisons to get better detail or better performance.
     
  8. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    No vertex is created or destroyed. Just vertices on original mesh are deformed so deformation performance/quality are tied with mesh vertex count.
    About performance, the delayed mode can be used where deformations are accumulated and applied n times/sec rather than on each impact. This can be a good choice in the case of targeting for mobile devices or scenarios with a lot of collisions at same time.
     
  9. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Hey man,
    Is something like drilling or sculpting possible with your package? How about the max depth amount?
     
  10. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    Hi!

    Impact Deformable does not create any new geometry on mesh, it just deform existing vertices so it would be capable only of basic sculpting. And drilling is really impossible for the same reason.

    There is a property "MaxVertexMov" that limits the distance that a vertex can move from its origin position.
     
  11. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Great then

    Yeah, I figured, I read the latter posts and noticed that it just manipulated vertices around ;) Sorry for the confusion

    What I mean is if it is possible to push or pull vertices in or out the mesh (for example) according to their normals or a second mesh (a morph like process) using a mouse or .... I don't, on touch devices maybe? :)
     
  12. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    I see. Would be possible, albeit not trivial, to force fake Collisions built from mouse or touch input into the core functions of this script. But I guess that a best way to accomplish this would be to build it from scratch instead of using Impact Deformable, for the best it has to offer in this case is the reference of the "hows to" of mesh manipulation (specifically the optimizations implemented in DelayedMode for mobile devices).
     
    Last edited: Apr 3, 2013
  13. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Thank you for your honest answer, I'll dig more into the subject :)
     
  14. Nakor

    Nakor

    Joined:
    Sep 5, 2012
    Posts:
    30
    Hi,

    Will this asset allow holes to be created by deformations after a set threshold? For example (like the metal rain demo) keep throwing a ball at around the same spot and have it eventually break through completely?
     
  15. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    Hi!
    Currently, no... It would require to form new geometry to achieve such effect.
     
  16. Hosni

    Hosni

    Joined:
    May 8, 2013
    Posts:
    3
    Hi,

    How does the material/texture on a object behave? Are there any previews of this? I would need it for simple and small deformations.


    Thanks
     
  17. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    Hi!

    There are no changes regarding material/texture on object, works as if deformation haven't take place. Impact deformable works on vertex data only:



    Please let me know if you need more clarifications.
     
  18. Hosni

    Hosni

    Joined:
    May 8, 2013
    Posts:
    3
    Looks like just what I need. I will try it out! Thanks for the fast reply.
     
  19. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,563
    Hello, is there a way to completely repair the mesh at the press of a button(or a function called) instead of clicking over the area? I've been looking over the readme and such but am not getting any results.
     
  20. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    Yes. There are 2 Repair methods in overload at Deformable.cs/js:

    Code (CSharp):
    1. public void Repair (float repair)
    2. public void Repair (float repair, Vector3 point, float radius)
    The first one will repair the entire mesh by the given proportion (0 to 1).
     
  21. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,563
    I'm working with a client on finishing a project another guy had started. For example, is this correct? I'm calling script.Repair(1); and it's calling this one.


    Code (CSharp):
    1.     public void Repair (float repair)
    2.     {
    3.         Repair(repair, Vector3.zero, 0);
    4.     }
    And then beneath it is the other Repair function.


    Code (CSharp):
    1. public void Repair (float repair, Vector3 point, float radius)
    2. {
    3.     //repair code here for vertices and such
    4. }
     
  22. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    Yes. This is the way to repair the entire mesh.
     
    carking1996 likes this.
  23. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,563
    Only problem is that it isn't working for them anymore, does it need some time to do it or how does that work?
     
  24. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    There is no reason to this function fail. The code just restore the mesh to original vertices state. Please be sure that the previous person working on project did not change the component code (download it again from asset store). Also, please check if the restored mesh is the one linked with the mesh filter/ mesh renderer presented at screen (maybe its cached elsewhere at some time). If it's possible, I offer to check the project code. If you want, we can continue the support by email (l-tyrosine@arcadiumplayware.com or wduty@hotmail.com)
     
  25. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    I just purchased this asset and I love it.

    How would you recommend that I simulate an explosive force on a deformation mesh without a rigidbody? The Unity explosive force needs a rigidbody.


    I can't seem to get vertex colors to work in Unity 5. I used this shader. Ideally I would like to use the alloy vertex blend shader to switch between two shaders based on vertex color.

    Also could you start a new thread in the Asset store forum since your asset is Unity 5 compatible.
     
    Last edited: Jun 11, 2016
  26. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    294
    You can call directly the method Deform(Vector3 point, Vector3 force) at ImpactDeformable class. Parameters are in world space. In this case, the point would be your explosion center and force size of explosion. Depending on your scale/mesh size values you will have to calc the point parameter closer to your object. I can easily show you how to do this by code, let me known if you need help with it.

    Yes, there is a new version 2.1 with vertex color change. Please check in the asset store forum thread.
    I'm about to finish it and post to asset store. Existing customer will get it for free.
     
  27. h00man

    h00man

    Joined:
    Apr 17, 2017
    Posts:
    49
    hey, thanks for your awesome asset.i got a question about the kind of mesh we should use to be able to deform it.i just exported a simple cylinder mesh from blender and did it like your metal rain scene but the my mesh won't be deformed like your .should we be using a specific file format for our mesh(i used blender's fbx)?should our mesh be triangulated first?
     
  28. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    859
    How complex can the mesh be before you see performance issues, how many verts / or on how many objects can this be used in a scene?