XNA Creators Club Online
Page 1 of 1 (7 items)
Sort Posts: Previous Next

Question about .X format and XNA

Last post 6/10/2008 4:29 PM by jwatte. 6 replies.
  • 6/5/2008 3:29 PM

    Question about .X format and XNA

    Hello, This is my first post here, I come here while looking for a solution for exporting .X files from a 3d package. Seems like only package with decent .X support is a Blender, which also has a decent sense for humor when it comes to being user friendly :-). We need to export (as everybody else) static meshes for levels and skinned meshes + animation for characters to be used with directx. We are trying to get legal pipeline, so our eyes turned to XSI Mod Tool. Now problem is that their .X file export is crap. It plain doesn't work. Since it comes with XNA add-on, I have looked at few files exported to xna format, and as far it look sto me like pretty much like regular .X files. Unfortunately, they seem not to use "standard" templates, but their own templates all prefixed with XSIsomething ... (which are of course hidden somewhere deep in runtime dll:s). Since I am not experienced with XNA, never done any XNA project, I have no idea what is possible or not within XNA runtime. My question is simply: is it possible to save a .X file from within an xna app if I load it into say a XNA "game" or app I make myself? Or is there some converter to convert those "xsi" files to standard .x format?
  • 6/5/2008 10:18 PM In reply to

    Re: Question about .X format and XNA

    The most robust pipeline with X and FX file format support I know if is 3ds Max, using kW X-port. Especially the 1.3.1 beta exporter has been feeling really solid. However, I am somewhat biased, as I wrote the kW X-port exporter :-)

    If you don't want to pay for 3ds Max, then there's not much I can help you with. You do, of course, have access to the geometry and the shader parameters inside the content pipeline, and on Windows you can use P/Invoke (or just plain file I/O) to take the data you get in a model content processor, and write out any file you want. Check out the ModelContent class in the XNA documentation for a place to start.


    Jon Watte, Direct3D MVP
    Tweets, occasionally
    kW X-port 3ds Max .X exporter
    kW Animation source code
  • 6/5/2008 11:39 PM In reply to

    Re: Question about .X format and XNA

    well :-) as a students we can't afford to pay for 3ds max, and then nobody of us ever used studio max .... but thnks for pointing me to a place in xna code to start with.

     edit: another question - can xsi mod tool export animations and skeletons to fbx? Since fbx is well documented I guess it should be possible to put together some converter.

  • 6/8/2008 8:00 AM In reply to

    Re: Question about .X format and XNA

    Did you ever consider making your Kw Xporter a stand-alone app?  You would be demi-god to many.

    Best,

    Byron

    ..shaders make you feel... powerful, or very very stupid.
    http://drjbn.spaces.live.com/
  • 6/9/2008 6:58 PM In reply to

    Re: Question about .X format and XNA

    Thanks for the suggestion. That sounds like it would be a lot of extra work, though.

    What would it convert from?


    Jon Watte, Direct3D MVP
    Tweets, occasionally
    kW X-port 3ds Max .X exporter
    kW Animation source code
  • 6/10/2008 12:02 AM In reply to

    Re: Question about .X format and XNA

    I'd be very happy with something that could take a 3ds and put out an X file.  That would make a lot of turbosquid more accessible.  I've got the standalone FBX converter, but it often doesn't seem to get it right and there is too much within the FBX files I don't understand when I go to look for things.    I take it that when writing a plugin you are not with a file format converter per se, but working with a raw form of the data after the parent app has read in and converted its own format?

    Best,

    Byron

    ..shaders make you feel... powerful, or very very stupid.
    http://drjbn.spaces.live.com/
  • 6/10/2008 4:29 PM In reply to

    Re: Question about .X format and XNA

    That's right; as a plug-in, you run as part of the 3ds Max application itself. The input is the scene graph within 3ds Max (which has its own problems, but those problems are at least already solved :-) Writing a converter would be a lot of additional work that would not solve any of the problems I myself are facing. In fact, it would probably be just as easy, if not easier, to write a .3ds importer component for the XNA content pipeline, than to bolt it onto the kW X-port exporter.

    You should know (if you don't already :-) that the .3ds format is very old, and is not at all the "preferred" format for 3ds Max files. There are many, many 3ds Max features that .3ds cannot represent well. I'm actually quite annoyed that people still seem to be exporting to .3ds when there are so many better formats around (like .X, or COLLADA).

    Anyway, if you want to convert .3ds files, I suggest looking at PolyTrans, which I think you can get a free evaluation trial of for 30 days. It does a reasonable job. Other tools that might be usable can probably be found in the OpenSceneGraph code distribution, because it has import and export modules for a number of file formats. Hope this helps!

     

    Jon Watte, Direct3D MVP
    Tweets, occasionally
    kW X-port 3ds Max .X exporter
    kW Animation source code
Page 1 of 1 (7 items) Previous Next