Metaball
surface node
Creates metaballs and meta-superquadric surfaces.
This node creates metaballs and metasurfaces. If you click and drag the mouse on the Construction Plane, it generates a metaball whose X radius is specified by your drag. Metasurfaces are generalized metaballs meaning that they aren’t necessarily ellipsoidal.
Introduction
Metaballs provide a method for creating an organic-looking surface. The metaballs are blobs (“fields”) of “density” floating in space. Houdini skins a surface around areas where the density is greater than some threshold.
When two metaballs overlap, Houdini adds their field effects together. Because the density of the force field can be increased by the proximity of other metaball force fields, metaballs have the unique property that they change their shape to adapt and fuse with surrounding metaballs. This makes them very effective for modeling organic surfaces.
You can specify negative Weights to create “pusher” metaballs. This lets you create holes in the surface by effectively subtracting density.
The field is controlled by a kernel function and a weight. The kernel function controls the gradient of the density value of a metaball field from 1 (at the center) to 0 (at its outside edge). The weight scales the density to shift the location of the surface closer or further away from the center. You can currently specify the shape of the field as an ellipsoid or a super-quadric.
Placing Metaballs
| To... | Do this |
|---|---|
|
Place the metaball anywhere in the scene |
|
|
Place the metaball at the origin |
If you are at the geometry level or have an object selected and you create a metaball, it will go into the selected object. If you are at the scene level and create a metaball, the viewer and the network editor will switch to the geometry level of the selected object. This unique feature allows you to merge multiple metaballs together automatically by creating them sequentially and close together.
Metaballs can be moved once they are placed by either dragging them in the scene view or changing the values in the parameter editor.
Metaball Handles
There are special handles available at the geometry level for the
Metaball object that allow you to stretch and squash it.
-
Move to the geometry level by double clicking
the metaball node in the network editor or by clicking the Jump to Operator button on the operation controls toolbar. -
Drag the handles to squash or stretch the metaball.
|
Stretch or squash the metaball along the x-axis |
Drag the red handle. |
|
Stretch or squash the metaball along the y-axis |
Drag the green handle. |
|
Stretch or squash the metaball along the z-axis |
Drag the blue handle. |
How to
| To... | Do this |
|---|---|
|
Make metaballs interact with each other |
|
|
Create a large number of metaballs easily |
|
|
Speed up the display of metaballs |
|
|
Convert metaballs to other geometry types |
|
Super-quadratic field shapes
Instead of the regular ellipsoid field shape, you can increase or decrease the XY and Z exponent parameters to create “star-ish” (exponent > 1) or “square-ish” (exponent < 1).
A metaball is known as a super-quadratic if either exponent is not equal to one.
How metaballs work
Each metaball has a “sphere of influence”. When you merge two metaballs and they extend into each other’s sphere of influence, they react in a way similar to drops of water: the surface tension works to form a smooth bridge between them. This is useful for making organic “blobby” shapes which meld into each other.
Metaballs can be thought of as spherical force fields whose surface is an implicit function defined at any point where the density of the force field equals a certain threshold. Because the density of the force field can be increased by the proximity of other metaball force fields, metaballs have the unique property that they change their shape to adapt and fuse with surrounding metaballs. This makes them very effective for modeling organic surfaces. For example, below we have a metaball. The surface of the metaball exists whenever the density of the metaball’s field reaches a certain threshold:
When two or more metaball force fields are combined, as in the illustration below, the resulting density of the force fields is added, and the surface extends to include that area where the force fields intersect and create density values with a value of one. For more information on Metaballs, see the Geometry Types section.
You can see a metaball’s sphere of influence by turning on Display primitive hulls in the Display options toolbar.
This node is ideal for creating organic models, liquid effects and other blobby surfaces.
Houdini also uses metaballs in different situations to define “fields of influence”, such as for the Force node which pushes or pulls Springs, and for capturing complex character geometry with the Capture Metaball node.
Tips
|
Level of detail |
You can change the level of detail of the metaball and NURBS display by adjusting the Level of Detail parameter in display options. |
|
Better metaball shading |
Accurate metaball normals will be computed if the normal attribute exists when conversion to polygons is done. Thus, to get improved shading on polygonized metaballs, it’s a good idea to add the normal attribute (i.e. use a Facet SOP) before converting the metaballs. |
|
Using metaballs to prune L-system copying |
This is typically done by copying metaballs to every point of the deforming a polygonal/mesh input source with a Copy SOP. When doing this, it is a good idea to pass any deforming geometry through a Facet SOP and Consolidate Points to minimize the number of points you need to copy to. If converting from spline surfaces, you may want to refine your surfaces first to get a smooth distribution of metaballs. If you are using metaballs to create a deforming attractor for the Particle SOP, you may want to use a Group SOP to define a bounding area, and copy the metaballs only to the points included in that group. This makes it much easier to control and animate the attractor area. |
Meta Expressions
Metaball expressions are user-specified attributes that determine how metaballs are to be merged. These expressions can be built using a combination of quoted group names, unquoted primitive numbers, and the operations min, max, and sum. An example of a valid expression is
sum(max("group1", "group2"), max("group3", "group4"), 0, 1)
where group1, group2, group3 and group4 are the names of groups, and 0 and 1 are the primitive numbers of metaballs. The min, max, and sum operations can take an arbitrary number of arguments and support nested expressions such as sum(max(...), ...). Arguments to min, max, or sum are separated by commas. Providing a quoted group name is equivalent to simply adding each metaball primitive from that group to the current argument list. For example, if group1 contains metaballs with primitive numbers 0, 1 and 2, then the expression
max("group1")
is equivalent to
max(0, 1, 2)
Duplicate argument names are also supported by this expression. For example, if a metaball with primitive number 0 is defined, then specifying the expression sum(0, 0) is equivalent to merging two distinct metaballs at the same location as metaball 0.
The following images show two metaballs merged using the sum, max and min operations, respectively.
This expression can be set by creating a detail/string attribute with the desired expression on any geometry containing metaballs. This functionality is also partially exposed via the
MetaGroups SOP. This SOP allows users to easily generate expressions of the form
max(sum(...), sum(...), ..., sum(...))
by establishing a set of Metaball groupings. Each of these groupings consists of a list of group names, separated by spaces. For example, if two metaball groupings are defined by the SOP, one as 'group1 group2', and the other as 'group3 group4', then the SOP generates a Metaball expression equivalent to
max(sum("group1", "group2"), sum("group3", "group4"))
Parameters
|
Mode |
How to interpret the parameters used to specify the metaball.
|
|||||||||||||||||
|
Radius |
X radius of a metaball that is placed if you click on the Construction Plane without dragging. If you click and drag, the size of the metaball is over-ridden by the amount of drag. Entering non-equal values in the xyz fields results in ellipsoidal shapes. The X radius is defined by the distance dragged from the center, while the Y and Z radii vary proportionally with the X / Y and X / Z ratios in the parameter dialog. |
|||||||||||||||||
|
Center |
Center of the metaball. This value is updated whenever you click (and drag) to create a metaball. A new metaball will be positioned here if you type Enter . |
|||||||||||||||||
|
Weight |
How much “pull” the metaball has on surrounding metaballs, causing them to merge together. |
|||||||||||||||||
|
Kernel Function |
|
|||||||||||||||||
|
XY Exponent |
Determines inflation/contraction in the x and y axes. For metaballs, the exponent determines the inflation towards “squarishness” or contraction towards “starishness” as described below: > 1 = metaballs that appear more like a star. < 1 = metaballs that appear more squarish. 1 = metaballs that appear spherical. |
|||||||||||||||||
|
Z Exponent |
Determines inflation/contraction in the z axis. |
Example files
BlendMetaballs
$HFS/houdini/help/examples/nodes/sop/metaball/BlendMetaballs.cmd
This is a basic example of how metaballs interact as force fields with a density threshold and falloff. Metaballs can be created in Houdini through the Metaball SOP
The Point SOP is used to provide a visual representation of how metaballs interact when their respective fields blend into one another in an additive fashion.
Usages in other examples
| Example name | Example for | |
|---|---|---|
| Fire Pit example |
Material shader |
|
| SpringHair |
Spring surface node |
|
| BulgeTube |
Bulge surface node |
|
| BulgeCat |
Bulge surface node |
|
| ForceBasic |
Force surface node |
|
| PrimitiveMetaWeight |
Primitive surface node |
|
| MagnetBubbles |
Magnet surface node |
|
| MagnetDistortion |
Magnet surface node |
|
| ParticlePusher |
Particle surface node |
|
| ParticleAttractor |
Particle surface node |
|
| ParticleExamples |
Particle surface node |
|
| ParticleDisturbance |
Particle surface node |
|
| CreepBlob |
Creep surface node |
|
| SparksStream |
Stream particle node |
|
| SimpleMetaImport |
Meta-Loop Import VEX node |
|
| Volume Rendering - Metaballs as Volume |
Mantra render node |
|
| DentingWithPops |
SOP Solver dynamics node |
|
| VisualizeImpacts |
SOP Solver dynamics node |