How to make depthbuffer, scenedepth buffer visible to CPU

Hey Guys,

We are working on a VR project with RGBD camera. In order to calibrate our depth camera with unreal scene virtual camera, we need to read out the depthbuffer (the calibration process is done by aligning depth image from our depth camera with depth buffer (or GBuffer depth channel) from unreal virtual camera, since the virtual environment has same geometry info as in real world).

Long words in short: we need to pass scene depth buffer to openCV for calibration.

However, we can’t find a way to make depth information visible to CPU. So any suggestion will be greatly appreciated.

Thanks

Been looking into a similar question myself. Thus far the biggest clue has been the ReadPixels functions in UnrealClient.cpp. Thinking about this further: the capture hdr screenshot function should have exactly what you need, as it strips every component off the gbuffer, throws it in CPU and writes it to disk.

Hi, I am the developer of UnrealCV http://unrealcv.org/, its code is hosted in github.

It might be helpful for your purpose.

Can look this [Odessey] Creating my own G-Buffer in UE4 - C++ Programming - Unreal Engine Forums