Home › Forum › SOFA › Using SOFA › Object Collision behaviour
- This topic has 4 replies, 4 voices, and was last updated 5 years, 11 months ago by Hugo.
-
AuthorPosts
-
12 November 2018 at 09:41 #12358AnonymousInactive
I am making two objects collide with each other (Triangle Topology Object with Triangle collision model, and a sphere collision model) , but when I do that my object which is .obj format when collided, it creates some form of spikes on the surface. Is this normal behaviour?
12 November 2018 at 10:52 #12359mbarrowBlockedHi Fayad.
I saw something similar when I had inappropriate values for ContactStiffness set, only I have to qualify this with the fact I was using only the Triangle Collision model.
Good luck!
14 November 2018 at 12:50 #1244018 November 2018 at 15:04 #12501AnonymousInactiveYes I played with the stiffness to get rid of that behaviour, here is the code to have a better idea:
<!-- Add a mechanical model : Elasticity --> <Node name="root" dt="0.01" gravity="0 0 0"> <VisualStyle displayFlags="showCollisionModels hideVisualModels" /> <DefaultAnimationLoop /> <CollisionPipeline verbose="0" draw="0"/> <BruteForceDetection name="N2"/> <NewProximityIntersection name="Proximity" alarmDistance="0.005" contactDistance="0.0025"/> <CollisionResponse name="Response" response="default"/> <MeshObjLoader name="meshLoader" filename="/Users/fayad/Documents/hamad-work/sofa-work/Models/OBJ/LP/Prostate_02.obj" /> <Node name="Prostate"> <EulerImplicitSolver /> <CGLinearSolver iterations="200" tolerance="1e-06" threshold="1e-06"/> <TriangleSetTopologyContainer name="topo" src="@../meshLoader" /> <TriangleSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <MechanicalObject template="Vec3d" name="myProstate" position="0 0 0" showObject="1"/> <TriangleFEMForceField name="FEM" youngModulus="1000" poissonRatio="0.4" method="large" /> <UniformMass totalmass="0" /> <ConstantForceField force="0 0 0" /> <Node name="Visu" > <OglModel name="VisualModel" fileMesh="/Users/fayad/Documents/hamad-work/sofa-work/Models/OBJ/LP/Prostate_02.obj" texturename="/Users/fayad/Documents/hamad-work/sofa-work/virtualLabco/prostate.png"/> <BarycentricMapping name="VMapping" input="@../myProstate" output="@VisualModel" /> </Node> <Node name="TriangularSurface"> <TriangleSetTopologyContainer src="@../topo" name="Container" /> <TriangleSetTopologyModifier name="Modifier" /> <Triangle name="CollisionModel" contactStiffness="1"/> </Node> </Node> <Node name="Sphere"> <EulerImplicitSolver rayleighStiffness="0"/> <CGLinearSolver iterations="200" tolerance="1e-06" threshold="1e-06"/> <MechanicalObject template="Rigid" name="myParticle" position="2 10 0 0 0 0 0" showObject="1" showObjectScale="0.5" /> <UniformMass totalmass="20" /> <ConstantForceField force="0 -1 0 0 1 0" /> <Sphere name="Floor" listRadius="1" simulated="1" moving="1" contactStiffness="3" /> </Node> </Node>
23 November 2018 at 20:24 #12530HugoKeymasterHi @fayad
I tested your scene with the “liver.obj” mesh from SOFA, since you did not share your Prostate mesh. It is actually working.
So, as @mjbarrow suggested, it should be due to an issue of numerical settings / parameters. Have you tested the contactStiffness? the time step might also be decreased ?
Best
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.