Skip to content
Automatically exported from code.google.com/p/v-hacd
Branch: master
Clone or download
kmammou Merge pull request #62 from tobyndax/master
Added table with parameters to the readme.md
Latest commit e22541f Apr 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DebugView * Revised NvRenderDebug Sep 18, 2017
add-ons/blender Resolved issue with spaces in path to executable. May 6, 2016
bin-no-ocl-omp/osx latest version Dec 28, 2016
bin-no-ocl update windows binaries Dec 28, 2016
bin update windows binaries Dec 28, 2016
doc added pictures Jan 24, 2016
install install/run.py fixed. Mar 11, 2018
scripts cmake config generation added Feb 2, 2016
snapshots add snapshots Nov 23, 2014
src Fixed opencl kernel. Feb 22, 2018
v-hacd-data @ 8c82db6 add data as submodule Jan 13, 2017
.gitignore Removing m_depth parameter as it is now a computed value Aug 28, 2017
.gitmodules
LICENSE Create LICENSE Dec 20, 2017
README.md Added table with parameters to the readme.md Apr 13, 2019

README.md

The V-HACD library decomposes a 3D surface into a set of "near" convex parts.

Approximate convex decomposition of "Camel"

Why do we need approximate convex decomposition?

Collision detection is essential for realistic physical interactions in video games and computer animation. In order to ensure real-time interactivity with the player/user, video game and 3D modeling software developers usually approximate the 3D models composing the scene (e.g. animated characters, static objects...) by a set of simple convex shapes such as ellipsoids, capsules or convex-hulls. In practice, these simple shapes provide poor approximations for concave surfaces and generate false collision detection.

Convex-hull vs. ACD

A second approach consists in computing an exact convex decomposition of a surface S, which consists in partitioning it into a minimal set of convex sub-surfaces. Exact convex decomposition algorithms are NP-hard and non-practical since they produce a high number of clusters. To overcome these limitations, the exact convexity constraint is relaxed and an approximate convex decomposition of S is instead computed. Here, the goal is to determine a partition of the mesh triangles with a minimal number of clusters, while ensuring that each cluster has a concavity lower than a user defined threshold.

ACD vs. ECD

Installing the Package

  1. Clone this Github repository
  2. You may either rebuild the binaries for your machine or use the provided binaries. Here we will assume that you will use the provided binaries in the v-hacd/bin directory.
  3. Copy the Python script in v-hacd/add-ons/blender/object_vhacd.py to your Blender addons directory. For Blender 2.78 this directory will be "Blender Foundation/Blender/2.78/scripts/addons/". You're at the right place if you see other scripts prefixed with object_.
  4. The addon must be enabled before use. After copying the script to the addons directory, open Blender and navigate to File > User Preferences > Add-ons. Object: V-HACD will be featured on the list. Check its mark to enable the addon and save user settings.

Using the Addon

  1. After you have enabled the addon, the V-HACD menu will appear in the object menu when an object is selected.
  2. Go to this menu and select a preset (or leave the path presets).
  3. Select your VHACD path by selecting the "Open File" button next to the VHACD path, which should currently be blank.
  4. Navigate to the directory in which you cloned this repository and find the appropriate executable in the bin folder for your operating systme.
  5. If you have a video card that supports OpenCL, this will be bin.
  6. If you don't have a video card or your video card does not support OpenCL, the appropriate executable for you will be bin-no-ocl (no OpenCL).
  7. Select the V-HACD button at the button of the panel. You will be presented with some options.
  8. Modify the options as desired and select "OK."
  9. Note that the processing may take some time. Increasing voxel resolution will particularly increase runtime.

Parameters

Parameter name Description Default value Range
resolution maximum number of voxels generated during the voxelization stage 100,000 10,000-64,000,000
depth maximum number of clipping stages. During each split stage, all the model parts (with a concavity higher than the user defined threshold) are clipped according the "best" clipping plane 20 1-32
concavity maximum concavity 0.0025 0.0-1.0
planeDownsampling controls the granularity of the search for the "best" clipping plane 4 1-16
convexhullDownsampling controls the precision of the convex-hull generation process during the clipping plane selection stage 4 1-16
alpha controls the bias toward clipping along symmetry planes 0.05 0.0-1.0
beta controls the bias toward clipping along revolution axes 0.05 0.0-1.0
gamma maximum allowed concavity during the merge stage 0.00125 0.0-1.0
pca enable/disable normalizing the mesh before applying the convex decomposition 0 0-1
mode 0: voxel-based approximate convex decomposition, 1: tetrahedron-based approximate convex decomposition 0 0-1
maxNumVerticesPerCH controls the maximum number of triangles per convex-hull 64 4-1024
minVolumePerCH controls the adaptive sampling of the generated convex-hulls 0.0001 0.0-0.01

More approximate convex decomposition results

V-HACD Results (1/4) V-HACD Results (2/4) V-HACD Results (3/4) V-HACD Results (4/4)

You can’t perform that action at this time.