loading a mesh...?

myxibrium

27-07-2008 05:51:15

Ok so I'm still on the beginner tutorials (in the wiki) and I haven't yet learned how to load "myownmesh.mesh". Can anyone point me to a simple tutorial or reference, or point out the key points of this article: http://wiki.python-ogre.org/index.php/A ... Tutorial_1

thanks

Zyzle

27-07-2008 16:15:05

Well for a start I wouldn't advise jumping straight into the Advanced tutorials. Particularly since it hasn't been converted from the C++ yet.

If all you want to do is load your own meshes in the basic tutorials then:

If you've done the basic tutorials (1 for example) and you want to load your own mesh instead of the robot one, simply drop the mesh file into $pythonOgre$/demos/media/models your textures into $pythonOgre$/demos/media/materials/textures/ and your materials file into $pythonOgre$/demos/media/materials/scripts/ . You may have to check these paths as I'm not sure they are the same on the 1.2rc

However if you want to know more about the process of resource loading in general then there is a few places I can point you to.

First is Basic Tutorial 6 and the sections titled, Resources and Initialising Resources.

Essentially all resource locations come from the resources.cfg file which is parsed using ogres ConfigFile class methods and these locations are in turn added by the ResourceGroupManager.

I have to say this is one thing that annoys me about the SampleFramework, I can see it is useful for creating small demos quickly, however in my opinion it hides too much from the user.

Hope this answers your question myxibrium.