• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX xtomdl and texture

Messages
135
Country
germany
Hello,

I have now exported my object from 3dsmax to a .x file and then converted to .mdl with xtomdl.exe.

But after compiling to bgl, there's now texture displayed in fsx.
I did check my mdl file with a mdl source tool, too. And this tool shows, that there are no textures used by this mdl file. My textures did I add direct in 3DSmax. It's a DXT5 DDS file, 8 bit, 1024 x 1024px size resolution and it's correctly displayed in 3ds max, but in fsx my object stays white.

How to do it right?

thanks

regards comy
 
Make sure you have "Export Skin" checked in the exporter options when you are saving to an X file out of 3DS Max. Also, if you left the default "Use DDS Textures" checked on export, flip and convert your textures to DDS format and place them into the correct texture folder for your scenery project.
 
I did try, but no changes. Same problem.
Okay in detail what I did:

My Projectfolder(.max, .xml files of library) contains a Scenery Folder(.x, .mdl, .bgl files) and a Texturefolder (.bgl files)

I did add my texture direct in 3ds Max as .DDS file. No bitmap.

Then I exported my .max to .x with the exporter options like you telled me.

I saved the .x file in den Project Sceneryfolder
Then I copied it to the plugin folder of 3dsmax where the xtomdl.exe is located.

I dragged my .x file and dropped it on the .exe. The compiler started and delivered me a .mdl file. I copied the .mdl back to my Project scenery folder, added it to the liberary with library creator and compiled it.

Then I placed it at the airport with ADE and compiled the bgl.

My texture copied I to the Addon Scenery/Texture and the both bgl files to Addon Scenery/Scenery.

I think it's correct so.

It's possible that I did a mistake in 3ds max by texturing?
I used the unwrapuvw modificator I think. I am not sure about the english title of this modificator.
 
Hi,

It's hard to tell what is going wrong. Maybe you can show the X file that might give you clue?
 
Yes, you can zip it and attach it on the forum.
 
Okay here is a testfile, because the other one is really to big to upload here, because it contains some more dds file:)

But this tesfile has the same problem. No textures are displayed in fsx. I tested it.
It contains the .max file for 2012, 2011, 2010 (don't know which version you use).

the .x file, the .mdl file and the .dds in DXT5 format.


All in the same folder structure which I use in my project.
Many thanks to you.

regards comy
 

Attachments

I did add my texture direct in 3ds Max as .DDS file. No bitmap.

That's both unnecessary and pointless. The format of the images you use in Max/GMax/FSDS is irrelevant. The only thing exported is the filename (no extension)...

What matters in Max/GMax/FSDS is that you can see the artwork clearly for UVW Mapping purposes.
 
Hi,

I don't have 3DS Max, so I can't look at the max files. But the X file has no reference to any texture at all. So are you sure you assigned it correctly? The day texture should be in the diffuse texture slot of your FlightSimX material.
 
Okay, I tried it again and you are right, my texture was in the wrong slot, I was in the diffuse slot of general and not flightsim X.
But the problem is the same, no texture is displayed. May could it be possible that the problem is the copying of the .x file from my project scenery folder to the plugin folder where the xtomdl.exe is located and then the backcopy of the new mdl file to my scenery folder?


I don't know, how to do it else.

Or could be it possible that I only use the diffuse slot? I don't have anymore textures at the moment like special map or night texture. But improbable, I think.

But many thanks for your help. I think it's not natural to check the files of somebody.

How did you check my mdl file? It would be good to know it, so it wouldn't be necassary to compile it to bgl everytime to find out, if my texture is avaible in mdl or not.

regards

comy
 
Last edited:
Hi,

Your X file does not have any reference to a texture. So the copying is not hte problem, it is the content of the file. Somehow your object does not seem to have a texture when it is exported.
 
First thing that I notice is that you have an MDL and .X file in your Scenery folder, but no BGL for the actual model. FSX won't read this directly. You'll need to compile the MDL to a BGL and use that for placement.

Second, which version of 3DS Max did you use to make this? As far as I've heard, the FSX SDK only supports 3DS Max 8 and 9, but you have been talking about 2010, 2011, and so on.

/offtopic Congrats to Arno for 15,300 posts. More than the ways I will skive off class this semester to monitor FSDev.
 
First thing that I notice is that you have an MDL and .X file in your Scenery folder, but no BGL for the actual model. FSX won't read this directly. You'll need to compile the MDL to a BGL and use that for placement.

Second, which version of 3DS Max did you use to make this? As far as I've heard, the FSX SDK only supports 3DS Max 8 and 9, but you have been talking about 2010, 2011, and so on.

ADE9X will load and display a scenery .mdl file just fine.

The free SDK from Prepar3D includes the export modules recompiled for all of the later versions of Max. This has been discussed quite a bit over the past few months... ;)
 
I use Max 2012 with the Prepar 3D SDK.

Okay with the moment content of information, it seems to be sure, that the problem begins at the moment of export.

I have set slot to FlightsimX, and added my texture to the diffuse map slot.
Furhtermore I have checked the prepar3D SDK documentation and did set the material configuration to the default configuration like described in the sdk documentation, copied the bgl files to Addon Scenery/Scenery and Texture to Texture folder, but all time the same, whatever I do.
I have no more ideas, how to find a solution.

Only what I can say is, that I get some error message by exporting my file to .x

The first one refers to the scale, because it seems like that .x file uses meter for scale (my units are set to meters). But I can't imagine that this is the problem, furthermore it's no problem for me, because I know the correct scale value for my model, so I can edit it in ADE.

