obj = scene.add_entity(
gs.morphs.Mesh(
file=str(glb_file.absolute()),
parse_glb_with_zup=True,
fixed=fixed,
decompose_object_error_threshold=0.001,
coacd_options=gs.options.CoacdOptions(
threshold = 0.03,
max_convex_hull = -1,
preprocess_mode = "auto",
preprocess_resolution = 30,
resolution = 2000,
mcts_nodes = 20,
mcts_iterations = 100,
mcts_max_depth = 3,
pca = True,
merge = True,
decimate = False,
max_ch_vertex = 256,
extrude = True,
extrude_margin = 0.03,
apx_mode = "ch",
seed = 0,
)
),
material=gs.materials.Rigid(
rho=rho,
)
)
Bug Description
When calling add_entity with pca=True in CoACDOptions, the underlying coacd actually applies a transformation to the mesh without transforming back, causing the collision body misaligned with the actual mesh
Steps to Reproduce
Run the following code snippet on my scenes with pca=True, and you will find that the stable scenes become unstable and collapse with weird collision performance. Sry I cannot provide the scene files as github does not support .glb file uploading
Expected Behavior
I believe that the problem has already been raised by SarahWeiii/CoACD#100, although I haven't checked it myself. Until further updates by the CoACD official repo, maybe an assertion that pca=False when processing CoacdOptions is appropriate.
Screenshots/Videos
with pca=False, my scene is stable:
otherwise, it collapses:
I have been able to locate the problem to coacd's implementation. As you can see, the collision body does not align with the original mesh with pca=True.
Relevant log output
Environment
Release version or Commit ID
0.4.6
Additional Context
No response