How does kmakemultires determine cubical or spherical output exactly?

  • We're using kmakemultires (part of release 1.0.8.11) to automatically convert uploaded images from our customers to a multi-resolution set. Depending on the dimensions of the input image we assume a certain output. It has always been to my understanding that with an exact width/height ratio of 2:1 that we can safely assume images for cubical projection can and will be outputted. If it's anything above 2:1 (say 3:1) than we have to assume we're dealing with a partial (vertical wise) panorama and output images for spherical projection.

    However, in our testing we see this logic is not completely followed by kmakemultires. It almost seems as if kmakemultires has a margin of error in determining for how long it will still try to output cubical images.

    We assumed:
    - 2000x1000 (2:1) --> cubical
    - 2001x1000 (>2:1) --> spherical
    - 3000x1000 (>2:1) --> spherical

    However, the following seems true:
    - 2000x1000 --> cubical
    - 3768x1880 (>2:1) --> cubical (real world example)

    We have not yet determined the boundary, as I'm kind of hoping someone can share the algorithm so we can explain it to our customers and make adjustments accordingly.

  • We tested some images yesterday and figured that the boundary is at 4:1. From 2:1 to 4:1 kmakemultires outputs cubical images. From >4:1 we'll get images for spherical projection.

    What's the point of this? Surely 4:1 is quite an arbitrary number?

  • Hi,

    there is 1 pixel tolerance in the basic 2:1 aspect detection for full 360x180 panos because of possible rounding errors,

    e.g. a 2001x1000 pano will be still detected as full 360x180 pano because a height of 1000.5 is not possible,

    but beside of the partial pano detection, which is independent of the cube conversion and only for necessary
    for the view limiting, there are this two settings in the .config files:

    they control if and when a spherical or partial spherical pano should be converted to a cube image,

    best regards,
    Klaus

  • Thanks Klaus for the quick reply.

    Does that mean the 'converttocubelimit' option actually indicates the width and height ratio? Not the minimum dimensions? In other words, a value of 360x120 would imply a maximum of 3:1 for the image to be converted to a cube. Is this correct?

  • Hi,

    basically it simply checks the fov values,
    the hfov must be entered by the user when a non 2:1 pano (with the 1 pixel width/height tolerance) was detected,
    and the vfov will be simply calculated by the hfov, imagetype (sphere,cylinder) and image aspect,
    and when now the fov values are inside that range, the pano will be converted to a cubical,

    the mean reason for the converting is the better rendering quality and performance,
    the tools will also insert viewing limits settings (as replacement for [VIEWLIMITS] placeholder in the xml
    template) to limit to the view to the original partial pano range,

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!