The present description will be better understood from the following detailed description read in light of the accompanying drawings, wherein:
Like reference numerals are used to designate like parts in the accompanying drawings.
The detailed description provided below in connection with the appended drawings is intended as a description of the present examples and is not intended to represent the only forms in which the present example may be constructed or utilized. The description sets forth the functions of the example and the sequence of steps for constructing and operating the example. However, the same or equivalent functions and sequences may be accomplished by different examples.
Although the present examples are described and illustrated herein as being implemented in a computer system, the system described is provided as an example and not a limitation. As those skilled in the art will appreciate, the present examples are suitable for application in a variety of different types of computer systems.
This description relates generally to an automated system and method for producing a deformed polygon mesh from an original mesh using a subspace solving algorithm. A user of a typical three dimensional (3D) polygon mesh manipulation computer application may wish to add movement, or animate, a polygon mesh representing a physical object such as a human being or a virtual object such as a cartoon character. Typically, a 3D polygon mesh manipulation computer application will produce frames of video representing the animated 3D polygon mesh such that viewer may use a simple video player to view the pre-rendered animation. In an alternative example, a user may export a 3D polygon mesh, associated graphic textures, other visual information such as bump maps, and associated three dimensional coordinates representing animated movement to a system designed specifically for rendering 3D polygon mesh animation in real time such as a video game engine.
A user may utilize a conventional 3D polygon mesh manipulation computer application, for example, a 3D editor, to create a mesh, indicate connection points, create textures and other visual effects for the exterior surfaces of the polygon mesh, and place the 3D polygon mesh at a beginning set of 3D coordinates. The user may then specify a new set of 3D coordinates for portions of the 3D polygon mesh which represent the ending points of the motion the user wishes to animate. The conventional 3D polygon mesh manipulation computer application may then calculate the intervening 3D coordinates that the various portions of the 3D polygon mesh will move through as the 3D polygon mesh is “deformed” to the new set of 3D coordinates specified by the user.
For example, a user may use a 3D polygon mesh manipulation computer application to create a 3D polygon mesh representing a human arm and hand. The user may model the hand connected to the forearm. The user may further specify a joint between the hand and the forearm, and specify a range of motion for the hand. The user may then similarly specify a joint between the forearm and upper arm and then specify a range of motion for such a joint.
Once the user has created the initial 3D polygon mesh, specified the joints in the 3D polygon mesh, and specified a range of motion for the joints, the user may position the 3D mesh at an initial set of 3D coordinates in which the arm and hand are fully extended. The user may then specify a new set of 3D coordinates in which the hand is at a forty-five degree angle relative to the forearm and the forearm is at a forty-five degree angle relative to the upper arm. The user may then instruct the 3D polygon mesh manipulation computer application to create the “in between” 3D coordinates. However, the resulting animation may appear unnatural as the conventional 3D polygon mesh manipulation computer application may not have enough information to accurately depict realistic human movement. For example, the conventional 3D polygon mesh manipulation computer application may not maintain the length of the hand, forearm, or arm and as such the hand, forearm, or arm may appear to shrink in length. In another example, the conventional 3D polygon mesh manipulation computer application may not preserve the volume contained by the 3D polygon mesh and the hand, forearm, or arm may appear to unnaturally contract or expand in volume.
A conventional 3D polygon mesh manipulation computer application may allow a user to place a length constraint and a volume constraint on a 3D polygon mesh. However, such constraints may introduce a set of mathematical computations too complex to be calculated in real time for the user. That is, the user may not be able to interact with the 3D polygon mesh using the 3D polygon mesh manipulation computer application and view the results of deforming the 3D polygon mesh in real time due to performance issues, errors in rendering the 3D polygon mesh, and the like.
The following figure describes how a conventional 3D polygon mesh manipulation computer application or system may allow a user to impose skeleton and volume constraints on a 3D polygon mesh. The following figure describes the errors and/or mathematical computation complexities which may result when a conventional 3D polygon mesh manipulation computer application or system deforms a mesh with such constraints.
The conventional 3D polygon mesh manipulation system 110 may be any device capable of reading data associated with a 3D polygon mesh, allowing human user interaction with the 3D polygon mesh data, and rendering such 3D polygon mesh data in a visual manner. For example, the conventional 3D polygon mesh manipulation system 110 may be a typical 3D editor computer software application executing on a conventionally constructed personal computer. In an alternative example, the conventional 3D polygon mesh manipulation system 110 may be video game software executing on a video game console.
The conventional 3D rendering component 120 may be, at least, any device capable of receiving and rendering 3D polygon mesh data such that it can be displayed on a conventional display device 130. For example, the conventional 3D rendering component 120 may be a conventionally constructed 3D rendering computer hardware device such as a 3D video graphics card. In an alternative example, the conventional 3D rendering component 120 may be a software 3D renderer executing within a typical operating system executing on a conventionally constructed personal computer.
The conventional display device 130 may be any device capable of receiving video signals from the conventional 3D polygon mesh manipulation system 110 and displaying the result. For example, the conventional display device 130 may be a conventionally constructed computer monitor. In an alternative example, the conventional display device 130 may be a television monitor.
It is to be appreciated that these are examples only and such systems and components may be implemented in a variety of hardware and software systems. For example, the conventional 3D polygon mesh manipulation system 110 and its associated components may be implemented in a video game console, a portable telephone, a handheld computing device, or the like.
The conventional mesh constraint component 140 and conventional mesh deformation component 150 may be typical software components, assemblies, libraries, or the like, which, when executed, performs a service. The conventional mesh constraint component 140 and conventional mesh deformation component 150 may be communicatively coupled by software services provided by the conventional 3D polygon mesh manipulation system 110 such that each may exchange information, instructions, or the like. Further, the conventional mesh constraint component 140 and conventional mesh deformation component 150 may include a combination of software and/or hardware components or the like.
The conventional 3D polygon mesh manipulation system 110 may allow a user to manipulate a 3D polygon mesh and display the resulting conventional deformed 3D polygon mesh on the conventional display device 130. As such, the conventional 3D polygon mesh manipulation system 110 may make use of other conventional hardware and software components to accept user input and display the results.
The conventional mesh constraint component 140 may be used for allowing a user to specify a constraint on the deformation of a conventional 3D polygon mesh. For example, the conventional mesh constraint component 140 may allow a user to specify a control handle and attached control grids on a conventional 3D polygon mesh such that the control handle will allow only the parts of the 3D polygon mesh encapsulated by the control grids to be repositioned in three dimensions.
The conventional mesh deformation component 150 may implement a method for solving, or performing the mathematical calculations necessary, to produce a conventional “deformed” 3D polygon mesh. Such a conventional mesh deformation component 150 may further accept linear constraints as specified by the user using the conventional mesh constraint component 140. A linear constraint may be a constraint which may be expressed as a computer-executable linear mathematical function.
In particular, a 3D polygon mesh may be represented as a tuple (K,X). The variable K may refer to the simplicial complex containing the vertices, edges, and triangles included in the 3D polygon mesh. A simplicial complex may represent a set of simplices, or, multidimensional triangles. Vertices may represent one or more vertexes, or, one or more points where one or more edges of a polygon meet. The variable X may refer to the positions of the vertices associated with the 3D polygon mesh. For example, X=(x1, . . . ,xN)1,xi ε R3.
More particularly, the conventional mesh deformation component 150 may solve the mesh deformation by implementing the following energy minimization equation in a computer executable form,
using Laplacian coordinates. The use of Laplacian coordinates in the deformation of 3D polygon meshes is known in the art and will not be discussed here. Further, in the equation above, f1(X)=LX−{circumflex over (δ)} is for reconstructing X from its Laplacian coordinates {circumflex over (δ)}(X) and L is the Laplacian operator matrix. In addition, the user may have used the conventional mesh constraint component 140 to specify constraints of the form fi(X),i>1 on the deformation. Such constraints may only be linear constraints as it may not be practical to introduce non-linear constraints into the equation above. For example, the computational power required to solve the above equation with non-linear constraints may be greater than can be provided by a conventionally constructed computing device.
However, should a user desire to add a non-linear constraint such as a volume constraint or skeleton constraint on the conventional 3D polygon mesh, the conventional mesh deformation component 150 may not solve the equation above in an efficient manner. An example of an effect of such inefficiency may be such that the user may not specify a non-linear constraint. Another example of an effect of such inefficiency may be such that the user may not manipulate a 3D polygon mesh interactively, or, in real time, and view the results interactively or in real time. Allowing the introduction of such non-linear constraints and a corresponding method for solving a deformation of a 3D polygon mesh with such non-linear constraints may be useful.
The system shown may be capable of reading data associated with a 3D polygon mesh, allowing human user interaction with such a 3D polygon mesh, and rendering such a 3D polygon mesh data as previously discussed. For example, the 3D polygon mesh manipulation system 210 may be a typical 3D editor computer software application executing on a conventionally constructed personal computer. Such a system may implement a deformation method 240 for efficiently solving the deformation of a 3D polygon mesh including linear and non-linear constraints. Such a system may further implement a skeleton constraint method 220 for specifying a skeleton constraint on a 3D polygon mesh.
The mesh constraint component 215 and polygon mesh deformation component 230 may be typical software components, assemblies, libraries, or the like, which, when executed, performs a service. The mesh constraint component 215 and skeleton constraint method 220 may be communicatively coupled by software services provided by the 3D polygon mesh manipulation system 210 such that each may exchange information, instructions, or the like. In another example, the mesh constraint component 215 and polygon mesh deformation component 230 may include a combination of software and/or hardware components or the like.
The mesh constraint component 215 may be used to allow a user to specify a constraint on the deformation of a conventional 3D polygon mesh. For example, the mesh constraint component 215 may provide a user interface to allow a skeleton constraint to be specified on a 3D polygon mesh or a portion of a 3D polygon mesh. In another example, the mesh constraint component 215 may provide a user interface to allow a volume constraint and/or projection constraint to be specified on a 3D polygon mesh.
The mesh constraint component 215 may allow a user to specify a volume constraint, a projection constraint, a skeleton constraint, and the like. A volume constraint may preserve the total volume of a 3D polygon mesh. For example, if a 3D polygon mesh is composed of a cube, a volume constraint imposed on such a cube would ensure that if the cube were deformed to the shape of a sphere, the sphere may enclose the same volume as the original cube. A projection constraint may be useful for a user to manipulate a 3D polygon mesh by constraining the movement of a 3D point such that the point may only move along a ray in one of the three dimensions. The effect of such a projection constraint may be such that the user may “lock” one point of a 3D polygon mesh in two dimensions. A skeleton constraint may constrain part of a 3D polygon mesh to be “unbendable” during manipulation by the user. For example, if a user creates a 3D polygon mesh representing a human arm, the user may draw a two dimensional skeleton constraint representing the unbendable areas of the human arm.
The deformation method 240 may allow a user to specify both linear and non-linear constraints as mentioned above, manipulate a 3D polygon mesh, and view the deformed mesh interactively. For example, the user may be able to create a 3D polygon mesh, specify joints or points of articulation, specify control handles, and then manipulate the control handles to position parts of the 3D polygon mesh to new points in three dimensions.
Such a deformation method may first build a coarse control 3D polygon mesh around the original 3D polygon mesh. The building of a coarse control 3D polygon mesh around the original 3D polygon mesh is known to those in the art and will not be discussed here. The vertices of the coarse control 3D polygon mesh may be referred to as the subspace of the coarse control 3D polygon mesh. As discussed with respect to the mesh deformation component 150 of
As discussed previously, a user may impose several non-linear constraints on the computation of the deformed mesh. Some non-linear constraints may be expressed as a Boolean, or, true or false value, for example imposing a constraint to maintain volume. Some non-linear constraints may be expressed as data, for example, a skeleton constraint may be expressed as a series of 3D points. An example of how a skeleton constraint may be specified follows.
Block 310 may refer to an operation in which a two dimensional (2D) skeleton line is specified over a 3D polygon mesh at the “eye point” of the 3D polygon mesh. Such an eye point may refer to the view position of the 3D polygon mesh when the 3D polygon mesh is rendered on a display device. Such an operation may be performed, for example, by a user using a computer mouse to draw or specify a line over a rendered 3D polygon mesh.
Block 320 may refer to an operation in which a ray, or straight line segment, is cast or extended from the eye point of the 3D polygon mesh through each individual measurement unit in the 2D skeleton line for a predetermined length that passes through the entire 3D polygon mesh. For example, the units of measurement of the 2D skeleton line may be screen pixels, and a ray may be cast from the eye point through each pixel in the 2D skeleton line. That is, if the skeleton line is 10 pixels in length, such an operation will extend 10 individual rays from the eye point through each pixel in the 2D skeleton line.
Block 330 may refer to an operation in which the 3D point at which each ray intersects with the 3D polygon mesh is calculated. Such an operation will result in at least two 3D points for each ray as the ray will have been extended for such a length as to intersect at least two surfaces of the 3D polygon mesh at block 320.
Block 340 may refer to an operation in which a line segment is created at a 3D point located on the ray at the midpoint between the 3D points calculated at block 330. Such a midpoint may be an approximation and may be discovered through the use of a least squares fitting algorithm. The operation is repeated for each ray created at block 320. The result of such an operation may be a 3D skeleton line located within the 3D polygon mesh.
Block 350 may refer to an optional operation in which a first boundary plane is created perpendicular to the first end of the 3D skeleton line created at block 340. Such a first boundary plane may be created such that the plane intersects all 3D points of the mesh that have common coordinate with the first end of the 3D skeleton line. That is, each 3D point of the 3D polygon mesh which is intersected by a ray cast from the first end of the 3D skeleton point perpendicularly may be an outer edge of the first boundary plane.
Block 360 may refer to an optional operation in which a second boundary plane is created perpendicular to the second end of the 3D skeleton line created at block 340. Such a second boundary plane may be created such that the plane intersects all 3D points of the mesh that have common coordinate with the second end of the 3D skeleton line. That is, each 3D point of the 3D polygon mesh which is intersected by a ray cast from the second end of the 3D skeleton point perpendicularly may be an outer edge of the second boundary plane.
Block 370 may refer to an operation in which the mesh region constrained by the first boundary plane created at block 350 and the second boundary plane created at block 360 is determined. Such a determination may be accomplished using any method which determines the constrained area. For example, the triangle located on the 3D polygon mesh that are intersected by each ray cast at block 320 may be “grown” or increased in area until each edge of each triangle meets an edge of another triangle or a first boundary plane or second boundary plane.
Block 410 may refer to an operation in which a coarse control 3D polygon mesh is created to encapsulate the original 3D polygon mesh to be deformed. Such an operation may be performed using any suitable method. For example, a coarse control mesh may be created using a progressive convex hull construction method. In another example, if the original 3D polygon mesh is not a “closed” 3D polygon mesh or, a 3D polygon mesh includes at least one area that does not specify a 3D point or polygon, the original 3D polygon mesh is closed by creating a new polygon to fill the empty area. Such as coarse control 3D polygon mesh may or may not be visible to a user.
Block 420 may refer to an operation in which a determination is made as to whether or not a user manipulated at least a portion of the original 3D polygon mesh. Such a determination may be made by inspecting the state of the original 3D polygon mesh and monitoring changes in location of any individual 3D points or polygons included in the original 3D polygon mesh. In response to a positive determination, flow continues to block 430. In response to a negative determination, flow continues to block 440.
Block 440 may refer to an operation in which the example method 400 terminates.
Block 430 may refer to an operation in which the 3D polygon mesh resulting from the “deformation” or manipulation of the original 3D polygon mesh at block 430 is determined or solved. Such an operation will be discussed fully in the discussion of
Block 440 may refer to an operation in which the resulting deformed or manipulated 3D polygon mesh determined at block 430 is rendered such that the resulting deformed for manipulated 3D polygon mesh may be viewed by a user. Such a rendering of a 3D polygon mesh is well known to those in the art and will not be discussed here.
Block 410 may refer to an operation in which a user may specify a constraint on the deformation of the original 3D polygon mesh. Such a constraint may be a Laplacian constraint, a skeleton constraint, a volume constraint, a projection constraint, or the like.
For example, the vertex positions X for a 3D polygon mesh may be reconstructed from the corresponding Laplacian coordinates given by the equation {circumflex over (δ)}={circumflex over (δ)}(X) where {circumflex over (δ)}(X) may represent the Laplacian coordinates of X. That is, a Laplacian constraint may be imposed on the original 3D polygon mesh by implementing the following equation in computer executable form:
L X={circumflex over (δ)}(X)
where L may represent the Laplacian operator matrix. More particularly, the Laplacian coordinates may be calculated by implementing the following equation in computer executable form:
where δi may represent the differential coordinate of an inner vertex xi of the 3D polygon mesh, xi,1, . . . ,xi,n
In another example, a skeleton constraint may be imposed on the original 3D polygon mesh by implementing the following equation in a computer executable form:
where X may represent the vertices of the original 3D polygon mesh, Γ may be a constant r×n matrix with
krj may be a set of constant coefficients created as the mean value coordinates with respect to the constrained portion of the original 3D polygon mesh, r may be the average length of the unbendable region of the original 3D polygon mesh, Θ may be a row vector with (Θ)i=krj−k0j, and {circumflex over (ρ)} may be the length of the 3D skeleton line as determined in the discussion of
In another example, a volume constraint may be imposed on the original 3D polygon mesh by implementing the following equation in computer executable form:
ψ(X)={circumflex over (υ)}
where X may represent the vertices of the original 3D polygon mesh, and {circumflex over (υ)} may represent the total volume of the original 3D polygon mesh.
In another example, a projection constraint may be imposed on the original 3D polygon mesh by implementing the following equation in computer executable form:
ΩX={circumflex over (ω)}
where Ω may represent a constant 2×3n matrix and {circumflex over (ω)} may represent a constant column vector.
Block 520 may refer to an operation in which the deformation energy of the original 3D polygon mesh and the constraints specified at block 510 are projected to the vertices of the coarse control 3D polygon mesh created at block 410 of
minimize∥(LW)P−b(WP)∥2 subject to g(WP)=0
where P may represent the vertices of the coarse control 3D polygon mesh, L may refer to a constant matrix, b(WP) may be a vector function with a Jacobian value that is small enough to be suitable, and g(WP) may represent the constraints.
For example, if the constraints discussed at block 510 are included, the following matrices and vector functions may be used for the above equation:
Block 530 may refer to an operation in which the Gauss-Newton method may be used to determine the deformed 3D polygon mesh. For example, the deformed 3D polygon mesh may be determined by implementing the following function in computer executable form:
h
p=−(WtLtLW)−1(WtLtf+(JgW)tλ) where
λp=−((JgW)(WtLtLW)−1(JgW)t)−1(g−(JgW)(WtLtLW)−1WtLtf), W
may represent a matrix that interpolates the original 3D polygon mesh from the coarse control 3D polygon mesh, Jg may represent the Jacobian of g.
For example, an iteration step size may be selected and for each iteration setting Wp=Wp−1+ahp then substituting the result in the following equation in computer executable form:
minimize∥(LW)P−b(WP)∥2 subject to g(WP)=0.
Depending on the exact configuration and type of computing device, memory 600 may be volatile (such as RAM), non-volatile (such as ROM, flash memory, etc.) or some combination of the two. Additionally, computing device 600 may also have additional features/functionality. For example, computing device 600 may include multiple CPU's. The described methods may be executed in any manner by any processing unit in computing device 600. For example, the described process may be executed by both multiple CPU's in parallel.
Computing device 600 may also include additional storage (removable and/or non-removable) including, but not limited to, magnetic or optical disks or tape. Such additional storage is illustrated in
Computing device 600 may also contain communications device(s) 640 that allow the device to communicate with other devices. Communications device(s) 640 is an example of communication media. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. The term computer-readable media as used herein includes both computer storage media and communication media. The described methods may be encoded in any computer-readable media in any form, such as data, computer-executable instructions, and the like.
Computing device 600 may also have input device(s) 635 such as keyboard, mouse, pen, voice input device, touch input device, etc. Output device(s) 630 such as a display, speakers, printer, etc. may also be included. All these devices are well know in the art and need not be discussed at length.
Those skilled in the art will realize that storage devices utilized to store program instructions can be distributed across a network. For example a remote computer may store an example of the process described as software. A local or terminal computer may access the remote computer and download a part or all of the software to run the program.
Alternatively the local computer may download pieces of the software as needed, or distributively process by executing some software instructions at the local terminal and some at the remote computer (or computer network). Those skilled in the art will also realize that by utilizing conventional techniques known to those skilled in the art that all, or a portion of the software instructions may be carried out by a dedicated circuit, such as a DSP, programmable logic array, or the like.