Partial Pano - calc view.hfov WITHOUT krpano

  • Hi,

    I would like to know how can I calculate view.hfov without using KRPANO, i.e. without loading the partial pano in KRPANO and reading "view.hfov". I have image.hfov and area.width and area.height. I noticed that view.hfov changes depending on the krpano.area.

    Kindly consider the default Partial Pano example that comes bundled with KRPANO. view.fov in the xml file is set to "90".

    1) When image.hfov=157.04, area.width=600 and area.height=450, in this case view.hfov is 90.82

    2) When image.hfov=157.04, area.width=800 and area.height=450, in this case view.hfov is 107.04

    3) When image.hfov=157.04, area.width=1000 and area.height=450, in this case view.hfov is 118.79

    Basically I want the formula to calculate view.hfov based on the parameters that I have, area and image.hfov, without loading pano with KRPANO.

    This thread might not be valid for this forum as it is not related to KRPANO, but I don't know where else to go and also I will be using KRPANO ultimately to display the pano, but I need to know image.hfov before it gets loaded, for the related elements of the interface to work, like the "play-head".

    Regards,

    OnisH

  • Hi,

    the view limiting/clipping is calculated dynamically,

    that means there is no simple formula for calculating the view.hfov from the image.hfov and screensize,
    there are also much more variables included (e.g. the vertical looking),

    and posting the full view limiting and fov conversion code would be too much and I don't want to do that too,

    best regards,
    Klaus

Participate now!

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