Hotspots in a flat pano

  • Just a simple question: is that possible?
    I assume the 'ath' and 'atv' properties of a hotspot are not relevant in a flat pano. Or can they also be defined in pixels?

  • Hi,

    a flat pano in krpano is typically defined as spherical or cylindrical pano with a hfov (=horizontal field of view) of 1.0,

    that means the whole image is just 1.0 degree wide in '3D space', so it will look flat,

    the hotspot ath/atv coordinates are also within these range,
    so for at pano with hfov=1.0 they should be in the range -0.5 to +0.5,

    calculating the ath/atv from the source pixel coordinates is possible,
    just:

    Code
    ath = (source-pixel-x / source-pixel-imagewidth - 0.5) * image-hfov
    atv = (source-pixel-y / source-pixel-imageheight - 0.5) * image-vfov

    if you don't know the image-vfov:

    Code
    image-vfov = image-hfov * source-pixel-imageheight / source-pixel-imagewidth

    best regards,
    Klaus

  • Hi!
    I have the similar problem:
    If zoom="true" my hotspot (png image) becomes invisible on the flat pano *sad*
    Default zoom="true" and the hotspot is visible. But I realy need to change hotspot size together with the pano when zooming *sad*

    Edited once, last by Valentin (June 30, 2011 at 9:34 PM).

  • i tried to add hotspot on flat image using toureditor, the arrow of the hotspot is seen so big, bigger than the screen covering the whole image.

    Here is the screen shot of toureditor - https://drive.google.com/open?id=0B_Wvk5…ZEpGa045Q0t6UEk

    The white area on the image is hotspot.

    So i added scale = " 0.01" on hotspot. The hotspot arrow got small but when i hover it, it again becomes very big. Bigger than the image.


    How should i solve this issue? Please help..


    Update -


    Open the second image of beach and hover over the hotspot arrow.
    Please help me out here..

    Edited 3 times, last by mt7 (September 12, 2016 at 2:12 PM).

  • Hi,

    setting a small scale is already correct.
    Or using non-zoomed/non-distorted hotspot, they have always the same size regardless of the pano zoom.

    The reason why the hotspot is large, is that a flat pano has only a very small fov (hfov=1.0 by default) - see the posts above.

    Best regards,
    Klaus

  • My hotspot code -

    <hotspot name="spot1" style="skin_hotspotstyle" ath="0.313" atv="-1.449" linkedscene="scene_3_bhk_kitchen_compressed" scale ="0.3" zoom="false" />

    when i add zoom = false, the hotspot is not visibile..

    And the position of the hotspot changes when i scale it down - scale = "0.02"

    so how can i stop zooming on hover and position it correctly. As using tour editor the hotspot is very big and after it add scale it changes its position..

    I tried this code but didn't work. I might be using it wrong. So how should i use this code -

    ath = (source-pixel-x / source-pixel-imagewidth - 0.5) * image-hfov
    atv = (source-pixel-y / source-pixel-imageheight - 0.5) * image-vfov

    image-vfov = image-hfov * source-pixel-imageheight / source-pixel-imagewidth


    Thank you..

  • I am having the same problems putting a hotspot on a flat pano. After fiddling around with the settings I found that when you make zoom="false" and leave the distorted at the default of "false" and you also set your scale back to 1.0 and adjust the ath="0" and atv="0" you will get a hotspot on a flat pano that is the same size as the original hotspot icon image in my case 20px X 20px centered on the flat pano. You can adjust it from there to where you want it. I think the combination of zoom="false" and small scale was making it invisible. Also the ath and atv need to be corrected to very small values or else it ends up off screen.

  • @lschaudies

    klaus.krpano

    I set zoom to false and scale to 1.0 and ath and atv to 0 but it didn't work..the arrow is not visible but the mouse pointer become hand pointer showing hotspot is there on half the screen means it is still big..

    <hotspot name="spot3" style="skin_hotspotstyle" ath="0.0" atv="0.0" linkedscene="scene_3_bhk_kitchen_compressed" zoom = "false" scale = "1.0" />


    Am i doing it right?

    And after we make it small how to place the hotspot at correct position as we cannot use the toureditor here?

    Edited once, last by mt7 (September 10, 2016 at 5:26 PM).

  • I wouldn't try using the tour editor for this. Sounds like you need to change the actual size of the graphic with Photoshop or similar editor. All the problems are related to getting the size etc. right relative to a 1degree field of view. I was using a 35px by 35px version of the default arrow. If your graphic is larger you can try reducing the scale appropriately. Try different scales down to I believe .01 is as small as it will go. That wasn't small enough for me using the supplied graphic so I made a smaller version of it.

  • Hi,

    when using a zoom=true or distorted=true hotspot on flat panos, just use a very small scale value (e.g. 0.001 or every smaller). That's because the scale is based on the pano-zoom and relative to a 360 pano - and a flat pano is a only 1 degree pano.

    Without zoom or distorted set true, a scale of 1.0 should be used, because then the scaling is screen-based.

    The ath/atv positions in a flat pano are in the range -0.5 to +0.5.

    About:

    Quote

    I set zoom to false and scale to 1.0 and ath and atv to 0 but it didn't
    work..the arrow is not visible but the mouse pointer become hand pointer
    showing hotspot is there on half the screen means it is still big..

    Post a link.

    Best regards,
    Klaus

  • Hi,

    Here's the link to the tour -

    I got the hotspot arrow small and is seen on the image with zoom = true, distorted = true and scale = 0.001

    But when i hover the hotspot the arrow becomes very big and becomes invisible. Please check the tour - open the second image of beach..

    How to avoid that?

    Edited once, last by mt7 (September 16, 2016 at 8:53 PM).

  • e.g. edit your skin_hotspotstyle style in skin/vtourskin.xml and adapt onover and onout scaling to something like:
    onover="if(zoom EQ true,tween(scale,0.002),tween(scale,0.55) );"
    onout="if(zoom EQ true,tween(scale,0.001),tween(scale,0.5) );"

  • Hi,

    When i add flat image on make vtour normal droplet, it convert normal flat image into spherical and shows this message-

    Code
    converting sphere to cube format

    and

    But sometimes it gives this message -

    Code
    WARNING: 47326254.jpg is not a 360x180 panorama image!         Imagesize=840x460px
    Type of the panorama image? (0=None/Skip, 1=Flat, 2=Spherical, 3=Cylindrical)Input:


    and i select option 1 and it keeps the image flat as i want.

    So how to disable automatic conversion of flat image to cube / spherical so i can select which images i want to be pano and which i want to keep flat / normal image.

    Update - I got it working by increase the width ss it does not follow the ratio and it ask for the input.

    Edited once, last by mt7 (September 18, 2016 at 2:42 PM).

Participate now!

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