Metaballs
Encyclopedia
Metaballs are, in computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

, organic-looking n-dimensional objects. The technique for rendering
Rendering (computer graphics)
Rendering is the process of generating an image from a model , by means of computer programs. A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene...

 metaballs was invented by Jim Blinn
Jim Blinn
James F. Blinn is a computer scientist who first became widely known for his work as a computer graphics expert at NASA's Jet Propulsion Laboratory , particularly his work on the pre-encounter animations for the Voyager project, his work on the Carl Sagan Cosmos documentary series and the research...

 in the early 1980s.

Each metaball is defined as a function
Function (mathematics)
In mathematics, a function associates one quantity, the argument of the function, also known as the input, with another quantity, the value of the function, also known as the output. A function assigns exactly one output to each input. The argument and the value may be real numbers, but they can...

 in n-dimensions (i.e. for three dimensions, ; three-dimensional metaballs tend to be most common, with two-dimensional implementations as well). A thresholding value is also chosen, to define a solid volume. Then,
represents whether the volume enclosed by the surface defined by metaballs is filled at or not.

A typical function chosen for metaballs is , where is the center of the metaball. However, due to the divide, it is computationally expensive. For this reason, approximate polynomial functions are typically used.

When seeking a more efficient falloff function, several qualities are desired:
  • Finite support. A function with finite support goes to zero at a maximum radius. When evaluating the metaball field, any points beyond their maximum radius from the sample point can be ignored. A hierarchical culling
    Culling
    Culling is the process of removing animals from a group based on specific criteria. This is done either to reinforce certain desirable characteristics or to remove certain undesirable characteristics from the group...

     system can thus ensure only the closest metaballs will need to be evaluated regardless of the total number in the field.
  • Smoothness. Because the isosurface
    Isosurface
    An isosurface is a three-dimensional analog of an isoline. It is a surface that represents points of a constant value within a volume of space; in other words, it is a level set of a continuous function whose domain is 3D-space.Isosurfaces are normally displayed using computer graphics, and are...

     is the result of adding the fields together, its smoothness is dependent on the smoothness of the falloff curves.


The simplest falloff curve that satisfies these criteria is: , where r is the distance to the point. This formulation avoids expensive square root
Square root
In mathematics, a square root of a number x is a number r such that r2 = x, or, in other words, a number r whose square is x...

 calls.

More complicated models use a Gaussian
GAUSSIAN
Gaussian is a computational chemistry software program initially released in 1970 by John Pople and his research group at Carnegie-Mellon University as Gaussian 70. It has been continuously updated since then...

 potential constrained to a finite radius or a mixture of polynomials to achieve smoothness. The Soft Object model by the Wyvill brothers provides higher degree of smoothness and still avoids square roots.

A simple generalization of metaballs is to apply the falloff curve to distance-from-lines or distance-from-surfaces.

There are a number of ways to render the metaballs to the screen. In the case of three dimensional metaballs, the two most common are brute force raycasting and the marching cubes
Marching cubes
Marching cubes is a computer graphics algorithm, published in the 1987 SIGGRAPH proceedings by Lorensen and Cline, for extracting a polygonal mesh of an isosurface from a three-dimensional scalar field...

 algorithm.

2D metaballs were a very common demo effect
Demo effect
Demo effects are computer-based real-time visual effects found in demos created by the demoscene.The main purpose of demo effects in demos is to show off the skills of the programmer...

 in the 1990s. The effect is also available as an XScreensaver
XScreenSaver
XScreenSaver is a collection of about two hundred free screensavers for Unix and Mac OS X computers. It was created by Jamie Zawinski in 1992 and is still maintained by him....

 module.


Further reading

  • Blinn, James F.  "A Generalization of Algebraic Surface Drawing." ACM Transactions on Graphics
    ACM Transactions on Graphics
    ACM Transactions on Graphics is a peer-reviewed scientific journal that aims to disseminate the latest findings of note in the field of computer graphics. It has been published since 1982 by the Association for Computing Machinery...

    1(3), July 1982, pp. 235–256.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK