Hlookat - Vlookat (Again) - KEEPVIEW

  • Hello.

    I've been tasked with creating a virtual tour for my workplace and I'm new to xml. My problem is when transitioning from one scene to another I would like to change the hlookat variable depending on where I come from. The KEEPVIEW parameter works well enough when the panos where taken with the same orientation, but some photos were taken with 90 or 180 degree rotation. So I'm using for transitions:

    <hotspot name="spot1" style="skin_hotspotstyle" ath="-124.349" atv="11.946" ondown="loadscene(scene_02,null, KEEPVIEW,blend(0.3)); "/>

    Is there any way to modify the hlookat parameter taken from the previous scene with KEEPVIEW say +90º or +180º, perhaps with the TWEEN action? This would work for this 'problematic' central scenes coming from any direction ...

    I know this has been asked before, but the solution given is very complicated and I don't quite understand what is going on:
    Hotspot hlookat - vlookat problem

    Many thanx ...

  • Hi,

    yes, that would be possible, but the probably easier way might be using the prealign setting to rotate the images itself to be aligned/rotated the same.

    Add an prealign setting to each <image> and set there the second value to rotate the image horizontally - e.g.

    Code
    <image ... prealign="0|90.0|0">

    Best regards,
    Klaus

  • Thank you for responding this quickly, Klaus ... at first this seemed to work, but then I realized that now I have the same problem when returning to the previous scene.

    Let's say I'm facing 0º in pano1 and pano2 is turned 90º, so I include the code:

    Code
    <image prealign="0|90.0|0">

    All is fine when going from scene1 to scene2 ... however, when I turn 180º to return to pano1 I'm now facing 180º+90º=270º in scene1 (when it should be 180º), so in the transition from pano2 to pano1 the 90º should be subtracted again. This is why I think I should do the correction of hlookat individually for each hotspot.

    It's a big problem for me because I'm under pressure for presenting a (semi)professional tour of our premises next week (now that krpano has been purchased specially with this intention in mind and a photographer was hired).

    Perhaps there is another solution, even if a little bit more complicated? It would help me a lot ...

  • I'm not sure why prealign isn't working.
    Perhaps you should share your project.

    Prealign is to simply set the same cardinal directions for all panoramas.
    Keepview should then be facing the same cardinal direction when entering new scenes. Done and done.

    Building a krpano presentation in a week with complex or custom features isn't very realistic. I've spent years on mine.

    Another thing you can do without prealign is to set the center point for each equirectangular to NORTH with the photoshop offset filter. You can use PTGUI, but offset will eliminate an interpolation step.
    Also its good if you have a referance physical compass in each image to facilitate this since it can be hard to remember where north was. Or you can trace out hlookat with a textfield set with onviewchange and just keep fiddling with entering new values into that prealign setting.

  • All is fine when going from scene1 to scene2 ... however, when I turn 180º to return to pano1 I'm now facing 180º+90º=270º in scene1 (when it should be 180º), so in the transition from pano2 to pano1 the 90º should be subtracted again. This is why I think I should do the correction of hlookat individually for each hotspot.

    The prealign would only change/rotate the given pano image, other images/scenes are not affected, so there will be no additional rotation when switching scenes.

    If you want you could directly set the startup look after the loadscene call,
    e.g.

    Code
    ondown="loadscene(...); lookat(0,0);"


    or just modify the current looking direction directly after the loading:

    Code
    ondown="loadscene(...); add(view.hlookat, 90);"

    but when all panos have the same orientation and KEEPVIEW was used, this should be not necessary...

    Best regards,
    Klaus

  • Many thanx, Klaus.

    Code
    ondown="loadscene(...); add(view.hlookat, 90);"


    I will try this in my next tour, for now I solved the problem with lower tech *g*
    : I simply recomposed the misaligned panoramic views, but putting e.g.
    the leftmost (single) image on the right, and then creating the pano
    with the makepano droplet. I inserted the new created tiles folder in
    the tour, changed the hotspot location and it works fine (but without
    programing).

    Sachagriffin:

    Prealign does work when entering a node, but not when returning to the previous one. I tried to explain ... my english perhaps is not good enough, but I don't know a better way to explain it:

    Zitat

    All is fine when going from scene1 to scene2 ... however, when I turn
    180º to return to pano1 I'm now facing 180º+90º=270º in scene1 (when it
    should be 180º), so in the transition from pano2 to pano1 the 90º should
    be subtracted again.

    Well, this problem is solved for this tour, now on to trying autohiding the thumbnails *confused*

    Thanx for helping

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!