Skip to main content

Sample Maps

  1. Download the sample maps as datasrcs.zip from Tuan's web site.
  2. Extract the directory datasrcs that you find in your datasrcs.zip into the PLSM/Samples/media/paginglandscape2 directory that you will create in the next section.
  3. Once you have extracted them, you can enable the terrains in paginglandscape2.cfg and maptools.cfg if needed. CVS users: You are required to do this.

Prebuilt Demo Binaries

  • Download the binaries here and extract all files into a directory. It doesn't matter how you call it, but here we shall call it the PLSM directory.
  • Download and extract the Sample Maps as described in the previous section. Now you should have several *.raw and *.png textures in this directory: PLSM/Samples/Media/paginglandscape2/datasrcs/.
  • Change the resources.cfg in the base directory to the following:
Copy to clipboard
# Resource locations to be added to the 'boostrap' path # This also contains the minimum you need to use the Ogre example framework [Bootstrap] Zip=./OgreCore.zip # Resource locations to be added to the default path [General] FileSystem=./ FileSystem=./fonts FileSystem=./programs FileSystem=./scripts FileSystem=./textures FileSystem=./models FileSystem=./overlays FileSystem=./particle FileSystem=./gui [PLSM2] FileSystem:=./Samples/media/paginglandscape2/ FileSystem:=./Samples/media/paginglandscape2/terrains FileSystem:=./Samples/media/paginglandscape2/materials\textures FileSystem:=./Samples/media/paginglandscape2/models FileSystem:=./Samples/media/paginglandscape2/overlays FileSystem:=./Samples/media/paginglandscape2/materials FileSystem:=./Samples/media/paginglandscape2/materials/scripts FileSystem:=./Samples/media/paginglandscape2/materials/programs FileSystem:=./Samples/media/paginglandscape2/datasrcs
  • Run MapSplitter.exe to generate data.
  • Change the resources_plsm2.cfg in the base directory to this:
Copy to clipboard
# Resource locations to be added to the 'boostrap' path # This also contains the minimum you need to use the Ogre example framework [Bootstrap] Zip=./OgreCore.zip # Resource locations to be added to the default path [General] FileSystem=./ FileSystem=./fonts FileSystem=./programs FileSystem=./scripts FileSystem=./textures FileSystem=./models FileSystem=./overlays FileSystem=./particle FileSystem=./gui [PLSM2] FileSystem:=./Samples/media/paginglandscape2/ FileSystem:=./Samples/media/paginglandscape2/terrains FileSystem:=./Samples/media/paginglandscape2/materials\textures FileSystem:=./Samples/media/paginglandscape2/models FileSystem:=./Samples/media/paginglandscape2/overlays FileSystem:=./Samples/media/paginglandscape2/materials FileSystem:=./Samples/media/paginglandscape2/materials/scripts FileSystem:=./Samples/media/paginglandscape2/materials/programs FileSystem:=./Samples/media/paginglandscape2/datasrcs
  • In the file PLSM\Samples\Media\paginglandscape2\paginglandscape2.cfg change the first line of the file to be
Copy to clipboard
DefaultMap=European_Alpes
  • Run Demo_PagingLandScape2.exe from PLSM directory. Use the demo controls to move around. PLSM2 should be succesfully installed now.


WARNING: do not use any of the dll's from the binary pack to compile/run your own plsm2 applications, use the source package.

Ogre SDK Compatible Install

First of all you need the stable Ogre SDK from ogre website.

  • Unpack/install the SDK


If you want stable, Ogre 1.4 SDK compatible plsm2. Download source from here

