Predicting levels and level image sizes for makemultires

  • I need to hook up makemultires to do some backend work.
    How do I predict how many levels this tool will make and what will be the tile width/heights based on variable source image dimensions?


    # tilesize
    # - size of the image tiles
    # - should be between 250 and 1500
    # - use 'auto' to let the tool automatically find good sizes
    #
    tilesize=auto


    # levels
    # - number of multi-resolution levels to generate
    # - use 'auto' to find automatically the best
    # - the number of the automatic levels depends on the image size and on 'minsize' and 'maxsize' settings
    #
    levels=auto

    7000x3500 makes 2 levels
    <level tiledimagewidth="2674" tiledimageheight="2674">
    <level tiledimagewidth="1337" tiledimageheight="1337">

    10000x5000 makes 3 levels
    <level tiledimagewidth="3183" tiledimageheight="3183">
    <level tiledimagewidth="1592" tiledimageheight="1592">
    <level tiledimagewidth="796" tiledimageheight="796">

    I could probably get away with just hard coding it, and hope I don't run into any old work thats neither one, but hopefully some of the experts here know the formula.
    A fairly thorough documentation search didn't help.

  • Hi,

    that's a bit more complicated,
    the tilesize isn't calculated by a simple formula,

    the resulting tilesize is a result of a kind of optimizer process that tries to find a good tilesize for
    all levels, where the size of the tiles don't become too small (e.g. to a void tiles like 1x512)
    and where the level image is symmetric splittable by the tilesize without too much splits (good for
    flash rendering performance),

    and then as second step the number of automatic levels depends on the found tilesize,

    best regards,
    Klaus

  • OK, i make panoramic with a width about 12000px

    krpano make 3 level cube : w/pi, w/2pi and w/4pi

    but sometime tilesize is 2w/8pi, sometime is 2w/11pi (2x more tiles)

    Why ? how predicting that ?

    we can choose fix or auto size in .config tool but can we choose a w/4pi tilesize ?

    can you explain how the tilesize is calculate ? *blink*

  • Hi,

    the first step is the spherical to cubical conversion and krpano uses here this calculation:

    Code
    cubewidth = spherewidth / PI

    then the resulting cubewidth size will be stepwise scaled down by the levelstep setting,
    and this as long as the minsize setting will be reached,

    in the new version there is also the adjustlevelsizes setting, which can affect the level size,

    if you want to 'predict' all sizes, you should use manual values for the 'auto' settings and disable the adjustlevelsizes setting,

    best regards,
    Klaus

Jetzt mitmachen!

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