Shape friction: shape preservation of simulated objects in computer animation

A method for simulating objects includes receiving a target shape associated with a simulated object. A difference is determined between the target shape and a measured shape associated with the simulated object. One or more forces are generated to act on the simulated object to reduce the difference between the target shape and the measured shape. The target shape may be updated when the difference between the target shape and the measured shape exceeds a predetermined tolerance. Updating the target shape may include reducing the target shape to move the target shape closer to the measured shape.

This application is related to U.S. patent application Ser. No. 11/758,969, filed Jun. 6, 2007 and entitled “Methods and Apparatus for Auto-scaling Simulated Objects”, and U.S. patent application Ser. No. 11/758,989, filed Jun. 6, 2007 entitled “Velocity Drag: Shape Preservation of Simulated Objects in Computer Animation”, the entire disclosures of which are herein incorporated by referenced for all purposes.

BACKGROUND OF THE INVENTION

The present invention relates to computer animation. More specifically, the present invention relates to methods and apparatus for preserving the shape of simulated objects using techniques for shape friction.

In computer graphics imagery, motions and positions of secondary objects, such as hair, clothing, and plants are usually too complex for a human animator to directly control at every stage of a computer animation. Instead, the human animator specifies the physics and/or physical properties of the secondary or simulated objects. A computer program then employs physically-based numerical methods and techniques to simulate the motions and positions of the secondary objects over time based on the physics or physical properties of the individual secondary objects.

For simulated clothing objects, for example, the animator specifies the physical properties and construction of the cloth. For example, the animator specifies how the cloth bends due to forces or collisions with solid objects. The animator further specifies how the cloth deforms or collides with itself. Moreover, the animator specifies external forces that act on the cloth, such as gravity and wind.

In addition to modeling the physical properties of the simulated objects, the animator specifies motions and positions of kinematic or non-simulated objects (e.g., characters upon which the clothing objects rest). The animation of a non-simulated object generally is independent of and otherwise unaffected by motions and positions of simulated objects. However, the motions and positions of the non-simulated objects often are the principal influencer of motions and positions of simulated objects, as clothing and hair are likely to be associated with a kinematic character.

Consider a computer animation of a human character standing upright, wearing a jacket. The human character is a kinematic or non-simulated object that is directly animated by the skilled human animator. The animator specifies the physics (e.g., the physical properties) of the jacket which is a simulated object. In addition, the animator models how the jacket is associated with and worn by the human character. During simulation, the computer program simulates the motions and positions of the jacket using physically-based numerical techniques in response to external forces and the motions and positions of the human character.

If the physical properties and external forces acting on a simulated object are accurately modeled, the resulting motion of the simulated object will be plausible and seemingly realistic. In our jacket example, the cloth of the jacket should hang down and fold naturally. Furthermore, the cloth should react according to the motions and positions of the human character when the human character wears the jacket. However, modeling the simulated objects to be truly accurate is a delicate balance between the limitations and complexities of the animator's knowledge of physics and particle systems on the one hand and budgetary and time constraints on the other.

In addition, other problems exists with physically-based numerical methods and techniques used in computer animations. A particularly difficult problem in the simulation of secondary or simulated objects, such as cloth, is dealing with creeping or oozing behaviors. A creeping or oozing behavior occurs when motion of a simulated object associated with a non-simulated object continues in a visually unpleasing manner after a change in motion of the non-simulated object.

In the real world, most garments such as shirts, jackets, or pants undergo no significant movement or change in shape when their wearers cease moving. Internal forces in clothes, and friction between the clothes and their wearer, generally lock the clothes into a fixed position when the wearer's motion ceases. Typically, the clothes stops moving far less than a second after the wearer does. Although some garments, such as long dresses or ties, typically swing back and forth for some period of time, this desired and realistic motion is different from undesirable creeping or oozing behaviors that result during simulation using physically-based numerical methods and techniques.

