A University of Southern California computer scientist has created a powerful and elegant algorithm to compress the large and ungainly files that represent 3-D shapes used in animations, video games and other computer graphics applications.
Simplifying by condensing small triangles (colored) into larger ones, and then into polygons.
“We simply did not have the tools to deal efficiently and accurately with three-dimensional digital geometry," he says. Desbrun will present his solution to the problem at this summer’s 2004 SIGGRAPH convention in Los Angeles.
His "Variational Shape Approximation" scheme created with two collaborators produces simplified but highly accurate "meshes" representing 3-D shapes. The meshes are orders of magnitude smaller than those produced by existing ways of handling such files but remain completely compatible with all widely used methods to display and use the information.
“The beauty of their approach,” says Professor Peter Schˆder of Caltech, who is leader of the Multi-Res modeling group and an expert in the field, “lies in its robustness, solid mathematical foundations, and speed for (very complex) geometries of interest.”
Computer applications depending on 3-D representations of objects are increasing rapidly:
Desbrun says that the data output from current 3-D scanners consists of a mesh of connected triangles and has many more triangles than is necessary to represent the shape. The data is redundant and costly to further process.
An alternative route: the Desbrun group's algorithm analyzes a shape (left) into "proxy" areas (center) that are then used to create a rough mesh of flat polygons providing a compact approximation of the shape, which can then be refined.
Desbrun explains that his accomplishment was to simplify such a mesh, by combining as many of the little triangles as possible into larger elements without compromising the actual shape. Nearly flat regions are efficiently represented by one large, flat mesh element while curved regions require more mesh elements.
Computer scientists have struggled with the problem of finding an optimal mix of large and small elements for years. In 1998, theoreticians proved that the problem was "NP hard" — that no general solution exists that can be solved by a computer in finite length of time. They did find work-arounds: fast methods to simplify meshes, which were unable to guarantee accuracy, and accurate techniques, which were too slow.
The Desbrun team’s novel approach comes from the seemingly unrelated field of machine learning using a technique invented in 1959 called “Lloyd Clustering” named after its inventor Stuart Lloyd. Desbrun’s algorithm uses it to automatically segment an object into a group of non-overlapping connected regions – an instant draft alternative to the too-numerous triangles of the original scan.
Then the method provides a fast and accurate way to test these alternative larger regions – called proxies – for their fit to the object, and successively optimize them in a small number of iterations. The process also allows direct manipulation of the results for special purposes by the user – making it a very convenient tool for digital artists in animation studios. The user can select particular areas of a 3-D representation to make them either less or more detailed, or to emphasize them.
"For instance, when approximating a human face with very few proxies, the eyes may not be apparent." But a user can adjust the technique to fine-tune the eye region while leaving other areas in rougher form.
The method also allows users to fine tune areas where the method has reached a dead end by giving hints, in the form of a “seed triangle.”
The proxy representation, once refined, is then reconverted into a now-optimized mesh -- but not necessarily a mesh of triangles. The technique turns them instead into an assortment of polygons -- some triangles, but also four, five, six or more sided figures that more efficiently represent the shape. These in turn feed seamlessly into standard software to represent 3-D shapes on computer screens, or for other uses.
“This is not a hack,” says another expert, in the field GÈrard Medioni, professor of computer science and chair of the department at the Viterbi School, using the term for a makeshift, unsystematic improvisation. “It has a strong formal basis. You can make up extreme cases that will trick it, but for ordinary shapes, it works remarkably well."
"We believe this approach to geometry approximation offers both solid foundations and unprecedented results," said Desbrun. "Combined with the other recent advances of our research lab on mesh compression, it is a significant step to facilitate use of 3-D geometry in many areas."