• 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.

Exporting?

GHD

Messages
12,244
Country
england
I have scaled, moved and rotated a model successfully:



However, if I export as an FS9 .mdl, it creates only the .x and .xanim files but doesn't run XToMdl. Even though it does state "Writing B747.MDL", the file is nowhere to be found.



I can run XtoMdl manually which does create a .mdl file.



However, on import, the model is missing the landing gear.



These are my Exporter settings

 
Hi,

I have imported, scaled, moved and rotated a SAMM converted blackhawk heli and exported it again.
I used Library Creator xml to make the bgl.
I placed the bgl in the scenery with the ADE LOM.
This LOM describes the object as 100 times its MCX adapted size and shows so on the ADE screen.
Besides the fact that I have no textures (well, almost none), the size in FSX is nevertheless correct.
Upon importing the MCX made mdl again, MCX gives me an error message:
System.ArgumentException: Ongeldige tekens in pad.
bij System.IO.Path.CheckInvalidPathChars(String path)
bij System.IO.Path.GetExtension(String path)
bij ASToFra.TextureObject.TextureSearcher.FindTexture(String filename, String startFile, String livery, Boolean onlyStartFolder)
bij ASToFra.TextureObject.TextureSearcher.FindTexture(String filename, String startFolder, String livery)
bij ASToFra.ObjectModel3D.TextureDictionary.GetTextureImage(String t, String p, String livery)
bij ASToFra.ObjectModel3D.ObjectModel.GetTextureImage(String t)
bij ASToFra.ObjectRenderer.Renderer3DHandlerType.ReadTexture(String mTexture)
bij ASToFra.ObjectRenderer.Renderer3DHandlerType.LoadTextures()
bij ASToFra.ObjectRenderer.Renderer3DHandlerType.ProcessObjectModel()
bij ASToFra.ObjectRenderer.Renderer3DHandlerType.set_ObjectModel(ObjectModel value)
bij ASToFra.ModelConverterX.MainWindow.SetPreview(Int32 index)
bij ASToFra.ModelConverterX.MainWindow.UpdateFormAfterImport()
bij ASToFra.ModelConverterX.MainWindow.bwImporter_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
bij System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
bij System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
I use the latest MCX dev release.
So much for my findings.
 
George,

Shouldn't your modeldef path point to modeldef.xml?

I don't know, I changed that path in error :o

Where is modeldef.xml ?

Edit. I set the paths to the G:\GMax\gamepacks\FSX_GmaxGamePack\Plugins folder, should it be FS9 GMax? If so, I don't have that installed.
 
Last edited:
(FSX)
...\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml
...\SDK\Environment Kit\Modeling SDK\FSX_GmaxGamePack\Plugins\XToMdl.exe
That is what I have.
 
Last edited:
Yes, I have those files, but I thought that aircraft as scenery needed to be compiled with the FS9 XToMdl.

Unfortunately I can find only MakeMDL.exe and MakeMDL.parts.xml in the FS9 SDK.

I'll try adding modeldef.xml.
 
This time I selected Export FS9 Model and it appeared to work (well, the .mdl file was created).



It also created B747.XML containing:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">

	<!-- Sample object placement.  Remove comment markers to place object east of 34R at Sea Tac. -->
	<!--
	<SceneryObject lat="47 25.89" lon="-122 18.43" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
		<LibraryObject name="C722590E4C25B54B9E0F6FA97250F619" scale="1.0" />
	</SceneryObject>

	-->

	<!-- Inclusion of model data.  Use the 'Name' of this object to place --> 
	<!-- it in other locations.                                           --> 
	<ModelData name="C722590E4C25B54B9E0F6FA97250F619" sourceFile="B747.mdl" />
</FSData>

However, if I import this .mdl I get the following error:



One step further ....

Edit.

If I compile the placement xml, apart from the missing textures, this is what I see:

 
Last edited:
Hi George,