Creating simulation programs for simulated objects, such as cloth, that can achieve the same effect after the wearer ceases moving has been difficult. One solution is to instruct the computer program during the simulation of our jacket example to freeze the cloth of the jacket in place whenever the human character ceases moving. The cloth then would be allowed to move again, when the human character begins to move. A problem with this solution is that our human character rarely remains exactly motionless. Typically, even when an animated character ceases movement, some small amount of “keep-alive” motion is applied. For example, the animator may rotate limbs of the character a few degrees or have the character sway back and forth just a little. It is during keep-alive motion, that the creeping or oozing of simulated objects is most apparent.

Accordingly, what is desired are improved methods and apparatus for solving the problems discussed above, while reducing the drawbacks discussed above.

BRIEF SUMMARY OF THE INVENTION

The present invention relates to computer animation. More specifically, the present invention relates to methods and apparatus for preserving the shape of simulated objects using techniques for shape friction.

In various embodiments, a method for simulating objects includes receiving a target shape associated with a simulated object. A difference is determined between the target shape and a measured shape associated with the simulated object. One or more forces are generated to act on the simulated object to reduce the difference between the target shape and the measured shape.

In some embodiments, the target shape is updated when the difference between the target shape and the measured shape exceeds a predetermined tolerance. Updating the target shape may include reducing the target shape to move the target shape closer to the measured shape. Receiving the target shape associated with the simulated object may include receiving a target distance between a first particle associated with the simulated object and a second particle associated with the simulated object.

Distance may be measured between a first particle associated with the simulated object and a second particle associated with the simulated object to determine the measured shape associated with the simulated object. Determining the difference between the target shape and the measured shape associated with the simulated object may include determining a difference between a target distance and a measured distance. Determining the difference between the target shape and the measured shape associated with the simulated object may include determining a difference between a target displacement and a measured displacement.

In one embodiment, the amount of the one or more forces is reduced. Reducing the amount of the one or more forces may include reducing the amount of the one or more forces based on a scaling factor determined in response to a difference between velocity of a first particle associated with the simulated object and velocity of a second particle associated with the simulated object as the difference between velocities approaches a predetermined threshold. Shape of the simulated object may be determined in response to a reference object associated with the simulated object when a difference in velocities associated with the simulated object exceeds a predetermined threshold. The reference object may include a non-simulated character object. The simulated object may include a cloth object.

In various embodiments, a computer program product is stored on a computer readable medium for simulating objects. The computer program product includes code for receiving a target shape associated with a simulated object, code for determining a difference between the target shape and a measured shape associated with the simulated object, and code for generating one or more forces to act on the simulated object to reduce the difference between the target shape and the measured shape.

In some embodiments, a system for simulating objects includes a processor and a memory coupled to the processor. The memory is configured to store a set of instructions which when executed by the processor cause the processor to receive a target shape associated with a simulated object, determine a difference between the target shape and a measured shape associated with the simulated object, and generate one or more forces to act on the simulated object to reduce the difference between the target shape and the measured shape.

A further understanding of the nature and the advantages of the inventions disclosed herein may be realized by reference of the remaining portions of the specification and the attached drawings.

DETAILED DESCRIPTION OF THE INVENTION

The present invention relates to computer animation. More specifically, the present invention relates to methods and apparatus for preserving the shape of simulated objects using techniques for shape friction.

In various embodiments, simulated objects are elements of a computer animation display. The computer animation display may include simulated objects (e.g., secondary or dynamic object) such as cloth, garments and clothing, hair, and fur. The computer animation display may further include reference objects (e.g., kinematic, non-simulated objects, or other simulated objects), such as characters and/or collision objects.

Typically simulated objects are model, described, or represented as a collection of particles, connected to each other in some manner. In one example, a topological mesh is used in the case of clothing. In another example, a collection of strands or linear objects are used to describe hair or fur. Techniques of the present invention allow a simulation computer program to better display in visually desirable manners simulated objects that response to changes in motions and positions of reference or non-simulated objects.

FIG. 1is a block diagram of typical computer system100according to an embodiment of the present invention.

