Box T3D¶
Summary¶
The Box T3D generates a box whose size along each axis is Scale × Uniform Scale in units of the volume's width, with its edges and corners rounded by Radius. The default is a cube half as wide as the volume.
The shape is a signed distance evaluated at every voxel's centre and blended from Background Color to Fill Color across Softness on either side of the surface, so its edge is antialiased and its alpha is a coverage. The volume's centre is the origin; sizes are in units of the volume's width, and with Aspect Correction on (the default) the shape keeps its proportions in a non-cubic volume. The first input sets the resolution and, by default, the shape is composited over it: see Combining volumes. Position and size are covered in Coordinates and units.
Parameters - Box Page¶
Radius Radius - Rounds the box's edges and corners, keeping its outer size. The rounding radius is Radius × half of Uniform Scale, in units of the volume's width, whatever the per-axis Scale: at 1 a cube (Scale 1 on every axis) becomes a sphere. 0 is sharp.
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).
Transform Order Xord ⊞ - Order in which scale, rotate and translate are applied to the shape.
- 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.
- 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.
Rotate R1 R2 R3 ⊞ - Rotation of the shape about each axis, in degrees, around Pivot.
Scale Sx Sy Sz ⊞ - Size of the box along each axis, in units of the volume's width, multiplied by Uniform Scale. Unlike the other shapes, this scale is not part of the transform: it sizes the box about its own centre, not about Pivot.
Pivot Px Py Pz ⊞ - Pivot of rotation and scale, measured like Translate. The default 0 is the volume's centre.
Uniform Scale Scale - Uniform scale of the box. The default 0.5 with Scale 1 gives a cube half as wide as the volume (measured: 64 voxels in 128³).
Fill Color Fillcolorr Fillcolorg Fillcolorb ⊞ - Colour inside the shape.
Fill Alpha Fillalpha - Alpha inside the shape.
Background Color Bgcolorr Bgcolorg Bgcolorb ⊞ - Colour outside the shape.
Background Alpha Bgalpha - Alpha outside the shape. 0 leaves the outside empty, so the shape composites cleanly.
Pre-Multiply RGB by Alpha Premultrgbbyalpha - Multiplies Fill Color and Background Color by their alphas, giving premultiplied output.
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.
Parameters - Output Page¶
Combine with Input Combineinput ⊞ - How the generated volume uses the first input, when one is connected.
- 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.
Swap Order Swaporder - Swaps the operands of Operation, so the input comes first.
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.
- 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.
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.
- 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.
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.
Bypass Bypass - Passes the first input through unchanged and skips the operator's work. With nothing connected the output is a single black voxel.
Version Version - T3D version of this operator. Read-only information; include it when reporting a problem.
Copyright Copyright - Author and licence information. Read-only.
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.043 ms at 64³, 0.054 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.