What is the equirectangular size of a 4096 x 4096 cube face?

  • I've been going through FB conversations, forums about converting matterport cube faces to sphere. They say on this page https://support.matterport.com/s/article/Down…?language=en_US that "the 4096 x 4096 cube faces (can be converted to 16384 x 8192)"

    However when I drag 6 cube faces with 4096 size to krpano tools the output I get is 12,868 x 6,434

    Is matterport wrong in saying that statement?

  • For krpano, the size of the output pano from a cube conversion can be set in the configuration files.

    By default, it is set to "auto" which whill result in the following:

    # * spheresize (CUBE to SPHERE only)
    # - output sphere size [width]x[height]
    # - use "auto" for automatic using:
    # spherewidth = cubesize * PI
    # sphereheight = spherewidth/2

    4096*PI= ~12.868

    I dont know why krpano choose these values, maybe Klaus can clarify better...

  • I see thanks for sharing the documentation and trying it out in ptgui. In the matterport group I keep seeing them say that they can get a 16k equirectangular image but the biggest cube face I can get is a 4096 but then I saw that statement from matterport so I started to wonder maybe it had something to do with conversion. The tools they're using to convert the cube faces probably uses a different computation.

  • Hi,

    I dowloaded a .e57 file from matterport and imported it in Cyclone / Register 360.
    Then I exported panorama images.
    The resulting panorama images were 16384x8192.

    The same .e57 files processed to obtain cubefaces (6x 4096x4096) and "stitched" with krpanotools results in 12,868 x 6,434.

    Does this mean that Cyclone/Register 360 export the panoramas in erroneous size?

    Or is the default krpanotools value "# spherewidth = cubesize * PI" kind of arbitrary, and does not really reflect actual "mathematical" requirements/reasons?

    To be fair I do not see any difference in detail visibility/readability on both krpano/cyclone panoramas from the same .e57 file.

    Would using "16384x8192" instead of "auto" krpanotools setting result in erroneous/worse quality/corrupted panorama?

  • Ever since the QTVR's, the 'collective mind' of the experts of that time... decided to "drag by the ears" the applied Euclidean geometry (or whatever it is exactly) of the physical spherical body, to the calculations of pixel values of computer calculations by Pi... this eventually became the greatest delusion. Today (in the time of the WebGL) forget all this as a "bad dream". Operate ONLY with computational logic and always rely only on these magic numbers multiples of two... 4,16,32,64,128 etc. And yes, the value 16384x8192 will be equivalent to six textured sides of a cube of 4096 px.

  • spherewidth = Cubesize * PI or cubesize = spherewidth / PI

    is a projection from a sphere/circle to cube/square that encloses that sphere/circle.
    Take a paper, draw both and do the math.

    There is no magic or 'invention of some experts' behind this.

    And yes, the value 16384x8192 will be equivalent to six textured sides of a cube of 4096 px.

    That's not 'equivalent', that would be upscaled and there is no need doing that.

  • Hi,

    Since I've used some editors with 30k image width pixel limitation, I use following spherewidth:
    (based on the lenses and camera sensor resolution I use for pano):

    - CUBE opt. spherewidth: 6434 (2k), 12868 (4k), 25736 (8k), 51472 (16k), MAX: 93292 (30k)
    - opt. size: (CUBE not SPHERE to edit in PSE11
    - XF14: 12k = 12868 x 6434 => cube 4k (4096x4096)
    - XF14: 25k = 25736 x 12868 => cube 8k (8192x8192)
    - XF14+60: 51k = 51472 x 25736 => cube 16k (16384x16384)
    - XF14+60 MAX: 93k = 93292 x 46646 => cube 30k (29696x29696).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!