You are not logged in.

1

Friday, July 18th 2014, 8:45am

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 ...

2

Friday, July 18th 2014, 10:22am

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.

Source code

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


Best regards,
Klaus

3

Friday, July 18th 2014, 11:33am

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:

Source code

1
<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 ...

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

4

Friday, July 18th 2014, 5:22pm

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.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

5

Friday, July 18th 2014, 5:35pm

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.

Source code

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

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

Source code

1
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

6

Monday, July 21st 2014, 12:45pm

Many thanx, Klaus.

Source code

1
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:

Quoted

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