1TESTVHACD(1) User Commands TESTVHACD(1)
2
3
4
6 TestVHACD – Test and utility command-line tool for the V-HACD library
7
9 TestVHACD <wavefront.obj> (options)
10
12 The V-HACD library decomposes a 3D surface into a set of “near” convex
13 parts.
14
16 -h <n> Maximum number of output convex hulls. Default is 32
17
18 -r <voxelresolution>
19 Total number of voxels to use. Default is 100,000
20
21 -e <volumeErrorPercent>
22 Volume error allowed as a percentage. Default is 1%. Valid
23 range is 0.001 to 10
24
25 -d <maxRecursionDepth>
26 Maximum recursion depth. Default value is 10.
27
28 -s <true/false>
29 Whether or not to shrinkwrap output to source mesh. Default is
30 true.
31
32 -f <fillMode>
33 Fill mode. Default is ‘flood’, also ‘surface’ and ‘raycast’ are
34 valid.
35
36 -v <maxHullVertCount>
37 Maximum number of vertices in the output convex hull. Default
38 value is 64
39
40 -a <true/false>
41 Whether or not to run asynchronously. Default is ‘true’
42
43 -l <minEdgeLength>
44 Minimum size of a voxel edge. Default value is 2 voxels.
45
46 -p <true/false>
47 If false, splits hulls in the middle. If true, tries to find
48 optimal split plane location. False by default.
49
50 -o <obj/stl/usda>
51 Export the convex hulls as a series of wavefront OBJ files, STL
52 files, or a single USDA.
53
54 -g <true/false>
55 If set to false, no logging will be displayed.
56
57 TUNING PARAMETERS
58 The default values are currently designed to give a fast and basic ap‐
59 proximation of a shape.
60
61 If you want as accurate results as possible and don’t care if it takes
62 quite a bit longer you can use a small error threshold (-e 0.01) and a
63 high voxel resolution of ten million (-r 10000000) and a relatively
64 high number of convex hulls say 128 (-h 128).
65
66 Finally you can set the maximum decomposition depth to much higher than
67 the default value of 10. Setting it to say 15 (-d 15) will allow the
68 algorithm to recurse much more deeply into the shape.
69
70 Example:
71 TestVHACD beshon.obj -e 0.01 -d 15 -r 10000000 -r 128
72
73 Usually this may be overkill for your use case but if you have say ma‐
74 chined parts with sharp angles, these settings have a better chance of
75 giving a good result.
76
77 Note that setting the maximum decomposition depth to 15 will make the
78 tool run a very long time (possibly multiple minutes) but it will
79 likely give the most precise results.
80
81 The default value for decomposition depth is currently ten and it goes
82 in powers of two. So the default value considers a maximum of 1,024
83 hulls but with a depth of 15 it will consider 32,768 convex hull frag‐
84 ments.
85
86
87
88 February 2023 TESTVHACD(1)