TsmTerrain not visible

fooguru

19-09-2007 21:06:03

Hi
I’m trying to load the TsmTerrain map in PLSM2 but I can't get it to render. Not even the debug minimap in the top-left corner is visible. But the European_Alpes loads and renders fine. I have copied these from the binary demo (after mapsplitter) and they both run fine in the demo. I have added the code that creates the scene and TsmTerrain.cfg.

Create Scene code
m_pSceneMgr = m_pOgre->createSceneManager(Ogre::ST_EXTERIOR_REAL_FAR);

m_pCamera = m_pSceneMgr->createCamera("main");
m_pCamera->setNearClipDistance(5);

Ogre::Viewport* vp = m_pWindow->addViewport(m_pCamera);
vp->setBackgroundColour(Ogre::ColourValue(0.5f, 0.5f, 0.5f));

m_pCamera->setAspectRatio((Ogre::Real)1.333333);
m_pSceneMgr->setWorldGeometry("paginglandscape2.cfg");
Ogre::SceneNode* node = m_pSceneMgr->getRootSceneNode()->createChildSceneNode( "CamNode1", Ogre::Vector3( -400, 200, 400 ) );

node->yaw( Ogre::Degree(-45) );

node = node->createChildSceneNode( "PitchNode1" );
node->attachObject(m_pCamera);

m_pCamNode = m_pCamera->getParentSceneNode()->getParentSceneNode();


TsmTerrain.cfg
GroupName=PLSM2

Width=1
Height=1

Data2DFormat=HeightField
LandScapeFileName=terrain

FileSystem=TsmTerrain
TextureStretchFactor=1

NumTextureFormatSupported=9

TextureFormatSupported0=ImagePagingLight
TextureFormatSupported0=PLSplattingShaderLitDecompress
TextureFormatSupported1=Base
TextureFormatSupported2=InstantBase
TextureFormatSupported3=Splatting
TextureFormatSupported4=Splatting5
TextureFormatSupported5=Splatting2
TextureFormatSupported6=Splatting7
TextureFormatSupported7=SplattingShader
TextureFormatSupported8=ImagePaging

TextureFormat=ImagePagingLight
ImageFilename=terrain_texture

ScaleX=15000
ScaleY=1000
ScaleZ=15000

Deformable=yes
VertexCompression=no
VertexProgramMorph=no
VertexNormals=no

NumMatHeightSplat=4
Height1=15
Height2=50
SplatFilename0=splatting_sand.png
SplatFilename1=splatting_grass.png
SplatFilename2=splatting_rock.png
SplatFilename3=splatting_snow.png

# where to put camera on load.
BaseCameraViewpoint.x=935.0f
BaseCameraViewpoint.y=600.0f
BaseCameraViewpoint.z=-432.0f

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


Any help is greatly appreciated.
EDIT: I'm running Ogre 1.4.4