Exporting FS2004 MDL files uses MakeMDL.

If you can send me the MDL file that gives the crash for debugging I can take a look what goes wrong.
 
Thanks Arno,

I scaled it by 0.00098, raised it by 3.994m then rotated about Y by -0.9.

Note that the exported mdl file contains an incorrect reference to the textures, it is missing the "\" between the folder and bmp file.

File attached.
 
Last edited:
Hi,

MDL files only store texture names, not the folder. The folder is always the texture folder that belongs to the scenery folder where the BGL is.

I'll try to debug the errors now.
 
Hi,

MDL files only store texture names, not the folder. The folder is always the texture folder that belongs to the scenery folder where the BGL is.

That's not true, the mdl file contains the relative path from the associated texture folder:

SAMM original converted mdl:

l3BWoA_AIA_B744_RR_BAW-British Airways\AIA_747_400_RR_T.BMP

MCX scaled mdl:

À7BWOA_AIA_B744_RR_BAW-BRITISH AIRWAYSAIA_747_400_RR_T.BMP


Note the missing "\".

Model Converter X reads and displays the original mdl correctly.
 
Last edited:
Hi George,

Humm, that is the first time I have seen that kind of texture assignment. I am surprised FS can work with that :). I don't think it is according to the standards, but it seems to work.

I guess it is lost somewhere in the export process then, I'll check.

I also noticed that the LOD calculation does not go correctly for the MDL file, since the original size is so big. I guess I must be missing a scale command somewhere in the MDL or do you have to use a small scale on the SAMM MDL as well?
 
I guess I must be missing a scale command somewhere in the MDL or do you have to use a small scale on the SAMM MDL as well?

Yes, I used a scale of 0.00098 in Model Converter X transform although it truncates it to 3 decimal places, so the scale is 0.001.
 
Sorry for intervening.

Yes.
In the case of the Blackhawk (see the relevant aircraft modelling forum), the scaling has to be 0.0195, something which is not possible in MCX nor in ADE.
 
Hi,

I just fixed the bug with that slash, so from tomorrow that works.

I also changed the minimum scale value from 0.001 to 0.0001, so the 0.00098 should work from tomorrow as well.

But when placing the SAMM MDL with BGLComp you need to scale it as well? Or is ModelConverterX missing a scale command when reading the MDL?
 
Hi,

By now I have also fixed the crash that happens with the duplicate labels.

I have found out that MakeMDL does not allow the slashes in the texture filename, it seems they are stripped out when compiling (XtoMDL keeps them in). Might be a limitation of the compiler, I'll try to do some testing tomorrow.

And then of course the biggest issue of the FS2004 MDL not importing again properly. I have been able to fix that by first stripping all animations from the model. It seems a few parts still had an animation, making a mesh of other things. This last change I have not yet included in the development release though, I will add some user interface for it tomorrow and then add it.
 
I guess I must be missing a scale command somewhere in the MDL or do you have to use a small scale on the SAMM MDL as well?

Yes, the reason for using the transformation in MCX is to make it unnecessary to provide alt, pitch and scale in the placement xml.

Of course, it would be more convenient if SAMM were to apply the transform before saving.

I don't know how Don does it, but he manages to keep the back-slash in the texture path.

For the example mdl, I scaled it by 0.00098, raised it by 3.994m then rotated about Y by -0.9.
 
Last edited:
Hi George,

I guess Don does not use MakeMDL to make the MDL file (quite sure about that if I look at the MDL structure).

XtoMDL is happy to make a MDL with the relative path, for MakeMDL I am not sure yet.
 
Hi George,

A new version of the development release is available now. It includes a new tool, the animation editor. At the moment all it can do is remove all animations. After you used it, the FS2004 MDL will export correctly (and also import correctly).

Only problem is those texture names, in the X file they are correct, but MakeMDL seems to remove the relative path. I'll try to do a little more testing with that.
 
Back
Top