VC9.0 + Ogre1.6RC1 Install

  • Download/checkout the PLSM2 Source
  • Unpack/move the PLSM2 source so it resides OgreSDK-Directory\paginglandscape
  • Open the plsm2_vc8 with Visual C++ 2008
  • Right click on the __Plugin_PagingLandScapeSceneManager2'''-project and select properties
  • On Configuration, select "All the configurations" so both "Release" and "Debug" modes are configured
  • Goto Configuration Properties > C/C++ > General and add ".", "OgreSDK-Directory\include" and "OgreSDK-Directory\include\opt" at the Additional Include Directories option
  • Goto Configuration Properties > Linker > General and add "OgreSDK-Directory\lib\opt", "." and "OgreSDK-Directory\lib" at the Additional Library Directories
  • Goto Configuration Properties > Linker > Input and add "Plugin_OctreeSceneManager_d.lib" at the Additional Dependencies option
  • Click Ok
  • Right click on the ''Plugin_PagingLandScapeSceneManager2__-project select "Project Only" and the "Build Only..."-option

VC8.0 Install

You will need :

  • Get Paging landscape 2 source from here.
  • Extract it so that paginglandscape is in the same directory as OgreSDK.
  • build the plsm2 Solution. (the _SDK.sln)

VC7.1 Install

You will need :

  • Get Paging landscape 2 source from here.
  • Extract it so that paginglandscape is in the same directory as OgreSDK.
  • build the plsm2 Solution. (the _SDK.sln)

Linux Install

In ogreaddons/paginglandscape/ directory:

  • execute bootstrap && ./configure && make && su && make install
  • edit Tools/Common/bin/maptools.cfg and Tools/Common/resources.cfg according to you directory structure. (mainly where are the Media)
  • cd Sample/Common/bin
  • edit maptools.cfg and resources.cfg according to you directory structure.(mainly where are the Media)
  • ./Mapsplitter
  • Resulting map splitted may be in directory no listed in resources.cgf. add them. (or uncomment them.)
  • ./PagingLandScape

Ogre CVS HEAD (Dagon) Compatible Install

If you want latest PLSM2 code, CVS ogre HEAD compatible (Dagon).
Use plsm2 CVS.

Visual Studio Install

Install

VC 7.1 & VC8 Install

You will need :

  • latest Ogre CVS update.
  • \ogreaddons\paginglandscape from Ogre CVS.


If compiling against CVS :

  • build the Ogre Solution. (the _CVS.sln)

Run

  1. Now you can run demo_paginglandscape2.exe from Samples/common/Debug or Samples/common/Release

Linux Install

In ogreaddons/paginglandscape/ directory:

  • execute bootstrap && ./configure && make && su && make install
  • edit Tools/Common/bin/maptools.cfg and Tools/Common/resources.cfg according to you directory structure. (mainly where are the Media)
  • cd Sample/Common/bin
  • edit maptools.cfg and resources.cfg according to you directory structure.(mainly where are the Media)
  • ./Mapsplitter
  • Resulting map splitted may be in directory no listed in resources.cgf. add them. (or uncomment them.)
  • ./PagingLandScape

Subsection

If the above method didn't work try this.

I'm a newbie Ogre & C++ user so what I'm about to describe may not be by the book, some may not be neccessary but at the very least it did install a working system. Hopefully somebody with more experience will correct my errors.
If you haven't already done so you need to download Ogre & Paginglandscape from CVS. Copy Paginglandscape into the same directory where you unpacked Ogre, eg. /home/someone/Ogre/ogrenew & /home/someone/Ogre/paginglandscape.
Install Ogrenew with the usual bootstrap, ./configure&&make&&make install routine. I like to use checkinstall ( http://asic-linux.com.mx/~izto/checkinstall/ ) as this keeps track of all the files and builds a package for your system & installs that, which is an easy way to keep your box tidy.

a) In /paginglandscape/configure.in,
below "AM_CONFIG_HEADER(config.h)"
add:-
dnl Next line added
AC_LANG_CPLUSPLUS

above the "AC_CHECK_LIB" statements
add:-
dnl Next line added
PKG_CHECK_MODULES(OGRE, OGRE >= 1.2)

below the "AC_CHECK_FUNC" statements
add:-
dnl added checks
AC_CHECK_FUNCS(floor)
AC_CHECK_FUNCS(memset)
AC_CHECK_FUNCS(pow)
AC_CHECK_FUNCS(sqrt)
AC_CHECK_HEADERS(malloc.h)
AC_CHECK_HEADERS(sys/param.h)
AC_C_CONST
AC_FUNC_MEMCMP
AC_HEADER_STDBOOL
AC_PROG_RANLIB
AC_TYPE_SIZE_T
AC_C_INLINE
dnl end of added checks

above the "dnl Detect endianness" statement
add:-
dnl Next 2 lines added
AC_SUBST(OGRE_CFLAGS)
AC_SUBST(OGRE_LIBS)

b) In paginglandscape/Tools/MapSplitter/Makefile.am
add a new line:-
LDADD = @OGRE_LIBS@
c) In paginglandscape/Tools/MapSplitter/src/Makefile.am.

In the line reading "MapSplitter_LDADD = -lOgreMain"
add $(OGRE_LIBS) so that it reads
MapSplitter_LDADD = -lOgreMain $(OGRE_LIBS)
d) In paginglandscape/Samples/PagingLandScape2/src/Makefile.am.
In the line reading "PagingLandScape2_LDADD = $(top_srcdir)/PlugIns/PagingLandScape2/src/Plugin_PagingLandScape2.la"
add $(OGRE_LIBS) so that it reads
PagingLandScape2_LDADD = $(top_srcdir)/PlugIns/PagingLandScape2/src/Plugin_PagingLandScape2.la $(OGRE_LIBS)
e) Copy ExampleApplication.h & ExampleFrameListener.h from ogrenew/Samples/Common/include to paginglandscape/Samples/Common/include
f) In paginglandscape/Plugins/PagingLandScape2/src/OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp.

add the following if they are not already included:-

Copy to clipboard
#include "OgrePagingLandScapeTile.h" #include "OgrePagingLandScapePage.h" #include "OgrePagingLandScapePageManager.h" #include "OgrePagingLandScapeData2D.h"

f)Make Bootstrap excutable then do Bootstrap, ./configure, make etc.

Check that everything installed Ok by looking in /usr/local/include for the OGRE & PAGINGLANDSCAPE directories and in /usr/local/lib/OGRE for the PagingLandScape2 libraries.

g) Follow the instructions at http://tuan.kuranes.free.fr/Ogre.html for downloading and installing datasrcs.zip.

h) Find resources.cfg in paginglandscape/Samples/Common/bin and rename it to resources_plsm2.cfg then open it in your favourite text editor and change the default paths according to your setup.

For example, for the setup described here:-

Copy to clipboard
[General] FileSystem=../../../../ogrenew/Samples/Media FileSystem=../../../../ogrenew/Samples/Media/fonts FileSystem=../../../../ogrenew/Samples/Media/materials/programs

and so on

We don't have fonts in fonts in the paginglandscape media directory so you can delete or comment out that line in the PLSM section.

i) cd /paginglandscape/Samples/Common/bin

NB.
Before using ./MapSplitter TsmTerrain needs a colormap named terrain_texture.jpg which doesn't exist in the datasrcs directory. However there is a terrain_texture.0.0.jpg in the material/textures directory which I copied and renamed terrain_texture..jpg, leaving it in the materials/textures directory. The extra "." is needed for some reason.

NB. This has been fixed in the latest CVS

After running ./MapSplitter you should see directories of the split maps in paginglandscape/Samples/Media/paginglandscape2/terrains/

j)
Make sure that the new map directories are listed in resources_plsm2.cfg. If not add them.

NB.
In paginglandscape2.cfg I found that I had to change the line "European_Alpes=Alpes" to "alpes=Alpes" before ./PagingLandScape2 would work with this map.

k) After running ./PagingLandScape2 if all has gone according to plan you shold arrive at the Ogre configure dialogue and then at blue filled Ogre render window.

Press F1 a couple of time to clear the debug & help overlays. Then press K key when a small white speck will appear.

Use the W key to zoom in quickly ( may need to zoom out again with the S key). Press M key to switch to camera mode.

You can now use the mouse to look around and zoom in and out at a more respectable rate.

Xpomjon 06:38, 22 February 2007 (CST)

Faq

  • I get no terrain ?


Make sure you did run mapsplitter prior to the demo, and that data splitted is available to Ogre (resources.cfg contains the terrain data directory (media/paginglandscape2/terrains/mylandscapename))


Alias: Paging_Scene_Manager_Installation