Sie sind nicht angemeldet.

jordi

Profi

  • »jordi« ist der Autor dieses Themas

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

1

Freitag, 8. April 2022, 11:34

High quality depthmaps

Hi,

because I get some request about depthmaps, and also because I want to elaborate a bit more about different keywords like bits, encoding, inverse, ...I want to make this post talking a about the concept behind the depthmap images.

depth options

So first things first, I would not recommend you, using this type of depth information in projects for krpano, because if we have the obj model, it makes no sense to use the depthmap image, they weight more, you need one image per pano, you don't have much precision specially if you move out of the centre of the image.
And on the other hand using the obj as the model for the depth, allows us :
  • use the same model for every panorama
  • having numerical values instead of pixels
  • not losing precision while getting away from the center of the image
  • and normally it's a lighter format
  • which improves performance and loading times

Nevertheless, there could still exist some usage cases, where users would like to keep using depth images, that's why the latest release of everpano 3D provides high quality depthmap images.

By high quality I mean that the accuracy is as best as possible, you get it at the right scale 1, and the best is that you can get it encoded in a way that krpano can take the most out of it.

So what 16 bits means is 216 = 2 × 2 × 2 × 2 × … 16 times = 65536.
That means that we can have 65536 steps between the closest point to the furthest point.

On the other hand if we would have a 8 bits image we would only have
28 = 2 × 2 × 2 × 2 × … 8 times = 256 So it's quite clear that the amount of steps between the more distanced points is really low, and that makes that those images are not very expressive.
Finally the issue is that if you would create a 16 bits one channel png image, like what you could get in blender for example, it could not be directly decoded as it is in a web environment, so it would be converted to a 8 bits image, losing all this range of depth information.
So that's why everpano is encoding the information of the 16 bits into an image of 8 bits, so that you can get the most benefit from it.

8 bits gray
8bits gray

16 bits gray
16bits gray

16 bits rgb, so it's has the 16 bits information but encoded in a 8 bits image, that's why it looks weird
16bits rgb

here you can check a live demo and play around with the different options


About inverse word, as mentioned above the default scale of the depthmap images produced in everpano 3D is 1, that means you do not need to calculate any scale, and also that means that white is close and black is far. So in case you would like to invert the concept so where black is close and white is far, you just need to press the invert checkbox.

A last note would be around depthmap size, I think that just keeping images small is already enough, we do not even need to create 4k depthmaps to get a good result.

Kind regards
everpano.com step beyond 360