needle-mirror / com.unity.recorder

The Recorder allows you to capture and save data from the Unity Editor during Play mode: animations, videos, images, audio, arbitrary output variables (AOVs), and more. 📦 [Mirrored from UPM, not affiliated with Unity Technologies.]
https://docs.unity3d.com/Packages/com.unity.recorder@3.0/manual/index.html
Other
26 stars 7 forks source link

Reconstruct camera distance from depth map #1

Closed FedericoVasile1 closed 2 years ago

FedericoVasile1 commented 2 years ago

Hi,

thank you for providing this package. I'm using AOV image sequence recorder to save depth images to disk. After that, I need to read these images (e.g. with python) and reconstruct back the camera depth (i.e. distance along z axis) for each pixel in the image. As far as I understood, somewhere in a shader there is a formula that converts the camera distances to a pixel values, with which the depth image is composed and saved. Therefore, I'm looking for the inverse formula, in order to obtain the camera distances given the depth image.

Thank you

marwie commented 2 years ago

Hello please report issues to Unity directly (we're not affiliated with Unity so unfortunately reports here won't reach the devs)