Metaballs

Last updated
1: The influence of 2 positive metaballs on each other.
2: The influence of a negative metaball on a positive metaball by creating an indentation in the positive metaball's surface. Metaballs.png
1: The influence of 2 positive metaballs on each other.
2: The influence of a negative metaball on a positive metaball by creating an indentation in the positive metaball's surface.

In computer graphics, metaballs, also known as blobby objects, [1] [2] are organic-looking n-dimensional isosurfaces, characterised by their ability to meld together when in close proximity to create single, contiguous objects.

Contents

In solid modelling, polygon meshes are commonly used. In certain instances, however, metaballs are superior. A metaball's "blobby" appearance makes them versatile tools, often used to model organic objects and also to create base meshes for sculpting. [3]

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 . [4] It is also referred to colloquially as the "jelly effect" in the motion and UX design community, [5] commonly appearing in UI elements such as navigations and buttons. Metaball behavior corresponds to mitosis in cell biology, where chromosomes generate identical copies of themselves through cell division.

Definition

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,

that is, all points larger than the threshold are inside the metaball.

As a more informal definition, consider two circles in 2D, and at point P, the influence of each circle is proportional to 1/distance from the circle's center, with the influence at P being the sum of influences. If that sum equals the threshold at point P, then P is on the surface of the metaball. If the sum is greater than the threshold, P is inside the metaball.

Implementation

The interaction between two differently coloured 3D positive metaballs, created in Bryce.
Note that the two smaller metaballs combine to create one larger object. Metaball contact sheet.png
The interaction between two differently coloured 3D positive metaballs, created in Bryce.
Note that the two smaller metaballs combine to create one larger object.

A typical function chosen for metaballs is simply inverse distance, that is, the contribution to the thresholding function falls off asymptotically toward zero the distance from the centre of the metaball increases:

where scales the magnitude of the contribution (changing the radius of a metaball) and is the distance from the ball's center, calculated from cartesian coordinates as:

where is the center of the metaball.

Various other falloff functions have historically been used for reasons of computational efficiency. Desirable properties of the function include:

More complicated models use an inverse square law, or 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.[ citation needed ]

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 algorithm.

2D metaballs were a very common demo effect in the 1990s. The effect is also available as an XScreenSaver module.

See also

Related Research Articles

<span class="mw-page-title-main">Metric space</span> Mathematical space with a notion of distance

In mathematics, a metric space is a set together with a notion of distance between its elements, usually called points. The distance is measured by a function called a metric or distance function. Metric spaces are the most general setting for studying many of the concepts of mathematical analysis and geometry.

<span class="mw-page-title-main">Surface area</span> Measure of a two-dimensional surface

The surface area of a solid object is a measure of the total area that the surface of the object occupies. The mathematical definition of surface area in the presence of curved surfaces is considerably more involved than the definition of arc length of one-dimensional curves, or of the surface area for polyhedra, for which the surface area is the sum of the areas of its faces. Smooth surfaces, such as a sphere, are assigned surface area using their representation as parametric surfaces. This definition of surface area is based on methods of infinitesimal calculus and involves partial derivatives and double integration.

<span class="mw-page-title-main">Sphere</span> Set of points equidistant from a center

A sphere is a geometrical object that is a three-dimensional analogue to a two-dimensional circle. Formally, a sphere is the set of points that are all at the same distance r from a given point in three-dimensional space. That given point is the center of the sphere, and r is the sphere's radius. The earliest known mentions of spheres appear in the work of the ancient Greek mathematicians.

In mathematics, the radius of convergence of a power series is the radius of the largest disk at the center of the series in which the series converges. It is either a non-negative real number or . When it is positive, the power series converges absolutely and uniformly on compact sets inside the open disk of radius equal to the radius of convergence, and it is the Taylor series of the analytic function to which it converges. In case of multiple singularities of a function, the radius of convergence is the shortest or minimum of all the respective distances calculated from the center of the disk of convergence to the respective singularities of the function.

<span class="mw-page-title-main">Riemannian manifold</span> Smooth manifold with an inner product on each tangent space

In differential geometry, a Riemannian manifold is a geometric space on which many geometric notions such as distance, angles, length, volume, and curvature are defined. Euclidean space, the -sphere, hyperbolic space, and smooth surfaces in three-dimensional space, such as ellipsoids and paraboloids, are all examples of Riemannian manifolds. Riemannian manifolds are named after German mathematician Bernhard Riemann, who first conceptualized them.

<span class="mw-page-title-main">Normal (geometry)</span> Line or vector perpendicular to a curve or a surface

In geometry, a normal is an object that is perpendicular to a given object. For example, the normal line to a plane curve at a given point is the line perpendicular to the tangent line to the curve at the point.

<span class="mw-page-title-main">Cylindrical coordinate system</span> Coordinates comprising two distances and an angle

