Scenecapture 2D scenedepth not working.

Why is scenedepth capture not working on my scenecapture2D?
20180916-18_39_05.png
It just outputs blank white in the red channel regardless of the scenecapture position.

Do you use 16float render target format?

I have tried all the formats. I have seen it working in the past, so it must just be a bug with my UE4 version (4.19.2)

Output is not normalized, so values can be veeery high, then it look like clear white texture. For debug you can try to use that texture in material, connect it to divide by 100 and then Frac node. Or just straight into something like divide by 10000.

I tested it now and have not any problem.

  1. Created new scene capture 2d actor
  2. Created new render target in content browser
  3. Set render target in scene capture 2d
  4. Created material…
    nothing else

Does anyone know how I can remap the depth capture to world space units?
(I.E so if I were to compare the this depth capture with world position, there would be no difference between the two.)

I may be mistaken but if remember correctly then it is already in world space units. That’s why it is so 'bright" red, because there are values like 1356.26 (cm) and pure red starts at 1.0.