Erwin Coumans wrote:
Could you give more details about what exactly not works in 'almost works' ?
Sorry for my poor wording... I will try to explain the problem.
When I run the MovingConcaveDemo, I found that if I shoot the
concave mesh several times within a short time (push "." key quickly ),
then the meshes will be pulled together. The added constraints are
quite strong and I can not even separate the individual object by mouse
dragging.
Here is the steps for a quick test:
1. Compile the MovingConcaveDemo.exe
2. Quick press the "." key to shoot the meshes
(say, 3 times within one second)
3. The three objects will be pulled/glued together, and work like they are
just one object.
In my customized demo, I saw the same behavior.
BTW, if I shoot the mesh using normal speed. the problem disappears.
Also I do not see any problem when I shoot non-concave meshes
like boxes (by mouse right click).
I am just wondering that maybe this is caused by discrete collision
detection, possible contact points were lost if the speed is an issue?
Or, do we have warm-up or object creation/management problems here?
Erwin Coumans wrote:
The optimal size is an interesting topic. I would definitely include the contact manifolds with the deepest penetration. Adding more manifolds will introduce a trade-off between performance versus quality, so its size can become a tuning parameter.
Which is quite true in my mind.
The problem is, I am not sure GIMPACT's
Code: Select all
//! Merges duplicate contacts with minimum depth criterion
void gim_merge_contacts(GDYNAMIC_ARRAY * source_contacts,
GDYNAMIC_ARRAY * dest_contacts);
//! Merges to an unique contact
void gim_merge_contacts_unique(GDYNAMIC_ARRAY * source_contacts,
GDYNAMIC_ARRAY * dest_contacts);
can do the reduction/optimization as you mentioned before.
My guess is not, since the low level CD library can not get enough
information to implement such kind of optimization.
Indeed here finding the trade-off is quite difficult in my mind.
BTW, is there any docs/papers for GIMPACT's interals?
Does the unmodified MovingConcaveDemo using GIMPACT have the same issue?
Yes. I just checked out the newest SVN trunk rev, the problem is still
there.
I post the steps above, which will generate the abnormal behavior.
If you have time please have a look at it.
In my simulation the concave information plays an important role.
For an example, suppose a ball is rolling on a continuous hill-plane, the
trajectory will be different if the hill-plane mesh info changes.
I'm not sure what this means, can you please explain more about this?
Thanks!
Erwin[/quote]
Well, maybe my understanding of convex decomposition is wrong...
But as I said in my previous post, my collision shapes are all triangle
meshes. In my simulator there is no assumption about the mesh shape.
Even the ground plane is modelled as Hill-Plane, which is constructed by
lots of triangles.
In my mind, the convex decomposition will try to keep the important
structural features and less important one will be discarded. Is this true?
Since I can not make any assumption about the convexity about my
object mesh model, then I can not assure that the new generated
convex shapes will give me the desired results.
In short, my problem is, I want to use the concave shape information to
get the accurate result and I am worrying about the convex decomposition
generated meshes can not provide me good enough approximation.
Actually I am not a game engine builder. what I am now doing is trying to
build my robotics simulator. Speed will be definitely a big plus but the
accuracy is the most important thing.
Please do correct me if I am wrong and I do appreciate your opinion
on how to build the *accurate* dynamics simulator.
Thank you for your time.