As part of our investigation of cloth simulation parameters, we wrote a cloth simulator. We implemented the simulator described by Baraff and Witkin [6], and released the software publicly with the name Freecloth. In Section 3.1, we discuss some corrections to Baraff and Witkin's paper. Using this simulator, we investigated the influence of each of the simulator's parameters. Details of this are discussed in Section 3.2.
Bhat et al. [11] noted issues with Baraff and Witkin's air drag formulation, and suggested corrections. We did not implement these corrections to air drag in our own cloth simulator. They also observed problems with excessive damping using the first-order implicit Euler time integration scheme used by Baraff and Witkin.
We note here a few corrections of our own. In particular, Baraff and Witkin's parameters are not scale-invariant. If a mesh is subdivided while all parameters are kept constant, the shape of the cloth changes substantially, beyond what would be expected through the simple introduction of a few edges for bending.
Baraff and Witkin defined forces in terms of what they called condition functions (C), which are closely related to energy (E):
(3.1) |
We recommend modifying Baraff and Witkin's condition functions to be proportional to the square root of the triangle area, making the energies directly proportional to triangle area. The stretch condition function in Baraff and Witkin's equation (10) should be changed to use the square-root of the area,
Finally, in equation (11) of Baraff and Witkin's paper, damping forces are calculated using , which they defined as
For some cloth simulation algorithms [17], the relationship between the simulator's parameters and the mechanical behaviour of real cloth has been well-established. However, Baraff and Witkin's simulator has not been subjected to such study, and it is not intuitively obvious how the simulator's parameters affect cloth motion, or how they interact. We set out to investigate the effect of the individual parameters on cloth movement.
Bhat et al. [11] are the only authors to present plausible parameter values for Baraff and Witkin's cloth simulator. The base values used in our simulation are shown in Table 3.1. Bhat et al. used a different drag model, and did not use the MPCG algorithm or adaptive time stepping requiring a stretch limit. They did report stretch, shear and bend resistances and damping parameters that were within an order of magnitude of the parameters we used.
|
To evaluate the influence of the individual parameters, a series of simulations was performed. The setup involved the draping of a tablecloth over a circular table. The cloth was modelled as a square sheet of 66×66 square patches with a regular split into triangles. In each experiment, only a single parameter was varied, and a number of statistics were recorded, including the appearance of the cloth and the spatial distribution of stretch, shear and bend energy in the cloth. In the results that follow, spatial energy distributions are visualised by encoding the logarithm of the stretch, shear and bend energies in the red, green and blue channels of the image respectively, as shown in Figure 3.1.
The experiments were limited to a single drape configuration, and only one parameter was changed at a time. Consequently, we can draw few substantial conclusions about the general behaviour of Baraff & Witkin's cloth model; we limit this section to our observations.
The effect of changing the discretisation of the cloth surface is demonstrated in Figure 3.2. In this particular tablecloth example, it appears that 66×66 patches is a sufficiently fine discretisation for a reasonable simulation. Both the final drape and the energy profile are very similar for the 66×66 case and the much finer 132×132 example.
|
It is interesting to observe the changing energy profile in lower tessellation examples. When the surface was discretised coarsely, the cloth was very limited in its ability to bend, and was consequently forced to shear substantially. With finer discretisations, bending rose slightly and shearing dropped dramatically. The only real difference between the finest discretisations was a slight change in bending behaviour.
Clearly, the appropriate level of discretisation is highly application-dependent. A discretisation of 66×66 was sufficient for this tablecloth, but might be a poor choice for a complicated piece of clothing with finer wrinkles and many regions of high curvature.
|
Large timesteps are known to introduce numerical damping, as demonstrated here. In this experiment a fixed timestep was used, and the damping impact can be seen in the mid-swing pose of the cloth shown in Figure 3.3 and also in the energy graph. Baraff and Witkin's goal of using large timesteps will clearly also force the cloth motion to be damped.
In terms of cloth parameter recovery, this result is quite significant. It implies that cloth parameters can only be reused in other simulations operating at the same timescale--if at all. Clearly, this behaviour needs further study if cloth parameter recovery is to be practical.
When using adaptive timestepping, varying amounts of damping were introduced into the system as the timestep grew and shrank, making it difficult to compare results between different trials. To reduce the effect of this behaviour, timesteps were kept small (5 ms) in the experiments that follow.
The effect of changing the cloth's resistance to stretch, shear and bend is demonstrated in Figures 3.4-3.6.
|
Changes to the stretch resistance had little effect on the movement of the cloth. The final drape and the transient motion were essentially unaffected over a wide range of values, although the total stretch energy stored in the cloth did change. With higher stretch resistance, stretch energy reached equilibrium rapidly, and less stretch energy was stored in the cloth in the transient régime.
|
Modifying the cloth's shear resistance had a more visible effect. With low shear resistance, the cloth's final drape showed more sag, and the shearing was quite evident in the cloth texture. When shear resistance was low, more shear energy was stored in the cloth and the cloth swung freely. When the shear resistance was higher, the cloth motion appeared highly damped.
|
Changes to bend resistance obviously influenced the cloth's shape. With high bend resistance, relatively few wrinkles formed, and the bends that did form stored a large amount of bend energy.
From our observations of both real and simulated cloth, the only aspect of cloth motion that was visibly damped was bending. Both stretching and shearing behaviour seemed to be overdamped, while bending behaviour was either underdamped or overdamped, depending on the cloth material.
In the tablecloth draping experiments, the cloth either settled slowly on the table or else fell quickly onto the table and swung back and forth several times before settling to a steady state. This corresponded to overdamped and underdamped behaviour, respectively. In the energy graphs, this can generally be seen by looking for ringing behaviour in the total bend energy.
|
The impact of the stretch damping constant was fairly minimal. Subtle damping in the motion of the cloth was evident during the first second of movement, but the final drape was unaffected. As shown in Figure 3.7, the energy graph shows changes to the transient energy distribution, with obvious damping effects in the stretch energy as the damping constant rose. Curiously, with very low stretch damping (e.g., ), the simulation could not be computed.
|
The shear damping constant also had only a minor effect on the cloth's behaviour. The cloth's final drape and motion were unaffected by changes to this constant. The energy graph shows predictable underdamped and critically damped behaviour in the shear energy, but the transient behaviour was brief enough that it had no major effect on the cloth's motion. Figure 3.8 shows the cloth energy distribution near the beginning of the simulation.
|
The bend damping constant had a very visible effect on the cloth's movement. As shown in the energy graphs in Figure 3.9, the bend energy was quite different as the constant was changed, and this could also be seen in the cloth's movement, particularly at the corners. The damping was predictable and followed a typical underdamped/overdamped form, but there was also some interesting smoothing. When the bending damping constant was low, fine wrinkles formed in the cloth during the early transient motion, while damping prevented these wrinkles from forming when the bending damping constant was higher. The final drape position was the same in all cases, however.