Jump to: navigation, search

Panotour - Advanced - Using the Keepview tag 230

Intro

This page will show you to modify your tours to make the point of view stay identical when switching between panoramas using Panotour 2.3. For the tutorial using the current version, see here.

For this, two cases will be explained:

  • 1rst case: The whole tour will keep this effect for navigation, for a streetview type tour for example.
  • 2nd case: The tour keeps it's normal navigation behaviour but offers the possibility of switching between two different scenes keeping the same view (between a day/night panorama, or before/after construction, etc...).



Requirements and notes

  • You need Panotour Pro to follow this tutorial, the standard version does not allow you to modify xml.
  • You have to be able to modify XML files. Although no knowledge of XML syntax is required for this tutorial, you need to have no fear of editing such files. The use of editors such as Notepad ++or Sublimetext is recommended to view XML files clearly.
  • These changes must be done on your built virtual tour, so make sure you are finished building your tour in Panotour before editing, lest you lose all your modifications from rebuilding your tour.
  • The modified code will vary slightly depending on the tour, the transitions used, etc... , so although the edits are simple, you must make this to the action generated by Panotour for that tour, you will not be able to effectively copy the same modified code from one tour to another.
  • For these effects to work, your panoramas (the original equirectangular images) must all be aligned in the same direction. Aligning them from Panotour will not work in this case. This is especially important for the Day/Night effect, the panoramas must be aligned perfectly (for example: if there is a lighthouse in your panorama, it must be in exactly the same place in both panoramas) for the look to be convincing and not confusing to your viewers.
  • The transitions you have set in your tour will be kept, so if for example you set the target transition to "load panorama view" or "load custom view" then that view will be loaded, the view will not be kept when switching from one panorama to another.



1rst case: Streetview-type navigation

Once you've built your tour, in Panotour Pro go to Edit > Open last exported project directory.
You are going to modify two xml files for this navigation, first YOURTOUR_core.xml and then YOURTOUR.xml.

Panotour - 200 - Tutorial - Keepview001.png


YOURTOUR_core.xml

  • Open YOURTOUR_core.xml in a text editor.
  • Search (Ctrl+F) for mainloadscene. This will bring you to the mainloadscene action, which is the action that all you navigation takes when you move from one panorama to another. Your action may have more content than in the examples below, that is fine, it varies on your settings when you built the tour, but the changes and steps remain the same.
  • Select the whole action, copy it (Ctrl+C) and paste (Ctrl+V) a copy underneath.
  • Now for your edits:
    1. In the first action (the original one), change the name from mainloadscene to startupmainloadscene.
    2. In the second action, search for the term MERGE, and replace it with KEEPVIEW.
  • Save the file.



YOURTOUR.xml

  • Now open YOURTOUR.xml in a text editor.
  • Near the top of the file, you should find <action name="startup">
  • Change mainloadscene to startupmainloadscene
  • Save, and you're done.




2nd case: Day/Night effect with default navigation

For this case and example, your tour will have two different types of navigation:

  • The usual method, using hotspots, menus, and/or thumbnails bars.
  • A way to navigate between the two different panoramas, usually either using buttons on the interface or hotspots on the panoramas. It's the navigation of these buttons that we are going to modify to keep the same view when switching between the two panoramas.
    • If using a button, it would be recommended to use the Pano-specific Toggle button. Create one instance for each pair of panoramas you are going to switch between (with the action "Basic > Go to a panorama", navigating between the pair of panoramas).


Once you've built your tour, in Panotour Pro go to Edit > Open last exported project directory.
You are going to modify two xml files for this navigation, first YOURTOUR_core.xml and then YOURTOUR_skin.xml if you will be using buttons, or 'YOURTOUR.xml if you will be using hotspots.

Panotour - 200 - Tutorial - Keepview009.png



YOURTOUR_core.xml

  • Open YOURTOUR_core.xml in a text editor.
  • Search (Ctrl+F) for mainloadscene. This will bring you to the mainloadscene action, which is the action that all you navigation takes when you move from one panorama to another. Your action may have more content than in the examples below, that is fine, it varies on your settings when you built the tour, but the changes and steps remain the same.
  • Select the whole action, copy it (Ctrl+C) and paste (Ctrl+V) a copy underneath.
  • Now for your edits:
    1. In your new action, change the name from mainloadscene to mainloadscenewithkeepview.
    2. Then, search for the term MERGE in your new action, and replace it with KEEPVIEW.
  • Save the file.



YOURTOUR_skin.xml (using buttons to switch)

  • Now open YOURTOUR_skin.xml in a text editor.
  • Search for your button's parameters. If you are using the toggle button, search (Ctrl+F) for toggle
  • Change every mainloadscene in your toggle button to mainloadscenewithkeepview
  • Repeat for as many pairs of panoramas and toggle buttons there are in your tour.
  • Save, and you're done.


YOURTOUR.xml (using hotspots to switch)

  • Now open YOURTOUR.xml in a text editor.
  • Search for your hotspot's parameters in the file by searching for the spot's style name without spaces (for example, for a style called Day Night switch spot, search for DayNightswitchspot)
  • Change every mainloadscene of your selected hotspot to mainloadscenewithkeepview
  • Repeat for as many pairs of panoramas and hotspots there are in your tour.
  • Save, and you're done.



(Optional) Keep hotspots

Keephotspots Flag

This little trick can allow you to keep the hotspots of the original panorama as well as the view when switching panoramas.
For example, imagine a tour where you are navigating between day-time shots of a hotel resort. In certain scenes, you want to switch to a night-time version of the panorama, but keep the hotspots of the original day-time panorama, that when clicked on, moves you to the next day-time panorama.

You can achieve this by adding |KEEPHOTSPOTS to your KEEPVIEW loadscene action.



Watch the video

Fullscreen is recommended, there is no sound in this short video.









BACK TO: Documentation / Panotour Documentation