Can't get demo working

kneeride

27-11-2006 07:02:39

Hi, I'm having trouble getting the demo to work.

I downloaded and unzipped OgreSDK_PLSM2_binary_demo.zip
I downloaded and unzipped datasrcs.zip

I am a little unsure where i copy datascr dir. However I have the following structure:

D:\OgreSDK_PLSM2_binary_demo\Samples\Media\paginglandscape2\datasrcs

I also tried creating my own media directory. ie:

D:\OgreSDK_PLSM2_binary_demo\Media\paginglandscape2\datasrcs


When I run MapSplitter.exe, I get the following error:

Runtime Error!
Program: ...
etc

The error actually occurs after the line:

Creating resources group Bootstrap


Any help would be appreciated.

kneeride

27-11-2006 07:07:01

I have some more info.

I dont seem to have a ../../Media/packs/OgreCore.zip. I dont need the OgreSDK do I. I'm assuming the media directory is supposed to be in the demo app and assume it's not looking in my SDK media folder...

the log says the following:


-----------------------------------
Details:
-----------------------------------
Error #: 9
Function: ZipArchive::checkZzipError
Description: ../../Media/packs/OgreCore.zip - error whilst opening archive: Unable to read zip file..
File: ..\src\OgreZip.cpp
Line: 256
Stack unwinding: <<beginning of stack>>
17:49:03: *-*-* OGRE Shutdown
17:49:03: Unregistering ResourceManager for type Compositor
17:49:03: Unregistering ResourceManager for type Font
17:49:03: Unregistering ResourceManager for type Skeleton
17:49:03: Unregistering ResourceManager for type Mesh
17:49:03: Unregistering ResourceManager for type HighLevelGpuProgram
17:49:03: Unloading library .\Plugin_PagingLandScapeSceneManager2
17:49:03: Unloading library .\Plugin_ParticleFX
17:49:03: Unloading library .\Plugin_CgProgramManager
17:49:03: *** Stopping Win32GL Subsystem ***
17:49:03: Unloading library .\RenderSystem_GL
17:49:03: D3D9 : Shutting down cleanly.
17:49:03: D3D9 : Direct3D9 Rendering Subsystem destroyed.
17:49:03: Unloading library .\RenderSystem_Direct3D9
17:49:03: Unregistering ResourceManager for type Material
17:49:03: Unloading library OgrePlatform.dll

kneeride

27-11-2006 07:12:35

I'm not sure if the resources.cfg file in the demo is correct.

ie
- OgreCore is in the root (not ../../Media/packs/OgreCore.zip)
- other folders such as GUI are in the root and not ../../Media/fonts


Details of resources.cfg:

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../Media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=../../Media
FileSystem=../../Media/fonts
FileSystem=../../Media/materials/programs
FileSystem=../../Media/materials/scripts
FileSystem=../../Media/materials/textures
FileSystem=../../Media/models
FileSystem=../../Media/overlays
FileSystem=../../Media/particle
FileSystem=../../Media/gui
FileSystem=../../Media/DeferredShadingMedia
Zip=../../Media/packs/cubemap.zip
Zip=../../Media/packs/cubemapsJS.zip
Zip=../../Media/packs/dragon.zip
Zip=../../Media/packs/fresneldemo.zip
Zip=../../Media/packs/ogretestmap.zip
Zip=../../Media/packs/skybox.zip

davesh

27-11-2006 15:05:42

Ok. I'll tell you how I set my environment up to get this working.

I created a work area separate from the PLSM2 installation. I wanted to make sure that I could split maps and then add output to my application.

My work area looks like this:

<d> project_root_dir
maptool.cfg
resources_plsm2.cfg
<d> project_root_dir/paginglandscape2
MyMap.gen.cfg
<d> project_root_dir/paginglandscape2/datasrcs
MyMap.png

Here is my maptool.cfg




DefaultMap=MyMap

MyMap=MyMap.gen

# resource group name
GroupName=PLSM2

#do you want to run it on all maps listed here
BatchMode=yes


Here is my resources_plsm2.cfg

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=C:/Development/ogrenew/Samples/Media/packs/OgreCore.zip

# Resource locations to be added to the default path
[PLSM2]
FileSystem=C:/Development/ogrenew/Samples/Media
FileSystem=C:/Development/ogrenew/Samples/Media/fonts
FileSystem=C:/Development/ogrenew/Samples/Media/materials/programs
FileSystem=C:/Development/ogrenew/Samples/Media/materials/scripts
FileSystem=C:/Development/ogrenew/Samples/Media/materials/textures
FileSystem=C:/Development/ogrenew/Samples/Media/models
FileSystem=C:/Development/ogrenew/Samples/Media/overlays
FileSystem=C:/Development/ogrenew/Samples/Media/particle
FileSystem=C:/Development/ogrenew/Samples/Media/gui
FileSystem=C:/Development/ogrenew/Samples/Media/DeferredShadingMedia
Zip=C:/Development/ogrenew/Samples/Media/packs/cubemap.zip
Zip=C:/Development/ogrenew/Samples/Media/packs/cubemapsJS.zip
Zip=C:/Development/ogrenew/Samples/Media/packs/dragon.zip
Zip=C:/Development/ogrenew/Samples/Media/packs/fresneldemo.zip
Zip=C:/Development/ogrenew/Samples/Media/packs/ogretestmap.zip
Zip=C:/Development/ogrenew/Samples/Media/packs/skybox.zip


FileSystem=./paginglandscape2
FileSystem=./paginglandscape2/datasrcs
FileSystem=./paginglandscape2/terrains

FileSystem=C:\Development\ogreaddons\paginglandscape\Samples\Media\paginglandscape2\materials\textures
FileSystem=C:\Development\ogreaddons\paginglandscape\Samples\Media\paginglandscape2\materials\scripts


Notice that this file specifies where to find the datasrcs relative to the directory from which I run mapsplitter (in my example project_root_dir)

Hopefully this will help you.

kneeride

28-11-2006 03:22:19

Thanks for the tips davesh, but I am having no luck at all.
Am I missing something because surely it is not supposed to be this difficult?
All I want to do is run the demo, at the moment I am not interested in splitting/running my own terrains.

I have pulled appart resources_plsm2.cfg
- I have pointed the media directories to point to my OgreSDK media
- I placed datasources in the OgreSDK media as well
- I linked textures and scripts (from the demo samples)
- I have setup resources.cfg the same way


# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/fonts
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/materials/programs
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/materials/scripts
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/materials/textures
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/models
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/overlays
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/particle
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/gui
FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/DeferredShadingMedia
Zip=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/packs/cubemap.zip
Zip=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/packs/cubemapsJS.zip
Zip=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/packs/dragon.zip
Zip=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/packs/fresneldemo.zip
Zip=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/packs/ogretestmap.zip
Zip=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/packs/skybox.zip

FileSystem=D:/Dev/GDev/Lib/Ogre/OgreSDK/Media/paginglandscape2/datasrcs

FileSystem=D:/DevLocal/GDev/Demo/PageManager/OgreSDK_PLSM2_binary_demo/Samples/Media/paginglandscape2
FileSystem=D:/DevLocal/GDev/Demo/PageManager/OgreSDK_PLSM2_binary_demo/Samples/Media/paginglandscape2/materials/textures
FileSystem=D:/DevLocal/GDev/Demo/PageManager/OgreSDK_PLSM2_binary_demo/Samples/Media/paginglandscape2/materials/scripts


when I run mapsplitter, I get the following exception
(where is the ogreaddons path coming from??).
I get a similar error when running Demo_PagingLandScape2.exe


Error #: 8
Function: FileSystemArchive::changeDirectory
Description: Cannot open requested directory ../../../../../ogreaddons/paginglandscape/Samples/Media/paginglandscape2.
File: ..\src\OgreFileSystem.cpp
Line: 141
Stack unwinding: <<beginning of stack>>
14:04:29: An exception has been thrown!

davesh

28-11-2006 13:05:44

Interestingly I'm pretty sure I ran into something similar when I tried to run. I actually tweaked code in a location where the path that is showing up in your log file was hard-coded. When I get to work I'll tell you what I did. I'm sure I was just missing a configuration file option (this would have prevented me from having to tweak code).

Will post any additional thoughts later today.

davesh

28-11-2006 16:08:03


directory ../../../../../ogreaddons/paginglandscape/Samples/Media/paginglandscape2.

See paginglandscape2application.h line 110

The application will be looking for critical resources in this directory.
For example if the PNG files that come out of the mapsplitter process are in a directory called MyMap

then the MyMap directory should be located under the terrains directory:

  1. ../../../../../ogreaddons/paginglandscape/Samples/Media/paginglandscape2/terrains/MyMap
    [/list:u]

    and MyMap.cfg should be located under terrains as well.