The scond one refers to the standard material like diffuse color and specular color, the .x export plugin disturbs that 3DS Max uses numbers as first sign in the material identifier.
But I think that can not be a reason for this problems, too, because I can confirm this error message and the exporter continue working and my texture don't have a number as first sign of file name.

Don't help really....hmm?
But thanks to all for supporting me. Hope dies last....

EDIT: I did use the LOD tool of prepar3D to set the GUID and Friendlyname. But if I verify my object in this tool, I get the message that GUID and Friendlyname is broken. :confused:
 
Last edited:
I had a look at your max file and noticed that the materials were not the usual Blinn and FSX types but some proprietary format.

My Max (2011) also complained that you had a scale of inches rather than meters, offering to convert them, and the model then came out as 10,10,5 meters, which I gather was the intended scale. But if I were you I would reset Max preferences to meters, ie do as you're told in the SDK.

Finally, I note that you "dragged my .x file and dropped it on the .exe". That's not how it is done either, as was mentioned in a recent post, namely mainly here:

http://www.fsdeveloper.com/forum/showthread.php?t=98974

Better also check the Wiki here, under Modeling > XtoMdl.

And perhaps begin by exporting a simple untextured cube, just to make sure you've got the basic process working.
 
Last edited by a moderator:
Oh yeah, I did know this article, but I thought it would be unimportant with prepar3D. May I was confused by the new mdl building option in the sdk (Yeah I know it's deactivated) Export only via File menu.

Okay back to problem.

I did read this article again and again and again. But anything will not work there, anyway at me.

I did create a shortcut like described in wiki.

But if I try to converting, I get only one line in my cmd (it shows the path to my pluginsfolder of 3DS Max and all usage of command reference end in a error), and as result I get a zero size .mdl file.

At first here are my sortcut preferences located in the sendto folder.

target path:
%windir%\System32\cmd.exe /K C":\Program Files (x86)\Autodesk\3ds Max Design 2012\plugins\XtoMDL.exe" /DICT:C:"\Program Files (x86)\Autodesk\3ds Max Design 2012\plugins\modeldef.XML" /XMLSAMPLE >buildlog.txt

start in: "C:\Program Files (x86)\Autodesk\3ds Max Design 2012\plugins"

And yes, my system is completly adapted to US english. So that couldn't be the reason for the zero size file.

@mjahn: you are right, I did only change my unit preference of my object and not of system preference.

And the other things, I use Flightsim Materials and Blinn. In the attachment you can find a .rar file with 2 screens where you can see the Material Editor preferences, which are important, I think. It's not an english 3DS Max, but I think that shouldn't be a problem because structure is same like 2011.

And may, you can explain me, why I get after every 3DS Max execution one more ACE Tools Menu in the Menubar. Look at screen. It's crazy. :D

thanks to all

regards comy
 

Attachments

Last edited:
In your pics I can see that Material selection now looks OK - as far as I can tell, I am no Max expert at all, just happen to be able to export to FSX...

ACES tools shouldn't be there twice so better remove and reconfigure.

Perhaps give the material a proper name so that it doesn't begin with a number.

Then try it the batch file way I suggested in the link above, ie create a batchfile containing these lines:

XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml /XMLSAMPLE test.x > err.log
pause

... call it CreateMdl.bat and put it here exactly:

c:\P3DSDK\Environment Kit\Modeling SDK\3DSM7\Plugins\CreateMdl.bat

Root and first folder point to the location of my P3D SDK (you probably have it in a different location so change as needed). But note well that you move to 3dsm7, and this may well be crucial. Where do you have the SDK by the way?

Then copy your test.x and your test.xanim file exactly where the CreatMdl.bat is and execute the bat. And see what happens...

It's not the most elegant way admittedly, but at least it will tell you whether you can export or not. You can then take it from there.

PS This SDK link might also be of interest: http://www.prepar3d.com/forum-5/?mingleforumaction=viewtopic&t=303.0
 
Last edited by a moderator:
Okay thanks.

I did it exactly how you described with the .bat file, except I used the 3DSmax12 plugin folder in the SDK.

Now it converts my .x file to .mdl correctly, but my textures are not displayed :(

Anything is absolutely wrong.
My SDK Installation is located in the standard location of the installer:

C:\Program Files (x86)\Lockheed Martin\Prepar3D SDK 1.2.3253.0\Environment Kit\Modeling SDK\3DSM2012\Plugins\CreateMDL.bat

Now I don't have more ideas what's wrong. In the Shadertool of SDK my material is correctly perceived as FSX Material.

And by exporting to .x file I set the options
export skin
flag duplicate part names
Export ESP 1.0 Material
Process Textures
use dds files.

All what I can think of more is that I have to change the profile after I did add my texture map in the material editor.
I change at frist to Flightsim X material, then I add my map, but when I do it, he changes from Flightsim X to Bitmap. So I have to change my profile again to see the Flightsim X material config. But this seems like normal.

hmm no more ideas :( Can not understand why it does not work. And I have viewed your link, thanks, but the problems reported there are not the same. I have the newest version of sdk tool.

regards comy.


Edit: I did make a test and find out that if I export to .OBJ file, that there are no materials are given to the .obj although a selected to option in the exporter configuration of .obj.
Anyway the value of materials in the obj export window stays 0. So I think that he don't export any materials. Really crazy....
 
Last edited:
Lets have your max and mdl files again please.

And do try it from 3dsm7...
 
Okay I did try it from 3dsM7 but no changes. Same problem. May be, I am not maked for scenery design.
It feels like a ban....

Here you have it...and thanks..
 

Attachments

Back
Top