PLSM cant see terrain, camera at -4.43578e+008 distance

Namnharef

01-09-2007 22:05:01

Hi all, Im quite a newbie about Ogre and PLSM.

I installed binary & source of Ogre 1.4.4 SDK, I downloaded binary and source from CVS of PLSM2. Im using winXP & VC8 sp 1.

Either with the original Ogre_d.dll and the newly compiled one I cant see the terrain in the screen, only the debug transparent windows. Im running in debug mode (*_d.dll) and actually I dont know how to change to release.

I followed the wiki steps to make it start, change the 3 cfgs & mapsplitter.
If I use the original dlls and exe all works fine, instead.



Others ogre projects works fine, like the tutorials and the examples.

Please help.

Thanks
Nam

Cutter

02-09-2007 19:15:11

That position is obviously invalid, try to set a new start position via a config file (I think there was a StartPos value somewhere in the terrain .cfg files) or via code (just set it on frameStarted as a quick test).

One valid Position should be (0,1000,0);

Namnharef

03-09-2007 18:04:17

Thanks for the fast answer Im trying to apply it... I forgot to say that I was trying to execute the Demo application as it comes with the source package...

edit:
When I add
mCurrentCamera->setPosition (0,1000,0);
at framestarted of framelistener class it shows the correct playercam position(0,1000,0) and draws some strange green grid at top right of the screen.

Cutter

05-09-2007 23:27:21

I have not tested (0,1000,0) with the demo, it may be too high for the demo terrain. Can you post a screenshot of that green grid?

If you move the "mCurrentCamera->setPosition (0,1000,0); " into the scene setup (before the rendering starts), you should be able to fly around and test things a little better.

Namnharef

07-09-2007 13:04:47

Here is the grid:


Ive put the camera position at:

// Override frameStarted event to process that (don't care about frameEnded)
bool frameStarted(const FrameEvent& evt)
{
bool returnValue = PagingLandScapeFrameListener::frameStarted(evt);

*** mCurrentCamera->setPosition (0,100,0); ***

const Real t = evt.timeSinceLastFrame;


Ive tried with 100 instead of 1000 and nothing changes.

Ive tried also to set it at the bottom of createscene of application
BillboardSet* LightSet = mSceneMgr->createBillboardSet("RedYellowLights");
LightSet->setMaterialName("Examples/Flare");
mLightNode->attachObject(LightSet);

Billboard* LightBoard = LightSet->createBillboard(LightPos);
//LightBoard->setDimensions(10.0f, 10.0f);
LightBoard->setColour(ColourValue(1.0f, 1.0f, 0.2f, 1.0f));

*** mCamera->setPosition (0,100,0); ***
}

protected:
Light* mLight;
SceneNod

but with this last test the camera will stay at -4e+008

Cutter

09-09-2007 14:48:53

That's strange... are there errors in the logfile?

Namnharef

10-09-2007 13:50:19

There is only a warning:
14:02:06: Texture: flare.png: Loading 1 faces(PF_R8G8B8,256x256x1) with 8 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
14:02:07: Texture: cursor.png: Loading 1 faces(PF_R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,32x32x1.
14:02:28: Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with 7 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
14:02:29: Texture: alpes.Base.2.0.png: Loading 1 faces(PF_R8G8B8,1024x1024x1) with 10 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
14:02:29: Texture: Detail3.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
14:02:30: Win32PBuffer::Creating PBuffer of format bits=8 float=false
14:02:30: Win32PBuffer::PBuffer -- Chosen pixel format rgba=8,8,8,8 depth=24 stencil=8
14:02:30: Win32RenderTexture::PBuffer created -- Real dimensions 512x512
14:02:30: WARNING: Texture instance 'Ogre/ShadowTexture0' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
14:02:30: Creating viewport on target 'Ogre/ShadowTexture0/0/0/0', rendering from camera 'Ogre/ShadowTexture0Cam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
14:02:37: Texture: alpes.Base.1.0.png: Loading 1 faces(PF_R8G8B8,1024x1024x1) with 10 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.

Cutter

10-09-2007 22:19:53

Sorry, I have no idea why your terrain isn`t shown.

You said that everything works if you switch the dlls and exe... what happens if you use your dlls and the original exe? If the error persists, there has to be something wrong with the source code of the downloaded demo.

Unfortunately I do not have the time to download and test the current cvs & Ogre SDK myself and a lot of time has gone since I played with the plsm2 demo so I am not the perfect person to help here.

Namnharef

11-09-2007 19:26:48

Dont worry, thanks for the try, I hope someone could help me to make the standard demo to work, otherwise Im not sure if I can jump inside the learning of all these sdks.

Jon

11-09-2007 23:52:50

Off the top of my head this sounds like a bad runtime configuration file. My copy of alpes.cfg has the following:


# where to put camera on load.
BaseCameraViewpoint.x=-396.0f
BaseCameraViewpoint.y=2000.0f
BaseCameraViewpoint.z=2640.0f

Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f


I don't recall the warning being anything serious. And the grid is a debug overlay, although I can't say more there. I don't recall seeing any explanation of it, and I don't have enough beer on hand to figure it out on my own right now.

Anyhow if the camera position is way off, it suggests to me that the camera position was never initialized. You should also verify that the cfg file you think you are loading is the one being used. An easy way is to change the default "TextureFormat" and confirm that the change is made when the demo is ran.

shenfy

26-10-2007 18:30:15

Hi, all. I'm having the same problem with PLSM2 CVS Head and Ogre 1.4.4.
i've done everything the wiki says, and DEMO_Paginglandscape will run, but only to give a light blue screen with the camera being at an invalid position.
I've tried to set the camera at a different position, which didn't work.

Is it me or is there something wrong with the PLSM2 CVS Head version?

bibiteinfo

26-10-2007 22:08:00

shenfy, everything is working with GOOF, and it's using the latest PLSM2 with Ogre V1.4.5

shenfy

26-10-2007 23:11:32

shenfy, everything is working with GOOF, and it's using the latest PLSM2 with Ogre V1.4.5

thanks!!! guess i've been out of the loop for a while. :oops:
downloading 1.4.5 right now. sorry 4 bothering.

shenfy

27-10-2007 01:40:52

shenfy, everything is working with GOOF, and it's using the latest PLSM2 with Ogre V1.4.5

Compiled PLSM2 demo application with Ogre V1.4.5, problem still exists. :shock:
dunno how u got GOOF to work. could u give me some suggestions?

bibiteinfo

27-10-2007 04:49:41

Check GOOF code, module PLSM2 ... I don't really know what's up with that part of the code. Might give you hint.

Falagard

27-10-2007 05:16:37

Try moving the camera a little? GOOF starts with the camera below the terrain.

bibiteinfo

27-10-2007 05:34:07

Try moving the camera a little? GOOF starts with the camera below the terrain.

He's not using GOOF, he's using PLSM2 demo. But might be that problem in PLSM2 demo.