1
$\begingroup$

Using Blender 2.82a, I'm simulating items on top of cloth (which itself is on top of a larger plane) and then using the cloth to drag the items. I have a method that works reasonably well, but I'm wondering if anyone has advice on improving it or extending it to rigid objects. Here's the setup at a high level:

  • Create a flat plane at the bottom, with collision modifier enabled.
  • Create a new plane, sub-divide it, add the cloth and collision modifiers. Increase the number of quality steps.
  • Create three cubes so that they fall on top of the cloth. The cubes also have the cloth and collision modifiers. Increase the number of quality steps.
  • Following this tutorial, attach two armatures (and join them), and make them the parents of the cloth. Have the armatures move, so that two pinned points of the cloth move with the armatures.

Right now, the main hyperparameter that I have tuned which shows successful results is the Collision -> Softbody And Cloth -> Friction value:

enter image description here

This is for the cloth, not the cubes.

By default, the value is 5.0. Above, I changed it to 50.0. You can see the progression from the three GIFs with friction of 5.0, 15.0, and 50.0, respectively:

enter image description here

enter image description here

enter image description here

Here is the .blend for the above gif that uses friction = 50.0.

This setup seems to be working reasonably well. Now, I am wondering if it's possible to have rigid objects on the cloth. (The cubes have the cloth modifier.) If I make the following changes:

  • Make the middle block an active rigid body of type box, and remove the cloth and collision modifiers. Note: I also tried keeping cloth only, keeping collision only, and keeping both cloth and collision modifiers, none of which produced better physics.
  • Make the plane a passive rigid body modifier of type mesh, in addition to its collision modifier.

I get this:

enter image description here

Ah, but unfortunately now that the middle block is rigid, it no longer interacts with the cloth. This is definitely hard to simulate with physics. Does Blender have a solution for this? Here is the .blend for the above gif.

A second question I have would be hyperparameter tuning. While I think tuning just this single friction hyperparameter work reasonably well, are there any others I should be aware of for testing purposes to produce realistic movements? The cubes, for example, are cloth and have their own friction hyperparameters, which might also need tuning, etc.

So, to summarize: (a) rigid objects on top of fabric, and (b) which hyperparameters to further tune? Thanks everyone.

$\endgroup$
7
  • $\begingroup$ I take it that you're not trying to fake this for video, rather have it all done with physics & soft cloth. If it is purely for a video, this is quite possible and would require two distinct processes, one for the cloth to fall onto say a table, plus the blocks falling and coming to rest. The 2nd where the cloth is pulled along the table's surface to bring the blocks with them. Both would be rendered to be joined up seamlessly in the VSE. $\endgroup$
    – Edgel3D
    May 10, 2020 at 6:09
  • $\begingroup$ To clarify, yes, I am not trying to fake it. Ideally it would be done with physics and cloth from Blender. Your suggestion about the video would be for when I would fake it, I believe? $\endgroup$ May 10, 2020 at 14:42
  • $\begingroup$ Yes I did it for video - took me 11 hours all up lol! The 2nd attempt worked. Video up on Dropbox. Blend file(s) yours if your wish. Links - dropbox.com/s/jxwmujrvk1bdtia/Cubes3.gif?dl=0 $\endgroup$
    – Edgel3D
    May 10, 2020 at 23:43
  • $\begingroup$ Whoa! That is nice. I was trying to do something like this because I'm implementing simulated robotics-style environments in Blender, where robots can grasp and pull cloth. Now that I think about it, the second part of your video (blocks and cloth pulling part) is basically all I need. The cloth can be assumed to start on the table. I'm curious if you have the blender file? Also feel free to write it up as an answer so I can upvote. :) $\endgroup$ May 11, 2020 at 0:25
  • $\begingroup$ I'll get the Blend files up here. Will have to be an answer. No way I can add them to a comment. I've written some notes up for myself so they'll need to be spuced up a bit. Watch this space... $\endgroup$
    – Edgel3D
    May 11, 2020 at 5:23

1 Answer 1

2
$\begingroup$

Much like rigid body physics, the cloth modifier in vers,2.77a at least, won't allow the cloth to be animated or shapekeyed whilst the physics cache is active.

The cache's frame range can be set however (physics properties) so we turn that off at frame 140 when the cloth has settled down.

Whilst the cloth physics is still active, two 'cloth shapers' are underneath the table that physically 'lift' the cloth ends. The cylinder moves to the right between frames 91 & 98, the other end's triangular cube, from frame 98 to 105.

Both lifters are given Collision Physics. They don't interfere with other collision objects such as the table and are invisible when rendered. (eye & camera icons in the Outliner)

In order to animate the cloth, we'd need to "Apply" the cloth modifier at frame 140 when it's settled down and therefore 'freeze' it in it's current shape, allowing keyframed animation.

In this example we don't need to animate the cloth at all. Instead we duplicate the table and get rid of the copy's inherited physics so it's just scenery.

The original table is made invisible in the Outliner and remains stationary to support the cloth.

At the frames where the cloth is supposed to be pulled to the right, we instead move the duplicate table to the left with the camera parented to it so the cloth appears to be pulled to the right.

As the falling cubes physics are baked we can add keyframes to simulate their inertia. All three are parented to an empty so they can be moved as one.

Should there be other objects and scenery behind, simply render the tables, cloth etc. out with a transparent background and render that as one clip. Render the background objects as another and mix them in the VSE.

$\endgroup$
12
  • $\begingroup$ Hi! I saw you comment on another question I had about trying to make cloth physics work with armatures. I will try and study your solution in detail to see if it's possible to maintain cloth modifiers in each single .blend file, and then combine them later programmatically. $\endgroup$ Jun 12, 2020 at 11:57
  • $\begingroup$ Hi again CS. This is a bit of a mouthful, so here goes - I went back to the project I made for your last question and found the 2nd Blend file wasn't as helpful as it could have been. The cloth had already been converted to mesh and shapekeyed, so the straightening process had already been performed. I'll have to redo that and add yet a third Bendfile, pre-cloth straightening. The cylinder and hinged plane used to do this will then be demonstrated with the cloth physics still active. $\endgroup$
    – Edgel3D
    Jun 13, 2020 at 20:20
  • $\begingroup$ Cont... As for mixing cloth physics with other processes such as deforming it's mesh further, I usually stick to the cloth physics and shape a rigid body object to suit the deformation I'm after, then push it against the cloth. This keeps the cloth reacting like cloth and once so deformed, I save the file to come back to - re-save it again as a different file. $\endgroup$
    – Edgel3D
    Jun 13, 2020 at 20:21
  • $\begingroup$ Cont... It's this 2nd file where the cloth physics are "Applied as Shapekeys" in order to convert the cloth to shapekeyed mesh and clear it of modifiers, constraints etc. i.e. the physics are dispensed with altogether but it's still changing shape and hopefully, maintaining cloth characteristics. Once the cloth is clear of modifiers etc, it can be animated before, after or during shape-shifting. If necessary this mesh can be further 'frozen' at a particular state and pose and carried forward to yet another Blend file where further magic can be applied. $\endgroup$
    – Edgel3D
    Jun 13, 2020 at 20:24
  • $\begingroup$ Cont... The process whilst sounding cumbersome, keeps things modularized and entanglement free. $\endgroup$
    – Edgel3D
    Jun 13, 2020 at 20:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .