Jump to content

wire/cloth collide


yongbin

Recommended Posts

sorry, hopbin. I can't see the 'static' and 'deforming' option.

i'll attach sample file. correct me please.

Hi,

I don't think you can solve the cloth and wire at the same time. Like what your trying to do. You need to first solve the cloth, and then import that into the wire solver as a static object. You can either solve the cloth object first, or cache out the cloth to sim files and load them in when you bake the wire simulation.

I've attached an example file.

The box is a static object used by the cloth object. The cloth_sim is solved first, because of the order of the cooking nodes. You need to be careful to ensure the nodes cook in the correct order if you're going to do it this way, otherwise, you're better off to output the cloth to files first, and then read them in for the wire_sim to cook.

When the cloth_sim cooks it does collision with the box, and outputs the geometry to the cloth object. The wire_sim then uses the output of the cloth object as a static object, with the "Use Deforming Geometry" flag turned. Which tells the sim that the static object changes on each frame. The wire object then performs collision with the static objects (including the ground), but in this example the box is excluded from the wire sim. So the only thing stopping the wire from hitting the ground is the cloth object.

I'm sure people here can post multiple methods of achieving the same results, some methods better then mine, but the basic rule is the same. That a wire solver and cloth solver don't feed back to each other. So you must provide the feedback yourself.

Now, if you want to get really fancy, and don't ask me for an example, but it's possible to create a deforming static object that represents the wire to cause collisions of the cloth with the wire. This is done by creating a new wire geometry by using points from the deforming wire on a previous frame ($F-1), which can then be used as a static object in the cloth sim when it's cooking the current frame. That cloth is then feed into the wire sim for the current frame, and it'll look like the two are colliding with each other correctly (sort of).

It would be nice, if sidefx would simply provide some basic assets with this sort of thing already setup. I guess the problem is that there are many cases were this won't work, and they don't want to provide assets that only work some of the times.

wire-to-cloth.hipnc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...