background preloader

Metaballs

Facebook Twitter

Metaballs. 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. ; 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. When seeking a more efficient falloff function, several qualities are desired: Finite support. The simplest falloff curve that satisfies these criteria is: , where r is the distance to the point. More complicated models use a Gaussian potential constrained to a finite radius or a mixture of polynomials to achieve smoothness. A simple generalization of metaballs is to apply the falloff curve to distance-from-lines or distance-from-surfaces.

Further reading[edit] Exploring Metaballs and Isosurfaces in 2D. Introduction Posing the Question In the history of game development, there has always been a "standard" means to represent data in the game world. During the 2D era the world and its components were shown by using sprites -- collections of pixels to form an image. As the industry moved into 3 dimensions, this standard-format became the 3D model.

Models representing the world, characters, and objects as collections of vertices in 3D space. Both (arguably) represent the most basic element that can be used in the given number of dimensions, but still allow for the greatest amount of speed. But what about other data representations? Overview The goals of this article are three-fold: To discuss the history, concept, and implementation of metaballs and isosurfaces. One such effect that gained popularity was metaballs: squishy circular objects that had an organic look and feel to them. (Metaballs. What is an Isosurface?

Like we said above, an isosurface is a level set of this function. Metaball math. Introduction to metaballs Note: bold letters are vectors, normal letters are scalars Metaballs are described as: - mn = location of metaball number n - sn = size of metaball number n - k = number of balls - g = "goo"-value, which affects the way how metaballs are drawn - r = treshold for metaballs - p = place vector - |x| = magnitude (length) of vector x For a more "concrete" example, here's the same formula, written for two 2d metaballs: You could try to solve y from that equation and draw the metaballs like any normal 1-dimensional function, but as the number of balls increases, solving y becomes impossible.

Normal approach in drawing 2d metaballs is to scan through some grid (for example, every pixel on screen) and evaluate the metaball formula. If the result is true, draw a pixel there. Small black crosses show the metaball center points mn, n = {1, 2, 3, 4} Metaball normals This leads to Very fast method for drawing 2d metaballs Tracking the border Result: Walking among the path Results. Ryan's Guide to MetaBalls (aka Blobs)