Home › Forum › SOFA › Using SOFA › How to exclude certain mesh elements from the collision test?
Tagged: 64_bits, collision detection, Linux_ubuntu, SOFA_1806
- This topic has 2 replies, 2 voices, and was last updated 6 years, 1 month ago by Noura.
-
AuthorPosts
-
30 October 2018 at 10:24 #12302NouraBlocked
Hello,
I’m wondering if there is a way to exclude certain elements (nodes, edges, faces, etc.) in a mesh object from collision tests without deactivating the collision on the entire object?
Or should this be managed once the collision is detected, by inducing a certain response for example? Any hint?Thanks,
Noura
30 October 2018 at 11:07 #12308Ant0ninBlockedHello Noura,
I’m wondering if there is a way to exclude certain elements (nodes, edges, faces, etc.) in a mesh object from collision tests without deactivating the collision on the entire object?
If the elements you want to exclude from your collision models are always the same all along the simulation, a quick solution I see could be to split your mesh in 2 parts: one part which contains the elements you want to disable, and the other part the elements you want to keep active during collision detection. So, the latter will be the mesh you use as your collision model.
Otherwise, if the subset of elements you want to exclude from collision is dynamic, you may have to have your own collision detection component. I recommand you to have a look in the method doCollisionDetection from the class DefaultPipeline (which represents the default collision pipeline actually). You’ll probably have to change something about the narrow phase of the collision detection.
Or should this be managed once the collision is detected, by inducing a certain response for example? Any hint?
Indeed, you could also have your own collision response in order to have anti-interpenetration constraints only on the contact pairs (contact points) which are located on a particular subset of elements inside your collision model. But it does not seem appropriate for your needs. I think it is better and easier to change the behavior of the collision detection (narrow phase) in your case.
Hope it helps,
Antonin.
30 October 2018 at 11:37 #12310NouraBlockedHello Antonin,
Thanks for the clear detailed reply. Yes, it helps!
For the moment, the collision models are static along the simulation, and splitting the mesh into 2 parts sounds a good approach.
The hint concerning “doCollisionDetection” method is also handy, I may need to implement a specific collision pipeline with an adapted narrow phase detection in the future.
Concerning the response, I agree that it is not the appropriate solution because it may introduce numerical instability when applying penalty after the detection.
Best,
Noura
-
AuthorPosts
- You must be logged in to reply to this topic.