Volumetric Hierarchical Approximate Convex Decomposition (e.g. for BGE Physics)

A Blender add-on to perform Volumetric Hierarchical Approximate Convex Decomposition using the new V-HACD v2.0 library is now available.

V-HACD v2.0 is a new open source library written by K. Mamou that uses a new and improved algorithm to perform automatic approximate convex hull decomposition of non-convex meshes. It is an essential tool to enable high performance and stable rigid body dynamics simulations of non-convex meshes. Hopefully V-HACD will be integrated into Blender in the near future; in the mean time you can use this add-on.

For more information (and wiki) check out the V-HACD Project Home.

You can download the add-on and the required testVHACD executable binaries, available for most platforms, from the V-HACD open source repository… download zip, unzip, install add-on (add-ons/blender), 3D View, Tools tab -> V-HACD, in Object mode, where you can specify the path to your platform’s testVHACD executable).

See this older video at the 19:17 mark (edit: also this one at 21:10) for examples of real-time physics simulation of a non-convex high-resolution mesh processed with automated hierarchical approximate convex decomposition using HACD, the predecessor of V-HACD by the same author.

Notes:

  • Make sure you have an open console window before starting the process (Window > Toggle System Console) in order to monitor V-HACD’s progress.
  • The add-on will generate a BGE (Blender Games Engine) compound active rigid body physics structure for each selected/processed object from the resulting convex hulls.
  • At this time I don’t think compound rigid bodies are supported in the 3D View physics, but they are supported by the BGE physics. Hopefully compound rigid bodies will be supported in the 3D View in the near future.

Hi Phymec,

nice to see you working at blender fracturing, this time with VHACD, again :slight_smile:
Regarding compounds in the viewport… AFAIK here is atleast a partial implementation

https://git.blender.org/gitweb/gitweb.cgi/blender.git/shortlog/refs/heads/soc-2013-rigid_body_sim

from Sergej Reich

And AFAIK he already experimented with an (older ?) version of HACD in his branch.

And in my (older) voronoi explode / rigidbody modifier i experimented a bit with compounds as well :slight_smile:
I used them basically to speed up the simulation by exchanging constrained parts by compounds. But they had a drawback… they could only be destroyed completely at once…

Imho the static pointcache prevents a dynamic fracture atm (a bit), unless you pre-allocate its maximum number of shards and populate those slots with compounds (each single rigidbody needs to be stored, or the compound rigidbodies (the parents respectively)
And (for me) there is also still a problem by throwing new rigidbodies into a running sim, crashed quite often…

My Fracture Modifier supports only prefracture and voronoi cells over the bbox + boolean or bisect atm… if VHACD would be included in blender (or even OpenVDB) this would help to improve fracture quality and simulation stability, as you get always convex pieces.

That VHACD addon idea reminds me a bit of my destructability editor addon :slight_smile: Only difference is that i have been using voro++ for generating the voronoi cells and wrote a small cython binding for it, to be able to access the voro++ functionality directly from python.

To be clear: this add-on is not for fracturing, but rather to enable reliable and high-performance rigid body dynamics of whole non-convex meshes using compound convex hull shapes. (although V-HACD’s ability, potentially with the help of Boolean intersection, to break down objects into discreet convex hulls could certainly be useful for fracturing.)

Sorry, I’m not familiar with the status of that branch. If someone could confirm if the release version of Blender supports Bullet’s btCompoundShape in the 3D View, that would be great, thanks. Would certainly be nice if V-HACD was integrated.

Congratulations scorpion81 on the new fracture modifier, I hope it makes its way to Blender core.

Hello, i hope it’s not too late to ask questions.

Your program could potentially save me hundreds of hours,
but i seem to be unable to install it correctly.

My System: Windows XP SP 3, Blender v. 2.76

I downloaded the v-hacd-master.zip from github,
unzipped it,
installed the add-on in blender (successfully, it seems),
moved the bin/win32/testVHACD.exe into C:\vhacd,
set the paths in blender>tools>v-hacd to C:\vhacd estVHACD.exe and C:\vhacd respectively.
I opened the console before running the program.
I created a simple sphere to test it.
I selected the sphere and then clicked on tools>v-hacd>v-hacd>ok.

I receive the windows error message:
“testVHACD.exe is not a valid Win32 application”

In the console i can see:

Exporting mesh for V-HACD: C:\vhacd\Sphere.off…
Running V-HACD…
“C:\vhacd estVHACD.exe” --input “C:\vhacd\Sphere.off” --resolution 100000 --dep
th 20 --concavity 0.0025 --planeDownsampling 4 --convexhullDownsampling 4 --alph
a 0.05 --beta 0.05 --gamma 0.00125 --pca 0 --mode 0 --maxNumVerticesPerCH 32 --m
inVolumePerCH 0.0001 --output “C:\vhacd\Sphere.wrl” --log “C:\vhacd\Sphere_log.t
xt”

Zugriff verweigert (german for “Access denied”)

I have tried various different vhacd executable and data locations in different folders, on different partitions, but nothing seems to work.

I think i also have installed every Microsoft Visual C++ Redistributable (2005, 2008, 2010, 2013, 2015) by now,
as the “Not a valid Win32 application” error is sometimes caused by missing one of these.

Any ideas?

I had this problem too. It was solved with:

chmod a+x bin* -R

Even on Windows (with cygwin). In other words, add permission to execute. Or use the ZIP from Github which doesn’t have implicit permissions.

Sorry for resurrecting such an old topic, but it’s what I find when searching for this problem.