Ogre: meshes, materials, and scenes

Advanced game related topics
Lykaestria
User
User
Posts: 76
Joined: Wed Sep 17, 2008 3:10 am
Location: New Zealand

Ogre: meshes, materials, and scenes

Post 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:
Violet
Enthusiast
Enthusiast
Posts: 106
Joined: Sun Dec 23, 2007 6:30 pm

Post 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...
best regards,

Violet
Lykaestria
User
User
Posts: 76
Joined: Wed Sep 17, 2008 3:10 am
Location: New Zealand

Post 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? :?
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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.
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post 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 :)
Please correct my english
http://purebasic.developpez.com/
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post 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.
Please correct my english
http://purebasic.developpez.com/
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post 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 :)
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post 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!
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Lykaestria
User
User
Posts: 76
Joined: Wed Sep 17, 2008 3:10 am
Location: New Zealand

Post 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? :?
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

if you can get the entity name and attributes, you should be able to load them and position them, right ?
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post 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. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
Lykaestria
User
User
Posts: 76
Joined: Wed Sep 17, 2008 3:10 am
Location: New Zealand

Post 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.
User avatar
J@ckWhiteIII
Enthusiast
Enthusiast
Posts: 183
Joined: Fri May 25, 2012 7:39 pm

Re: Ogre: meshes, materials, and scenes

Post by J@ckWhiteIII »

I am VERY interested in that. I hope you'll post it here :)
Post Reply