Loading error

osknoes

01-02-2009 04:29:44

Hi guys!

I'm new using oFusion and Ogre3D.

I've spent some time looking how oFusion works, following the video tutorials and so on.
Now, it's time to start coding. I've tried to load a basic scene, but I don't get it.

What I have :

A real little project compiling and working using the code for loading scenes.
My exported objects copied to the root of the ogre/media. That is the root in the resources.cfg of ogre.

What's the problem:
In OgreOSMScene.cpp when the code execute this :

DataStreamPtr pStream = ResourceGroupManager::getSingleton().openResource(pszXMLFile);

Seems like he can't load the scene, or he can't find it. I looked at the ogre.log, but there's no data about my scene.osm. Not either with my sphere.mesh.
But, i see he try to load my test.material (that's all I have, a scene with a sphere with a simple material)

So, any advice will be really aprecaited. Thanks so much.

Evak

01-02-2009 07:52:49

It sounds to me like the loader is not working properly. I am not too familiar with that part because I have programmers that handle the OSM loading. I can tell you why the material loaded though. The material is loaded automatically by ogre itself independent of the OSM sceneloader. Ogre's default behavior is to read ALL script resources like materials, particles etc. that it finds in registered folders at runtime. So all these scripts even if they are not being used will be loaded so long as they are in registered folders.

Hopefully someone else will be able to explain what the actual error message means :)

Lioric

01-02-2009 23:48:16

Is the osm scene in any of your resource locations registered with the Ogre resource system?

You can step debug that method call to define why the file is not loaded, but most probably is because it is not within any of your application resource locations

osknoes

01-02-2009 23:55:43

Yes, the files are in the correct folder, I guess :$. Just somewhere in the folder from /media...
I copied in more than once folder, just to be sure.

Btw, I've the prebuild version of ogre, so I can't step into the function call. I tried other exporters and doing quite the same it worked, so I don't really know.

Any other advice, about including some plugin, or adding some line in the resources.cfg? Whatever...

Lioric

03-02-2009 15:34:55

Post your ogre.log file (from your application)
Post how are you loading the scene

Why do you consider that line is the issue?

You can trace your application, what is the value of "pStream->pRep" after that line is executed

Note: You can debug Ogre when you use the precompiled package, just download the symbols package and add the correct debug symbol paths to your solution

Evak

03-02-2009 19:48:43

Ogre has to have exact paths to all media registered or it won't find it. It doesn't include sub directories or anything. I included a snippet from our flow3d wiki below.

Resource.cfg

This file registers paths to your media files. All dir paths to media of any kind has to be listed in resource.cfg.


[Bootstrap]
Zip=./media/Core.zip
[General]
FileSystem=./media/OSM
FileSystem=./media/GUI

Ogre also allows you to store media in zip files, each of these zip files have to be registered individualy, you can see the example under the [Bootstrap] section above.

Your regular media paths are listed under [General] and must include all paths whether its Meshes, textures, materials, GUI, particles, sounds. Ogre will not find them if they are not registered here.

osknoes

07-02-2009 21:32:25

Hey guys!

I've been working with others contents creators, and I succeed, so, I'm not gonna change right now.
Btw, your help was really appreciated. I will take this in count!