Problem with meshes not being found in Sub Folders [SOLVED]

Evak

04-08-2007 23:31:55

I started trying to use sub folders with the features built into ofusion. Were working on two seperate scenes now and wanted an easy way to handle the resources.

For some reason the meshes in my scene are not being found.

What I did was have name sub paths and checked the auto register checkbox. I also checked the copy textures box. (Copy shaders seems to be disabled at the moment).

I exported this scene to its own root folder named FPS. On export all the media/mesh files were exported correctly and offusion created the new sub folders.

I made sure that the root FPS folder was listed in my resource.cfg. Also tried without registering the root folder the OSM was in.

Either way it was not finding the meshes. here's what I get in the log.


15:22:19: ********************************
15:22:19: ** oScene Loader Lib **
15:22:19: ********************************
15:22:19: oSceneLoader: Loading 'D:\FlowED_SVN\media\TEST\fps.OSM' file
15:22:19: Added resource location './media/GUI/Meshes/' of type 'FileSystem' to resource group 'General'
15:22:19: Added resource location './media/GUI/Materials/' of type 'FileSystem' to resource group 'General'
15:22:19: Added resource location './media/GUI/Anims/' of type 'FileSystem' to resource group 'General'
15:22:19: Added resource location './media/GUI//' of type 'FileSystem' to resource group 'General'
15:22:19: oSceneLoader: Creating scene on 'Root' node
15:22:19: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for Shape11.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1366)
15:22:19: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for SpiralStair02.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1366)
15:22:19: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for StraightStair03.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1366)
15:22:19: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for StraightStair04.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1366)
15:22:19: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for Shape.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1366)
15:22:19: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for SpiralStair03.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1366)
15:22:19: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for Sphere06.mesh automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at ..\src\OgreResourceGroupManager.cpp (line 1366)


If I export without subdirs and auto resources it loads fine.

RedEyeCoder

05-08-2007 00:51:04

Are the resource locations being initialised before you try and use meshes from them?

Evak

05-08-2007 01:01:02

hey, thanks for making me look more closely, I somehow missed the path that was being registered.

You just made me realize something, for some reason its loading the OSM from media/TEST/ but registering a subfolder in the wrong GUI/Meshes directory instead of TEST/Meshes directory.

15:22:19: oSceneLoader: Loading 'D:\FlowED_SVN\media\TEST\fps.OSM' file
15:22:19: Added resource location './media/GUI/Meshes/' of type 'FileSystem' to resource group 'General'
15:22:19: Added resource location './media/GUI/Materials/' of type 'FileSystem' to resource group 'General'
15:22:19: Added resource location './media/GUI/Anims/' of type 'FileSystem' to resource group 'General'
15:22:19: Added resource location './media/GUI//' of type 'FileSystem' to resource group 'General'


Ofusion creates the sub folders in the correct TEST/ folder, wonder why its registering the wrong folders that don't even exist.

Evak

05-08-2007 01:10:22

Ok I found the problem, If I move the TEST folder to the top of my resource.cfg under general, then meshes load fine. (materials are still not found)

[Bootstrap]
Zip=./media/FlowEDcore.zip


[General]

FileSystem=./media/TEST
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/OSM
FileSystem=./media/textures
FileSystem=./media/material
FileSystem=./media/BLOCKS
FileSystem=./media/Mesh
FileSystem=./media

FileSystem=./media/particles
FileSystem=./media/Shaders


There seems to be a bug with assigning the resource sub folders, instead of assigning the resource subfolder to your selected root, the scene loader assigns the first general resource folder on the list in your CFG file.

NOTE: Another thing, the meshes load correctly after reorganizing the resource.cfg file but materials do not. The ofusion scene loader can't find the materials.

If I copy the .material ofusion creates TEST/Material to a folder in resource.cfg then the materials load correctly. I'm unsure what folder is autoregistered with the scene loader for materials and havent tried anims since we don't have any.

Evak

14-08-2007 19:58:16

Anyone else tested the sub folder functionality of the Scene loader?

Evak

28-10-2007 18:22:58

This works now, allthough only with one level of sub folder. I tried having a sub folder for each seperate locale with its own mesh etc subfolder and instead of FPS/meshes it created a FPS_meshes folder.

It's not a big deal, but would be handy to have the option.

Lioric

29-10-2007 15:21:41

Could you provide more details on this

When you specify subfolders for each resource type, they are created as you defined them

yourSceneRoot
yourSceneRoot\Materials
yourSceneRoot\Meshes
yourSceneRoot\Textures
yourSceneRoot\Shaders

Is this not working or do you need a different (sub)folder hierachy support?

Evak

29-10-2007 16:18:52

yeah, I was just surprised you didn't have a bit more flexibility with the paths. What I was trying to do was to have a mesh directory for each locale that was to be loaded into the editor.

Ogre creates a ton of mesh files so I thought I'd try and keep them seperate by using extra dirs making it easier to move around and update the locales seperately:

yourSceneRoot\Meshes\Desert
yourSceneRoot\meshes\Snow
yourSceneRoot\meshes\Mountain
yourSceneRoot\meshes\Cathedral

If I use the above paths, Ofusion creates

yourSceneRoot\Meshes_Desert
yourSceneRoot\meshes_Snow
yourSceneRoot\meshes_Mountain
yourSceneRoot\meshes_Cathedral


Just seemed the extra flexibility would be usefull, but otherwise submeshes work perfectly the way you specified in your post.