With nCloth it is simple to give the cloth a specific thickness for simulation. However one may also wish to render the cloth showing the thickness. In general it is much preferable to simulate on a simple flat cloth object with thickness then add construction history downstream to turn the flat cloth into a thick 3d object.The following technique can be used not only to add thickness to garments, but also to create more complex 3d objects, thick rubber slabs and gumby-like characters. Lets start out creating a simple cloth plane falling on a colliding cube: 1. MENU "Create: Polygon Primitives: Cube" 2. MENU "nCloth: Create Passive" 3. MENU "Create Polygon Primitives: Plane" Position the plane above the cube 4. MENU "nCloth: Create nCloth" In the attribute editor for nClothShape1 make the thickness 0.1 and set solver display to "Collision Thickness". (The solver display is for feedback only and does not render)
When you playback the cloth should collide with correct thickness for the top of the cube. Note that the cube nRigid node also has some thickness... you can make this zero if desired, but be careful that the cloth width is never zero, as currently it can lead to bad collisions when the total collide width between two objects is zero. Note that with thick cloth the behavior is somewhat different because the self collision with thickness makes the cloth somewhat less compressible and also restricts bend angles. This is usually desirable, but you probably want to make sure that the selfCollideWidthScale is not greater than one. The "Vertex" selfCollisionFlag works the fastest for very thick cloth, although on occasion you may need to use "Full Surface" for better quality. Now lets thicken the rendering of the cloth to match the simulation thickness. 5. Select the cloth plane. 6. MENU "Polygons: Edit Mesh: Transform Component" Move the mesh down to the bottom of the thickness display (polyMoveVertex:local translateZ = -0.1)
7. Go back to object selection mode (the cloth plane should be selected) 8. MENU "Polygons: Edit Mesh: Extrude" Drag the extrusion to the top of the plane (polyExtrudeFace:localTranslateZ = 0.2) Turn on "Keep Faces Together" on the polyExtrudeFace node.
If you turn off the thickness display and run the simulation a bit it should look as follows:
You now have a rough match for the collision thickness to render, but the edges are square. A bevel or a smooth operation will round the corners if desired. For many cases this will be sufficient, but for large thicknesses one may wish to match the effect of added width along border edges. This can be done by adjusting the above workflow as if for a thinner object, then doing a smooth on the surface followed by another "Transform Component" to offset the smoothed surface: 9. Edit polyMoveVertex1: set localTranslateZ to -0.01 10. Edit polyExtrudeFace1: set localTranslateZ to 0.02 Also set the divisions to 2 for more resolution around the edge. 11. MENU "Polygons: Mesh: Smooth" 12. MENU "Polygons: Edit Mesh: Transform Component" Drag the manip away from the surface until the thickness matches (polyMoveVertex:local translateZ = 0.1)
The resulting effect is that the surface offsets outward not just along the normal but also thickens away from border edges. Note that one could have used a bevel instead of a smooth, although in general it is nice to have the smoother surface.