You are not logged in.

Tangent12

Trainee

  • "Tangent12" started this thread

Posts: 89

Location: Liverpool, UK

Occupation: Application Developer

  • Send private message

1

Friday, May 7th 2010, 10:14pm

Smooth Pan Out

Hi All,

I have a gigapixel pano that has hotspots for points of interest. You click a thumbnail image and the pano zooms in close to the point of interest.
On a gigapixel pano that is very zoomed in. When you click another point of interest the pano moves (pans) to that one but stays zoomed and shifts across disorientating the user and it looks a bit rubbish.
I then got the pano to zoom out half way then turn and zoom into the new point of interest.
This also doesn't look good because it is not a smooth action.

I'd really like to zoom out turn and zoom in all in one smooth motion as if the camera was on a curved path but I can't seem to get it to work.

I tried the following code but there is a big pause and it doesn't account for if the user is currently zoomed out.
I pass the toH, toV and fov of the destination point of interest into the action.

Source code

1
2
3
4
<action name="smoothZoom">
zoomto(30,smooth(60, 60, 60));
lookto(%1,%2,%3,smooth(60, 60, 60));
</action>


Any help would be much appreciated.

Thanks

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

2

Friday, May 7th 2010, 10:32pm

Hi,

there is no automatic function for that in krpano,
but you can try to use tween to change the position and zoom manually,

e.g. here an example - pan and zoom by tween

and here the code for it:

Source code

1
2
3
4
5
6
7
8
9
10
11
<action name="pan">
  oninterrupt(break);

  lookat(-5.88, 2.49, 1.0);
  wait(LOAD);
  wait(2);
		
  tween(view.hlookat, -19.92, 6.0, easeInOutQuint);
  tween(view.vlookat, -1.18,  6.0, easeInOutQuint);
  tween(view.fov, 5.0, 3.0, easeOutQuad, tween(view.fov, 1.0, 3.0, easeInQuad));
</action>


best regards,
Klaus

Tangent12

Trainee

  • "Tangent12" started this thread

Posts: 89

Location: Liverpool, UK

Occupation: Application Developer

  • Send private message

3

Friday, May 7th 2010, 10:33pm

I also tried this code to get a sort of half way point between the current view and the destination point of interest but it was a bit erratic and didn't solve the smoothness issue.

Source code

1
2
sub(a, %1,get(view.hlookat));
sub(b, %2,get(view.vlookat));


Thanks again

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

Tangent12

Trainee

  • "Tangent12" started this thread

Posts: 89

Location: Liverpool, UK

Occupation: Application Developer

  • Send private message

4

Friday, May 7th 2010, 10:36pm

Hi Klaus,

That is exactly what I'm looking for and I really appreciate the help.

I will try the code now and let you know.

Thank you very much.

Also, thank you for all the recent new features.
Keeping your customers ahead of their competition.

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

5

Friday, May 7th 2010, 10:37pm

Hi,

one more note - the lookto/moveto/zoomto actions are using an 'accelerated movement':
first - acceleration, then moving with maxspeed and then braking down,
so there will be always a 'stop' with them,

best regards,
Klaus