Home › Forum › SOFA › Using SOFA › [SOLVED] Mapping between rigid and deformable objects
Tagged: 64_bits, Linux_ubuntu, SOFA_1608
- This topic has 6 replies, 3 voices, and was last updated 7 years, 3 months ago by
Noura.
-
AuthorPosts
-
7 June 2017 at 03:36 #9285
Noura
BlockedHi all,
I have two objects A(rigid) and B(deformable) with different geometries.
When A moves, B should move according to A (passive movement).– I tried
RigidRigidMapping
between the 2 centres of mass. The behaviour was fine when both objects were rigid, and I don’t think that it would be the good mapping schema when B is deformable.– I tried to place multiple rigid frames inside B, and used a
BarycentricMapping
between A and B but the result was not good at all.– I had a look at
DeformableOnRigidFrameMapping
scene in examples/Components/mapping as well but I’m not sure that it is really related.Any suggestions for a mapping scheme please?
Thanks,
Noura
7 June 2017 at 04:22 #9286Hugo
KeymasterHey Noura,
Then the appropriate mapping should be the
RigidMapping
.
Let me know if it does the job,Hugo
10 June 2017 at 05:18 #9309Noura
BlockedHey Hugo,
Thanks for the hint! Indeed, your suggestion worked fine.
A mapping between object B(deformable) and the centre of mass of object A (rigid) allowed “B” to follow “A” which follows its centre of mass in turn.
<RigidMapping template="Rigid,Vec3d" name="RM_AB" input="@objetA_centre_mass/MO_A" output="@objetB/MO_B" />
However, I realized that this mapping won’t be sufficient for the succeeding step
where the collision with “A” should be detected … The later entails the entire mechanical state vectors with their corresponding topology not only the centre of mass.The idea was to reduce the computation cost by just moving one particle of “A” instead of the complete positions. Now I think I have to refine the mesh.
Please don’t hesitate to correct me if I’m wrong.
Noura
10 June 2017 at 12:07 #9311Hugo
KeymasterHi Noura,
Good for the first step.
I’m sorry I don’t really follow what simulation you want to achieve (two mapped objects that collide sounds strange to me).Could you explain us more in details ? maybe some illustration would help.
Cheers,
Hugo
10 June 2017 at 15:52 #9313Noura
BlockedHi Hugo,
object A is a bone and B is a muscle attached to it. The motion of B is derived by the motion of A (this is why I established mapping between them).
At the same time, the muscle should not penetrate the bone when they collide.
I’ll mark this topic as resolved, and start a separate thread concerning the collision when needed.
Thanks,
Noura
11 June 2017 at 10:41 #9315max
BlockedHi all,
The problem with
RigidMapping
is that the displacement field will be rigid: your deformable object will no-longer be able to deform once its DOFs are mapped rigidly from a rigid frame.There might be a workaround in the scene you mentioned
DeformableOnRigidFrameMapping
, but I suspect there will be numerical issues since the DOFs become redundant: you can translate the rigid frame and your points (in the local rigid frame) in opposite directions and get no motion in the world frame. Maybe the mapping in the example deals with this issue, I don’t know.But more generally, what you really need is to attach both ends of your muscles to the bone. For that you need to
RigidMap
attach points from the rigid body, then place a stiff spring or a constraint between the attach point and some point on your muscle.HTH,
11 June 2017 at 13:33 #9317Noura
BlockedThanks Max for this explanation! Yes it helps.
– I see,
RigidMapping
even works, but it won’t maintain “realistic” deformations.– In the scene example
DeformableOnRigidFrameMapping
, the false displacement is suppressed by an opposite one.– Your suggestion regarding the implementation helps, maybe no mapping is needed at all, and just appropriate attachment can perform well.
I’ll keep you updated.
Noura
-
AuthorPosts
- You must be logged in to reply to this topic.