In one embodiment, computer system100includes a monitor110, computer120, a keyboard130, a user input device140, computer interfaces150, and the like.

In various embodiments, user input device140is typically embodied as a computer mouse, a trackball, a track pad, a joystick, wireless remote, drawing tablet, voice command system, eye tracking system, and the like. User input device140typically allows a user to select objects, icons, text and the like that appear on the monitor110via a command such as a click of a button or the like.

Embodiments of computer interfaces150typically include an Ethernet card, a modem (telephone, satellite, cable, ISDN), (asynchronous) digital subscriber line (DSL) unit, FireWire interface, USB interface, and the like. For example, computer interfaces150may be coupled to a computer network, to a FireWire bus, or the like. In other embodiments, computer interfaces150may be physically integrated on the motherboard of computer120, and may be a software program, such as soft DSL, or the like.

In various embodiments, computer120typically includes familiar computer components such as a processor160, and memory storage devices, such as a random access memory (RAM)170, disk drives180, a GPU185, and system bus190interconnecting the above components.

In some embodiments, computer120includes one or more Xeon microprocessors from Intel. Further, in one embodiment, computer120includes a UNIX-based operating system.

RAM170and disk drive180are examples of tangible media configured to store data such as image files, models including geometrical descriptions of objects, ordered geometric descriptions of objects, procedural descriptions of models, scene descriptor files, shader code, a rendering engine, embodiments of the present invention, including executable computer code, human readable code, or the like. Other types of tangible media include floppy disks, removable hard disks, optical storage media such as CD-ROMS, DVDs and bar codes, semiconductor memories such as flash memories, read-only-memories (ROMS), battery-backed volatile memories, networked storage devices, and the like.

In various embodiments, computer system100may also include software that enables communications over a network such as the HTTP, TCP/IP, RTP/RTSP protocols, and the like. In alternative embodiments of the present invention, other communications software and transfer protocols may also be used, for example IPX, UDP or the like.

In some embodiments of the present invention, GPU185may be any conventional graphics processing unit that may be user programmable. Such GPUs are available from NVIDIA, ATI, and other vendors. In this example, GPU185includes a graphics processor193, a number of memories and/or registers195, and a number of frame buffers197.

FIG. 1is representative of a computer system capable of embodying the present invention. It will be readily apparent to one of ordinary skill in the art that many other hardware and software configurations are suitable for use with the present invention. For example, the computer may be a desktop, portable, rack-mounted or tablet configuration. Additionally, the computer may be a series of networked computers. Further, the use of other micro processors are contemplated, such as Pentium™ or Itanium™ microprocessors; Opteron™ or AthlonXP™ microprocessors from Advanced Micro Devices, Inc; and the like. Further, other types of operating systems are contemplated, such as Windows®, WindowsXP®, WindowsNT®, or the like from Microsoft Corporation, Solaris from Sun Microsystems, LINUX, UNIX, and the like. In still other embodiments, the techniques described above may be implemented upon a chip or an auxiliary processing board.

In various embodiments, computer system100allows an animator to preserve or maintain the shape of simulated objects, such as cloth and hair, to provide visually appealing animations.

Consider an example in which a jacket (i.e., a simulated object) is associated with an animated character (i.e., a non-simulated or kinematic object). In this example, the character has been walking, but has just stopped. The motions of the jacket may be simulated as influenced by the motions of the character using traditional physically-based numerical techniques. Accordingly, due to traditional physically-based numerical techniques, folds and wrinkles under the arms and down the torso of the character remain in motion until settling down after the character has remained motionless for a few seconds.

This undesired action of the jacket (e.g., the creeping or oozing of the cloth of the jacket) is visually displeasing during animation. In response to traditional physically-based numerical techniques, a slow creeping or oozing starts under the arms and down the torso of the character. The creeping or oozing occurs even though the overall difference between when the character stops moving and when the motion of the jacket settles is small.

