Textures are not working on the Terrain

hoffhoff

10-10-2006 02:37:24

Hello,
I have exported a scene of an island on Max with oFusion. Then I copied the generated files to the data folder of ogre and I´m trying to load it like:



void CApplication::chooseSceneManager()
{
oScene = new OSMScene;
oScene->initialise("island.osm", NULL);
oScene->createScene();
mSceneMgr = oScene->getSceneManager();
}

void CApplication::createScene()
{
mSceneMgr->setAmbientLight(Ogre::ColourValue(0.5,0.5,0.5));
mSceneMgr->setShadowTechnique(Ogre:: SHADOWTYPE_TEXTURE_MODULATIVE );

}


Well, it is working, but the textures are not loaded in the scene.

I'm also loading a simple mesh (wich I created with ofusion) and in it the textures are working fine.

Is there something else I have to do for loading the terrain?

Thanks!

Lioric

10-10-2006 15:54:29

Are the textures in the same folder? or if in different folder, is this added to your resource locations file?

Is there any hint in your ogre.log file about the texture loading?

Is the terrain a World Geometry for the Terrain Scene Manager or is it a mesh object?

hoffhoff

10-10-2006 16:18:00

Hey,
Thanks for replying. The textures and the .material are all in the same folder.
I didnt use anything like "setworldgeometry"
My scene on Max is an island with 3 trees. It generated a .mesh for each 3 and another one for the terrain. The trees and the terrain are with no texture.

But if I load a tree.mesh as a separated file, the textures will work on it.

I dont know if I have to set something on SceneMgr or what =\

hoffhoff

12-10-2006 01:31:35

Nevermind, I fixed it.
Thanks