Using Depth Map from TDDepthAnything to Generate 3D Geometry / Particle System

Hi everyone,

I’m currently experimenting with the TDDepthAnything component, which I successfully set up with TensorRT and the Depth Anything v2 model. I now have a working depth map TOP being generated in real time inside TouchDesigner.

What I’d like to achieve is a way to translate this depth map into a 3D representation — either as a point cloud or a displaced mesh/grid, ideally in real time.

In addition to that, I’m also interested in using this depth data to drive a particle system — for example, spawning particles in 3D space based on the depth information, or displacing particles to follow the shape of the scene captured in the depth map.

Has anyone explored this approach before?
What’s the best way to go from a depth TOP to a 3D particle system in TD?
Would you recommend using TOP → CHOP → SOP pipelines, or going directly through GLSL / compute shaders for more efficient control?

Any advice, workflow suggestions, or component references would be greatly appreciated!

Hi,

The easiest way to turning a grayscale image into a depth point cloud is by using instancing like so:

use a pair of ramps to create an instanced grid on your X/Y axis and then drive the depth (Z channel) with the blue value.
instanceDepthTop.toe (4.3 KB)

thanks dude!
:slight_smile:

No worries!

Just another note that you’ll probably want to change the pixel format of your TOPs to 32bit float for best precision.