According to various embodiments, computer system100enables shape preservation using techniques for shape friction during simulation of objects in a computer animation display. For example, a simulated object may be associated with a reference object (e.g., a non-simulated object). Motions and positions of the simulated object may be influenced by motions and positions of the non-simulated object. Additionally, the motions and positions of the simulated object may be simulated using physically-based numerical techniques.

In these embodiments, computer system100receives a reference or target shape associated with the simulated object. Computer system100then determines a different between the target shape and a measured shape (e.g., the current shape) of the simulated object. While there exists a difference between the target shape and the measured shape, computer system100attempts to reduce the error between the target shape and the measured shape. To do so, computer system100may generate one or more forces to act on the simulated object to reduce the difference between the target shape and the measured shape.

In some embodiments, computer system100uses a measure of distance as the “shape” associated with a simulated object. The distance between a particles and a set of neighboring particles provides an acceptable measure of the shape of the simulated object. For example, a position of a first particle associated with the simulated object and a position of a second particle associated with the simulated object are determined. The second particle may be in the set of particles that neighbor the first particle.

Accordingly, computer system100enables simulated objects to be free to move in response to the motions of reference or non-simulated objects. When a difference between a target shape is measured or detected (e.g., in displacement, distance, velocity, etc.), the shape of the simulated object is preserved by applying one or more forces to particles such that the shape of the entire simulated object or a portion of the simulated object is maintained. In some embodiments, these forces acts like an internal friction force to maintain the shape of the simulated object and a provide a more visually pleasant simulation of the simulated object. In some embodiments, once motion of a reference or non-simulated object exceeds a predetermined threshold (e.g., a predetermined maximum velocity), the friction force preserving the shape is overcome, and the simulated object is free to fully move in response to the non-simulated object.

FIGS. 2A and 2Bare screenshots of a human character wearing a jacket.FIG. 2Adepicts a non-simulated human character who has just stopped walking. The human character is wearing a jacket that may be simulated by computer system100using a physically-based numerical technique. Additionally, the motions and positions of the jacket may be influenced by motions and positions of the human character as animated or posed by an animator.

InFIG. 2A, at the moment the human character ceases walking, there are folds and wrinkles in motion starting at the sleeve and down the torso of the human character in area210. The folds and wrinkles continue moving in a creeping or oozing behavior for a small number of seconds after the human character stops walking.

FIG. 2Bdepicts the human character after the motion of the folds and wrinkles of the jacket stop. In this example, the crease line down the arm has changed slightly and the wrinkle across the right shoulder has shifted in area210. Many of the folds and wrinkles along the torso have disappeared. The vertical wrinkle down the torso has smoothed out, and the cloth of the jacket appears to wear naturally on the human character.

Accordingly, in various embodiments, while the human character is walking, computer system100detects the motion of the jacket, and allows the folds and wrinkles in the cloth of the jacket to be simulated using physically-based numerical techniques. When the human character ceases walking, computer system100detects the changes in speed, direction, and the like.

Thus, computer system100automatically applies forces to particles that form the jacket to maintain the shape of the jacket according to various techniques to preserve the shape of the jacket. Therefore, the state of the jacket depicted inFIG. 2Ais reached and remains at the point in time when the human character stops walking Advantageously, computer system100reduces or eliminates the creeping or oozing behavior of the cloth of the jacket fromFIG. 2AtoFIG. 2Bafter the characters stops moving.

In some embodiments, computer system100provides techniques to allow an animator to specify how positions of particles associated with a simulated object (e.g., the jacket ofFIGS. 2A and 2B) relative to themselves are influenced by motions of a reference object or a non-simulated object (e.g., the human character ofFIGS. 2A and 2B). For example, if the motions of the human character cause one or more metrics to exceed a predetermined threshold, such as when the character is moving normally, computer system100allows the jacket to change shape by adjusting the relative positions of particle of the jacket to allow the jacket to appear responsive to the characters motions. In other words, when the character is moving at or above a particular speed, computer system100allows the jacket to fold and wrinkle.

