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 »

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.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

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...
klepto
Gnoblar
Posts: 6
Joined: Mon Jan 03, 2005 1:19 am

Post by klepto »

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. ?
User avatar
cTh
Halfling
Posts: 81
Joined: Wed Dec 11, 2002 10:47 am
Location: Moscow/Russia

Post by cTh »

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 ;)
HtH, cTh
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

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.
klepto
Gnoblar
Posts: 6
Joined: Mon Jan 03, 2005 1:19 am

Post by klepto »

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