Skip to content

Function T3D

Summary

The Function T3D is the Function TOP for volumes: square roots, trigonometry and its inverses, hyperbolics, logarithms, exponentials, powers and decibel conversions, applied to every voxel. Function RGBA applies one function to all four channels; left at Input, Function RGB applies one to the colour channels, and left at Input too, each channel takes its own. Replace Errors replaces the infinities and NaNs that roots and logarithms of negative values produce.

The two-argument functions, atan2(x, y) and x ^ y, are meant to read y from the second input; in 1.14 they take it from the first input as well.

Parameters - Function Page

Function RGBA Funcrgba ⊞ - One function for all four channels. When it is anything other than Input, Function RGB and the per-channel functions are ignored. The functions are those of the Function TOP: roots, trigonometry and its inverses, hyperbolics, logarithms, exponentials, powers and decibel conversions. Menu · default x Input

Function RGB Funcrgb ⊞ - One function for RGB, used when Function RGBA is Input; alpha then follows Function A. Menu · default x Input

Function R Funcr ⊞ - The function for red, used when Function RGBA and Function RGB are both Input. Menu · default x Input

Function G Funcg ⊞ - The function for green, used when Function RGBA and Function RGB are both Input. Menu · default x Input

Function B Funcb ⊞ - The function for blue, used when Function RGBA and Function RGB are both Input. Menu · default x Input

Function A Funca ⊞ - The function for alpha, used when Function RGBA is Input. Menu · default x Input

Base Value Baseval - The base of the Log Base N and Base N ^ x functions. Float · default 2

Exponent Value Expval - The exponent of the x ^ N function. Float · default 2

Constant Value Constval - The value the Constant Value function writes. Float · default 0

Angle Units Angunit ⊞ - Unit of angles: the input of cos, sin and tan, and the output of acos, asin, atan and atan2. Degrees, radians, or cycles (1 = a full turn). Menu · default Degrees

  • Degrees deg
  • Radians rad
  • Cycles cycle

Replace Errors Replace - Replaces results that are infinite or not a number (the square root or log of a negative value) with Error Value. Toggle · default Off

Error Value Errval - The value written in place of an infinite or undefined result. Float · default 0

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: Input T3D_in1 - The volume the functions are applied to.
  • Input 1: Input 2 T3D_in2 - Meant as y of atan2(x, y) and x^y. In 1.14 it is not read: both functions take y from the first input too.

Operator Outputs

  • Output 0: Output T3D_output - The result.

Performance

GPU time when the operator recooks: 0.023 ms at 64³, 0.030 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.