View Single Post
Old 25th August 2008, 07:59 AM   #6
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: FSX export plugin

I don't think you need a script at all... ? .x is a text-based format. You can edit it in notepad or another text editor.

My understanding from the tutorial--again, I haven't done this myself--is:

- Make sure your texture maps are .dds format.
- In AC3D, click File > Export > DirectX
- Open the .x file generated in a text editor such as notepad.
- Paste the code below into your .x file (edit model names and guids as appropriate)
- From the SDK included on the FSX deluxe disk, run XtoMDL on the .x file to convert it.

For the "guids" you'll need to make a unique ID number for your model. You can download a program called guidgen.exe from Microsoft to do this; there are also websites that make random id's if you don't want to download anything: http://createguid.com/

Code:
//... Add new template info...
          template Header {
           <3D82AB43-62DA-11cf-AB39-0020AF71E433>
           WORD major;
           WORD minor;
           DWORD flags;
          } 

          template GuidToName {
           <7419dfe5-b73a-4d66-98d8-c082591dc9e7>
           STRING Guid;
           STRING Name;
          } 

          template TextureFilename {
           <A42790E1-7810-11cf-8F52-0040333594A3>
           STRING filename;
          }
          //....remaining existing template sections already in the .X file go here....

          //.... Add new data info...
          Header {
              1;
              0;
              1;
          } 

          GuidToName {
              "{49D04F1F-E6E3-4072-AF10-8F5602234212}";  \\<--- Note: this needs to be a unique GUID. I use GUIDGen to create these.
              "TestHouse"; \\<--- A Friendly Name I've given to the model
          } 

          //.... existing Frame details go here...
          Frame Scene_Root {
           Frame TestHouse {
           //.......
lisa is offline   Reply With Quote