Page 1 of 1

Ogre: meshes, materials, and scenes

Posted: Mon Oct 06, 2008 12:57 pm
by Lykaestria
Okay, I understand how to load a mesh easily enough, and how to texture it with a single material... but how on earth do I load scene files and use the associated material file with it? :?

It would be an absolute nightmare to manually load all 390 resulting mesh files of my ogre-converted house model and set individual texture and collision attributes to all of them, plus put them all back in the right place :shock:

Posted: Mon Oct 06, 2008 2:57 pm
by Violet
Once upon a time...

...there was the command LoadWorld(), which is still listed in Auto-complete, I think, but which doesn't exist no more. And it also just loaded Quake 3 like *.bsp Maps... and I know nothing about a Ogre Scene File Support in the newer PureBasic OGRE Version. If that really isn't the case, you should invent your own Scene Format...

Posted: Mon Oct 06, 2008 3:14 pm
by Lykaestria
like setting all 390 pivots to world coordinate 0,0,0 before I export to ogre and hope PB is nice enough to line up all 390 meshes in the correct places when I load them in? :?

Posted: Mon Oct 06, 2008 4:00 pm
by Fred
Unfortunately, there is no official 'scene' format for OGRE, so we don't have added support for such. The best for you house would be to export in a a single mesh (if possible) or export the scene into an XML form and load it from PureBasic using the XML library.

Posted: Mon Oct 06, 2008 4:15 pm
by Comtois
Violet wrote:Once upon a time...

...there was the command LoadWorld(), which is still listed in Auto-complete, I think, but which doesn't exist no more. And it also just loaded Quake 3 like *.bsp Maps...
See World.pb example. Yes LoadWorld come back :)

Posted: Mon Oct 06, 2008 4:23 pm
by Comtois
Lykaestria wrote:like setting all 390 pivots to world coordinate 0,0,0 before I export to ogre and hope PB is nice enough to line up all 390 meshes in the correct places when I load them in? :?
Which tool do you use to create your mesh ?
may be you can load your mesh in deled, and use the OgreExporter ?
it work fine.

Posted: Mon Oct 06, 2008 5:57 pm
by djes
As I'm using lightwave and a plugin called lw2ogre, I can't help you. With it, I'm able to export objects and scenes, and do batch processing, but it almost always need little tweaks.
Badly, this plugin is no more supported. However I have the source code :)

Posted: Mon Oct 06, 2008 8:57 pm
by Rook Zimbabwe
I usee RHINO3D and use a program called 3Ds2MESH to convert to Ogre...

I truly wished OGRE would support more mesh types!

Posted: Tue Oct 07, 2008 2:16 pm
by Lykaestria
Fred wrote:Unfortunately, there is no official 'scene' format for OGRE, so we don't have added support for such. The best for you house would be to export in a a single mesh (if possible) or export the scene into an XML form and load it from PureBasic using the XML library.
Indeed, the .scene file is based on XML and will successfully load and display in the XML.pb example. It contains nodes with detailed information regarding scale, position, rotation, entity name, and whether or not the meshes cast or receive shadows. But how to integrate that into PB? :?

Posted: Tue Oct 07, 2008 2:32 pm
by Fred
if you can get the entity name and attributes, you should be able to load them and position them, right ?

Posted: Sun Oct 12, 2008 9:28 pm
by J. Baker
Fred wrote:Unfortunately, there is no official 'scene' format for OGRE, so we don't have added support for such. The best for you house would be to export in a a single mesh (if possible) or export the scene into an XML form and load it from PureBasic using the XML library.
I've been waiting for a "scene" import myself, for some time now. http://www.freeworld3d.org does export to a scene. This app is great for OGRE projects. ;)

Posted: Thu Oct 16, 2008 12:16 pm
by Lykaestria
J. Baker wrote:I've been waiting for a "scene" import myself, for some time now. http://www.freeworld3d.org does export to a scene. This app is great for OGRE projects. ;)
I'm in the process of creating my own 3D file type. It should be finished in a few days. Basically I'm creating a little program to convert Renderware scripts (.rwx) into a data file that can be read by a procedure and manually create complex meshes using SetMeshData(). The advantage of this is having a single 3D file instead of having hundreds in order to load a very complex model such as a fully furnished house or an entire world. If I'm clever enough I hope to extend the process and create models with rotating joints that are animated by another data file. I could post the code in here when it's finished if anyone is interested.

Re: Ogre: meshes, materials, and scenes

Posted: Tue May 29, 2012 4:29 pm
by J@ckWhiteIII
I am VERY interested in that. I hope you'll post it here :)