Fluid T3D¶
Summary¶
The Fluid T3D simulates an incompressible fluid in a 3D texture and carries a substance (smoke, dye, temperature) with it. Each cook advances the simulation one step: the velocity is advected, forces are added (the Forces input, vorticity confinement, buoyancy), viscosity diffuses it, and a pressure projection removes its divergence so the flow neither compresses nor expands. The substance is then advected through the new velocity, its source added, and dissipated and diffused per channel.
The velocity is stored on a staggered (MAC) grid: each component lives on the cell face it flows through, which keeps the projection exact and free of the checkerboard artefacts of cell-centred solvers. The Velocity output is converted back to cell centres for downstream operators.
Domain. The simulation domain is set by the inputs, not by the Common page: the Forces input if connected, else the Substance input, else 64 × 64 × 64. A change of size applies live, without Reset. The substance keeps its own input's resolution; forces and buoyancy sample it at the velocity's cell centres. Resolutions that are multiples of 16 let every multigrid level halve exactly.
Channels. Forces carry a force per voxel in XYZ. Obstacles carry solidity in W and the obstacle's velocity in XYZ. The Substance input and output carry density in RGB and temperature in A. Velocities are in volume widths per unit time. The Substance output feeds the Volume T3D directly: RGB as coloured density, and temperature in A as emission when Emission is on.
Substance motion. With Use Substance Motion on (the default), the motion of the substance input itself becomes a force: its luminance is compared with the previous frame by the same method as the Optical Flow T3D, and the flow, times Motion Scale, is added to the forces. A moving source, a live camera volume or a growing shape then drags the fluid with it without a separate forces network.
Parameters - Fluid Page¶
Reset Reset - Clears velocity, pressure and substance to zero.
Step Size Stepsize - Time step. The simulation advances one step each time the operator cooks, so each frame it is pulled. Velocities are in volume widths per unit time: a velocity of 1 at Step Size 0.1 moves content a tenth of the width per step. Larger steps move faster and lose detail.
Precision Precision ⊞ - Storage of velocity, forces and substance. 16-bit float is enough for most scenes and halves memory and bandwidth; pressure is always 32-bit float. This, not Pixel Format, sets the output format.
- 16bit
16bit - 32bit
32bit
Pressure Solver Pressuresolver ⊞ - How the pressure is solved each step. Multigrid converges in a few V-cycles at the cost of about 7 Jacobi iterations each; Jacobi needs hundreds of iterations for large swirls.
- Jacobi
jacobi - Multigrid
multigrid
Pressure Projection Iterations Pressureprojectioniterations - Jacobi iterations per step, used when Pressure Solver is Jacobi. Jacobi converges slowly: measured at 128³ in steady state, 25 iterations leave about 80 % of the large-scale divergence, one warm-started multigrid V-cycle about 6 %.
V-Cycles Vcycles - Multigrid V-cycles per step. 1 is usually enough with the warm start; 2 for fast flows.
Viscosity Viscosity - Diffusion of velocity: higher values give a thicker, slower fluid. 0 skips the diffusion pass entirely.
Diffusion Iterations Diffusioniterations - Jacobi iterations of the velocity diffusion. Used when Viscosity is above 0.
Vorticity Confinement Vorticityconfinement - Adds back small swirls that the grid smooths away. Scaled by the voxel size (relative to 64 across X): at higher resolution the grid smooths less, and the same value adds less.
Velocity Damping Velocitydamping - Fraction of the velocity removed each step: the velocity is multiplied by 1 − Velocity Damping. Not scaled by Step Size.
Use Substance Motion Usesubstancemotion - Adds the motion of the substance input to the forces: an optical flow of the substance's luminance from one frame to the next (as the Optical Flow T3D computes it), so a moving or growing substance pushes the fluid along with it.
Motion Scale Motionscale - Multiplies the substance motion before it is added to the forces.
Use Obstacle Velocity Useobstaclevelocity - Moving obstacles push the fluid: the obstacle input's XYZ becomes the velocity at solid faces. Off, obstacles are at rest.
Repeat Domain Repeatdomain - Periodic domain: flow leaving one side enters on the opposite side. Off, the domain is a closed box with solid walls.
Parameters - Substance Page¶
Dissipation Dissipation1 Dissipation2 Dissipation3 Dissipation4 ⊞ - Fraction of each substance channel (R, G, B, A) lost per unit time: each step multiplies the channel by 1 − Dissipation × Step Size.
Diffusion Diffusion1 Diffusion2 Diffusion3 Diffusion4 ⊞ - Diffusion rate of each substance channel (R, G, B, A).
Diffusion Iterations Substanceiterations - Jacobi iterations of the substance diffusion. Used when any Diffusion is above 0.
Apply Buoyancy Applybuoyancy - Lift from temperature: the substance's alpha pushes along Up Vector by Buoyancy Factor × (1/273 − 1/(273 + T)), about Buoyancy Factor × T / 74 802 for small T. With Smoke Weight, density pulls the other way.
Buoyancy Factor Buoyancy - Strength of the buoyancy force. Scales both the lift from temperature and the weight from Smoke Weight.
Up Vector Upvectorx Upvectory Upvectorz ⊞ - Direction buoyancy lifts along, in the volume's space.
Smoke Weight Smokeweight - With Apply Buoyancy, how strongly the substance density (mean of its RGB) pulls against the Up vector, relative to the lift from temperature (alpha). At 1, one unit of density cancels one unit of temperature. 0 keeps buoyancy temperature-only.
Parameters - Common Page¶
Output Resolution Outputresolution ⊞ - Has no effect: the domain comes from the inputs (forces, else substance, else 64³).
- Use Input
useinput - Custom
custom
Resolution Resolution1 Resolution2 Resolution3 ⊞ - Has no effect: the domain comes from the forces input, else the substance input, else 64 × 64 × 64.
Input Smoothness Inputfiltertype ⊞ - Has no effect on fluid.
- Nearest Pixel
nearest - Interpolate Pixels
linear - Mipmap Pixels
mipmap
Passes Npasses - Has no effect on fluid.
Pixel Format Format ⊞ - Has no effect. Precision sets the output format.
Bypass Bypass - Passes the forces input to the velocity output and the substance input to the substance output.
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: Forces
in_forces- XYZ force per voxel, added to the velocity every step times Step Size. Also sets the simulation domain when connected. - Input 1: Obstacles
in_obstacle- W is solidity, 0 to 1: faces between cells are blended by it, and a cell above 0.5 counts as solid. XYZ is the obstacle's velocity, used when Use Obstacle Velocity is on. Any resolution: sampled at the fluid's cell centres. - Input 2: Substance
in_substance- A source, added every step times Step Size: RGB is density (and colour), A is temperature. It is a source, not an initial state: a constant input keeps emitting. Sets the domain when no forces are connected.
Operator Outputs¶
- Output 0: Velocity
out_velocity- Cell-centred, XYZ in volume widths per unit time. 16- or 32-bit float per Precision. - Output 1: Substance
out_substance- RGBA as the source. Keeps the substance input's resolution, which may differ from the domain.
Pressure Solve¶
The projection solves a Poisson equation for pressure every step. Pressure Solver chooses how:
- Multigrid (default) runs V-cycles over successively coarser grids (64 → 32 → 16 → 8 → 4 at 64³), warm-started from the previous step's pressure. Measured at 128³ in steady state, one V-cycle leaves about 6 % of the large-scale divergence, which is what makes smoke look compressible when it remains. Use 2 V-cycles for fast flows.
- Jacobi runs weighted Jacobi iterations: cheap each, but slow to converge. 25 iterations leave about 80 % of the large-scale divergence in the same test.
Pressure and divergence are always 32-bit float.
Performance¶
GPU time when the operator recooks: 2.343 ms at 64³, 4.391 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.
Most of the cost is the number of passes, not the voxels: a V-cycle is 13 passes, and at 64³ fixed per-pass overhead dominates.