Skip to content

Metaball T3D

Summary

The Metaball T3D joins spheres into one smooth surface. The balls come from a CHOP (a sample per ball: x, y, z, radius), a TOP (a pixel per ball, RGBA = x, y, z, radius), a POP (points with P, PointScale and Color), or any combination, and merge through a smooth minimum whose reach is Goop. With no data connected the output is the background.

Positions and radii are in the operator's space: the volume's centre is 0 and the width is 1, and the transform parameters move the whole set. The output is the filled surface, as for the other shape generators, or its signed distance (Output SDF). The operator exports its mapping to world space: point the T3D Transform Reference of volume, surface or voltrace at it and the rendered volume lines up with the points that made it (see Coordinates and units).

Every voxel visits every ball, so the cost is voxels × balls: 64³ with 100 balls is 26 million distance evaluations. For thousands of particles, splat them into the volume with point_cloud instead.

Parameters - Metaball Page

Data CHOP Datachop - Balls from a CHOP: one sample per ball, four channels in order, x, y, z and radius. Positions and radii in the operator's space: the volume's centre is 0 and the width is 1 (see Aspect Correction). CHOP

Data TOP Datatop - Balls from a TOP: one pixel per ball, RGBA = x, y, z, radius, in the same space as Data CHOP. Use a 32-bit float TOP; every pixel is a ball, so a 16 × 16 TOP is 256 balls. TOP

Data POP Datapop - Balls from a POP: each point is a ball at P with radius PointScale, and its Color tints the metaball where that ball dominates, blended by the same weights as the surface. Needs a build with POPs; greyed out otherwise. POP

Goop Goop - How far balls melt into each other: the smoothing distance of the smooth minimum that joins them, in units of the width. Small values keep separate spheres that merge only when they touch; larger values bridge them from further apart and swell the whole shape. Minimum 0.01. Float · default 0.1

Offset Offset - Subtracted from the distance: positive values grow the surface outwards, negative values shrink it. Float · default 0

Aspect Correction Aspectcorrection - Keeps the shape's proportions in voxels when the volume is not a cube: sizes along Y and Z are measured in units of the width, so a sphere stays round (measured: Radius 0.1 in 128 × 64 × 32 is 26 voxels across on every axis). Off, each axis runs from −0.5 to 0.5 across its own extent and the shape stretches with the volume (26 × 12 × 6 voxels). Toggle · default On

Transform Order Xord ⊞ - Order in which scale, rotate and translate are applied to the shape. Menu · default Scale Rotate Translate

  • Scale Rotate Translate srt
  • Scale Translate Rotate str
  • Rotate Scale Translate rst
  • Rotate Translate Scale rts
  • Translate Scale Rotate tsr
  • Translate Rotate Scale trs

Rotate Order Rord ⊞ - Order of the rotations about X, Y and Z. Menu · default Rx Ry Rz

  • Rx Ry Rz xyz
  • Rx Rz Ry xzy
  • Ry Rx Rz yxz
  • Ry Rz Rx yzx
  • Rz Rx Ry zxy
  • Rz Ry Rx zyx

Translate Tx Ty Tz ⊞ - Moves the shape. The volume's centre is 0, and each axis is measured as a fraction of its own extent: 0.5 moves the shape's centre to the face of the volume. Float × 3 · default 0

Rotate R1 R2 R3 ⊞ - Rotation of the shape about each axis, in degrees, around Pivot. Float × 3 · default 0

Scale Sx Sy Sz ⊞ - Scale of the shape along each axis, around Pivot. Float × 3 · default 1

Pivot Px Py Pz ⊞ - Pivot of rotation and scale, measured like Translate. The default 0 is the volume's centre. Float × 3 · default 0

Uniform Scale Scale - Uniform scale, multiplied with Scale per axis. Float · default 1

Fill Color Fillcolorr Fillcolorg Fillcolorb ⊞ - Colour inside the shape. RGBA × 3 · default 1

Fill Alpha Fillalpha - Alpha inside the shape. Float · default 1

