parkchamchi / DepthViewer

Unity program that creates 3D scenes for VR using MiDaS model
MIT License
66 stars 5 forks source link

Depth images with high dynamic range (high precision) #2

Closed nedsed closed 1 year ago

nedsed commented 1 year ago

Hi, great software!

I noticed that all depth data in files is only 8 bits per channel. Would it be possible to optionally use higher precision for export? PNG, for example, can store 32 bits per color. TIFF or OpenEXR could also be used. Gimp unfortunately doesn't support high dynamic range as far as I know, but Photoshop or Blender will do. 8-bit can introduce artifacts when used as a displacement map for rendering.

Best regards!

parkchamchi commented 1 year ago

Unity appears to provide the EncodeToEXR method in addition to the EncodeToPNG this program is using, and it supports 16bit or 32bit floating point values. Other formats would require additional libraries. I'll add the EXR export on the future release.

nedsed commented 1 year ago

Wonderful, I'm looking forward to it. Thank you very much!

parkchamchi commented 1 year ago

Commit 3a127d8 adds the EXR export.

parkchamchi commented 1 year ago

Release v0.8.8 includes this.

nedsed commented 1 year ago

I tested it and it works perfectly. Thank you very much!