Hosting by Solid Eight Studios,PhotoTangler Collage Maker

This section of the archives stores flipcode's complete Developer Toolbox collection, featuring a variety of mini-articles and source code contributions from our readers.


  Using the X File Exporter (DX8 SDK) with 3DSMax 4.2
  Submitted by

The "X file exporter plugin for 3DS Max" in the DirectX 8.0 SDK doesn't work in 3DS Max 4.x. It only works in version 3.x. To fix it, it must be re-compiled with the 3DS Max 4.x SDK Library.

Before compiling, we need these :

1. X file exporter source file
- included in DirectX 8.0 SDK(see extras\direct3d\tools\3dsmax3).

2. 3DS Max 4.x SDK + Character Studio 3.x SDK
- installed when you installed 3DS Max 4.x (located in (3dsmax folder)\maxsdk and (3dsmax folder)\Cstudio\sdk)

The procedure is :

1. copy "(DirectX 8.0 SDK folder)\extras\direct3d\tools\3dsmax3\*.*" into "(3dsmax folder)\maxsdk\include"
- you don't need to copy the files in sub-directory.

2. copy "(DirectX 8.0 SDK folder)\extras\direct3d\tools\xskinexptemplates.h" into "(3dsmax folder)\maxsdk\include"

3. open "(3dsmax folder)\maxsdk\include\xkinexp.dsp" in Visual Studio.

4. Fix the line 994 of "ExportXFile.cpp" like :
before : WRITE_FLOAT(pbCur, pPatchMesh->tVerts[1][iTextureIndex].x); //u
after : WRITE_FLOAT(pbCur, pPatchMesh->tVerts[1][iTextureIndex].p.x); //u

5. Fix the line 994 of "ExportXFile.cpp" like :
before : WRITE_FLOAT(pbCur, pPatchMesh->tVerts[1][iTextureIndex].y * -1); //v
after : WRITE_FLOAT(pbCur, pPatchMesh->tVerts[1][iTextureIndex].p.y * -1); //v

6. Fix the line 1322 of "ExportXFile.cpp" like :
before : pTexMap = pMtl->GetActiveTexmap();
after : pTexMap = (Texmap*) pTexMap = pMtl->GetActiveTexmap();

7. Add "(3dsmax folder)\maxsdk\include" and "(3dsmax folder)\cstudio\sdk" to visual studio include directories(if you're using visual studio 6, you can do this in Tools Menu->Option->Directories Tab)

8. Add ("3dsmax folder)\maxsdk\lib" to visual studio library directories.

9. Default Output File Path is "c:\3dsmax3\plugins\xskinexp.dle". So, change the output file path to what you want(if you're using visual studio 6, you can do this in Project Menu->Settings->Link Tab). But the extension of the output file shoule be "dle".

10. Build

11. Copy the output file into "(3dsmax folder)\plugins"

Then, run the 3dsmax 4.x. You will notice that "X file" is registered in file types of the Export Dialog.

The zip file viewer built into the Developer Toolbox made use of the zlib library, as well as the zlibdll source additions.


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.