1
$\begingroup$

Here is the blend file: https://drive.google.com/file/d/1EvQ3yYtWmFcM7evke1OW3uL0aInsn0rM/view?usp=sharing

I have tried everything, everything to stop my cloth sim wire from clipping through this cupboard and all of my other collision objects:enter image description here

Here is a video of the animation as well: https://www.reddit.com/r/blenderhelp/comments/rpjik7/cant_seem_to_fix_the_collisions_the_cubboard_has/hq4omdy/?context=3

I made the wire starting with a single vert and drew out the line with extrude in edit mode, then applied the hooks, pins and cloth simulation. Everything about this works the way I want it to except for the collisions of the wire.

Here is everything I have tried:

  • Maxing out the distance on cloth object collisions
  • upped the collisions quality
  • Maxed out the thickness outer slider on all of my collision objects
  • cleared the cache several times/baked and re-baked several times
  • Put all of my collision objects in a collection and set that as the collision collection in the cloth sim settings for the heck of it
  • prayer

Absolutely nothing seems to change when it comes to the wire clipping through any collision objects. The TV, floor and cupboard all have collision applied and it seems to completely ignore them all together.

Any help would be greatly appreciated! I have been working on this for a week straight and cant make any progress on this.

$\endgroup$
3
  • $\begingroup$ at first you should fix your face orientation: red means "normally": wrong, so the floor is wrong for sure....[1]: i.stack.imgur.com/xDxde.png $\endgroup$
    – Chris
    Dec 27, 2021 at 10:34
  • $\begingroup$ Thanks Chris. I tried that and fixed the normals on everything I could in the scene. It didnt make any difference. $\endgroup$
    – Zack Alves
    Dec 27, 2021 at 18:51
  • $\begingroup$ I wonder how does the rigid body physics work? The controller is an active rigid body. But the floor is not a passive rigid body. The Collision modifier only works for cloth and soft-body objects. So I've fixed the cloth collision and now the controller object falls through the floor. When I make the floor a passive RB then it works. But why it works in your file? $\endgroup$
    – Blunder
    Dec 28, 2021 at 14:52

1 Answer 1

3
$\begingroup$

The main reason why the collision doesn't work is that the cable is just a few connected vertices (edges) without any faces.

example animation

You're using the Skin modifier to give the cable some thickness. That's a good idea but the Skin modifier is below the Cloth modifier on the stack (top-down-wise). This leaves the Cloth simulation still the few vertices and no mesh for collision detection. The Skin modifier must be before (on top of) the Cloth modifier. But this doesn't work either because the Cloth modifier will make the skinned cable collapse, and when the rigid body physic kicks in then the cable "explodes".

Your physic settings are completely off. In the Collision settings of several objects you have set the Thickness Outer and Damping values to 1! (I guess you had been desperate). It's better to use a small value for the first, something like 0.05for objects that have a real-world size, and leave Damping at the default value (0.100).

Also in the Cloth setting you have set the Object Collisions > Distance to 1 meter! This freezes Blender completely! Go with the default settings and just lower the Distance value to 0.01 m. The same distance you can use for Self Collisions. But it was not needed in the animation above.

Furthermore, you have some other issues, that prevent proper collision detection.

What Chris already in the comment mentioned is that the face orientation of the walls and floor is wrong. This does not work because by default the Single Sided option in the Collision settings is enabled. This makes the collision detection only work for the outside of the object (which is the inside because of the flipped normals).

Last but not least, if you run physic simulations apply the Scale to all objects so the objects have their Scale set to 1.000 (Ctrl+A in Object mode). You can check this in the N-panel in the Transform tab. Don't forget the Empty. Since you're using cloth and rigid body simulations it's a good idea to apply also the Rotation for the objects that are involved in the simulation. Applying the Location depends. Sometimes you need to apply it (=reset to 0,0,0) but sometimes you need to set it to the center of the geometry. Later is needed for the floor for example.

Checklist To Get The Animation Running

  • in the first step, fix the issues (normals, scale, collision settings)
  • remove the Skin modifier, extrude the cable so that it is a small stripe of faces.
  • add the vertices of both ends of the cable to the Pin group.
  • use the Vertex Hook for the first 4 vertices to hook them to the Empty. Make sure these 4 vertices are in the Pin group and only those are hooked
  • don't scale the Empty of the hook. It affects the mesh when it is used as a hook. Better change the visual appearance in the Object Data Properties > Size
  • use Vertex Parent (Ctrl+P in Edit mode) to parent the Empty to a vertex of the game controller object
  • add a Collision modifier to the game controller object and change Physics Properties > Collision > Thickness Outer to 0.010 and ... > Inner to 0.050, and uncheck 'Single Sided' to "tame" the cable near the controller.
  • make the floor a Passive Rigid Body (menu Object > Rigid Body > Add Passive). This way the game controller doesn't fall through. The Collision modifier is for the Cloth, Particle & Soft Body only. (For the TV and the board, there are 2 low-poly "... Hit Box" objects that are passive rigid bodies.)
  • set the origin of the floor to the geometry to make the collision work properly (menu: Object > Set Geometry > Origin To Geometry)
  • remove the Cloth modifier from the cable and add a fresh one to get the default values. Set the Shape > Pin Group, and set Object Collisions > Distance to 0.01 m.
  • remove the Collision modifier from the cable connector at the game cube. The cable is pinned here anyways, and it sticks a little into the connector. The collision detection will go crazy here.
  • to give the cable thickness you can use the Solidify modifier and Subdivision Surface modifier. Make sure they are after/below the Cloth modifier.
  • by default, the Solidify modifier is enabled in Edit mode and the model looks like in the Object mode. Don't let Blender fool you. In Edit mode, the cloth simulation doesn't run! Make sure you're in Object mode when you run it.
$\endgroup$
1
  • $\begingroup$ Thank you Blunder! I really needed this, it explains a ton. Thank you so much. $\endgroup$
    – Zack Alves
    Dec 28, 2021 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.