Slope T3D¶
Summary¶
The Slope T3D computes the gradient of its input's red channel at every voxel from central differences along X, Y and Z, and writes it into RGB: the direction in which the value rises, and how fast. The difference is taken over two voxels and divided by 4, so a value rising by 1 per voxel gives 0.5. Normalize keeps only the direction, which turns a density or distance field into surface normals.
The output has signed values: use a float Pixel Format. It is a natural input for displace, advect or
lookup, and the normals of an SDF for shading.
Parameters - Slope Page¶
Normalize Normalize - Scales every gradient to length 1, keeping only its direction (a normal field). Voxels with no slope keep 0.
Strength Strength - Multiplies the result, after Normalize.
Input Extend Mode UV Inputextenduv ⊞ - What the input returns beyond its faces, which decides the gradient in the outermost voxels: Zero reads the faces as a drop to 0, Hold gives no slope across them.
- Hold
hold - Zero
zero - Repeat
repeat - Mirror
mirror
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 - Runs the operation this many times, each pass taking the previous pass's result in place of the first input. Cost scales linearly with the number of passes.
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 whose red channel is differentiated.
Operator Outputs¶
- Output 0: Output
T3D_output- The gradient, X / Y / Z in RGB, alpha 1.
Performance¶
GPU time when the operator recooks: 0.018 ms at 64³, 0.033 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.