Background Color Bgcolorr Bgcolorg Bgcolorb ⊞ - Colour outside the shape. RGBA × 3 · default 0

Background Alpha Bgalpha - Alpha outside the shape. 0 leaves the outside empty, so the shape composites cleanly. Float · default 0

Pre-Multiply RGB by Alpha Premultrgbbyalpha - Multiplies Fill Color and Background Color by their alphas, giving premultiplied output. Toggle · default On

Softness Softness - Width of the edge, in units of the volume's width: the output blends from Background to Fill between Softness outside and Softness inside the surface, and is halfway at the surface itself. 0 gives a hard edge: every voxel is either Fill or Background. The edge is measured in the shape's own space, so Scale scales it too. Float · default 0.1 · min 0

Parameters - Output Page

Output Output ⊞ - What the output holds. Menu · default Metaball

  • Metaball Metaball - The metaball surface, blended from Background Color to Fill Color across Softness.
  • SDF SDF - The signed distance to the surface, minus Offset, in every channel: negative inside. Use a float Pixel Format.

Combine with Input Combineinput ⊞ - How the generated volume uses the first input, when one is connected. Menu · default Composite and Set Resolution

  • Set Resolution Only res - The input only sets the output resolution; its content is discarded.
  • Composite and Set Resolution compres - The generated volume is composited with the input using Operation.

Operation Operand ⊞ - Compositing operation between the generated volume and the first input, with the same options as TouchDesigner's Composite TOP. The generated volume is the first operand: with Over, it sits on top of the input. Menu · default Over

Swap Order Swaporder - Swaps the operands of Operation, so the input comes first. Toggle · default Off

Parameters - Common Page

Output Resolution Outputresolution ⊞ - Where the output's width, height and depth come from. With nothing connected to the first input the operator always uses Resolution, whichever option is set. Menu · default Use Input

  • Use Input useinput - The first input's width, height and depth.
  • Custom custom - The Resolution parameter.

Resolution Resolution1 Resolution2 Resolution3 ⊞ - Width, height and depth of the output in voxels. Used when Output Resolution is Custom, or when the first input is not connected. Memory is width × height × depth × bytes per voxel of the Pixel Format: 256³ at 16-bit float RGBA is 128 MiB. Int × 3 · default 64 · min 1

Input Smoothness Inputfiltertype ⊞ - Filtering of the internal GLSL TOPs' input samplers, as TouchDesigner's Input Smoothness. Inputs are read at normalised coordinates, so this matters whenever the input and output resolutions differ or an input is transformed. Nearest Pixel returns voxels unblended; Interpolate Pixels is trilinear. Menu · default Interpolate Pixels

  • Nearest Pixel nearest
  • Interpolate Pixels linear
  • Mipmap Pixels mipmap

Passes Npasses - Has no effect on this operator: its shaders are compute shaders, which read the connected input on every pass, so extra passes repeat identical work. Leave it at 1. Int · default 1

Pixel Format Format ⊞ - Pixel format of the output. Use Input takes the first input's format. With nothing connected, Use Input resolves to 8-bit fixed (RGBA), which clamps values to 0–1 and quantises them to 1/255: set a float format for signed distances, densities above 1, velocities or anything else outside 0–1. Menu · default Use Input

Bypass Bypass - Passes the first input through unchanged and skips the operator's work. With nothing connected the output is a single black voxel. Toggle · default Off

Version Version - T3D version of this operator. Read-only information; include it when reporting a problem. Str

Operator Inputs

  • Input 0: Composite Input T3D_in1 - Optional. Sets the output resolution when Output Resolution is Use Input, and with Combine with Input at Composite the shape is composited with it using Operation.

Operator Outputs

  • Output 0: Output T3D_output - The shape, as colour and alpha.

Performance

GPU time when the operator recooks: 0.041 ms at 64³, 0.052 ms at 128³, all of its passes summed (GeForce RTX 4090, TouchDesigner 2025.33230). An operator whose inputs and parameters are unchanged does not recook and costs nothing.