Point Clouds in TouchDesigner are achieved via a number of operators, rendering techniques, UI features, file formats and devices.
Point Clouds are most effectively handled using TOPs, where a pixel in a TOP is one point, or at very least, an attribute of one point, since TOPs are limited to 4 channels per TOP (RGBA). The XYZ positions of points are placed in the red, green and blue channels usually.
Reading In Point Cloud Files
The Point File In TOP and Point File Select TOP bring point clouds into TouchDesigner, supporting most common point cloud formats and EXR multi-channel files, enabling the conversion of many-channel files into mutiple 4-channel TOPs.
One point cloud file may have more than 4 attributes values, so get at the 5th channel onward using a Point File Select TOP.
See the OP Snippets for the Point File In TOP.
Displaying Point Clouds in TOP Viewers
Normalized Split is a display mode of all TOP Viewers where each RGBA channel is visible a grey scale, normalized to the min-max range of the floating point or fixed point numbers in the pixels, showing the min-max values.
View as Points is another display mode of TOPs that treats the RGB channels of an image as XYZ points and displays them in the interactive 3D viewer.
Manipulating Point Clouds: TOPs
The Point Transform TOP applies 3D transforms, alignments and normalizations on a point cloud.
The Math TOP, Function TOP, Limit TOP and Lookup TOP have been enhanced to support manipulation of pixels as general numeric data, and are aligned closely with their counterparts in CHOPs.
You can render point clouds directly from their representation in TOP as instances in the Render TOP.
Movie File Out TOP has been extended to create many-channel EXR (OpenEXR) files with metadata injected via a DAT. These files can be read back in with the Point File In TOP.
Manipulating Point Clouds: SOPs
You can generate point clouds with SOPs, for example the Sprinkle SOP. But to get them into TOPs you need to use a SOP to CHOP and then a CHOP to TOP, typically into a square texture.
Manipulating Point Clouds: Palette Components
There are some components in the TouchDesigner Palette Components in the Point Clouds section.
- Palette:pointField - generate point "weights" into the alpha channel based on proximity to basic shapes.
- Palette:pointGenerator - generate simple distributions of points
- Palette:pointMerge - merge multiple point clouds together.
- Palette:pointRender - a simple render network for colored points.
- Palette:pointRepack - the same points but in a different widht/height image.
- Palette:pointWeight - GLSL code for distance/falloff calculation.
Manipulating Point Clouds: Devices
TouchDesigner supports the Kinect Azure's generation of Z-depth images and XYZ+color point clouds.
The Ouster LIDAR system generates long-range point clouds in real-time.
See more here: 2020 Official Update