Sliding 2 panoramic images at the same time and playing with opacity between them

  • Hello,
    I have 2 panoramic images taken at the same place with the same angle, one picture taken during the day and another picture during the night.
    I would like to give the possibility to the user to change the "view" daily or nightly during the pano
    and even having the possibility to change the opacity to different value from 1 to 0 to have a sort of animation if the user doesn't click on anything.

    That way, I will avoid to have a video who will be really heavier to load and only 2 pictures to load.
    What do you think? Is it do-able to pan 2 pictures at the same time and play with the opacity between them?
    How can I do?

    Thank you
    Regards,
    Gilles

  • I would like to give the possibility to the user to change the "view" daily or nightly during the pano
    and even having the possibility to change the opacity to different value from 1 to 0 to have a sort of animation if the user doesn't click on anything.

    you can do it with this reference: loadpano.blend and events.onidle

    That way, I will avoid to have a video who will be really heavier to load and only 2 pictures to load.
    What do you think? Is it do-able to pan 2 pictures at the same time and play with the opacity between them?
    How can I do?

    here's an example:

    Code
    <events name="PanoIdle" keep="true" onloadcomplete="set(events[PanoIdle].onidle,PanoIdle(););" onidle=""/>
    
    
    	<action name="PanoIdle">
    		loadscene(scene_002,null,KEEPVIEW,BLEND(5));
    	</action>

    Yanward *squint*

  • Thank you Yanward for your reply,
    I know you can do transition between 2 scenes via this example
    https://krpano.com/examples/119/k…ending-demo.xml


    But I would like to "freeze" the transition at certain steps: Il would like to have 10 steps available via 10 buttons: so it should stops at opacity:1 , 0.9, 0.8, 0.7 ... 0.1 and 0


    For example, the user could have a button to see the visual at certain moment in the day: so the above daily pano opacity will stop at , for example, 0.6 to see more or less the 'night' pano below.
    Do you understand what I mean?

    Is it possible?

    Gilles

  • Yup, I understand.

    the option I can think of is more on javascript:

    create 2 pano viewer, one is overlapping the other, you can create a javascript control to manage the opacity of the first viewer to show the other pano by decreasing the opacity the way you want to do.

    but this might slightly increase the CPU Usage or the Memory/RAM Usage.

    Yanward *squint*

  • Mmmh, not a bad idea,
    I'm just wondering if I can manage the "rotation" of the 2 pano at the same time to have always the same view angle...
    I will check but I think I will have to manage this with a video :( So, much really heavier to load than 2 pics...

  • Hi,

    you could do it also like in the 'slider-blend-cubes' example (included in the 1.18 download package):
    https://krpano.com/examples/slider-blend-cubes/

    The xml:
    https://krpano.com/examples/slider-blend-cubes/slider.xml

    There the panos are included as hotspots - each hotspot is one cube-face-side of a pnano.
    And for the blending just the alpha setting of the hotspots will be changed.

    Best regards,
    Klaus

  • Thk you Yanward :)
    The "cube" images are 2000x2000,
    I will try to see if 1000x1000 with a jpg recompression is maybe sufficient to decrease the total files size (the exterior scene is in total 9mb , the other are 3Mb)...


    Regards,
    Gilles

  • I think that is my videoplayer hotspot crashing my scene under iOs - here with Safari
    <hotspot name="videospot" zorder="52" url.html5="%SWFPATH%/plugins/videoplayer.js" url.flash="%SWFPATH%/plugins/videoplayer.swf" ...

    Check here below...
    Is there any solution for this issue?

Participate now!

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