This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)(Learn how and when to remove this template message)
In computer graphics, metaballs are organic-looking n-dimensional isosurfaces, characterised by their ability to meld together when in close proximity to create single, contiguous objects. This "blobby" appearance makes them versatile tools, often used to model organic objects and also to create base meshes for sculpting. The technique for rendering metaballs was invented by Jim Blinn in the early 1980s to model atom interactions for Carl Sagan's 1980 TV series Cosmos.
Each metaball is defined as a function in n dimensions (e.g., for three dimensions, ; three-dimensional metaballs tend to be most common, with two-dimensional implementations popular 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 division, 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 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 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 calls.
More complicated models use a Gaussian 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.
- Blinn, J. F. (July 1982). "A Generalization of Algebraic Surface Drawing". ACM Transactions on Graphics. 1 (3): 235–256. doi:10.1145/357306.357310.
- Implicit Surfaces article by Paul Bourke
- Meta Objects article from Blender wiki
- Metaballs article from SIGGRAPH website