The Unofficial SoftImage XSI->OGRE Exporter v2.1X10^-3

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

The Unofficial SoftImage XSI->OGRE Exporter v2.1X10^-3

Post by Bill » Sun Mar 13, 2005 4:45 am

Well I have only had partial sucess knocking out the memory leaks. The amount of memory it leaks is about 20% of what it use to. I think I got all the obvious stuff, but I'm scratching my head on the rest.

I also changed the code around so it's more C++ish. Still some work to do on this front too.

I didn't add any features. And I hope it still works. Tell me if it doesn't.

Anyway, here it is if you want it http://www.cast.uark.edu/~wgj/OGRE_XSI_Exporter/

All my instructions were in the messages that got erased. I was going to gather them together and make a readme, but I didn't get around to it.

Basically there is an addon that works with XSI 4.2. You can load the addon via File->Add-On->Install. Then to export something you node or branch select the object. Then use File->Export->OGRE Mesh Export. It only works with Polymeshes and 4 OpenGL RT shaders.
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Sun Mar 13, 2005 7:56 pm

I downloaded it but haven't test driven it yet. Unfortunately the prior discussion was lost.
0 x

Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill » Mon Mar 14, 2005 11:23 pm

I added a new feature for you Slicky. There is now a check box that will allow you to keep the global coordinates of an object. It turned out to be an easy 20 min modification.


[Edit] And I just realized there may be a problem with it in that I don't think I adjust the bone locations. [/Edit]
0 x

Yokom
Halfling
Posts: 88
Joined: Tue Nov 30, 2004 2:34 am

Post by Yokom » Tue Mar 15, 2005 5:30 am

im missing two files to compile the exporter do i need to get them from the xsi install, if so i dont have them and my artits that has xsi doesnt think they are in his xsi install.

xsi_3dobject.h
xsi_value.h

where do we get these files
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Tue Mar 15, 2005 6:21 am

Thanks for the feature I'll have to check it out. I don't use bones so it may work for me as is.

I wonder how hard it would be to do a renderer for OGRE within xsi.
0 x

Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill » Tue Mar 15, 2005 4:55 pm

Yokom wrote:im missing two files to compile the exporter do i need to get them from the xsi install, if so i dont have them and my artits that has xsi doesnt think they are in his xsi install.

xsi_3dobject.h
xsi_value.h

where do we get these files

All the xsi_whatever.h files are in the XSI SDK. To install the SDK from the install disks you have to select custom install and choose the SDK as it doesn't install by default. btw I use 4.2.
0 x

Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill » Tue Mar 15, 2005 5:38 pm

Slicky wrote:Thanks for the feature I'll have to check it out. I don't use bones so it may work for me as is..
I looked into the issue with the bones a bit. There is some wierdness there. The main problem is if you create and object, then attach a bone, and then move the object and not the bone. It won't move in XSI because the bone controls the location of the object once it's attached and key framed. However, when I export using global coordinates the animation will be messed up. It seems the object is drawn at it's location that you see it in XSI, but then the rotations are done as if the object was in location that you set the objects location to. It's going to take some real thinking to get that one figured out. .... actually I just had an idea... I'll get back to you.
Slicky wrote: I wonder how hard it would be to do a renderer for OGRE within xsi.
I think it would be possible to have a button in XSI that would popup an OGRE window with the objects rendered in it. I still don't know anything about OGRE. Maybe that would be a good project to learn OGRE.

The other thing I think that would be worth doing is to create OGRE shaders. That would eliminate the guess work in trying to figure out how things should be mapped from XSI's OpenGL shaders to OGRE materials.
0 x

Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill » Wed Mar 16, 2005 1:35 am

Huzza!! I fixed the global coord bone problem. It was one of those things where you think about it for a long time and then type one line of code and it works. What a rush.

Anyway, the fix is posted.
0 x

Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill » Sun Mar 20, 2005 10:57 pm

The last bit I posted had some debug print lines. They have been removed.
0 x

Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill » Sun Mar 20, 2005 11:47 pm

Thanks to some advice by Sinbad I can now pronounce this latest version memory leak free. So now I can start looking at adding new features.
0 x

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

Post by sinbad » Sun Mar 20, 2005 11:49 pm

Thanks for keeping this up Bill - even though I'm now (finally!) continuing with my own direct-to-binary-mesh exporter, having code like yours around to compare against is very handy when navigating the twists that are the XSI SDK.

I just decided to refactor a bunch of my code because I want to give people the option of having the exporter combine the contents of separate PolygonMesh and PolygonCluster objects which have the same material, since I've observed that many people keep lots of separate PolygonMesh objects around for modelling convenience that would be better combined for runtime use. Mine still isn't as complete as yours (and I may like to adapt your material code once I'm done with meshes and skeletons since there won't be much difference there I suspect) but it's getting there.
0 x

Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill » Mon Mar 21, 2005 3:50 am

I'm glad to help out.

I just added support for the OGL13CubicTexture shader. It seems to work more or less. Can't exactly duplicate what I see in SoftImage to OGRE, but sometimes it gets close. :-)
0 x

Bill
Gremlin
Posts: 167
Joined: Sun Sep 26, 2004 11:50 pm
Location: Arkansas

Post by Bill » Fri Mar 25, 2005 5:51 am

bump. You know the only reason I work on this is to push my thread to the top of the stack. :-)


Seriously, I added support for the OGLTCTrans shader. This shader gives you access to the following texture parameters:

scroll
scroll_anim
rotate
rotate_anim
scale
wave_xform

No serioulsy, I only do this stuff so that I can bump my thread.

*BUMP*
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

Post by Slicky » Fri Mar 25, 2005 6:06 am

Thanks bud - keep bumping.

I haven't played with that shader but now I'm tempted to. :D
0 x

RoundSparrow
Greenskin
Posts: 145
Joined: Wed Jan 19, 2005 4:36 am
Location: Arica, Chile
Contact:

Post by RoundSparrow » Sat Mar 26, 2005 2:08 pm

One of you working on a mesh importer like Monster did for AC3D ? :)
0 x

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

Post by sinbad » Sat Mar 26, 2005 5:43 pm

I'm not - seems to me that you're better to exchange the models in their original format rather than Ogre's .mesh format. My XSI-to-mesh exporter reorganises the .mesh for runtime efficiency too so converting back from .mesh wouldn't give you the original anyway.
0 x

User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia
Contact:

Post by monster » Sat Mar 26, 2005 5:49 pm

sinbad wrote:...seems to me that you're better to exchange the models in their original format rather than Ogre's .mesh format.
'tis true. The importer's only there for "experimental" purposes. It's not current in the latest version, and I may well not put it back in.
My XSI-to-mesh exporter reorganises the .mesh for runtime efficiency too so converting back from .mesh wouldn't give you the original anyway.
Mine does the same. If you import (say) a 3ds, export it to mesh and then import that mesh, you won't get the exact 3ds back, just a "representation" of it. I think the readme makes that clear, doesn't it?
0 x

Post Reply