kW X-port: new X file exporter for 3dsMax 8

Started by
16 comments, last by QuadMV 17 years, 8 months ago
The SDK exporter for X files out of 3dsMax version 8 has been busted for years now. The Panda exporter works pretty well for some things, but I ran into a few bugs with exporting skinned geometry using off-origin object offset, and it also doesn't support scales other than system units. Last, its management of settings wasn't what I needed -- I'd like settings for each file to be stored in that file, because I use many different kinds of settings for different files. Last time I tried fixing this, IGame (an API within 3dsMax) was too buggy to be used well. However, this time, version 2.0 of IGame is actually usable (if not bug free), so I spent a few vaccation days writing an exporter. Feel free to try it out and let me know how it works for you. Make sure you use the pre-requisites installer if you don't have the VS 2005 runtime libraries already installed. Screen shot:
enum Bool { True, False, FileNotFound };
Advertisement
Very cool :)

I'd try it out, but I don't have 3ds.
Sirob Yes.» - status: Work-O-Rama.
Yeah, this post is kind-of only interesting for the intersection of people who use 3dsmax, and those who use .X files...
enum Bool { True, False, FileNotFound };
Quote:Original post by hplus0603
Yeah, this post is kind-of only interesting for the intersection of people who use 3dsmax, and those who use .X files...
Admittedly I don't use 3dsmax myself (would have to sell my body for medical research to pay for a licence [lol]), but I see enough threads in this forum asking about it. Stickied for a bit so that it (hopefully) gets seen by those that keep asking about it [smile]

Cheers,
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

I'd actually prefer a little more third party testing before getting too much wide-spread usage, but thanks. I'll sticky a new thread once it's shored up a bit.
enum Bool { True, False, FileNotFound };
hehe, okay then - hopefully I'll spot it, but if you could keep me in the loop for any changes it'd be appreciated. I'm trying to put the finishing touches on the .X file part of the updated forum FAQ... I've got a few links to the different exporters/importers/tools, but adding another cant be a bad thing.

Cheers,
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Did you try exporting tangents and binromals and then loading the .x file? I cannot see how this would work given:

template DeclData
{
< BF22E553-292C-4781-9FEA-62BD554BDD93 >
DWORD nElements;
array VertexElement Elements[nElements];
DWORD nDWords;
array DWORD data[nDWords];
}


What would the DX functions do with DWORDs, being that they are really noramlized D3DXVECTOR3s (floats)? The actual values would be lost in the DWORD conversion.
--------------------------Most of what I know came from Frank D. Luna's DirectX books
Quote:Original post by DXnut
What would the DX functions do with DWORDs, being that they are really noramlized D3DXVECTOR3s (floats)? The actual values would be lost in the DWORD conversion.
It doesn't convert the floating point value to an integer equivalent and then store it. A DWORD is a 32bit quantity as is a float - so it'd just do a reinterpret_cast<DWORD*>(&fVariable) operation (the F2DW() macro does similar). If you were to load it without performing the opposite then you'd probably get a very large integer number [smile]

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

The numbers are stored in the .x file (that was saved with the TEXT option) without any decimal point. So, DX would have to know to not just use the normal text array to float conversion routine (like _tstof()). They would need to treat the numbers as having an implied decimal point.

And if it were saved in binary format, you would have an 8 byte binary number in the .x file. How would you convert it to a float and insert the decimal point where it belongs?

I just assumed, after I saved a mesh with tangents and binormals to a .x file and looked at it in WordPad, that the decldata would be useless and could never be read back in.
--------------------------Most of what I know came from Frank D. Luna's DirectX books
Looks pretty sweet to me - nice work. It's good to see that somebody is breathing life into X-file animation [smile]
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

This topic is closed to new replies.

Advertisement