Chaning the multires XML formatting

  • Hi,

    I have a question on how to change or overcome different types of dicing up and organizing a multires panorama.

    The reason is that panoramas that are already diced up either through custom scripts in Photoshop, or using the Silverlight DZ photoshop plugin - http://research.microsoft.com/en-us/um/redmo…oshopplugin.htm - might use a different format, naming convention and folder organization than what you get with the kmaketiles.

    Below is the edited example XML for a standard krpano multires pano. It stores each LOD tiles in a separate folder.

    <krpano version="1.0.8">
    <preview url="hafenpreview.jpg" details="12"/>

    <image type="SPHERE" multires="yes" multiresthreshold="0" tilesize="1024" baseindex="1">

    <level tiledimagewidth="2048" tiledimageheight="1024">
    <sphere url="1k/hafen1k_%0V%0U.jpg"/>
    </level>

    <level tiledimagewidth="4096" tiledimageheight="2048">
    <sphere url="2k/hafen2k_%0V%0U.jpg"/>
    </level>

    <level tiledimagewidth="6144" tiledimageheight="3072">
    <sphere url="3k/hafen3k_%0V%0U.jpg"/>
    </level>

    </image>
    </krpano>

    Now the kmaketiles dice the tiles in rows first and then colums, while other programs may do the opposite. This is not a problem though since you can use %u and %v in the file name and swap them around as you please.

    My problem though is that krpano expects the columns to be numbered from 1 rather than from 0 which is what I would get from some other program. In addition it seems that it is NOT possible to keep the tiles in sub folder under each separate LOD level folder using the % variable.

    Perhaps there is an easy XML fix to read in the tiles in a different way, but my XML skills are unfortunately not up to it. Below is an example of the folder structure for one of the multires panoramas I am trying to get into krpano without having to rename the files or move them about on the server. Note that the LOD name is at the end of the file name.

    Any help and advice much appreciated.

    Cheers,
    Kim

  • Quote

    My problem though is that krpano expects the columns to be numbered from 1 rather than from 0 which is what I would get from some other program.

    IF I understand this part correctly, I think the baseindex attribute is what you need to change... from 1 to 0...

    Code
    <image type="SPHERE" multires="yes" multiresthreshold="0" tilesize="1024" baseindex="0">

    The rest of it... don't know yet.

    Graydon

  • Perhaps there is an easy XML fix to read in the tiles in a different way, but my XML skills are unfortunately not up to it. Below is an example of the folder structure for one of the multires panoramas I am trying to get into krpano without having to rename the files or move them about on the server. Note that the LOD name is at the end of the file name.

    Hi,

    this would be the XML for your folder structure:
    (the tilesize and imagesizes must be adjusted of course)

    note - for the tile indices the following placeholders can be used:
    horizontal: %h, %u, %x, %c (=all the same)
    vertical: %v, %y, %r

    and they can be used and ordered in any way, also for subfolders

    best regards,
    Klaus

  • Hi Klaus,

    Unfortunately that did not do the trick. The tiles are 256 by 256, and there seems to be a problem with this with respect to the code.

    <image type="SPHERE" multires="true" tilesize="256" baseindex="0">

    I have zipped the files and sent you the archive.

    Cheers,
    Kim

  • Thanks Klaus. Gosh *whistling* *pinch* talk about feeling stupid... basic math. I guess sometimes when the solution is staring at you, right in front of your face you dont see it. Cannot see the forest for the trees.

    When using a different tilesize then you of course have to recalculate the tiledimagewidth and tiledimageheight based on your tilesize.

    Cheers,
    Kim

  • It would be really nice to use the Deep Zoom Photoshop plugin for tiling.

    Advantages:

    1. It will use the full resolution of your image, the full sized image does not have to be a power of 2 (unlike my photoshop javascript action) or divisable by any tile size so you can use the full native resolution of your image (useful for partial gigapixel panoramas)
    2. It is really fast, (just tiled a 5gp image in 20 min)
    3. It will tile any image you can open in photoshop.


    Problems:

    1. The tiles are not all the same size. It is creating 255 pixel wide tiles until the last colum and that may be 255x21 or some other number less than 255. The bottom row has the same issue with height.
    2. The second issue is that there is a 1 pixel overlap between images. I assume this is done to improve the software rendering of seams but it is a different behavoir than KR Pano.


    Is there a way to work around these problems? I would love to use this tiler mainly due to speed and .psb support.

    I did a quick test to see if it would just work if I set the tile size to 255 and set the imagewidth to the width of that levels images (subtracting for the 1 pixel overlap) http://www.xrez.com/krpano/html/hep_test.html

Participate now!

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