The first tests were done using some of the models given by the author of the V-HACD library (which are found on Github under: https://github.com/kmammou/v-hacd-data).
We chose the model cup as our test 3D model. We executed the V-HACD algorithm on this model variating one parameter at a time (leaving the rest in their default values). The objective was to analyse the influence that each parameter has on its own in the model decomposition.
The original stl file of the cup model is 553,8kB.
The following tables show the number of pieces obtained after the decomposition and the total size of the decomposed model when variating each parameter on its own leaving the others in their default value.
These first tests show that the parameter that really influences and changes the number of pieces is the resolution. That is, we can see how the number of pieces obtained when changing the rest of parameters is more or less constant (29 pieces) which is the value fixed by the default resolution.
There are other interesting things to point out.
The variation of the concavity does not seem to increase the number of pieces obtained, however further tests show it has an impact on it (see next entry). We can think that the smaller the concavity is the more pieces we will end up having. This is in general true but it strongly depends on the 3D model we are decomposing and in the granularity of the decomposition (which is basically set via the resolution parameter).
The parameters MaxNumvertices, MinVolumePerCH do not have any impact in the number of pieces obtained. As described before, these parameters are used in the Convex hull adaptive sampling phase whose aim is to simplify the complexity of each convex hull without changing the number of them.
We can also see how the parameter maxConvexHulls will allow us to set the number of convex hulls up to the maximum given/obtained before the merge phase (and that as we have seen already it is highly dependant on the resolution). That is, tests show that a change in this parameter does not allow to increase the number of decomposed pieces (given by the default set up of values).
The parameters convexHullDownsampling and planeDownsampling have a small influence in the number of pieces obtained.
The influence of the alpha and beta parameters is also interesting to analyse.
We can see how bigger values of beta lead to a higher decomposition. The beta parameter is used to give (or remove) weight to the symmetry factor: the bigger it is, the more chances we have to use as a clipping plane a plane orthogonal to a revolution axis (leading to a two subsets of voxels with similar or identical shape). As our model studied, the cup, has a revolution axis (with the exception of the handle), the increase of the beta parameter produces an increase of the pieces obtained after the decomposition. This effect will probably not happen if the model has not a revolution axis.
However, even if we have more number of pieces the decomposition is not correct, we can see how in our case big values of the beta parameter produce a poor/bad decomposition of the cup handle (it is considered to be one piece - its hole is filled).
If we focus on the alpha parameter we can see how, in our tests, big values of it produce higher number of pieces. As with the beta parameter, this is probably due to the fact that our model is quite symmetric so that the volumes of the subsets of voxels obtained after clipping are quite close (remember the alpha is the factor that goes with the balance component of the energy criteria). This behaviour will probably not occur when the model is less symmetric. A use of a higher value of the alpha parameter (higher than ten default value) could be used in order to have a bigger decomposition, tests have not shown the same bad effects we had when increased the beta parameter.
However, it is strongly encouraged to visualize the decomposed model because quite often having a higher decomposition does not mean that the result model is better.
Finally, and as expected, the more pieces we have the bigger is the size of the total model decomposed. However, in this case the decomposed model is always smaller in size the original one, we suppose this is due to the fact that on one hand, the initial model has a high resolution and on the other hand, the algorithm merges and simplifies (steps 3 and 4 of the algorithm) the decomposed pieces.
To sum up we can say that the number of pieces obtained by the V-HACD algorithm depends on:
- Resolution
- Concavity
- Complexity of the piece
### Further tests 1
In order to verify this behaviour the same tests where done but this time with a default resolution of 1e7 (instead of 1e6). We could see how the variation of the parameters convexHullDownsampling, planeDownsampling, alpha, beta and maxConvexHulls did not change (or did it in a really small vairation) the total number of pieces obtained after decomposition, this time the value was around 36.
On the other hand we could see how in this case the variation of the concavity parameter had an impact in the number of decomposed pieces (whilst for the resolution 1e6 it did not seem to affect). In this case smaller values than 0.003 -our default value- lead to higher decompositions as the table shows:
| Concavity | Num. Pieces | Size (kB) |
| ------ | ------ | ------ |
| 0 | 51 | 284,8 |
| 0.0001 | 51 | 284,8 |
| 0.0005 | 50 | 284,8 |
| 0.001 | 47 | 284,8 |
| 0.003 | 36 | 291,6 |
| 0.005 | 27 | 284 |
### Further tests 2
Finally we decided to do the same tests but using other 3D models (all of them from the vhacd-data project). We decided to use the models: Block, Eight, Helix and Torus.
The following tables represent how the variation of the resolution, the concavity and the maxConvexHulls influences the number of decomposed pieces in each model.
We can see how the characteristics of each model has a direct impact on the number of pieces obtained.