A cylindrical coordinate system is a three-dimensional coordinate system that specifies point positions by the distance from a chosen reference axis (axis L in the image opposite), the direction from the axis relative to a chosen reference direction (axis A), and the distance from a chosen reference plane perpendicular to the axis (plane containing the purple section). The latter distance is given as a positive or negative number depending on which side of the reference plane faces the point.

Geopotential is the potential of the Earth's gravity field. For convenience it is often defined as the negative of the potential energy per unit mass, so that the gravity vector is obtained as the gradient of the geopotential, without the negation. In addition to the actual potential, a theoretical normal potential and their difference, the disturbing potential, can also be defined.

<span class="mw-page-title-main">3D projection</span> Design technique

A 3D projection is a design technique used to display a three-dimensional (3D) object on a two-dimensional (2D) surface. These projections rely on visual perspective and aspect analysis to project a complex object for viewing capability on a simpler plane.

<span class="mw-page-title-main">Square (algebra)</span> Product of a number by itself

In mathematics, a square is the result of multiplying a number by itself. The verb "to square" is used to denote this operation. Squaring is the same as raising to the power 2, and is denoted by a superscript 2; for instance, the square of 3 may be written as 32, which is the number 9. In some cases when superscripts are not available, as for instance in programming languages or plain text files, the notations x^2 (caret) or x**2 may be used in place of x2. The adjective which corresponds to squaring is quadratic.

<span class="mw-page-title-main">Cone</span> Geometric shape

A cone is a three-dimensional geometric shape that tapers smoothly from a flat base to a point called the apex or vertex that is not contained in the base.

<span class="mw-page-title-main">Point spread function</span> Response in an optical imaging system

The point spread function (PSF) describes the response of a focused optical imaging system to a point source or point object. A more general term for the PSF is the system's impulse response; the PSF is the impulse response or impulse response function (IRF) of a focused optical imaging system. The PSF in many contexts can be thought of as the shapeless blob in an image that should represent a single point object. We can consider this as a spatial impulse response function. In functional terms, it is the spatial domain version of the optical transfer function (OTF) of an imaging system. It is a useful concept in Fourier optics, astronomical imaging, medical imaging, electron microscopy and other imaging techniques such as 3D microscopy and fluorescence microscopy.

<span class="mw-page-title-main">Isosurface</span> Surface representing points of constant value within a volume

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 3-space.

<span class="mw-page-title-main">Implicit surface</span> Surface in 3D space defined by an implicit function of three variables

In mathematics, an implicit surface is a surface in Euclidean space defined by an equation

Abstract analytic number theory is a branch of mathematics which takes the ideas and techniques of classical analytic number theory and applies them to a variety of different mathematical fields. The classical prime number theorem serves as a prototypical example, and the emphasis is on abstract asymptotic distribution results. The theory was invented and developed by mathematicians such as John Knopfmacher and Arne Beurling in the twentieth century.

<span class="mw-page-title-main">Manifold</span> Topological space that locally resembles Euclidean space

In mathematics, a manifold is a topological space that locally resembles Euclidean space near each point. More precisely, an -dimensional manifold, or -manifold for short, is a topological space with the property that each point has a neighborhood that is homeomorphic to an open subset of -dimensional Euclidean space.

In mathematics, the structure tensor, also referred to as the second-moment matrix, is a matrix derived from the gradient of a function. It describes the distribution of the gradient in a specified neighborhood around a point and makes the information invariant to the observing coordinates. The structure tensor is often used in image processing and computer vision.

Thin plate splines (TPS) are a spline-based technique for data interpolation and smoothing. "A spline is a function defined by polynomials in a piecewise manner." They were introduced to geometric design by Duchon. They are an important special case of a polyharmonic spline. Robust Point Matching (RPM) is a common extension and shortly known as the TPS-RPM algorithm.

In numerical analysis, multivariate interpolation is interpolation on functions of more than one variable ; when the variates are spatial coordinates, it is also known as spatial interpolation.

Mean shift is a non-parametric feature-space mathematical analysis technique for locating the maxima of a density function, a so-called mode-seeking algorithm. Application domains include cluster analysis in computer vision and image processing.

References

  1. "blobby model". A Dictionary of Computing. Oxford University Press. 2019. Retrieved 2023-10-27 via www.encyclopedia.com.
  2. Ward, Matthew. "An Overview of Metaballs/Blobby Objects". Worcester Polytechnic Institute . Retrieved 2023-10-27.
  3. "Art of Joe Daniels: Digital Sculpting Tutorial". 8 October 2007.
  4. "CG Notes: Metaballs Intro".
  5. "The "jelly effect" has recently been very popular and used in lots of animations. … | After effect tutorial, Adobe after effects tutorials, Motion graphics tutorial". Pinterest. Retrieved 2020-08-11.

Further reading