1 / 28

Shape Blending

Shape Blending. Joshua Filliater December 15, 2000. What is Shape Blending?. Shape Blending is the morphing of one shape into another shape by concentrating on the shape itself. Try to stretch, compress and bend one shape into another shape over a given time period.

roused
Download Presentation

Shape Blending

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Shape Blending Joshua Filliater December 15, 2000

  2. What is Shape Blending? • Shape Blending is the morphing of one shape into another shape by concentrating on the shape itself. • Try to stretch, compress and bend one shape into another shape over a given time period. • Shape blending tries to morph shapes in a realistic fashion. • This has great practical use in the field of computer animation.

  3. The Major Problems • Two Major Problems: Vertex Correspondence and Vertex Path. • Vertex Correspondence: Figure out which vertex in the first image should blend to which vertex in the last image. A solution is given by Sederberg in “A Physically Based Approach to 2-D Shape Blending”, however many people feel that the vertex correspondence is best left to the animator. • Vertex Path: Figure out which path the vertices should take to get from the first image to the last image. Many solutions have been suggested for this problem, including the Linear Interpolation Solution, the Intrinsic Solution, the Star-Skeleton Blending Solution, and the Wavelet Shape Blending Solution.

  4. “A Physically Based Approach to 2-D Shape Blending” - The Theory • Solution to the Vertex Correspondence Solution • Model the first polygon as a piece of wire and define the “best” shape blend as the one that requires the least amount of work to deform the first polygon into the last polygon through bending and stretching. • Stretching Work: From solid mechanics, a force, P, will stretch a wire of length L0 an amount where A is the cross sectional area and E is the modulus of elasticity. Thus, the work to stretch this wire a distance, d, is

  5. “A Physically Based Approach to 2-D Shape Blending” - The Theory • Replace AE with ks, a user defined “stretching stiffness” constant. • If L0 is the initial length of the wire, and L1 is the final length of the wire, the previous work equation will produce different results if the initial and final shapes are swapped. • If an edge collapses to a single vertex, the previous work equation requires an infinite amount of work. • These factors are all motivation for the following change where csis a user defined constant which penalizes edges that collapse to points.

  6. “A Physically Based Approach to 2-D Shape Blending” - The Theory • The square of the distance stretched implies an elastic deformation. If excessive stretching occurs, the wire will undergo plastic deformation. To reflect this condition, the equation is changed to whereesis a user defined constant. An es of one denotes totally plastic deformation, while an es of two denotes totally elastic deformation. • In physical reality, this equation would be valid for stretching work only, but for the purpose of this algorithm, it is valid for both stretching and compressing work.

  7. “A Physically Based Approach to 2-D Shape Blending” - The Theory • Bending Work: There are two conditions that should be avoided in the bending of the shape. The first is that and the second is that Θi(t)should change monotonically fromΘi(0)toΘi(1). The bending work formula is where ΔΘ* is the deviation from monotonicity. kb and eb are analagous to ks and es. mb punishes non-monotonic angles, while pb punishes angles that go to zero. • The derivation of the bending work solution is analogous to that of the stretching work solution.

  8. “A Physically Based Approach to 2-D Shape Blending” - The Theory • Use the work equations to find the amount of work it takes to blend every vertex in P0 to every vertex in P1. • Also compute a north and a west matrix according to the amount of work required to blend a vertex in P0 to a vertex in P1. • Starting from the last vertex correspondence, which is known to be a correct correspondence, work up to the first vertex correspondence by following the north and west matrices.

  9. “A Physically Based Approach to 2-D Shape Blending” - The Theory • Solution to the Vertex Path Problem • This is the simplest of all Vertex Path solutions. Just linearly interpolate the corresponding vertices. • Mathematically, given two polygons P0and P1 each with n vertices, the polygons can be expressed as • From these definitions, the Vertex Path is just the linear interpolation of the corresponding vertices over the time, t.

  10. “A Physically Based Approach to 2-D Shape Blending” - The Results

  11. “A Physically Based Approach to 2-D Shape Blending” - The Results

  12. “A Physically Based Approach to 2-D Shape Blending” - The Results

  13. “A Physically Based Approach to 2-D Shape Blending” - The Conclusions • Positive Aspects of this Algorithm Shapes do not generally turn themselves inside-out. • Negative Aspects of this Algorithm Requires a fairly reasonable initial distribution of vertices. Can only add vertices which are already in the list of vertices. The shapes do not generally keep the same area throughout the blend.

  14. “2-D Shape Blending: An Intrinsic Solution to the Vertex Path Problem” - The Theory • Solution to the Vertex Path Problem • Instead of interpolating the vertices, try to be more realistic and interpolate the angles and the edge lengths of the polygons. • Mathematically, the edge lengths are given as • The angles are computed using the trigonometric identities for the cross product and the dot product. • From this information, the angles and lengths are interpolated by • Finally, the intermediate shapes can be reconstructed from the angle and edge length information.

  15. “2-D Shape Blending: An Intrinsic Solution to the Vertex Path Problem” - The Theory • This solution “is a heuristic whose justification lies in the fact that it generally seems to work rather well.” • There is one small problem. Usually, the shapes do not close. This can be fixed by adding a small error factor to the edge length. • In general, the error factor,Si, should be proportional to Li. Also, it should have the same length throughout the entire shape blend. • This error factor can be calculated through a series of equations. Once this is calculated, the angles and edges can be interpolated by

  16. “2-D Shape Blending: An Intrinsic Solution to the Vertex Path Problem” - The Results

  17. “2-D Shape Blending: An Intrinsic Solution to the Vertex Path Problem” - The Theory • Positive Aspects of this Algorithm The area of the shape is more or less constant throughout the blend. Shapes do not deform during blending. • Negative Aspects of this Algorithm Cannot handle coincident vertices.

  18. “Wavelet Shape Blending” The Theory • Solution to the Vertex Path Problem • Since the Intrinsic Solution does not work with dense vertices, remove some of the vertices and then use the Intrinsic Blend. • To remove vertices, use the Haar Wavelet Transform. • The Haar Wavelet Transform of polygon, P, with 2j vertices at resolution level, k, results in a polygon of lower resolution, P*, with 2k vertices, and a details polygon, D, with 2j-k vertices.

  19. Haar Wavelet Transform • One Dimensional Example Given a polygon with four vertices, [9,8], [7,5], [3,1], [5,4], the Haar Wavelet Transform is computed for different resolutions as follows. The resulting polygon at resolution level 2 is ([8,6.5],[4,2.5]) with details ([1,1.5],[4,-1.5]). The resulting polygon at resolution level 1 is ([6,2]) with details ([2,2],[1,1.5],[4,-1.5]).

  20. “Wavelet Shape Blending” The Algorithm • Decompose the first and last polygons,P0 and P1, at an appropriate resolution level into polygons, P0* and P1*, and details, D0 and D1. • Use the Intrinsic Blend solution to blend P0* to P1*. • Use the Linear Interpolation Solution to blend D0 to D1. • Reconstruct each image at time,t, using the reconstruct algorithm of the Haar Wavelet Transform.

  21. “Wavelet Shape Blending” The Results

  22. “Wavelet Shape Blending” The Results

  23. “Wavelet Shape Blending” The Results

  24. “Wavelet Shape Blending”The Conclusions • Positive Aspects of this Algorithm Can handle a reasonable amount of coincident vertices. Shapes do not deform during blending at higher resolutions. • Negative Aspects of this Algorithm Cannot handle too many coincident vertices. Shapes tend to have “broken” lines.

  25. “Shape Blending Using the Star-Skeleton Representation” • Solution to the Vertex Path Problem • Decompose the first and last polygons,P0 and P1, into star-shaped pieces, each represented by its vertices and the star origin. A star-shape is a polygon for which there exists at least one point that is visible from all other points. This point is called the star origin. • Form the skeleton by connecting the star origins and the midpoints of shared edges in an altering fashion. • Linearly interpolate the between the skeletons of polygon P0 and P1. • Compute the coordinates of each vertex on the boundary of the polygon from the original vertex, the star origin, and the midpoints of the shared edges.

  26. Shape Blending: The Conclusions • What conclusions can be drawn from all of this? A good initial distribution of vertices is extremely important. The vertex correspondence problem is still best solved by the animator. The computer can be used to solve the vertex path problem

  27. References • T.W. Sederberg and E. Greenwood, “A Physically Based Approach to 2D Shape Blending,” Computer Graphics (Proc. SIGGRAPH), Vol. 26, No.2, 1992, pp. 25-34. • T.W. Sederberg et al., “2D Shape Blending: An Intrinsic Solution to the Vertex Path Problem,” Computer Graphics (Proc. SIGGRAPH), Vol. 27, 1993, pp. 15-18. • M. Shapira and A. Rappoport, “Shape Blending Using the Star-Skeleton Representation,” IEEE Computer Graphics and Applications, March, 1995, pp. 44-50. • Y. Zhang and Y. Huang, “Wavelet Shape Blending,” The Visual Computer, Vol. 16, No. 2, 2000, pp.106-115.

  28. Additional References • E.J. Stollnitz, T.D. DeRose, and D.H. Salesin, “Wavelets for Computer Graphics: A Primer, Part 1” IEEE Computer Graphics and Applications, Vol. 15, No. 3, 1995, pp.76-84. • E.J. Stollnitz, T.D. DeRose, and D.H. Salesin, “Wavelets for Computer Graphics: A Primer, Part 2” IEEE Computer Graphics and Applications, Vol. 15, No. 4, 1995, pp.75-85.

More Related