Layers in KR pano?

  • I was just wondering if anyone has ever experimented with creating layers in KRpano? YOu see this effect quite alot in FLash ads and it can also be done using Jquery, where the layers slide at different rates to provide the sense of a depth of field. It seems that this could be done fairly easily by using a plugin image and then scripting it to move at a faster rate than the background, but my XML skills are not quite up to this kind of challenge.

    If anyone has any examples of this, or suggestions on how to get started, I would like to see/hear them.
    There is an example of the type of effect I am talking about here (Flash)

    Thanks!
    Eric

  • Hi,

    images can be included in krpano via the <plugin> tag,
    and the positions can be changed by changing the x/y attributes, for example via the tween() action,
    the order (deep) of the images is defined by the "zorder" attribute,

    e.g.

    Code
    <plugin name="layer1" url="image1.png" align="lefttop" x="0" y="0" zorder="1" onclick="action(dosomething);" />
    <plugin name="layer2" url="image2.png" align="lefttop" x="50" y="0" zorder="2" onclick="action(dosomething);" />
    
    
    <action name="dosomething">
     tween(plugin[layer1].x, 300, 1.0); 
     tween(plugin[layer2].x, 350, 1.2);
    </action>

    best regards,
    Klaus

  • Klaus,
    Thanks for your response (and a GREAT product).

    Yes, what you have explained is moving in the right direction. But what I do not know, is how to link the tween motion of the layered images (i.e. layers z=2, z=3) to the rotation of the camera. So, rather that using an "onclick" (like in your example) the camera rotation or FOV change would be detected and that value fed into the layer positions (scaled by a percentage).

    Does this make sense? I think this concept is fairly simple but, as I mentioned before, I am not very advanced with XML and do not know how one would do this. That's why I was hoping maybe something similar had already been done that I could use for reference.

    Cheers!

  • What I had in mind was a simulated parallax. I was imagining that you would set up a set up a series of nested images. The background (deepest) layer would be a solid image, but the closer images would have transparent areas so that you could see through them. The images that were "closer" to the camera would rotate at a higher rate than the BG image. So maybe the BG layer moves at x, layer z=1 moves at x(1.1), and layer z=2 moves at x(1.2).

    The ideas I have for this could include:
    -A cityscape with several layers of buildings in front of a sky BG.
    -Foreground layers could be used for fog effects or foliage.

    I was also thinking that the image layer's alpha could be linked to the camera's FOV. Which would allow the viewer to "fly through" the closer layers when zooming into the pano. I am not sure if KRpano supports any type of blurring, but if it did, you could also use this to simulate Depth of Field which could be linked to the camera's FOV.

    Part of what got me thinking about this was the Holiday pano that you created with the snow effect. I thought that was really great and was thinking of other ways to make the pano experience more immersive and realistic.

    Thanks!

  • I just wanted to add that as well as being a photographer I am a 3D artist. So many of the ideas that I have would involve using 3D rendered content where individual layers could be produced with alpha channels. This allows for some creative applications that would not be possible using standard photographic panos.

    Thanks!

Participate now!

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