Sie sind nicht angemeldet.

tonesh

Schüler

  • »tonesh« ist der Autor dieses Themas

Beiträge: 75

Wohnort: Rome

Beruf: Photographer

  • Nachricht senden

1

Samstag, 31. August 2013, 10:34

Keep same orientation in vtour

I have a vtour with a costum map + radar so that every scene has a "heading".

How can I pass (through hotspot or clicking on the map ) from a scene to another keeping the same orientation ?
With orientation I mean for example that if the starting scene is pointing north, the target scene should pointing north too.

KEEPVIEW does NOT count the heading of each scene, so I guess it may be an action that gets the starting scene view, corrects with its heading, and then apply this orientation to the target scene, corrected with heading's target scene.
I have a mental block on how to write this code *confused*
btw, "fov" should not be changed.

Thanks,
Toni

2

Montag, 9. September 2013, 21:28

when you stitch your panoramas you can set the center or starting point and then the viewer will always start the view at that location.

You can also set the start position with the included tour_editor.html.
Bill



http://astimegoesby.us Personal family history back to the 1800's

tonesh

Schüler

  • »tonesh« ist der Autor dieses Themas

Beiträge: 75

Wohnort: Rome

Beruf: Photographer

  • Nachricht senden

3

Montag, 9. September 2013, 23:49

Yes billjones, this is a solution, but for next time: set the center of all equirectangulars pointing the same direction. So, applying KEEPViEW will work. But I have already done the project. I miss just this option.
The solution should be in storing the the vlookat (pan) + the heading and hlookat (tilt) from the leaving scene and then properly apply this orientation to the next opening scene.
If there was an "on leave" state like "on start" it could be easy.
To explain it better, it is just as google street acts passing from pano to pano...

tonesh

Schüler

  • »tonesh« ist der Autor dieses Themas

Beiträge: 75

Wohnort: Rome

Beruf: Photographer

  • Nachricht senden

4

Mittwoch, 11. September 2013, 17:49

I resolved the problem, yes, but partially...

So I set the "onclick" of the skin_hotspotstyle in vrtourskin.xml with KEEPALL and add the action "orientation":

Quellcode

1
 onclick="if(linkedscene, tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); loadscene(get(linkedscene),null,KEEPALL,BLEND(1)); orientation(); skin_updatescroll(); );"


The action "orientation" is:

Quellcode

1
<action name="orientation"> add(view.hlookat,get(pointing)); set(view.vlookat,0); set(view.fov,90);</action>


(I set the vlookat to 0 as the KEEPALL can give some tilt, and same with fov, but these settings can be ignored )

So this action refers to a variable "pointing" that I need to set in the vtour.xml at each hotspot:

Quellcode

1
<hotspot name="spot6" style="skin_hotspotstyle" ath="111.792" atv="15.943" linkedscene="scene_069" pointing="leaving_pano_heading - destination_pano_heading" />


This means that the "pointing" variable will have a number that is the result of the "heading" value of the leaving pano minus the "heading" of the destination pano.
As I said, I have an image map with radar etc., and had found the "heading" for all the panos.

Now I can calculate manually all the "pointing" and set for each link the value, and this works *g*

but it would be nice to make it automatically, getting the values from the map, something like:

Quellcode

1
<hotspot name="spot6" style="skin_hotspotstyle" ath="111.792" atv="15.943" linkedscene="scene_069" pointing="sub(pointing,get(layer[map_point_start].heading),get(layer[map_point_destination].heading)" />

this doesn't work, I'm sure that I'm doing something wrong with "sub" but can't realize what....

thanks
Toni

5

Samstag, 10. Juni 2017, 09:08

Hello Tony, i have the same pb, did you find a solution?
how is it possible to get the same orientation when we use "heading"???
Thanks