Reply To: Record data

Home Forums AR Sandbox Forum Record data Reply To: Record data

#101184
Oliver Kreylos
Keymaster

It’s a bit complicated. The Kinect camera captures elevation in a projective coordinate system, and the AR Sandbox only unprojects those measurements into a regular 2D grid on the GPU as part of water simulation.

The best way to intercept that grid is to patch the updateBathymetry method in WaterTable2.cpp. After line 273, you could read the contents of the 2D texture containing the just-rendered bathymetry to a 2D array on the CPU side using glGetTexImage, and write that to a file. Note that the bathymetry texture is a single-component texture with 32-bit floating-point components.

Comments are closed.