Search Unity

Feedback Add V-HACD library to unity

Discussion in 'Physics' started by StrongCube, Jun 14, 2019.

  1. StrongCube

    StrongCube

    Joined:
    Nov 22, 2016
    Posts:
    50
    In any project you need to make colliders for meshes, but now the choice is only between primitives (BoxCollider) and MeshCollider. MeshCollider is not suitable for large projects on mobile devices.

    Add the golden mean!
    https://github.com/kmammou/v-hacd

     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Supposedly it's in the Roadmap:

    https://unity3d.com/unity/roadmap
    (find "Automatic Convex Decomposition" under the Development section)

    But it has been there for some years now, so I wouldn't expect it to be available anytime soon.
     
    Hypertectonic and hippocoder like this.
  3. airnamics

    airnamics

    Joined:
    Feb 5, 2020
    Posts:
    28
    Bump, because it could be very good addition.
     
    Gooren likes this.
  4. Ivan_br

    Ivan_br

    Joined:
    Nov 10, 2015
    Posts:
    29
    With the new Unity roadmap, I wasn't able to find it on their list anymore (I may have overlooked it though as the new roadmap is a bit difficult to find things).

    I found this Unity GitHub repository for VHACD integration into Unity - https://github.com/Unity-Technologies/VHACD

    But it seems like it was currently incorporated only for URDF import and not for other file types - https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/urdf_importer/urdf_appendix.md#Convex-Mesh-Collider

    There may be a solution for other file types if someone digs deeper into the GitHub repository.
     
  5. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    Why should they add it ?
    After all who needs Proper Efficient Collision Detection for Dynamic Rigidbodies in 3D games engine ! ?

    And I second the question: Have you found the way to do it, except AssetStore solution.
     
    FaffyWaffles likes this.
  6. jweiland123

    jweiland123

    Joined:
    Sep 28, 2020
    Posts:
    12
    I'm trying to use VHACD. We found the following " It can support any mesh as long as you can extract the triangle info from it which I was able to do with the STL files. Problem is, is that it returns an error that the package is missing when you run it in a webgl build so it seems like it isn't supported for webgl." suggestions?
     
    Last edited: Jul 4, 2022
  7. cjbruce

    cjbruce

    Joined:
    Jun 26, 2017
    Posts:
    12
    Is it possible that VHACD is Windows-only? I'm on a mac and we would love to use it in our Windows/MacOS/Linux open-source project.
     
  8. livj

    livj

    Joined:
    Feb 8, 2019
    Posts:
    10
    Is there anyone who knows how to use it? I have model like a bowl in Unity that I created in Maya and I put the script VHACD on my bowl with a mesh collider... enable convex and it also has a rigidbody. What is the next step or do I have to to something in Maya first? It still puts a "top" that covers the hole...
     

    Attached Files:

    • 1.png
      1.png
      File size:
      67.5 KB
      Views:
      149
    • 2.png
      2.png
      File size:
      100 KB
      Views:
      149
  9. livj

    livj

    Joined:
    Feb 8, 2019
    Posts:
    10
    You can install it as a local package, that worked for me.
    https://docs.unity3d.com/Manual/upm-ui-local.html

    Open the folder an go to com.unity.robotics.vhacd and choose the package -file.
     
    Edy likes this.
  10. Adam_Benko

    Adam_Benko

    Joined:
    Jun 16, 2018
    Posts:
    105
    Have you figured it out ? This is crazy, no documentation, nothing....
     
    cjackcandy likes this.