Fit T3D¶
Summary¶
The Fit T3D resamples its input into the output resolution the way the Fit TOP does, extended to depth: Fit chooses whether the input is stretched, fitted along one axis with its proportions kept, fitted inside or outside, or kept at one voxel per voxel. The Transform page then moves, rotates and scales the result, and Extend Overlay fills what the input does not cover.
Set the target size with Output Resolution Custom and Resolution on the Common page; at Use Input the output keeps the input's resolution and only the transform applies.
Parameters - Fit Page¶
Fit Prefit ⊞ - How the input is scaled to the output resolution, as in TouchDesigner's Fit TOP, extended to three axes. Fill stretches it to the output on every axis. Fit Horizontal, Fit Vertical and Fit Depth match the input's width, height or depth to the output's and keep its proportions; Fit Best and Fit Outside pick the axis that keeps the input entirely inside, or entirely covering, the output. Native Resolution keeps one input voxel per output voxel.
- Fill
fill - Fit Horizontal
fithorz - Fit Vertical
fitvert - Fit Depth
fitdepth - Fit Best
fitbest - Fit Outside
fitoutside - Native Resolution
nativeres
Justify Horizontal Justifyh ⊞ - Horizontal placement of the input. Applies only when Fit is Native Resolution; the other modes centre the input.
- Left
left - Center
center - Right
right
Justify Vertical Justifyv ⊞ - Vertical placement of the input. Applies only when Fit is Native Resolution; the other modes centre the input.
- Bottom
bottom - Center
center - Top
top
Justify Depth Justifyd ⊞ - Placement of the input in depth. Applies only when Fit is Native Resolution; the other modes centre the input.
- Back
back - Center
center - Front
front
Extend Overlay Extend ⊞ - What the input returns where the transform samples outside it: Zero (transparent black), Hold (the edge voxel), Repeat or Mirror.
- Hold
hold - Zero
zero - Repeat
repeat - Mirror
mirror
Aspect Correction Aspectcorrection - Rotates the input in undistorted space when the volume is not a cube, so rotation keeps its shape. Translate and Scale are fractions of each axis's extent either way. See Coordinates and units.
Transform Order Xord ⊞ - Order in which scale, rotate and translate are applied.
- 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 content, as a fraction of each axis's extent: 0.1 moves it a tenth of the width along X and a tenth of the height along Y.
Rotate R1 R2 R3 ⊞ - Rotation of the content about each axis, in degrees, around Pivot.
Scale Sx Sy Sz ⊞ - Scale of the content along each axis, around Pivot.
Pivot Px Py Pz ⊞ - Pivot of rotation and scale, as a fraction of each axis's extent from the corner at the origin. The default 0.5 is the volume's centre.
Uniform Scale Scale - Uniform scale, multiplied with Scale per axis.
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: Input
T3D_in1- The volume to fit.
Operator Outputs¶
- Output 0: Output
T3D_output- The input fitted into the output resolution, then transformed.
Performance¶
GPU time when the operator recooks: 0.018 ms at 64³, 0.025 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.