Using the XSI Exporter with CVS HEAD

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
klepto
Gnoblar
Posts: 6
Joined: Mon Jan 03, 2005 1:19 am

Using the XSI Exporter with CVS HEAD

Post by klepto » Fri Jan 07, 2005 1:14 am

Mainly to get up to speed with Ogre I made a couple of changes to the XSI exporter to get it to work with CVS HEAD as at 7 Jan 2005. I've noted them here just in case anyone wants to try it:

(1) In OgreXSIMeshExporter.cpp replace the lines in exportMesh() up to

DefaultHardwareBufferManager *hardwareBufMgr = new DefaultHardwareBufferManager();

with this:

Ogre::Root* root = new Ogre::Root();
root->showConfigDialog();
root->saveConfig();
root->initialise( false, "whatever" );

LogManager logMgr;
MeshManager& meshMgr = Ogre::MeshManager::getSingleton();

It seemed to me necessary to create the Root object so that the necessary singletons are created - could be wrong here.

Then change:

Mesh* pMesh = MeshManager::getSingleton().createManual("XSIExport");

to this, adding a dummy 2nd parameter

MeshPtr pMesh = MeshManager::getSingleton().createManual("XSIExport", "GroupName" );

(2) In OgreXSIHelper.h there seems to be a bug converting the XSI file name to an Ogre string. At line 51 add this:

tmp[c] = 0;

after the call to wcstombs()


(3) I also had to copy zlib1.dll to my C:\Softimage\XSI_4.0_Foundation\Application\bin directory.

(4) I could not see how to initialise the Ore::Root without a renderer, so in the C:\Softimage\XSI_4.0_Foundation\Application\bin bin directory I put a plugins.cfg file in which the only plugin is RenderSystem_GL. No other plugins are required. You also need to copy OgrePlatform.dll to the C:\Softimage\XSI_4.0_Foundation\Application\bin directory.




---
Last edited by klepto on Fri Jan 07, 2005 3:23 am, edited 1 time in total.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19263
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Fri Jan 07, 2005 1:19 am

Thanks - I hadn't got around to this yet, and developed the initial XSI exporter in Hastur just so that I could avoid the complications of Azathoth's instability (at that time).

Does it work then? I haven't had time to get back to it yet...
0 x

klepto
Gnoblar
Posts: 6
Joined: Mon Jan 03, 2005 1:19 am

Post by klepto » Fri Jan 07, 2005 1:34 am

It does export a mesh, which can be be displayed in Ogre 0.15.1, although some of the vertices seem to be drawn in the wrong order, or maybe some tris are created from the wrong vertexes.

I'm just trying to build the MeshViewer added in HEAD at the moment.

Is the mesh format the same in HEAD and 0.15.1. ?
0 x

User avatar
cTh
Halfling
Posts: 81
Joined: Wed Dec 11, 2002 10:47 am
Location: Moscow/Russia

Post by cTh » Fri Jan 07, 2005 2:16 pm

I'll update the MeshViewer CVS with a version that works with Ogre HEAD CVS branch these days, you can wait if u're not in a hurryy ;)
0 x
HtH, cTh

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19263
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Fri Jan 07, 2005 2:43 pm

Yes, the 0.15.1 mesh format is the same in HEAD.

My TODO list is always bursting, but spending more time on XSI is definitely there. Because it's separate from the rest of 1.0.0 (and can be back-ported to 0.15.x) I'm currently leaving it till later in the list, since it not being finished won't stop 1.0.0 being released; it can be refined as we go on.
0 x

klepto
Gnoblar
Posts: 6
Joined: Mon Jan 03, 2005 1:19 am

Post by klepto » Fri Jan 07, 2005 9:03 pm

Thanks for the info guys. I'll keep going using the 0.15 mesh viewer then.
0 x

Post Reply