If the motions of the character do not cause one or more metrics to exceed a predetermined threshold, such as when the character is slightly moving or moving during “keep alive” motion, computer system100may apply one or more forces to the particles of the jacket, such as a friction force, to maintain the relative distances or positions between the particles of all or part of the jacket. Therefore, when the character slows down to under a particular speed or stops, computer system100advantageously preserves the shape of the jacket to prevent the appearance of the creeping or oozing folds and wrinkles.

In general, shape friction is a technique that allows computer system100to simplify the complicated frictional aspects arising from a multitude of contacts between simulated objects, such as cloth or hair. In the real world, friction is primarily a surface phenomenon, with forces generated where ever two surfaces come into contact. With regard to simulated cloth and hair, generally the effect of internal friction in cloth and hair is to make the cloth or hair hold a particular shape whenever externally imposed forces on the cloth or hair are low, and the cloth or hair is at rest. However, when the external imposed forces become large enough or if the velocity of the cloth or hair is large, the friction forces are overcome, and the cloth or hair can easily change it shape. Once the external forces seeking to move the cloth or hair become low again, and the cloth or hair has regained a low velocity, the friction forces once again serve to lock the cloth or hair into its new shape. Accordingly, in some embodiments, shape friction is applied to couple a simple three-dimensional model of a shape to internal 3-D forces (as opposed to 2-D frictional forces) in a way that emulates the response of cloth or hair to frictional forces.

FIG. 3is a simplified flowchart of a method for preserving shape of a simulated object using shape friction in one embodiment according to the present invention. The processing depicted inFIG. 3may be performed by software modules (e.g., instructions or code) executed by a processor of a computer system, by hardware modules of the computer system, or combinations thereof.FIG. 3begins in step300.

In step310, computer system100receives a reference shape or target shape associated with a simulated object. In one example, computer system100receives a target distance between a first particle associated with the simulated object and a second particle associated with the simulated object. In some embodiments, the second particle may be a single particle that is adjacent to or neighboring the first particle. In another example, the second particle may be found two or three particles out or away from the first particle. The second particle may also be or represent a set of one or more particles.

In step320, computer system100receives a measured shape associated with simulated object. In one example, computer system100receives a metric associated with the first particle and the second particle. A metric is any value or measurement. For example, computer system100may receive a measurement of distance, velocity, acceleration, and the like. Speed or velocity may be measures as a derivative of a force acting on a particle. The metric may represent other higher order derivatives. Another example of the metric is a vector that represents the velocity and direction.

In step330, computer system100determines a difference between the target shape and a measured shape. For example, computer system100may determine a difference between a target distance and an actual or measure distance between the first particle and the second particle. In another example, computer system100determines a difference between a target displacement (e.g., distance, direction, velocity, acceleration, etc.) and an actual or measure displacement. In one example, computer system100may determine whether the difference between the target shape and the measured shape satisfies or fails to satisfy a set of conditions.

In step340, computer system100generates one or more forces to act on the simulated object to reduce the difference between the target shape and the measured shape. The one or more forces may be a friction force or a dragging force. The forces, for example, may slow the velocity of the first particle or accelerate the first particle toward the second particle such that the difference between the target shape and the measured shape is reduced.

Therefore, in various embodiments, computer system100reduces creeping or oozing that may be caused by simulating objects using physically-based numerical techniques. As a result, computer system100quickly reduces error between a target shape and a measured shape such that the state of shape of the simulated object is reached at an acceptable point in time to provide visually acceptable simulations.FIG. 3ends in step350.

In various embodiments, the basics of shape friction may be most simply described by considering a pair of particles, with the distance between the pair of particles be considered their “shape.” Although distance by itself doesn't necessarily convey shape, if every particle in a cloth mesh tries to maintain a specific distance to a set of neighboring particles in the mesh, simultaneously maintaining all of those distances does indeed maintain the shape of the cloth over each particles neighborhood. The above description may be applied to other simulated objects, such as hair, grass, trees, and other plants.

