Thursday, July 24, 2008

A tutorial on making pinned cloth in blender 2.46.

This tutorial shows how to simulate a curtain blowing in the wind using blender 2.46. I saw some conflicting advice in a forum, so I had to figure out what were the essential steps. If it's not entirely visible here, consider going to the Youtube page for that anim and watching it full screen.

Here are the steps:

1. Create a mesh that is a grid-- use a high number of vertex counts-- I used 32 for each of x and y here.
2. (Not shown) Under the mesh editing tab, Set Smooth. (I forgot to do it in this anim).
3. Go into Edit Mode (Tab), and select the row of vertices you want to serve as the "curtain rod". Here I did it with B B select, and have somewhat sloppy results. You could switch to Top View and select one column more precisely with a B select.
4. In the Mesh Editing tab, Click on New under the Vertex Groups area. Type in a name for your new Vertex Group. Here, I called it "pinned".
5. Hit the Assign button to assign your selected vertices to the new Vertex Group.
6. Unselect all the vertices by hitting A A.
7. Go to the Object Editing area, make sure you're under the particle editing button, and hit Cloth. It automatically comes up with the settings that simulate Cotton.
8. Just underneath here you'll find the button for Pinning of Cloth. Hit it and if you're lucky, the Vertex Group "pinned" will already be selected.
9. To make it interesting, I added an Empty. This will be the vehicle where we describe how the wind will act on the object.
10. The wind will be coming out of the "Z" axis on the empty. I rotated the Empty until its z was pointing at my curtain at an oblique angle.
11. Under the Empty's physics tabs, I set up a Field of Wind. I set a Strength of the Field to be a number between 1 and 10.
12. I selected the curtain again with a right click on it.
13. I hit Ctrl-B to Bake the curtain. I chose the selection of "Bake Selected."
14. You will now see the mesh react to the three (or more) forces you've placed on it: gravity, pinned vertices, and wind. It will compute a Bake for the number of frames prescribed in the "Collision" tab.
15. There you go!

This version has at least two things which make it ugly: I forgot to "Set Smooth", and the region of pinned vertices is quite sloppily chosen. For a slightly less ugly version, see my previous post on the matter.

Enjoy.


No comments: