Direct node access and direction

Q&A about the latest versions
Post Reply
HaraldJ
Posts: 156
Joined: Wed Oct 10, 2012 2:05 pm
Location: Surrey, United Kingdom
Contact:

Tue May 26, 2015 10:23 am

Just wondering how this could be done:

Take a virtual tour similar to Google Street View - your panoramas are along one line, like a road, and visually linked to each other with hotspots along this line.

Let's say your starting panorama is A, you can move to B, then to C, and the end is at D.

If I use the right target parameters for my hotspots, I can "turn around" when I reach D, and trace my route back to A, just by following hotspots C and B.

Now I add direct node access - A is #node1, D is #node4. If I start at #node1, the default, I'm facing towards B, if I start there, then it's C, and so on.

What I would like to achieve is an option to be able to START at D, our #node4 and "normal" end of journey, WITHOUT having to turn around to look towards C.

In other words: Default would be A to D, with direction A to D, I would like an option to invoke the tour as D to A, with the direction D to A.

Would that be possible?

Thanks!!

Harald
Harald Joergens
Harald Joergens Photography
Nutfield, Surrey, United Kingdom
User avatar
JimWatters
Posts: 329
Joined: Thu Oct 07, 2010 6:16 pm
Location: Saint John, New Brunswick
Contact:

Tue May 26, 2015 1:00 pm

Adding direct node access allows you to specify a link to a node. So you can do
tour.html#node4
But the html template does not generate any code to add the directions. You can add this.

It is necessary to parse the URL to find if any parameters are there and if so use them.

Code to get parameters from the URL, add some Javascript like this.
http://code-tricks.com/get-url-paramete ... avascript/

See JavaScript API (Pano2VR)

So with a URL like: http://tour.html#node4?pan=20&tilt=40&FoV=40
You can use the following snippet to move the pano to the position in the URL
var vPan= getUrlParameters("pan", "", true);
var vTilt= getUrlParameters("tilt", "", true);
var vFoV= getUrlParameters("FoV", "", true);

pano.moveTo(vPan,vTilt,vFov,10);

Any changes you make to the html page will be overridden when you generate the project again do make sure you keep a copy of your changes.
Alternatively you can create a new html template that includes your changes and use that to generate your html page.
see HTML Template
HaraldJ
Posts: 156
Joined: Wed Oct 10, 2012 2:05 pm
Location: Surrey, United Kingdom
Contact:

Tue May 26, 2015 1:06 pm

Thank, Jim,

That's brilliant, and exactly what i wanted!

I'll build that into my current "work in progress" and publish a link once it' s done!

Thanks again for the quick and detailed response!
Harald
Harald Joergens
Harald Joergens Photography
Nutfield, Surrey, United Kingdom
HaraldJ
Posts: 156
Joined: Wed Oct 10, 2012 2:05 pm
Location: Surrey, United Kingdom
Contact:

Fri May 29, 2015 1:31 pm

With a few code changes it seems to be working now, before I publish the code here, please try it out, and let me know the results, good or bad:

You will need a node parameter, I haven't worked around that. With a node parameter, just add pan, tilt, and field of view (all are needed)

Example:

URL: https://www.haraldjoergens.com/panorama ... cks/files/
Node: 16 (there are 23 nodes in this example)
Pan: 185 degrees
Tilt: 9 degreees
Field of view: 30 degrees

The complete URL for the above is

https://www.haraldjoergens.com/panorama ... t=9&fov=30

You can change the URL values and just hit "Enter" to see the change, perhaps a useful tool.

The original idea was to be able to use and end point of a virtual tour as a start point, "going" in the opposite direction. This seems to work now, you can go down this flight of canal locks with one URL, and start at the lower end to go up with another URL that uses the above parameters.

Does it work for you? Any issues?

UPDATE: The problem with Internet Explorer seems to be fixed now, I haven't been able to find any more problems. That doesn't mean there are none - it would be great if you could play around a bit, and let me know the results! Thank you very much!

Update: I'm using the direct access to the view parameters much more than I had thought. Instead of writing in an email "open the panorama, turn left and up a bit, and zoom in", I can now provide a link that opens the panorama in exactly the way I want it to.
Example: Default view with direct node access, and the view I want to show for a specific purpose.

Thanks!

Harald
Harald Joergens
Harald Joergens Photography
Nutfield, Surrey, United Kingdom
User avatar
Hopki
Gnome
Posts: 11131
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fri Jun 05, 2015 2:22 pm

Hi Harald,
Just set the views you want to start with by using the Viewing parameters.
Then when in the tour you would use your hotspot target view to open the last panorama which can be a different view.
Regards,
Hopki
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
HaraldJ
Posts: 156
Joined: Wed Oct 10, 2012 2:05 pm
Location: Surrey, United Kingdom
Contact:

Fri Jun 05, 2015 2:29 pm

Hi Hopki,

Thanks, I have already implemented it via changes to the HTML5 template and adding a bit more Javascript, please see my previous post. It seems to work very well, but I'm hoping to get a bit more feedback, good or bad.

It's a feature I'm now using all the time, especially when sending a link via email, to draw the viewer's attention to exactly where i want it to be. Can't believe I could ever cope without it!

Harald
Harald Joergens
Harald Joergens Photography
Nutfield, Surrey, United Kingdom
User avatar
Hopki
Gnome
Posts: 11131
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fri Jun 05, 2015 2:33 pm

Hi Harald,
I do believe this is already a feature request.
Would have to look it up.
Regards,
Hopki
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
CSoehner
Posts: 22
Joined: Thu Jul 23, 2015 10:00 am

Mon Aug 17, 2015 9:44 pm

I am also wanting the "directional view". The same as google maps where the view of the new pano is in the direction you were looking from the last pano.
I am using Pano2VR5. Is there a setting there for that? How do I kill the default view?
User avatar
Hopki
Gnome
Posts: 11131
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Wed Aug 19, 2015 1:52 pm

Hi CSoehner,
For V5 Pro when in hotspot viewer mode you have a target view button.
Click this to open a view window to set the view of the next node.

If using the V5 you will need to open the project file of the next node then under the viewing parameters panel rotate the pano to the desired view and make a note of the Pan, Tilt and FoV.

Back it the first panorama and in the hotspot mode enter the Pan, Tilt and FoV under the target.
Regards,
Hopki
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
CSoehner
Posts: 22
Joined: Thu Jul 23, 2015 10:00 am

Wed Aug 19, 2015 4:17 pm

I'm not sure I understand. What do you mean make a not of the Pan, Tilt and FoV? I know what those are, but can we only set one default view?
I would like the first view of every pano to be in the direction of the viewer if they were actually walking through the building. That means the view will be different depending on which way they were touring the building.
User avatar
Hopki
Gnome
Posts: 11131
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Wed Aug 19, 2015 8:37 pm

text corrected, should of been read:
"make a note of the Pan, Tilt and FoV"
Regards,
Hopki
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply