• Good day,

    Got a bit of a conundrum that I have been looking at for far too long and need another set of eyes to take a gander.

    Basically the multires panos are not blending on first load, but subsequent loads in the tour they blend just fine.
    Here are the details.

    I create multires panos via the following Python script:
    proc_command = krpanotools_path + ' makepano -config=' + config_path + ' -tilepath=' + str(
        theMediaPath) + '/the.tiles/[c/]l%Al/%Av/l%Al[_c]_%Av_%Ah.jpg -previewpath=' + str(
        theMediaPath) + '/the.tiles/preview.jpg -thumbpath=' + str(
        theMediaPath) + '/the.tiles/thumb.jpg -xmlpath=' + str(
        theMediaPath) + '/xml_' + pano_id + '.xml ' + str(fileTarget)

    Which results in the requisite files and, specifically, the following XML formatted file:
    <krpano version="1.20">
        <preview url="the.tiles/preview.jpg" />
        <image>
           <cube url="the.tiles/mres_%s/l%l/%v/l%l_%s_%v_%h.jpg" multires="512,768,1664,3200" />
        </image>
    </krpano>

    I then <include> the XML in dynamically (php) generated scene_xml files like the following:
    <include url="<?php echo XP_MEDIA; ?>pano/<?php echo $this_scene_media->media_mediaRef; ?>/xml_<?php echo $this_scene_media->media_mediaRef; ?>.xml"/>

    This works great. EXCEPT the first time the scene is loaded via:
    loadpanoscene('scene_xml.php?sceneid=<?php echo $hotspot_action->action_scene; ?>&amp;tourid=<?php echo $tour_ID; ?>&amp;load=fade',scene<?php echo $hotspot_action->action_scene; ?>,null,MERGE,BLEND(0.5));

    ...the blending does not occur and there appears to be a brief white flash before the new pano is loaded. Now, on the second and subsequent loads of the scene in the tour the blending occurs as expected.
    I have some "old-school' cubic panos that are used in the form of:
    <image type="cube" hfov="360" vfov="180">
        <cube url="<?php echo XP_MEDIA; ?>pano/<?php echo $this_scene_media->media_mediaRef; ?>/_%s.jpg"/>
    </image>

    ...that always BLEND correctly on the first load.

    Anyone have ANY idea why this is happening?
    I'm probably missing something simple....

    Thanks in advance for any directions that I can be pointed in.

  • Hi Douglas,


    i was wondering.. in the part below.. perhaps you want that to be in side a scene container as well and add autoload="true"?

    <krpano version="1.20">
        <preview url="the.tiles/preview.jpg" />
        <image>
           <cube url="the.tiles/mres_%s/l%l/%v/l%l_%s_%v_%h.jpg" multires="512,768,1664,3200" />
        </image>
    </krpano>


    is it the blend between the pano above and the next one that is problematic?

    or..

    perhaps no pano at all there ^ and load the first scene from the included xml?

    or..

    are you sure about url vars in xml? as here: ?>&amp;tourid=<?php echo $tour_ID; ?>&amp;load=fade'

    ..

    I might not fully understand your question/issue though..

    Tuur*thumbsup*

  • Tuur,

    The XML containing the <preview/> and <image/> are being <include/>'d into the <scene/>
    I do it this way, generating separate XML for each pano and storing it with the.tiles, because of the variability of the sizes of the panos we can potentially include in a scene & tour. As of me typing this we have 9,780 panos on our s3 that we use in tours.
    On the surface this seems like KRPano has an issue with the initial load of the scene & image. But once it has been cached, going back to the scene results in expected blending from one scene to another.

Participate now!

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