FIG. 4Ais simplified block diagram of a particle P1and particle P2associated with a simulated object400in one embodiment according to the present invention. In this example, particle P1is moving in a particular direction D1, at a given velocity V1, and at a given acceleration A1. For example, vector410may indicate the direction and/or magnitude of the velocity associated with particle P1. Vector410may also indicate the magnitude and direction of a force accelerating particle P1.

Particle P2is moving in a particular direction D2, at a given velocity V2, and at a given acceleration A2. For example, vector420may indicate the direction and/or magnitude of the velocity associated with particle P2. Vector420may also indicate the magnitude and direction of a force accelerating particle P2.

In some embodiments, computer system100maps particle P1to P2as a reference particle or point. Computer system100may attempt to match the velocity, direction, acceleration, etc. of particle P1to the velocity, direction, acceleration, etc. of the reference particle P2.

Consider, for example, the two particles P1and P2in space, where the positions of the particles are given by p1and p2. Let the velocities of the two particles be represented by v1and v2. Let d represent a target distance desired between the two particles. A shape friction force F1maybe be defined to act on one of the particles by using equation (1):

F1=-k⁡(length⁡(p1-p2)-d)⁢(p1-p2)length⁡(p1-p2)(1)
where length(p) defines the length of a vector and k is a positive spring-stiffness constant. In various embodiments, computer system100generates the friction force F to act on particle P1to keep particle P1the distance d from particle P2.

In some embodiments, computer system100provides one or more guiding limits on the behavior friction force F1. For example, computer system100may provide a tolerance distance that satisfies equation (2):
−tol<length(p1−p2)−d<tol(2)
for some chosen tolerance distance tol. In the above form, equation (2) may be viewed as a constraint on d, or the shape. For example, suppose that we choose a tolerance of tol equal to 0.1 where d is equal to 1.5. As long as the particles remained between a distance of 1.4 and 1.6 apart, computer system100exerts a force that tries to bring the particles back to a distance of 1.5 apart. However, external forces act so as to force the particles outside of this range, computer system100modifies d to maintain the inequality of equation (2).

Accordingly, if computer system100determines that the particles have moved to a distance of 1.8 apart, computer system100updates the target distance d to be d=1.8−tol=1.7. Thus, when computer system100determines F1, the magnitude of F1has been implicitly limited, because the target distance d may be within some tolerance of the current distance between the particles.

In some embodiments, computer system100reduces the forces acting on the particles as the “shape velocity” between the particle P1and particle P2moves away from zero. The force F1that may actually be exerted on particle P1may be provided equation (3):

(1-length⁡(v1-v2)vmax)⁢F1(3)
which reduces the force F1by a scaling factor as the difference in the velocities of particle P1and particle P2grows. Once the difference in the velocities reaches some threshold vmax, computer system100may turn the friction force completely off. Accordingly, if a predetermined level, point, value, or threshold is reached or exceeded, computer system100allows the simulated object to be freely influenced without preserving shape.

In some embodiments, computer system100exerts force F1on particle P1and an opposite force −F1on particle P2. As discussed previously, if the particles are forced to far apart, computer system100updates the distance d to stay within the range given by equation (2), which effectively changes the shape to which the cloth or hair wants to hold. Similarly, if the differences in velocities between the particles becomes large, computer system100further limits the friction force. Once the differences in velocities become smaller again, computer system100then allows the shape-friction force to act once more.

In some embodiments, for example with simulated objects such as cloth or hair, computer system100records for each particle a separate distance d to each neighboring particle, along with a stiffness k and a maximum velocity of vmax. The number of neighboring particles may be provided as a parameter to computer system100. For example, the larger the neighboring set of particles, the more strongly shapes can be held.

Additionally, in some embodiments, the force F1may be specified as a vector in space according to equation (4):
F1=−k((p1−p2)−d)  (4)
with d as a vector, as opposed to a scalar, and with a limit on how much ((p1−p2)−d)) can deviate before dragging d in the direction p1−p2. The vector d can be recorded either an absolute unchanging coordinate system, or can be based on a local time-varying coordinate system, arising from the kinematic or non-simulated object (i.e., the animated human character).

