Tuesday 11 November 2014

V-HACD V2.0 is here!






V-HACD V2.0 is here and it kicks ass. It works with any triangular mesh (i.e., open or closed, manifold or not, oriented or not...) and it gives cleaner and more consistent results than V-HACD 1.0 and HACD.

The source code is available here https://github.com/kmammou/v-hacd

You can also download binaries:
Example of command line (lower quality but faster):
testVHACD.exe input.obj 100000 20 0.0025 4 4 0.05 0.05 0.00125 0 0 64 0.0 output.wrl log.txt

Example of command line (high quality but slow):
testVHACD.exe input.obj 8000000 20 0.0025 4 4 0.05 0.05 0.00125 0 0 64 0.0 output.wrl log.txt


Below some convex decomposition results generated with V-HACD 2.0.






16 comments:

  1. Hi Khaled, what does the first V stand for? Thank you

    ReplyDelete

  2. Volumetric-Hierarchical Approximate Convex Decomposition

    ReplyDelete
  3. the output hulls are non-manifold

    ReplyDelete
  4. This is not expected. Please, could you share an example?

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. i am sorry..it was an error on my side...your library rocks ^_^

    ReplyDelete
  7. Is it possible to output each region to a different wrl file ?

    ReplyDelete
    Replies
    1. Also, is it possible to define the final number of clusters? To force the algorithm to output only X clusters at the end of the computation?

      Delete
  8. In order to save the CHs to different files, you should provides a different foutCH to SaveVRML2(foutCH, ch.m_points, ch.m_triangles, ch.m_nPoints, ch.m_nTriangles, mat, myLogger); in main.cpp

    It is hard to directly control the number of generated clusters. In order to generate less than 2^N clusters, you should:
    - set "concavity" to a big number
    - set "depth" to N

    ReplyDelete
  9. Hey this library looks awesome. Thanks so much. I am trying to use this on a few meshes, one of which is already convex (it is a cube made up of 12 triangles) and so the output should just be a single mesh that matches the cube. Unfortunately the process gets stuck at the voxelisation stage (2nd iteration) with the number of voxels outside the surface continuously increasing. Do you know what could be going wrong here? Will I need to check to see if meshes are already convex before trying to generate convex meshes? Thanks, James

    ReplyDelete
    Replies
    1. Same, it creates a line segment when I feed it a rectangle cube.

      Delete
    2. Same, it creates a line segment when I feed it a rectangle cube.

      Delete
  10. How do I use and implement this in Unity . . I have no idea . . please advise?

    ReplyDelete
  11. I see there are two opencl kernels in the .cl file. Is that means remaining parts of the algorithm could not run in parallel on GPU?

    ReplyDelete
  12. Hi Khaled,
    Is there any paper/references I can refern to on this V-HACD method?

    ReplyDelete
  13. Grate article, We at Addhunters shifted this service to a level much higher
    than the broker concept.
    you can see more details like
    this article property finder

    ReplyDelete