Here is a very basic workflow for creating a flag using the new nCloth in Maya8.5. 1. Create a poly plane. Scale and position it to the desired start location and set the subidivsions on the polyPlane node to the desired resolution. 2. MENU "nCloth:Create nCloth" 3. Select two corner vertices on the plane 4. MENU "nConstraint:Transform" You can now playback to see the flag drop. One can keyframe the transform on the constraint to pull the flag around. One may wish to parent this constraint to a flag pole object. One could then wave the flag by animating the transformation of the pole. 5. On the nucleus node edit the windSpeed and direction attributes to blow the flag. You may wish to have a windspeed greater than 1 depending on your object scale. It is also a good idea to lower the mass on the nCloth node so it is more responsive to the wind. (increasing the drag/lift or air density would have similar effects but mass is more logical in this instance) You should now have a flag flapping in the wind:
6. Set the relative scale for dynamics You can set the relative size of the flag (in terms of gravity and wind speed ) by adjusting the spaceScale attribute on the nucleus node. Dynamics in Maya assume that units are meters and ignore the actual Maya units setting. If you modelled the flag with the assumption that units were centimeters, for example, then set the space scale to 0.01. The primary effect of this is an increase in gravity. 7. Adjust cloth stretch resistance For a detailed mesh the default settings will likely be too stretchy. You can increase the stretch resistance to 200 or so. Note that the strength on the constraint should also be increased to avoid stretching of edges near the constraint. Also if you set the scalingRelation to "local" the various effects like stretch and bend resistance will be automatically adjusted to compensate for the mesh density, which is useful when you want to model the stretch behavior on low resolution stand-in objects. 8. MENU "Mesh:Smooth" This is optional, but very useful. With a quad mesh one gets a very good quality surface with the smoothing. This is also much more efficient than simulating on the higher resolution mesh. After the mesh smooth:
9. Changing which vertices are constrained At any point you can easily change the vertices of the flag that are constrained by simply selecting new vertices on the flag and doing: MENU "nConstraint:Replace Members". For example if you had edited the mesh resolution since creating the constraint you may need to redefine the vertices. Note that if you had done a smooth on the mesh then you should temporarily make the subdivision levels = 0 on the polySmoothFace node so that only the simulating cvs are selectable for the replace members operation. Alternately you could do MENU "Display Input Mesh" and select cvs on the input cloth mesh instead of the smoothed mesh, then do MENU "Display Current Mesh" when done. 10. MENU "Edit nCloth: Initial State: Relax initial state" This will allow your flag to be in a natural pose at the start of the simulation. Temporarily make the wind speed zero before doing this if you want it to be fully collapsed at the start. 11. MENU "Cache: Create New Cache" This will allow you to playback at full speed as well as scrub the animation. It is also generally a good idea to cache before rendering. That's all there is to it. However there are additional techniques that help for a more advanced flag animation which I will cover in a coming post.