Cloth + Wires + RBD + Constraints == Irk!

   8139   9   2
User Avatar
Member
4262 posts
Joined: July 2005
Offline
I've been trying to get better with DOPs by setting up some odd examples and I've kinda hit a wall. My problem is one of two things, I either don't understand the new constraint digital assets at all, or they aren't as flexible as I would like.

Setup:

I have a Cloth Object, Wire Object and 48 spheres from a Point RBD Object


————- <- Cloth pinned at 4 corners
| | | | | | <- Wires hanging from cloth
O O O O O O <- Spheres hanging from wires

I couldn't get the default contraint assets to do what I wanted to I just used the ApplyRelationships DOP and my own anchors. It seems to kinda work but I've got a few questions.

/obj/geo1/dopnet1

1- Wiring the Ground Plane to the left input of merge1 causes the spheres to go crazy during the sim.
2- Frame 18 has a piece of random geo show up. It appears to be from the cloth object but not really.
3- The constraints to pin the wires to the cloth aren't mutual affectors although I think they should be. When they are mutual affectors the cloth doesn't fall at the pinned points.
4- The isn't any support for Wire/Cloth collisions, correct?
5- Is there a better way to setup the contraints in this example?

Thanks! Learning via abuse.

Attachments:
unified.hip (196.8 KB)
out.mpg.gz (802.7 KB)

if(coffees<2,round(float),float)
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
I've had an insanely difficult time being a former reactor user to do my favorite, rigid-body handing from wires simulations.

Did you ever do a single ball hanging from a single wire? I'm having a hard time sorting through your example with so much stuff going on.
User Avatar
Member
1145 posts
Joined: July 2005
Offline
Here ya go Andrew,

It's simplicity itself. Bring in a default sphere, turn it into an RBD object.
Then call in a Pin Constraint, choose the ball, hit enter twice. You'll see a transform handle which is for the root of the constraint. Lift that up. Then select the sphere and move it over so it swings.
You hit enter twice for the pin constraint, once to accept the sphere and the second time to place the root of the constraint at 0,0,0

Attachments:
simple_constraint.hip (71.8 KB)

“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
Thanks for the example, this is half-way there.

Without trying a few things on my own … how could this be applied to the sphere hanging from wire objects?

This is where I've struggled, I too am a bit perplexed by the constraint workflow, as to what is effecting what especially with soft bodies (cloth, wires, etc)

I prefer not to use the shelf since it really doesn't get me any closer to understanding the flow of data but if that's the best way to do it I'm all for it.
User Avatar
Staff
4441 posts
Joined: July 2005
Offline
The root of the problem here is that the cloth, wires, and spheres are each solved by different solvers. They are solved one after the other. First the cloth, then the wires, then the spheres. DOPs allows you to make objects with different solvers into “mutual affectors”, but this mutually affecting relationship only works for collisions. It doesn't work for constraints.

This is why you can't make the cloth/wire constraints into “mirror” constraints. There is no “constraint feedback” mechanism through which the solvers can communicate. So the cloth solver solves first, and sees these constraints to the wire object. These are hard constraints, never to be broken, so the cloth doesn't move those points constrained to the wires. Then the wires solve, and see these hard constraints to the (now immovable) cloth, so the wire solver doesn't move these points. And so the constrained points sit perfectly still forever. This answers question 3.

Question 1 has a similar answer. The wires look soft and bendy, but to the RBD Solver, they are infinitely massiv and immovable, just like the ground plane. So when you have a hard constraint to a wire which is pushing the sphere into the infinitely massive ground plane, the spheres have nowhere to go, and they get a little wonky. They move around in any way they can to simultaneously satisfy the constraint to the wire and the implicit constraint that they never penetrate the ground plane.

The geometry that appears on frame 18 is the guide geometry for the volume representation of the cloth object. Why is anyone generating a volume representation of the cloth object? Because the merge1 node is creating a collision relationship between the cloth object and the spheres. There really isn't any need for this collision detection, and you'll notice the simulation runs much much faster (with identical results and no cloth volume representation) if you change the merge1 node to “No Change” on the Affector Relationship.

Question 4: I believe this is correct, but I'll direct an expert to this post to correct me if I'm wrong.

And for 5, it looks to me like you've done this the right way. I was actually a bit surprised that I was not able to replace the constraint1, constraint2, and all the input nodes with a couple of SBD Pin Constraint assets. But those assets contain an Apply Relationship node inside of themselves (to let you create many constraints with a single node). I have submitted an RFE to create simple, single-constraint versions of the SBD constraint assets that are more similar to the RBD Constraint assets (which can be fed into an Apply Relationship node to procedurally create multiple constraints without having to use the raw anchor nodes).

Mark
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
wow this answers a lot … I hope the expert can post a “this is the best way to hang stuff from wires” file
User Avatar
Member
107 posts
Joined: June 2006
Offline
Yes! Please!
Live life in chunks.
User Avatar
Member
4262 posts
Joined: July 2005
Offline
mtucker
The root of the problem here is that the cloth, wires, and spheres are each solved by different solvers. They are solved one after the other.

Thanks a ton Mark! While situations like the above rarely occur in production, (and if they do they can be faked), its always nice to have a good understanding of the system under the hood. Thanks again for the detailed explanation.

After all this I think the ApplyRel DOP wins the prize for the most complex OP.
if(coffees<2,round(float),float)
User Avatar
Staff
4441 posts
Joined: July 2005
Offline
andrewlowell
wow this answers a lot … I hope the expert can post a “this is the best way to hang stuff from wires” file

Because constraints between different solver types don't really work, the best solution for “hanging stuff from a wire” is to create a chain of constrained RBD objects to be the wire. No other approach is going to really work right under all circumstances.

Mark
User Avatar
Staff
329 posts
Joined: July 2005
Offline
Wolfwood
4- The isn't any support for Wire/Cloth collisions, correct?

That is correct. Wire/cloth collisions are not supported yet.
  • Quick Links