change details on pan/tilt

  • Hi,

    sorry,but krpano is not designed for dynamic changes of the 'details' setting,
    the internal 3D object was build once with the given quality, and every change needs a rebuild (by updateobject)

    you could change it by:

    Code
    set(display.details, ##);
    updateobject();

    but that's not sense full for continuous usage during viewing,

    best regards,
    Klaus

  • Ok,

    I basicly now have this:

    Code
    set(events.onidle, setDetails(32));
    set(events.onmouseup, setDetails(32));
    set(events.onmousedown, setDetails(8));
    set(events.onkeydown, setDetails(8));
    set(events.onkeyup, setDetails(8));


    //(I only have arrowkeys enabled)

    Code
    <action name="setDetails">
    		set(display.details, %1);
    		updateobject();
       </action>

    I alsoo call setDetails on every animation I do.

    If I press tab, it works perfectly, untill you move to uncached area. Then I see some 32detailed tiles and movement becomes bit jaggy (this could alsoo be the result of the TAB view). It seems it updates the currentview to 8 details and not the whole Sphereobject.

    Why is it not sensable to use updateobject alot? And what is alot? onviewchange would be alot, but would onmousedown/up raise some issues? Performance wise I see an improvement.

    Btw doesn't the quality settings internally redraws the canvas? (same like the details settings)

  • Hi,

    If I press tab, it works perfectly, untill you move to uncached area. Then I see some 32detailed tiles and movement becomes bit jaggy (this could alsoo be the result of the TAB view). It seems it updates the currentview to 8 details and not the whole Sphereobject.

    when pressing tab - just lines around triangle will be down,

    right, updateobject() updates only the details for the current level (note - you can set the details for each level in the xml),
    updating all level is currently not possible,

    Why is it not sensable to use updateobject alot? And what is alot? onviewchange would be alot, but would onmousedown/up raise some issues? Performance wise I see an improvement.

    it depends also on the size of the pano, number of tiles, and the details setting itself, how long it will need to update the internal 3d object, changing the details on a >2 gigapixel pano would be slow, but on a 2-10 megapixel pano it would be fast in comparison, I can't give a recommendation here, maybe just try and see if it's okay in your case...


    Btw doesn't the quality settings internally redraws the canvas? (same like the details settings)

    how do you mean that?

    best regards,
    Klaus

  • Quote

    how do you mean that?

    Well If you use the HIGH Filter. Flash draws the bitmap (read panorama) anti-aliased using a 4 x 4 pixel grid and smoothed if the movie is static. If you put the quality to lets say LOW. Flash has to redraw the panorama to a non anti-alisased and non smooth one.

    Isnt this basicly the same with details settings. Flash draws a 3d vector sphere/cube/cylinder, after changing the details, it has to redraw it.

    The calculations made to redraw a 3d vector sphere would probally be faster then redrawing the whole stage or all the tiles to a other antialising setting.

    Im just guessing stuff here :P

    Quote

    right, updateobject() updates only the details for the current level (note - you can set the details for each level in the xml),
    updating all level is currently not possible,

    Settings details per level is something I like to avoid. I don't see the functionality of this. If details settings are to low or to high on the first level, how would the next step be different? I like to keep the details the same on all levels. This way I always have control over the perfomance in 1 xml file (I could make 1 plugin with details per leve <plugin name="leveldetails" level1="16" level2="32" keep="true"/>l and use get(plugin[leveldetails].level) per level step, but that overcomplicates things).

    On a completely other subject. Maybe I asked this before but, how does the (pre)loader work? Does it include plugin and xml files? Like if I have a 1mb plugin file, does he preload it together with the tiles? or is it just the tiles/panorama?

    Edited once, last by Zephyr (June 2, 2010 at 9:37 AM).

  • Hi,

    Isnt this basicly the same with details settings. Flash draws a 3d vector sphere/cube/cylinder, after changing the details, it has to redraw it.

    no, Flash itselfs doesn't draw or calculate the sphere/cube/...
    the data structures and generation of the final triangles is all done by krpano,
    and after changing the details the whole data structure (which includes much more than just coordinates or so) behind the sphere/cube must be rebuild,


    On a completely other subject. Maybe I asked this before but, how does the (pre)loader work? Does it include plugin and xml files? Like if I have a 1mb plugin file, does he preload it together with the tiles? or is it just the tiles/panorama?

    which preloader?

    krpano itselfs work in that way:
    - first the xml files will be loaded and parsed
    - then it starts loading the plugin/hotspots files and the preview image at the same time
    - when the preview image was done, it start loading the tiles

    best regards,
    Klaus

  • The Loader:

    Code
    <progress showload="bar(center,33%,3%,0,15%,shaded,
                            0x000000,0x666666,0xAAAAAA)" />

    Since it's in the xml, I reckon that it doesn't take the size of the xml in consideration. (So If you have 100kb xml file, it has to load 100kb, before it shows anything, you basicly stare to a blank screen).

    Then it loads the preview image and the plugins. Is that added in the preloader bar?

    If it's not, then it has to load loads of Kb before the user sees anything.

    So:
    Loads index.html/ javascripts/images in the html file/ krpano.swf
    You'll see your htmlpage
    Krpano stage is blank
    Now it loads loads the xml, the first xml can be quite massive with includes, settings, view, contextmenu, keybuttons, events, actions, etc. Usually the 2nd, 3rd, 4th, 5th xml is smaller with just scene information)
    You see nothing yet
    Loads preivew image, is shows as soon as load is done
    Loads plugins url from xmls
    If plugin preload = true, wait till plugin is loaded, then:
    You see preview image
    Loads the tiles. THIS IS WHERE YOU SEE THE PRELOADER BAR LOAD. By now 1-2mb is already downloaded depending on how many plugins you have

    It seems there is an awfull lot of loading before the user sees that its loading.

    I know it's impossible to show a loader when loading the xml files when the loader information is in the xml file, but would it be possible (as a feature request) to include the bytes from the preview image and plugins in the preloader bar?

    What I always do is make 1 global.xml In this global.xml I declare all general settings for the photo's. I load the flash interface, buttons, map, maphotspots, mousecursor, viewersettings, detailsettings. Well easily 10's of pages of xml and 100'kbs of swf's and images. Then this xml is included within every location. So my initial load is high, while during the tour, I only load tiles and scene xml. The downside now is, that the scene starts loading after the global.xml + plugins are done. This isn't a problem as long as people see that Im loading stuff and that it isn't broken. People lose their attention after 3 seconds.

  • Hi,

    Since it's in the xml, I reckon that it doesn't take the size of the xml in consideration. (So If you have 100kb xml file, it has to load 100kb, before it shows anything, you basicly stare to a blank screen).

    right, that's true,
    such large xml files were never part of the loading design...
    but why is that xml so larger, there should be ways to make it smaller...


    Then it loads the preview image and the plugins. Is that added in the preloader bar?

    If it's not, then it has to load loads of Kb before the user sees anything.

    no, this 'loading bar' shows only the progress of the pano tiles loading,


    I know it's impossible to show a loader when loading the xml files when the loader information is in the xml file, but would it be possible (as a feature request) to include the bytes from the preview image and plugins in the preloader bar?

    that's more difficult as you maybe think - the filesize of the plugins is not known before starting loading them, and the number of simultaneous loading files is limited by the browser, you see the problem also when using multi-resolution panos, calculating a sense-full progress bar there, is not an easy topic...

    but you could do the following:
    include a 'loading screen' per plugin and preload it (maybe it a separate small xml before the main one),
    e.g.

    startup.xml:

    best regards,
    Klaus

Participate now!

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