Sprinkle T3D¶
Summary¶
The Sprinkle T3D scatters points so that their density follows the volume's: each point tries random positions and stays at the first one where the volume's value (Threshold, 0–1) is higher than a random number, so a voxel of 0.8 is four times as likely to hold a point as one of 0.2, and empty voxels get none. Points that find no place within Number of Attempts per Point hold NaN or Color.
The points come out twice: as a 2D texture, one point per pixel (RGB = position), and as a POP. Positions are centred on the volume, in units of its width, with Y and Z scaled by the volume's proportions, then moved by the Transform page. The operator exports this mapping for the T3D Transform Reference of the renderers (see Coordinates and units).
Seed changes the scattering; the same seed, volume and parameters always give the same points.
Parameters - Sprinkle Page¶
Number of Points (POP) Numberofpointspop - Points in the POP output. The TOP output has one per pixel of its Resolution.
Seed Seed - Seed of the random positions. Change it for another scattering with the same distribution.
Number of Attempts per Point Numberofattempsperpoint - Random positions tried per point before giving up. A point is kept where the density exceeds a random value, so sparse densities need more attempts; each attempt costs one sample of the volume.
Threshold Thresholdchannel ⊞ - The value of the density used as the probability of keeping a point (luminance is 0.3 R + 0.6 G + 0.1 B).
Unsuccessful Pixels Unsuccesfulpixels ⊞ - What a point that found no place within its attempts holds: NaN (which point_cloud and instancing skip), or Color.
- NaN
NaN - Color
Color
Color Colorr Colorg Colorb Colora ⊞ - The value written for unsuccessful points, when Unsuccessful Pixels is Color.
Parameters - Transform Page¶
Transform Order Xord ⊞ - Order in which scale, rotate and translate are applied to the points.
- 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.
- 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 points.
Rotate Rx Ry Rz ⊞ - Rotates the points, in degrees, around Pivot.
Scale Sx Sy Sz ⊞ - Scales the points along each axis.
Pivot Px Py Pz ⊞ - Pivot of rotation and scale; 0 is the volume's centre.
Uniform Scale Scale - Uniform scale, multiplied with Scale.
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 ⊞ - 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: Density
in1- The volume points are scattered by. Denser voxels (in Threshold's channel, 0–1) get more points.
Operator Outputs¶
- Output 0: Points (TOP)
out1- One point per pixel of a 32-bit float 2D texture of Resolution width × height: RGB = x, y, z. Ready forpoint_cloud, instancing, or a TOP to CHOP. - Output 1: Points (POP)
out_pop- The same scattering as a POP of Number of Points (POP) points, inP(needs a build with POPs).
Performance¶
GPU time when the operator recooks: 0.035 ms at 64³, 0.021 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.