In some embodiments, computer system100provides the force F1to a single particle, for example, when it makes sense for the “shape” to simply be the position of a particle relative to some local or fixed coordinate scheme. One example of a local or fixed coordinate scheme is described with respect toFIGS. 6 and 7.

FIG. 4Bis a simplified block diagram of particles associated with simulated object400in one embodiment according to the present invention. In this example,FIG. 4Bincludes particles P1, P2, P3, P4, and P5. For example, particles P1, P2, P3, P4, and P5may form part of a cloth mesh. Particle P1is separated from particle P2by a distance430. Particle P1is separated from particle P3by a distance440. Particle P1is separated from particle P4by a distance450. Particle P1is separated from particle P5by a distance460.

In general, particles P2, P3, P4, and P5may be considered neighboring particles to particle P1. In some embodiments, particle P5may be considered a neighboring particle to particle P3. As discussed above, larger sets of particles or smaller set of particles may be used to provide the desired “stiffness” associated with the simulated object.

In various embodiments, computer system100attempts to maintain a target distance470between particle P1and particle P2. As discussed further below, computer system100may generate one or more forces to act on particle P1and particle P2to reduce the difference between the actual distance430and the target distance470between particles P1and P2.

FIGS. 5A and 5Bare a flowchart of a method for preserving shape of a simulated object using shape friction during motion in one embodiment according to the present invention.FIG. 5begins in step500. In general, the simulated object is associated with a reference object that influences motion and position of the simulated object. In this example, the simulated object includes a set of particles.

In step505, computer system100receives a velocity threshold (e.g., vmax). In step510, computer system100receives a tolerance distance (e.g., tol). In step515, computer system100receives a target distance between a first particle (e.g., particle P1ofFIG. 4A) and a neighboring second particle (e.g., particle P2ofFIG. 4A).

In step520, computer system100determines a difference between velocity of the first particle and velocity of the second particle. In step525, computer system100determines whether the difference between velocities exceeds the velocity threshold. In step530, if the difference between the velocities exceeds (or meets) the velocity threshold, in step535, computer system100determines motion (and position) of the simulated object in response to motion (and position) of a reference object. The flowchart then continues in step520. In step530, if the difference between velocities does not exceed the velocity threshold, in step540, computer system100determines a scaling factor based on the difference between the velocity of the first particle and the velocity of the second particle.FIG. 5Aends in step540.

FIG. 5Bbegins in step545, continuing fromFIG. 5A. In step545, computer system100measures a current distance between the first particle and the second particle. In step550, computer system100determines a difference between the target distance and the measured current distance. In step555, computer system100determines whether the difference between the target distance and the measured current distance exceeds the tolerance distance.

In step560, if the difference between the target distance and the measured distance exceeds the tolerance distance, in step565, computer system100updates the target distance. For example, computer system100may increase or decrease the target distance by the tolerance distance.

In step570, computer system100generates one or more forces to act on the simulated object (e.g., on the first particle and/or on the second particle) to reduce the difference between the target shape and the measured current shape. In step575, computer system100reduces the amount of the one or more forces in response to the scaling factor. In some embodiments, computer system100reduces the amount of the one or more forces to nothing in response to the scaling factor if the difference between the target shape and the measured shape exceeds the tolerance distance and/or the velocity threshold is exceeded.FIG. 5Bends in step575.

Accordingly, computer system100eliminates or reduces the creeping or oozing behavior of the simulated object by providing internal shape friction forces, while still allowing the simulated object to move correctly with motion of an associated non-simulated object. Advantageously, computer system100allows the simulated object to move and/or change its shape or wrinkle pattern as little as possible, subject to being positioned correctly or in a visually pleasing manner on the character.

The present invention can be implemented in the form of control logic in software or hardware or a combination of both. The control logic may be stored in an information storage medium as a plurality of instructions adapted to direct an information-processing device to perform a set of steps disclosed in embodiments of the present invention. Based on the disclosure and teachings provided herein, a person of ordinary skill in the art will appreciate other ways and/or methods to implement the present invention.