Has anyone else tried to use the HACD library for convex decomp? I'm getting erroneous decompositions. For example, feeding in a single unit tetrahedron produces a tet, and 2 extra triangles. The extras are 2 sides of a triangle on the tet.
I'm using the suggested parameters for HACD. Am I doing/missing something obvious?
-Nafees
Problems using HACD
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
Re: Problems using HACD
I think I have seen similar issues here (both posts are kind of related iirc):
http://www.bulletphysics.org/Bullet/php ... ACD#p24273
http://www.bulletphysics.org/Bullet/php ... hilit=HACD
There are also a discussion here, but I haven't checked if they deal with your issue:
http://www.bulletphysics.org/Bullet/php ... ACD#p24331
Cheers,
-Dirk
http://www.bulletphysics.org/Bullet/php ... ACD#p24273
http://www.bulletphysics.org/Bullet/php ... hilit=HACD
There are also a discussion here, but I haven't checked if they deal with your issue:
http://www.bulletphysics.org/Bullet/php ... ACD#p24331
Cheers,
-Dirk
-
- Posts: 57
- Joined: Tue Mar 16, 2010 1:42 am
Re: Problems using HACD
I'm having some issues as well. I haven't quite got it nailed down to what particular situation in my meshes is causing it to fail, but what they have in common is that it triggers the ICHullErrorInconsistent error in the convex hull processing part of HACD. After that it falls back to some code that will either crash or produce those isolated triangles.
I think it has something to do with ICHull::MakeConeFace(), particularly in the case where an edge already exists and has two triangles on it. The edge can then not receive the new triangle face, and consistency will fail as the edge part of the face but not vice-versa. I don't know why this situation occurs. Maybe nearly co-planar polygons on the convex hull?
---JvdL---
I think it has something to do with ICHull::MakeConeFace(), particularly in the case where an edge already exists and has two triangles on it. The edge can then not receive the new triangle face, and consistency will fail as the edge part of the face but not vice-versa. I don't know why this situation occurs. Maybe nearly co-planar polygons on the convex hull?
---JvdL---
-
- Posts: 237
- Joined: Tue Jun 29, 2010 10:27 pm
Re: Problems using HACD
In case you are using an older version of HACD, try updating it (I believe there have been a few bug fixes since the last integration into Bullet, which may or may not be related to your problem):
http://sourceforge.net/projects/hacd/
http://sourceforge.net/projects/hacd/
-
- Posts: 57
- Joined: Tue Mar 16, 2010 1:42 am
Re: Problems using HACD
Using the head revision of HACD solves the problem for some of the meshes, but still getting an inconsistency error in the hull on others.
I think I'm going to try and dump out what the hulls look like leading up to the error.
---JvdL---
I think I'm going to try and dump out what the hulls look like leading up to the error.
---JvdL---
-
- Posts: 22
- Joined: Mon May 02, 2011 3:26 pm
Re: Problems using HACD
Please, could you share the problematic meshes in OFF or OBJ format.
--Khaled
--Khaled
-
- Posts: 57
- Joined: Tue Mar 16, 2010 1:42 am
Re: Problems using HACD
I'll see if I can convert to OBJ format. The mesh is actually pretty nasty and I now don't expect it to work for other reasons. But there is an issue with co-planar triangles during the convex hull creation. Two adjacent triangles which are seen edge-on from a candidate point can appear to have a concave edge between them due to floating point imprecision. That violates the pre-condition that the hull made so far is convex.
---JvdL---
---JvdL---
-
- Posts: 57
- Joined: Tue Mar 16, 2010 1:42 am
Re: Problems using HACD
I've added the bug report to the HACD project bug tracker on SourceForge.
---JvdL---
---JvdL---
-
- Posts: 22
- Joined: Mon May 02, 2011 3:26 pm
Re: Problems using HACD
Find attached the decomposition I have just computed by using the last HACD version. Please, could you give more details about the problem with this mesh?
Saving .\ichull_coplanar_problem.wrl
Saving .\ichull_coplanar_problem.off
invert 0
+ Mesh
# vertices 87
# triangles 166
+ Parameters
min # of clusters 2
max concavity 50
compacity weigth 0.1
volume weigth 0
# vertices per convex-hull 100
scale 1000
add extra distance points 1
add face distance points 1
produce full convex-hulls 0
max. distance to connect CCs 30
+ Normalizing Data
+ Creating Graph
nCC 1
+ Initializing Dual Graph
+ Initializing Priority Queue
+ Simplification ...
CH 0 5.277756
CH 1 18.952912
CH 2 8.783706
CH 3 0.000000
CH 4 0.000000
CH 5 4.243094
CH 6 2.291609
CH 7 0.015410
CH 8 0.000000
CH 9 0.000000
# clusters = 10 C = 18.952912
+ Denormalizing Data
+ Computing final convex-hulls
Time 1.533 s
Saving .\ichull_coplanar_problem_hacd.wrl
Saving .\ichull_coplanar_problem.wrl
Saving .\ichull_coplanar_problem.off
invert 0
+ Mesh
# vertices 87
# triangles 166
+ Parameters
min # of clusters 2
max concavity 50
compacity weigth 0.1
volume weigth 0
# vertices per convex-hull 100
scale 1000
add extra distance points 1
add face distance points 1
produce full convex-hulls 0
max. distance to connect CCs 30
+ Normalizing Data
+ Creating Graph
nCC 1
+ Initializing Dual Graph
+ Initializing Priority Queue
+ Simplification ...
CH 0 5.277756
CH 1 18.952912
CH 2 8.783706
CH 3 0.000000
CH 4 0.000000
CH 5 4.243094
CH 6 2.291609
CH 7 0.015410
CH 8 0.000000
CH 9 0.000000
# clusters = 10 C = 18.952912
+ Denormalizing Data
+ Computing final convex-hulls
Time 1.533 s
Saving .\ichull_coplanar_problem_hacd.wrl
You do not have the required permissions to view the files attached to this post.