Kinect vertex shader disortions

Hi,

I’m using a simple vertex shader to decode Kinect 2.0 points cloud data, it works, but the 3D image contains some grid-like glitches.

Here’s how it looks like:

Here’s the relevant vertex shader code. uPointRes is resolution, uPointTex is point cloud TOP:

int id = gl_VertexID; vec2 posUV; posUV.t = id / int(uPointRes.p); posUV.s = id - (posUV.t * int(uPointRes.q)); posUV *= uPointRes.st; vec4 newPos = texture(sPointTex, posUV); vec4 worldSpaceVert =TDDeform(newPos); vec4 camSpaceVert = uTDMat.cam * worldSpaceVert; gl_Position = TDCamToProj(camSpaceVert);

Does anyone know this issue? Decoding the texture to points is very straightforward, what can be causing the disorted lines?

It’s not hardware fault - point cloud drawn by another software is fine. Might it be the fault of scaling down the Kinect TOP to 1280x720 on a free license TD?

EDIT: Opps, wrong board, please move this topic to “Bugs” board.
kinect_basic_nocolor.1.toe (7.21 KB)

That happens at full resolution too. I think it’s an artifact of the IR emitters but have no evidence to support that theory. I think there are some other forum threads about this issue but I don’t recall seeing any surefire solutions. I know that’s not entirely helpful, but at least you know it’s not the resolution limit causing the grid artifacts.

Edit: To confirm that it’s not the shader, I made a little artifact explorer that shows the grid in the RGB channels. However, In the 2D data the grid looks like rings. Leads me to wonder if it has to do with phase interference as the different frequency IR beams bend through the depth lens… I’m no expert on photonics, and the science behind Kinect’s ToF depth sensing is non-trivial, so for now I just have guesses.

Also some interesting Kinect science I found while researching this topic:
cvl.isy.liu.se/research/data … 2-dataset/



kinectPointcloudArtifactExplorer.toe (4.59 KB)