Switching from one pano to another when panning takes longer the first time round which causes stuttering when panning

  • Hi,

    I am trying to use krpano to do something to PanoMoments or Photosynth.


    I am loading (in this example/ configurable) 4 panoramas as cube faces and depending on panning (where you look) it switches every 90 degrees (360/4) from one panorama to the next.
    Everything is working fine - all the cube faces are loaded on startup and I can drag the pano with the mouse

    So far so good

    BUT

    The first time one of the 90 degree pans is reached there is a delay when it switches to the other panorama - ONLY THE FIRST TIME.
    I checked with the network monitor but there is no loading happening.
    Tried to figure it out with the performance monitor in Chrome and that shows that the first time there is a spike in "painting"

    Once all the borders have been "painted" once it is all smooth but not the first time round.

    As I said - the example is only 4 panoramas but I wanted to use it with 16/32 and then the stutter the first time round makes it quite unusable *sad*
    I have tried smaller tiles but it doesn't make a difference (smallest I tried was 512x512 and it still had this delay).

    Anybody any idea?

    You can see the example here under https://playingwithstuff.000webhostapp.com/cubeswitch/cubeswitch.html
    The 4 images are the same pano just getting darker - so if you look around at 90 degrees the first time it will "hang" - from then on there is no problem.
    I have attached the XML - perhaps I am doing something silly ??


    Any ideas are appreciated.

    Cheers.

  • Hmm, strange - it is for me.
    Yes, they are not the most reliable and the occasional tile doesn't load but generally it should be fine. Just clicked it and it worked in Chrome and Edge.
    It is not fast - so it might have the black window with "krpano Demo" for about 3 seconds before it loads the tiles.



    Hope it works *cry*

  • OK, tried several things.
    Changes the script so only when actually going over a "border" and action will be called - no better.
    Used visible instead of changing alpha value - no better.

    Used zorder - and it works - panning without a stutter BUT when loading the images at the beginning it seems the zorder is not used?? The images come up one after another and then the one with the highest zorder comes to the top again. Changed order there or tried to make them visible afterwards but that didn't change anything.
    In Chrome with developer tools switched on it makes a big difference if I do a "Empty Cache and Hard Reload" - doing that it properly cycles through all images (which is not nice).

    So all in all - alpha change or visible change cause a "performance" hit which makes the panning stutter but just changing zorder does not???

    But why then does it work OK with visible and alpha change when you panned around 360 degrees once?? Is it then all cached which speeds things up ??

    I am still at a loss.

    Put the second example also up - hope it works - cubeswitchzorder <-- loading "problem" cycles through images but panning all the way around is smooth with image change

    The first example is still out - cubeswitch <-- problem there is that once you try panning past 90,180,270,0 it stutters the first time round - second time round everything is fine.

    xml of cubeswitchzorder is attached

    All my tries of using alpha, visible or force visibility are in but commented out.

    Has anybody an idea why alpha/visible would create the stutter??

    And - I don't mind going down the zorder route but how do I prevent the images from cycling trough at the beginning.

    The idea is to have 16 or 32 images - not fully equirectangular but only "slices" (180 degrees vertical and perhaps 30 degrees wide) so any cycling through all whilst loading is not wanted - neither the stutter.

    Again - any ideas welcome.

    Cheers.

  • Hi,

    there could be numbers of reason - it could be also your hardware (gpu-memory, gpu-drivers), but to be able to say more it would be first necessary to have a look at your example - e.g. to see exactly what you're doing - e.g. there is no information yet about your krpano version and if html5 or flash.

    So about your links - sorry, but for me they are not working, I'm always getting a 'server not found' error.
    Are you sure your server is public accessible?

    Best regards,
    Klaus

  • I can certainly understand that you would need to see it and I have to say - I am confused. *confused*


    000webhostapp.com is a free hosting service based on hostinger.
    I use it mainly for WebGL stuff and I have shared links to the site before with people.
    Had the account for a couple of years now but only used it to share small projects.

    I tried to reach the site via the tor browser and choose a couple of different countries to connect to the internet from and the site was always found.
    Just asked some friends in Germany and it works there.

    Well - but all that doesn't help if you can't see it.
    I do not have my own domain/server so I need to sort that one out first - even though I'm not sure what to do about it.

    Could post a screen video but that is just not the same as actually trying it.

    Just a couple of things - pretty sure no HW problem NVidia 970 and as I said - no matter how small the tiles it always happens.

    krpano version krpano 1.19-pr8 and I am forcing html5:only - works on my phone as well.


    Will update the issue once I think I sorted out the *cursing* hosting problem *cry* *angry*


    Thanks for trying anyway.

  • OK - I will give it one more go before the weekend

    First try (first xml posted) setting hotspot alpha - stutters when going over the 90,180... boundaries when a new hotspot becomes visible - http://pano.5gbfree.com/cubeswitch/cubeswitch.html

    Second try (second xml) using zorder to make hotspots visible -
    tried to improve scripting - only do something if there is a change .....
    works on panning without stutter but on first load - or in developer mode with empty cache and hard reload - the images overlap on loading.
    Thought I set the zorder but perhaps not - http://pano.5gbfree.com/cubeswitchzord…itchzorder.html

    Hope it works on that server for you.

  • Both links work for me. To best see what you are talking about I used the arrow key to pan the image. As a new pano loads for the first time panning stops until the new pano is loaded, then continues. The next time you do this there is no stopping.

    Try using multires and be sure you have a preview version for each pano. See if that makes a difference. And just so everyone is on the same page, update to the current version of KRPano. (You are using PR8. Current version is PR12.)

  • Your tour is blending 2 panoramas by really loading them - right . So you load a second panorama.

    Sorry if my example doesn't really show what I would like to achieve and I know now that I picked the wrong images/panoramas.

    My idea was to sort of do what panomoments ( https://www.panomoments.com/ ) does or what photosynth did.

    So the images should be about 180 degrees vertical but only about 90 degrees wide. Taken in a rotating motion (not necessarily around to nodal point) you just convert those images to cubefaces which have a front, top and bottom - no stitching them together. Then you upload those cubefaces and the script positions them next to each other and when you "move" the panorama it will visualise movement.

    Sorry for choosing such a bad example - will try to post something which shows better what I mean next week.

    The problems with loading a new panorama would be that the old one is gone so if you go back and forth you would always need to reload (even though most will come out of cache this is not what I wanted).
    That is why I used distorted hotspots because they allow me to have them all loaded and manipulate the alpha value or zorder. The idea with alpha value was that I could have a small blend phase not the hard cut only.

    What I can't understand is why there is the stutter even though all the data is there ( I checked the network log of the chrome developer tools - all images are loaded to hotspots in the beginning) ?
    Why would changing the alpha value affect the movement that much - but only the first time?

    As I said - I will try to come up with a better example next week.

    And thanks for the multires/preview image idea - will look into it.

    Cheers

  • My idea was to sort of do what panomoments does...


    If that is what you are after, it is really a kind of object VR -- muliple frames, not panoramas. Currently, that is only available officially in KRPano using Flash. For HTML5 you can use code developed by several users here but I expect you will want to make some modifications to fully duplicate what Panomoments does.

    The way you get around the "stuttering" is to load upcoming frames in the background and make them visible when needed while also making unneeded frames not visible (for the kind of frame change Panomotion does) or moving them behind the newly visible frame if you want any kind of crossfade.

  • Yes, I think you are right - it really is more object VR than panorama.
    Only "problem" will be that for full-screen and looking up/down I need the front/up/down cube face in decent quality which makes the image size (in terms of data) quite big.


    Well hey - I might as well give it a go.

    Thanks for the pointers.


    Cheers,
    Bernd

Participate now!

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