[Help]My PLSM2 demo build is broken, why?[Solved]

manxnakur

04-12-2007 04:48:28

hi,

I've successfuly got the PLSM2 demo/sample working, which i got from here (the binary). I then got the source for PLSM2 from CVS and built it. The problem is that the one i built doesn't work properly. For example, the binary version, from Tuan's web site, unloads and loads the pages successfuly, i can see the debug information changing correctly on the debug overlay as well as see the terrain being loaded on screen; with the one i built i can see the terrain but it doesn't unload and load when the camera isn't focusing on parts of the terrain. Another odd thing is that the one i built shows that it can view a max of 763 renderables when there should only be 384.

NOTE: I'm using the latest version of paging scene manager from CVS and the latest Ogre SDK (1.4.5) from Ogre's web site. I couldn't get the demo to work with the CVS version of the SDK. Also, i had to add Plugin_OctreeSceneManager.lib in the linker library for the PLSM2 plugin that i built, and i had to add Plugin_OctreeSceneManager.dll to get the PLSM2 demo, that i built, to work.

Here are some screenshots:

My version (Look at the renderables section in the debug overlay):



Binary version from Tuan's web site (Look at the renderables section in the debug overlay):



Can anyone please help me with this problem?

Ankur

manxnakur

04-12-2007 22:05:31

Hi,

I'm getting very strange bool returns from setOption. This is probably stopping things from working. I'm calling:
mSceneMgr->setOption("setCullingMode", "CHC" );

the return value i get is false. Why is that?

Falagard

05-12-2007 13:21:44

Step into the code and find out :-) Debug.

manxnakur

05-12-2007 16:36:51

Hi Falagard,

thanks for the tip :P I went through the code and realised that i am using OgrePagingLandScapeSceneManager and not PagingLandScapeOctreeSceneManager. Am i right in thinking, that to make my program draw only the pages, of terrain, in front of the camera, i'll have to use PagingLandScapeOctreeSceneManager and not OgrePagingLandScapeSceneManager? Is there a way of culling with OgrePagingLandScapeSceneManager, this would be cool becasue then i could use the terrain paint and deform functions awell.


Thanks
Ankur

Falagard

05-12-2007 17:05:06

As far as I know, PagingLandScapeSceneManager inherits from PagingLandscapeOctreeSceneManager - so you get the benefits of both.

manxnakur

06-12-2007 03:28:24

Hi,

Stupid me, i forgot to define _PLSM_OCTREE. Now that i have done that, CHC works!

Ankur