#### Transcript PPT - Modeling & Simulation Lab.

Physics Based Modeling III Animation Lecture 3 Kwang Hee Ko Gwangju Institute of Science and Technology Introduction What is “Animation”??? To animate is, literally, to bring to life. It covers all changes that have a visual effect. Examples Motion dynamics: time varying position Update dynamics: shape, color, texture, transparency of an object. Changes in lighting, camera position, orientation, etc. Application Areas Entertainment industry, education, scientific visualization, simulation. Three-Dimensional Animation Creating images for an animation using a virtual 3D world involves three steps: Modeling Setting up the elements in a scene and describing each of those elements Animating Rendering Converting the description of the objects and their motion into images Modeling Requirements To animate motion, the user needs a static description information about how that object moves. To add such additional information, we use Articulated model Particle system Deformable objects Hybrid models Modeling Requirements Articulated Model A collection of objects connected together by joints in a hierarchical, treelike structure. The location of an object is determined by the location of the objects above it in the hierarchy. The object at the top of the hierarchy affect the position and orientation of the entire model. Ex. The motion of the elbow joint in a human model Affect the position of the lower arm and the hand and fingers. Modeling Requirements Particle System Collection of points. The motion of the particles through space is determined by a set of rules. Laws of physics. Suitable for representing water spray, smoke and flocks of birds Modeling Requirements Deformable Objects Suitable for objects that do not have welldefined articulated joints but have too much structure to be easily represented with a particle system. Spring-mass lattices, volumetric models, surface representations, etc. Water, hair, clothing, etc. Modeling Requirements Hybrid Models Complex systems that require two or more types of models Each part of the system to is modeled by the most appropriate technique. Diver: articulated model. Pool: deformable model. Spray: particle system. Rendering Requirements Motion Blur One of the rendering techniques that is required for animation. Anti-aliasing technique for time Without motion blur, rapid motion of an object in a series of frames creates unpleasant strobing effects. As opposed to temporal anti-aliasing Wheels which appear to move in the wrong direction A fast moving object can be rendered in several of the positions it had during the period of time represented by each frame. Create a blurred representation of the object. Motion Generation The task of specifying the motion of an animated object to the computer is surprisingly difficult. Even animating a simple object like a bouncing ball can present problems. Humans are very skilled at observing motion and quickly detect motion that is unnatural or implausible. To specify motion Keyframing Procedural methods Motion capture Motion Generation Key-frame animation Creation of key frames Inbetweening The frames in which the entities being animated are at extreme or characteristic positions, from which their intermediate positions can be inferred. The animator should understand in intimate detail how the animated object should behave. The intermediate frames are then filled in. The entire process of producing an animation is supposed to be sequential. But often it could be iterative. Motion Generation The most basic computer animation tools assist the process of hand animation by automatically interpolating between the key frames of images or models. Problems A human inbetweener can perceive the circumstances of the object being interpolated. Is it a falling ball or a rolling ball? A computer-based system is typically given only the starting and ending positions. Interpolation Easiest Interpolation: Linear interpolation Given the values vs and ve in the starting and ending frames, the value vt at intermediate frames is vt = (1-t)vs + tve. Can generate unrealistic results. Continuous motion No continuous derivatives Abrupt changes in velocity Interpolation Spline Interpolation To smooth out interpolation between key frames. Introduce a function f(t). A value can be interpolated by setting vt = (1-f(t))vs + f(t)ve. A figure drawn as polyline can be interpolated between keyframes by interpolating each vertex of the polyline from its starting to ending position. Interpolation Defining interpolated shapes Interpolation Interpolation of Position and Rotation Position The position of the center of the body is specified at certain key frames. The intermediate positions are interpolated by some spline path. The rate at which the spline path is traversed may be specified as well. Interpolation Interpolation of Position and Rotation Rotation: Much more difficult than position Euler angle approach Rotating Euler angles is not intuitive, leading to unnatural interpolations of rotations. Unit quaternion approach Intuitive and better interpolation. BUT!!! Interpolation Unit quaternion approach Disadvantages Each orientation of an object can actually be represented by two quaternions. Orientations and rotations are not exactly the same thing. A rotation by 360 is very different from a rotation by 0 in an animation. But the same quaterion represents both. Interpolation Unit quaternion approach Disadvantages Quaternions provide an isotropic method for rotation. The interpolation is independent of everything except the relation between the initial and final rotations. Humans strongly prefer cameras to be held upright and are profoundly disturbed by tilted camera. Quaternions have no such preferences. Quaternions should not be used for camera interpolation. Motion Generation Procedural Methods A computer procedurally follows the steps in an algorithm to generate the motion. Advantages over keyframing techniques They make it easy to generate a family of similar motions. They can be used for systems that would be too complex to animate by hand such as particle systems or flexible surfaces. Physics-based simulation belongs to a class of procedural methods. It makes use of the laws of physics to generate motion. Motion Generation Simulated motion is inherently realistic. Unfortunately, building a new simulation is a difficult process requiring an in-depth understanding of the relevant physical laws. Simulations can be divided into two categories Passive Active Motion Generation Passive Simulation Passive systems have no internal energy source and move only when an external force acts on them. They are well suited to physically based simulation. Pools of water, clothing, hair, leaves, etc. Motion Generation Active Simulation Active systems do have an internal source of energy and can move of their own volition. These systems are more difficult to model because People, animals, robots, etc. Implement the physical laws Specify the behavior of the simulated muscles or motors. An additional algorithm, a control system, must be designed to allow the model to walk, run, or perform other actions. Motion Generation Control System A control system for standing must contain Laws that specify how the hips and knees should move to keep the figure balanced when one arm is extended out to the side. Example The runner is an active simulation. A control system generates the running motion. The runner’s clothes are a passive cloth simulation. Motion Generation Control System Movement of arms when the upper body moves (bending the back). Motion Generation Procedural methods can also be used to generate motion for groups of objects that move together. Flocks of birds, schools of fish, herds of animals, etc. Motion Generation Motion Capture Use special sensors, trackers, to record the motion of a human performer. The recorded data is then used to generate the motion for an animation. Problems. Accurate measurement of the motion of the human body is tricky. Due to different dimensions between the recorded motion and the graphical objects, noticeable flaws can be observed. But this technique is widely used. Deformable Models in Computer Graphics: Survey Non-Physical Models Purely geometric techniques They are generally computationally efficient. They rely on the skill of the designer rather than on physical principles. Splines and Patches Bezier curves/surfaces, B-spline, NURBS, etc. Support interactive modification of shape. Subtle control of object shape is possible. But precise specification or modification of curves or surfaces can be laborious. Deformable Models in Computer Graphics: Survey Non-Physical Models Free-Form Deformation (FFD) It is a general method for deforming objects that provides a higher and more powerful level of control than adjusting individual control points. FFD changes the shape of an object by deforming the space in which the object lies though mapping. Ex.Twist about the z-axis More complex deformations can be constructed by composing mappings. Deformable Models in Computer Graphics: Survey Mass-Spring Models Non-physical methods for modeling deformation are limited by the expertise and patience of the user. Deformations must be explicitly specified and the system has no knowledge about the nature of the object being manipulated. Modeling an object as complex as the human face is a daunting task. Therefore, physics is considered in the modeling. Deformable Models in Computer Graphics: Survey Mass-Spring Models They are physically based technique that has been used widely and effectively for modeling deformable objects. An object is modeled as a collection of point masses connected by springs in a lattice structure. The spring forces are linear/nonlinear. Deformable Models in Computer Graphics: Survey Mass-Spring Models The equation of motion for the entire system are assembled from the motions of all of the mass points in the lattice. The system is evolved forward through time by reexpressing the equations as a system of first-order differential equations Deformable Models in Computer Graphics: Survey Mass-Spring Models They have been used widely in facial animation. Tension nets: static versions of mass-spring systems. Kx = f. The face is modeled as a two-dimensional mesh of points warped around an ovoid and connected by linear springs. Muscle actions are represented by the application of a force to a particular region of nodes. Deformable Models in Computer Graphics: Survey Mass-Spring Models Dynamic mass-spring systems to facial modeling A three-layer mesh of mass points based on three anatomically distinct layers of facial tissue: The dermis A layer of subcutaneous fatty tissue The muscle layer Deformable Models in Computer Graphics: Survey Mass-Spring Models Dynamic mass-spring systems to facial modeling Facial models are created Different spring constants were used to model the different layers based on tissues properties. Manually Using a radial laser-scanned image data Computer Tomography (CT) Prediction of the post-operative appearance of patients whose underlying bone structure has been changed during cranio-facial surgery. Spring stiffness for the system is derived from tissue densities obtained by CT image data. Deformable Models in Computer Graphics: Survey Mass-Spring Models Mass-spring models combined with free-form deformations are used to animate muscles in human character animation. A mass-spring model for deformable bodies is used to model a transition change from solid to liquid. Mass-spring systems can be used to generate “artificial fish”. Deformable Models in Computer Graphics: Survey Mass-Spring Models Advantages Simple, well understood dynamics Easy to construct. Can be animated at rates not possible with other techniques Interactive and real-time simulation is possible. Well suited to parallel computation. Drawbacks The discrete model is a significant approximation of the true physics that occurs in a continuous body. Proper values of spring constants may not be easily obtained. “Stiffness” issue: numerical instability would occur. Large spring constants to model objects that are nearly rigid. Deformable Models in Computer Graphics: Survey Continuum Models Accurate physical models treat deformable objects as a continuum. bodies with mass and energies distributed throughout. Modeling itself can be derived based on the assumption of continuum. But ultimately computation is discrete. Deformable Models in Computer Graphics: Survey Continuum Models The full continuum model of a deformable object considers the EQUILIBRIUM of a general body acted on by external forces. The object deformation is a function of the acting forces and the object’s material properties. The object reaches equilibrium when its total energy is at a minimum. П=Λ-W Deformable Models in Computer Graphics: Survey Continuum Models To determine the equilibrium shape of the object, Both Λ and W are expressed in terms of the object deformation. Λ is the total strain energy of the deformable object W is the work done by external forces The total potential reaches a minimum when the derivative of the total potential with respect to the material displacement function is zero. This approach leads to a continuous differential equilibrium equation. Deformable Models in Computer Graphics: Survey Continuum Models A closed-form analytic solution of the differential equation is not always possible. We instead find an approximate solution to the equation. FEM method. Deformable Models in Computer Graphics: Survey The use of FEM in computer graphics has been limited because of the computational requirements. In real-time applications, it has proven difficult to use FEM. The force vectors and the mass and stiffness matrices are computed by integrating over the object, they must, in theory, be re-evaluated as the object deforms. The re-evaluation is very costly. Deformable Models in Computer Graphics: Survey FEM Methods Advantage Provide a more physically realistic simulation than mass spring methods with fewer node points. Disadvantages Significant pre-processing time. If the topology of the object changes during the simulation, or if the object shape changes beyond small deformation limits, the mass and stiffness matrices must be re-evaluated during the simulation. Meshless approach??? Deformable Models in Computer Graphics: Survey Approximate Continuum Models Physically motivated, but adhere less strictly to the laws of physics than the FEM methods. Snakes One-dimensional deformable curves that are often used to deform or define edges or contours or to tract motion in a moving image. Discretized deformation energy Hybrid models Deformable Models in Computer Graphics: Survey Low Degree of Freedom Models Discretization of the physically based models leads to systems with many degrees of freedom. A large number of node points The systems are slow to simulate, limiting their use in interactive and real time settings. Alternative approximate continuum models They restrict the deformable object to many fewer degrees of freedom, sacrificing generality for speed. Deformable Models in Computer Graphics: Survey Low Degree of Freedom Models Modal Analysis Dynamic Global Deformation Minimal Energy Surfaces