Next Patent: DISPLACEABLE DISPLAY ARRANGEMENT
Next Patent: DISPLACEABLE DISPLAY ARRANGEMENT
Plaque It!
Sponsored by: Flash of Genius |
[0001] 1. Field
[0002] The present invention relates generally to computer graphics and, more specifically, to shape transformation of two-dimensional and three-dimensional objects on a computer display.
[0003] 2. Description of Related Art
[0004] In recent years, image processing techniques, popularly known as “morphing,” have achieved widespread use in the entertainment industry. Morphing involves the transformation of one image into another image or from one model into another model. Morphing operations can be performed to transform one two-dimensional (2-D) image into another 2-D image, to transform one 2-D model into another 2-D model, or to transform one three-dimensional (3-D) model into another 3-D model. These techniques specify some operation that maps points from one image or model onto points of the other image or model, and then simultaneously interpolate the color and position of corresponding points to generate intermediate images or models. When viewed in sequence, these intermediate images produce an animation of the first image or model changing into the second image or model. Variations of these techniques have been used to create special effects for television commercials, music videos, movies, and web pages on the World Wide Web.
[0005] Morphs are typically restricted to 2-D images, primarily because a realistic transition between two-dimensional (2-D) and three-dimensional (3-D) models is difficult to specify. However, such specifications might be valuable because the resulting morph can be viewed from arbitrary viewpoints in arbitrary settings, can be arbitrarily scaled and placed, and provides greater compression and realism.
[0006] There are at least two existing approaches for defining a morph between two 3-D models, each of which may be adapted for 2-D models. The first approach is described in “Shape Transformation For Polyhedral Objects”, by James R. Kent, et al., Computer Graphics, Vol. 26, No. 2, July 1992. Kent, et al. describes a process that, given two 3-D polyhedral models, generates two new models that have the same or similar shape as the original ones, but that allow transformations from one to another to be easily computed. This process assumes the morphing of star-shaped objects only. If the objects are not star-shaped, then externally supplied information is employed to divide the non-star-shaped objects into several star-shapes objects for morphing. Star-shaped refers to models for which at least one interior point p exists such that any semi-infinite ray originating at p intersects the surface of the object at exactly one point. The second approach is discussed in “Solid-Interpolating Deformations: Construction and Animation of PIPs”, by Anil Kaul and Jarek Rossignac, Eurographics '91, Proceedings of the European Computer Graphics Conference, September 1991, pp. 493-505. Kaul and Rossignac describe an process using an animation primitive called a Parameterized Interpolating Polyhedron (PIP), which may be animated on widely used graphic hardware because a PIP is a smoothly varying family of polyhedra representations bounded by faces that evolve with time. The faces have constant orientation and vertices that each move on a straight line between the vertex of the initial shape and a vertex of the final one. This process uses Minkowski sum operations for computing the PIPs.
[0007] There are several drawbacks to the above approaches. Both approaches exhibit a quadratic computational complexity, so they are impractical for some models. Furthermore, if two models to be morphed have N
[0008] Thus, an improved method of morphing 2-D and 3-D models is desired that reduces the deficiencies and limitations of the prior art.
[0009] An embodiment of the present invention is a method of constructing morphs between a first model having a first resolution and a second model having a second resolution. The method includes determining a first morph between the first model and the second model, increasing resolution of at least one of the first and second models, and determining a subsequent morph between the first model and the second model.
[0010] The features and advantages of the present invention will become apparent from the following detailed description of the present invention in which:
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018] In the following description, various aspects of the present invention will be described. However, it will be apparent to those skilled in the art that the present invention may be practiced with only some or all aspects of the present invention. For purposes of explanation, specific numbers, examples and configurations are set forth in order to provide a thorough understanding of the present invention. However, it will also be apparent to one skilled in the art that the present invention may be practiced without the specific details. In other instances, well-known features are omitted or simplified in order not to obscure the present invention.
[0019] An embodiment of the present invention specifies a procedure for defining and refining a morph between two three-dimensional (3-D) models. The advantage of this embodiment is that it builds the morph progressively, e. g., the morph is built at a low model resolution and refined iteratively as the resolution of the models is increased. Resolution in this regard is measured in terms of numbers of vertices of the models, with models having more vertices being of a higher resolution and models having less vertices being of a lower resolution. This provides several advantages over the existing approaches. Embodiments of the present invention employ less computation than existing morph generating methods. Given two models as progressive meshes, the computation used is linear in the number of vertices, as opposed to quadratic for existing approaches. The morphs constructed by embodiments of the present invention are more compact to represent than those constructed by existing approaches. If the two models have N
[0020] Embodiments of the present invention are premised on two observations. First, whereas it is difficult to determine a morph between two models represented at a high resolution, the morph is relatively easy to construct at a lower resolution of the two models. Second, if either of the two models is refined by adding more detail, the morph may be refined at the same time by a local search for the correct mapping of vertices between the models.
[0021] These concepts may be illustrated with a 2-D example, although the concepts are also valid for 3-D models. Consider a morph between the simplified human image shown in
[0022] Embodiments of the present invention reduce given models from high resolution to low resolution ones between which the morph may be constructed either without user control or with simple user interaction, and then refine the morph using local searches as the two models are progressively refined back to full resolution.
[0023]
[0024] When both polygons are represented at the lowest resolution (e. g., A(
[0025]
[0026] In an embodiment of the present invention, generating a morph between two objects at the lowest resolution generally follows the process outlined by Kent, et. al for star-shaped objects. The process disclosed below is used for explanatory purposes. Other alternative processes and other variations of the Kent, et. al process may also be employed by those skilled in the art to generate a morph with an embodiment of a method in accordance with the present invention, although the invention is not limited in scope in this respect. The process disclosed by Kent, et. al, is applicable to 2-D models, because triangles are star-shaped. The Kent, et. al process is also applicable to 3-D models because tetrahedrons are star shaped. This particular embodiment of the present invention refines the Kent, et. al process for progressive morphing.
[0027] In the case of 2-D models, in one embodiment, a data structure representation of a morph between two polygons A and B consists of five elements. The first element comprises an array of real vertices of polygon A, denoted MORPH.realA. The second element comprises an array of real vertices of polygon B, denoted MORPH.realB. The third element comprises an array of fake vertices of polygon A, corresponding to real vertices of B, denoted MORPH.fakeA. The fourth element comprises an array of fake vertices of polygon B, corresponding to real vertices of A, denoted MORPH.fakeB. The fifth element comprises an array of tuples, the first element of which specifies which array to index into (realA or fakeA), and the second element of which comprises an index into the specified array. This element is denoted MORPH.vert_arr. The i'th element of the realA array corresponds to i'th element of the fakeB array. The i'th element of the fakeA array corresponds to the i'th element of the realB array. It will, of course, be appreciated that the invention is not limited in scope to employing this particular data structure.
[0028] These five elements may be used in the pseudo-code as shown below in Table I to morph between two triangles, although the invention is not limited in scope in this respect. The process is based on the technique presented by Kent et al.
TABLE I © 1998 Intel Corporation Process InitMorph2D (Triangle A, Triangle B) Let cA = center of A Let cB = center of B Let MORPH = empty morph /* Initialize MORPH.realA and MORPH.fakeB */ For I = 1 to 3 do Let MORPH.realA [I] = A.v[I] Let r = ray from cA towards A.v[I] and beyond Translate r to start at cB, instead of cA Let MORPH.fakeB [I] = Intersection of r and B End for /* Initialize MORPH.realB and MORPH.fakeA */ For I = 1 to 3 do Let MORPH.realB [I] = B.v[I] Let r = ray from cB towards B.v[I] and beyond Translate r to start at cA, instead of cB Let MORPH.fakeA [I] = Intersection of r and A End for /* Initialize MORPH.vert_arr and MORPH.connectivity */ For I = 1 to 3 do Store (real, I) in MORPH.vert_arr Store (fake, I) in MORPH.vert_arr End for Reorder elements in MORPH.vert_arr so that they are in order (i.e., MORPH.vert_arr[i] and MORPH.vert_arr[i + 1] are directly connected) Return (MORPH)
[0029] In the case of 3-D models, a representation of a morph between two meshes A and B consists of six elements. The first element comprises an array of real vertices of mesh A, denoted MORPH.realA. The second element comprises an array of real vertices of mesh B, denoted MORPH.realB. The third element comprises an array of fake vertices of mesh A, denoted MORPH.fakeA. The fourth element comprises an array of fake vertices of mesh B, denoted MORPH.fakeB. The fourth element comprises an array of tuples, the first element of which specifies which array to index into (realA or fakeA), and the second element of which comprises an index into the specified array. This element is denoted MORPH.vert_arr. The i'th element of the realA array corresponds to i'th element of the fakeB array. The i'th element of the fakeA array corresponds to the i'th element of the realB array. The sixth element is an array of indexed triangles. An indexed triangle comprises a list of three integers that are indices into the MORPH.vert_arr array. This element is denoted MORPH.connectivity.
[0030] Instead of using Kent, et. al's scheme for morphing between tetrahedrons, one embodiment of the present invention may be the following scheme. However, the process disclosed by Kent, et. al, could also be used, with modifications to the MORPH data structure described above, for example. One skilled in the art will recognize that other processes may also be used to generate a morph for a 3-D models consistent with other aspects of the present invention. The scheme disclosed below (corresponding to block
TABLE II © 1998 Intel Corporation Process InitMorph3D (Tetrahedron A, Tetrahedron B) Let BestMorph = empty morph Let CurMorph = empty morph Let BestMorphQuality = −Infinity For I = 1 to 4 do Let CurMorph.realA [I] = A.v[I] Let CurMorph.realB [I] = B.v[I] Let CurMorph.vert_arr [I] = (real, I) Let CurMorph.vert_arr [I + 4] = (fake, I) Let CurMorph.connectivity [I] = A.triangle [I] End for For I = 1 to 4 do Let (a, b, c) = B.triangle [I] Let ia = index of (fake, a) in MORPH.vert_arr Let ib = index of (fake, b) in MORPH.vert_arr Let ic = index of (fake, c) in MORPH.vert_arr Add (ia, ib, ic) to CurMorph.connectivity End for For b1 = 1 to 4 do For b2 = 1 to 4 do For b3 = 1 to 4 do For b4 = 1 to 4 do If (b1, b2, b3, b4) are distinct Let CurMorph.fakeB [1] = B.v[b1] Let CurMorph.fakeB [2] = B.v[b2] Let CurMorph.fakeB [3] = B.v[b3] Let CurMorph.fakeB [4] = B.v[b4] Let CurMorph.fakeA [b1] = A.v[1] Let CurMorph.fakeA [b2] = A.v[2] Let CurMorph.fakeA [b3] = A.v[3] Let CurMorph.fakeA [b4] = A.v[4] If (CurMorph.Quality() > BestMorphQuality) BestMorph = CurMorph BestMorphQuality = CurMorph.Quality () End if End if End for End for End for End for Return (BestMorph)
[0031] Table III illustrates an example morph quality function, such as is used in CurMorph above. However, other quality functions may also be used to better fit a given user's application.
TABLE III © 1998 Intel Corporation Process Morph3d.Quality() For I = 1 to 4 do Let d[I] = Distance squared from Morph3d.realA (I) to Morph3d.fakeB (I) End for Let TB = {B.triangle (1), B.triangle (2), B.Triangle (3), B.triangle (4) } Let T_MappedA = {} For I = 1 to 4 do Let tA = Morph3d.connectivity (I) Let tA_map1 = Morph3d.fakeB [tA [1]] Let tA_map2 = Morph3d.fakeB [tA [2]] Let tA_map3 = Morph3d.fakeB [tA [3]] Let tA_map = indexed triangle (tB1, tB2, tB3) Add tA_map to T_MappedA End for If (TB != T_MappedA) Return (−Infinity) End if Return (d[1] + d[2] + d[3] + d[4]) * −1
[0032] Table IV illustrates an embodiment of a process for the 2-D case for modifying the previously described MORPH data structure embodiment to match the topology changes.
TABLE IV © 1998 Intel Corporation Process Modify 2-D Morph (ProgPgon A, ProgPgon B, MORPH2D CurMorph) /* Initialize parameters specifying how to increase resolution of A */ Let v = new vertex to add to A, in order to increase A's resolution Let pos = index in A.vertices (and CurMorph.realA) where to insert nv /* Changes required to CurMorph.realA: */ CurMorph.realA.insert_at (pos, v) /* Changes required to CurMorph.realB: none */ /* Changes required to CurMorph.fakeA: */ Let nvr = CurMorph.realA.size () Let old_nvr = nvr − 1 Let posM1 = 1 + ((pos − 2 + nvr) MOD nvr) /* position before pos */ Let posP1 = (pos MOD nvr) + 1 /* position after pos */ Let vrp1 = CurMorph.realA [posP1] Let vrm1 = CurMorph.realA [posM1] Let Ipos = index of (real, pos) in CurMorph.vert_arr /* position of vr in vert_arr */ Let IposM1 = index of (real, posM1) in CurMorph.vert_arr Let nf = (Ipos − IposM1 − I + nvr) MOD nvr /* # fake verts on removed edge */ Let NT_before = 0 /* #fake verts mapped to new edge between vrm and v */ Let d_orig = distance (vrp1, vrm1) Let dv_vrm1 = distance (v, vrm1) Let dv_vrp1 = dist (v, vrp1) Let d_new = dv_vrm1 + dv_vrp1 Let r = dv_vrm1/d_new For i = 1 to nf do Let idx_fake = 1 + ((Ipos − 1 + i) MOD nvr) /* Usually (Ipos + i) */ Let (which_A, which_fake) = CurMorph.vert_arr [idx_fake] Let vf = CurMorph.fakeA [which_fake] Let d1 = distance (vf, vrm1) Let ratio = d1/d_orig Let new_fake if (new_fake_d < dv_vrm1) Let new_vf = point at distance new_fake_d from vrm1,towards v NT_before = NT_before + 1 else new_fake_d = new_fake_d − dv_vrm1 Let new_vf = point at distance new_fake_d from v, towards vrp1 end if CurMorph.fakeA [which_fake] = new_vf End for /* Changes required to CurMorph.fakeB: */ Let old_posM1 = 1 + ((pos − 2 + old_nvr) MOD old_nvr) /* position before pos */ Let fvr = CurMorph.fakeB [pos] Let fvrm1 = CurMorph.fakeB [oldposM1] Let dtot = distance from fvrm1 to fvr on B Let d = r * dtot Let new_fake_vertex = traverse B from fvrm1 towards fvr, stopping at distance d CurMorph.fakeB.insert_at (pos, new_fake_vertex) /* Changes required to CurMorph.vert_arr: */ For i = 1 to CurMorph.vert_arr.size () do Let (whicharr, j) = CurMorph.vert_arr [i] if (j >= pos) and (whicharr == real) CurMorph.vert_arr [j] = (real, j+1) End if End loop CurMorph.vert_arr.insert_at (IposM1 + NT_before, (real, pos))
[0033] Table V illustrates an embodiment of a process for the 3-D case for modifying the previously described MORPH data structure embodiment to match the topology changes.
TABLE V © 1998 Intel Corporation Process Modify 3-D Morph (ProgMesh A, ProgMesh B, MORPH3D CurMorph) /* Initialize parameters specifying how to increase resolution of mesh A */ Let vts = index of the vertex to split in mesh A, to increase A's resolution Let nv = new vertex to add to mesh A, in order to increase A's resolution Let add_list = {triangles to add to mesh A, in order to increase A's resolution} Let del_list = {triangles to remove from mesh A, when increasing A's resolution} /* Changes required to CurMorph.realA: */ CurMorph.realA.addlast (nv) /* Changes required to CurMorph.realB: none */ /* Changes required to CurMorph.fakeA: none */ /* Changes required to CurMorph.fakeB: */ Let v = CurMorph.fakeB [vts] CurMorph.fakeB.addlast (v) /* Changes required to CurMorph.vert_arr: */ CurMorph. vert_arr. addlast ((real, size(CurMorph.realA))) /* Changes required to CurMorph.connectivity: */ Let n = del_list.size() For i = 1 to n do Let (a, b, c) = del_list [i] Let (d, e, f) = add_list [i] Let ia = index of (real, a) in CurMorph.vert_arr Let ib = index of (real, b) in CurMorph.vert_arr Let ic = index of (real, c) in CurMorph.vert_arr Let id = index of (real, d) in CurMorph.vert_arr Let ie = index of (real, e) in CurMorph.vert_arr Let if = index of (real, f) in CurMorph.vert_arr Let it = index of (ia, ib, ic) in CurMorph.connectivity CurMorph.connectivity [it] = (id, ie, if) End for For i = n+1 to add_list.size() do Let (d, e, f) = add list [i] Let id = index of (real, d) in CurMorph.vert_arr Let ie = index of (real, e) in CurMorph.vert_arr Let if = index of (real, f) in CurMorph.vert_arr Add (id, ie, if) to CurMorph.connectivity End for
[0034] Both of the modify processes shown may be used for the case of increasing model A's resolution. Similar processes may be used for the case of increasing model B's resolution.
[0035]
[0036] These elements perform their conventional functions well known in the art. In particular, mass storage
[0037] While this invention has been described with reference to illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications of the illustrative embodiments, as well as other embodiments of the invention, which are apparent to persons skilled in the art to which the inventions pertains are deemed to lie within the spirit and scope of the invention.