Dx11 kinect pointcloud problem

I have a problem with the kinect dx11 node and the transformation of its depth texture to coordinates:

as you can see the contours of objects are not at the right place. they are shifted towards the depth sensor…

this problem does not occur with the dx9 kinect node.

is it a problem in my implementation of the CS_DepthToCoords compute shader or a bug in the dx11 kinect / depth nodes? (32.8 kB)

as far as i know dx11 kinect node outputs texture in specific format, witch is 12 bit something, so it might loose some data unless u process it correctly.

Yeah, I ran into the same thing when I did a DX9 shader for this. Your sampler state is causing points to be interpolated, so edges next to black (no data) get lower values, making them look closer. Change it to this:

SamplerState mySampler : IMMUTABLE
    Filter = MIN_MAG_MIP_POINT;      // Don't interpolate!
    AddressU = Wrap;
    AddressV = Wrap;

and it works perfecto.

Hmmm, your distances don’t look right; if you want meters, you should take the depth pixel and do this:

float depth =  pixel * 65.535 ;

The rest of the formula you are using looks unfamiliar as well, as you are not taking the horizontal and vertical fields of view into account. Here’s more or less how I do it after converting the depth pixel to meters:

    double XtoZ = tan(FoVH/2)*2;
    double YtoZ = tan(FoVV/2)*2;

col.r = ((In.TexCd.x - 0.5) * Depth * XtoZ);
col.g = ((0.5 - In.TexCd.y) * Depth * YtoZ);
col.b = Depth;

mediadog that was really helpful.
thanks alot! :)

Hi, could you please explain briefly how this patch is to be used?

I am trying to get a point cloud going with the MS Kinect nodes and the new DX11 nodes, but have not fully managed to understand what it is you are trying to accomplish with this patch.

Thanks for any help you can provide!

can you upload the final version of the patch??
Really need this to migrate a Project from DX9 to DX11

i want release a bunch of pointcloud nodes and tools in the next time, but first i have to get rid of some problems and bugs that are still pending.

especially this one: