Basic PLSM Demo

CaseyB

15-02-2006 21:39:12

I have been digging through the PLSM Demo and there is a LOT there. Does anyone have a really basic example? I mean just like one terrain and movement?

tuan kuranes

16-02-2006 09:19:13

try to modify Demo_Terrain from Ogre, making it using PLSM2 instead of TSM.
It should work out of the box.

SuperMegaMau

16-02-2006 14:56:14

try to modify Demo_Terrain from Ogre, making it using PLSM2 instead of TSM.
It should work out of the box.


right, just change the setWorldGeometry("terrain.cfg") to setWorldGeometry("paginglandscape2.cfg").

don't forget to include the library in the plugins.cfg and the correct datafiles in the correct path...

CaseyB

16-02-2006 16:08:41

Sweet! I'll give this a shot! Thanks!

CaseyB

16-02-2006 17:02:20

Ok, I gave this a shot, but it pops up and error that says

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: PagingLandScapeOptions::load
Description: You need to define a GroupName where to find the map definition file .
File: ..\src\OgrePagingLandScapeOptions.cpp
Line: 273
Stack unwinding: <<beginning of stack>>

What does that mean?

tuan kuranes

16-02-2006 17:08:57

means the the paginglandscape2.cfg in
setWorldGeometry("paginglandscape2.cfg").
may not be correct.

CaseyB

16-02-2006 17:59:22

AH, ok, I still had it pointing to "terrain.cfg" Thanks!

CaseyB

17-02-2006 19:10:34

Now I am trying to pull the simple terrain demo out of the c:\ogrenew\samples framework in to a project that I create and I am running into this error.

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: PagingLandScapeOptions::load
Description: You need to define a DefaultMap= .
File: ..\src\OgrePagingLandScapeOptions.cpp
Line: 304
Stack unwinding: <<beginning of stack>>

if I copy the executable into the ogrenew\samples\bin\debug directory it works fine, which leads me to believe that I am missing something.

tuan kuranes

17-02-2006 19:12:08

did you copy paginglandscape2.cfg ?
does paginglandscape2.cfg has a DefaultMap config variable ?

CaseyB

17-02-2006 19:15:19

yup and yup. Here is the source from the paginglandscape2.cfg

DefaultMap=Terrain_Scene_Manager_Terrain

puget_sound=ps_height_1k
#grand_canyon=gcanyon_height_4k2k
#terragen_generated=terragen16bits
#European_Alpes=Alpes
Terrain_Scene_Manager_Terrain=TsmTerrain
def=Default

# resource group name where to find map definition
GroupName=PLSM2

# Try forbidden textureformat combinations
TextureFormatDebug=no

I also modified the resources.cfg to include this

[PLSM2]
FileSystem=../Media/paginglandscape2

FileSystem=../Media/paginglandscape2/models
FileSystem=../Media/paginglandscape2/materials
FileSystem=../Media/paginglandscape2/materials/scripts
FileSystem=../Media/paginglandscape2/materials/textures
FileSystem=../Media/paginglandscape2/materials/programs

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

and added

Plugin=Plugin_PagingLandScapeSceneManager2

to the plugins.cfg

tuan kuranes

17-02-2006 19:35:04

Strange.
plsm2 read file given on setWorldGeometry, opens it and search for DefaultMap in the file, and exception is raised if it doesn't exist.

So it along that line of action.

Does setWorldGeometry() has the good file as parameter ?

CaseyB

17-02-2006 21:12:46

:oops: I was pointing it at the wrong file! Thank you very much and sorry for the trouble!!

CaseyB

22-02-2006 16:39:09

Ok, so I have an app working using the Terrain demo, but now I am running into trouble when I try to pull out the ExampleApplication stuff. It dies on this line

void PagingLandScapeSceneManager::_updateSceneGraph(Camera * cam)
{
// entry into here could come before setWorldGeometry
// got called which could be disastrous
// so check for init
--->assert(mPageManager);
if (isRenderQueueToBeProcessed(mPageManager->getPageRenderQueue()))
{

it's line 283 in OgrePagingLandscapeSceneManager.cpp
Any ideas what I am setting up incorrectly?

tuan kuranes

22-02-2006 16:51:33

you're starting to render frame before calling setWorldGeometry("...cfg") ?

CaseyB

22-02-2006 16:57:25

:lol: You are a genius! Thank you, it was another STUPID mistake! :oops: