osm file not loading + preventing the rest from loading

sjaakiejj

19-11-2008 13:15:30

hey,

I've recently downloaded Ofusion, and stumbled across a problem. I'm trying to import a scene into my program, but when I load the OSM file the screen goes black, only displaying the gui..

here's what I use for importing:

OSMScene oScene;
oSceneCallback oe_Callback;
oScene.initialise( "Tombe/GothicBuilding.osm", &oe_Callback );
oScene.createScene();
mSceneMgr = oScene.getSceneManager();

sjaakiejj

21-11-2008 10:18:19

11:02:33: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for Plane01.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1368)
11:02:33: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for Box01.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1368)
11:02:33: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for Box03.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1368)

This is the error causing my problems. Found it in the log.

Evak

21-11-2008 18:28:38

It sounds like its trying to tell you it can't find the media it's looking for in the directory paths that it has been asigned to search in.

Usualy most Ogre apps have a resources.cfg file that lists all the media dirs and zip files used that contain resources.

If the path to your models is missing then ogre won't find them. Here's what the info in the resource.cfg for our level editor looks like.



[code][Bootstrap]
Zip=./media/Core.zip

[General]
FileSystem=./media/OSM
FileSystem=./media/GUI
FileSystem=./media/GUI/fonts
FileSystem=./media/GUI/imagesets
FileSystem=./media/GUI/layouts
FileSystem=./media/GUI/looknfeel
FileSystem=./media/GUI/lua_scripts
FileSystem=./media/GUI/configs
FileSystem=./media/GUI/schemes
FileSystem=./media
FileSystem=./media/Particles
FileSystem=./media/OSM/Shaders
FileSystem=./media/OSM/meshes/Collision
FileSystem=./media/OSM/meshes
FileSystem=./media/OSM/materials
FileSystem=./media/OSM/textures
FileSystem=./media/Overlays
FileSystem=./media/Compositors
FileSystem=./media/Compositors/programs
FileSystem=./media/Compositors/scripts
FileSystem=./media/Compositors/textures[/code]

sjaakiejj

21-11-2008 22:13:47

It sounds like its trying to tell you it can't find the media it's looking for in the directory paths that it has been asigned to search in.

Usualy most Ogre apps have a resources.cfg file that lists all the media dirs and zip files used that contain resources.

If the path to your models is missing then ogre won't find them. Here's what the info in the resource.cfg for our level editor looks like.



[code][Bootstrap]
Zip=./media/Core.zip

[General]
FileSystem=./media/OSM
FileSystem=./media/GUI
FileSystem=./media/GUI/fonts
FileSystem=./media/GUI/imagesets
FileSystem=./media/GUI/layouts
FileSystem=./media/GUI/looknfeel
FileSystem=./media/GUI/lua_scripts
FileSystem=./media/GUI/configs
FileSystem=./media/GUI/schemes
FileSystem=./media
FileSystem=./media/Particles
FileSystem=./media/OSM/Shaders
FileSystem=./media/OSM/meshes/Collision
FileSystem=./media/OSM/meshes
FileSystem=./media/OSM/materials
FileSystem=./media/OSM/textures
FileSystem=./media/Overlays
FileSystem=./media/Compositors
FileSystem=./media/Compositors/programs
FileSystem=./media/Compositors/scripts
FileSystem=./media/Compositors/textures[/code]


I currently have the resource file configured like this:

FileSystem=Media
FileSystem=Media/Textures

for the OSM files, meshes are located in the same folder. It does seem to detect the .material file, since when I put a duplicate with a different name in the same map, I get an error telling me that "24 - default" already is included in the program..

Evak

22-11-2008 00:23:58

with the materials you can't have duplicates in your resource dirs. Ogre loads all the materials it finds before your app starts. So if something is in more than one place it will usually spit out an error and crash your program.

if your OSM, mesh material and textures are all in the same registered folder it should just work. Unless ogre itself hasn't compiled correctly?

If it is a programming problem, perhaps someone like lioric can help.

sjaakiejj

22-11-2008 10:07:40

Ogre itself hasn't given any error messages, it just keeps on giving me the same errors in the log file "could not be found"

syedhs

22-11-2008 15:01:47

Ogre doesn't give error message is most probably due to LogManager being disabled (you can spot these two lines: ENABLE_LOGMANAGER & DISABLE_LOGMANAGER in many places).

The mesh was not found because it cannot be found on the directories listed in your resource list.

sjaakiejj

01-12-2008 13:23:31

I noticed that there are two files for the oFusion importer, one of which is a CPP file and another which is a H file, I used the H file up till now but reading the documentation it stated the CPP file has to be used. Problem however is that when I include it, I get a large number of linker errors "Is already defined"

Lioric

05-12-2008 03:12:33

Where do you include it? you must include these files in your solution

See the oSceneLoader demo application for more details on using it

sjaakiejj

05-12-2008 09:56:08

Where do you include it? you must include these files in your solution

See the oSceneLoader demo application for more details on using it


I've included them in the solution.