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

FS2004 aircraft mdl export

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
33,162
Country
netherlands
Some features are on the ModelConverterX wishlist for quite a while already. For example the feature request to export FS2004 aircraft mdl files with working animations and such is on the list for over 10 years already. And given that FS2004 is less popular nowadays I thought I might never come around to implement this feature request.

But sometimes strange things happen. A question from an user on the FSDeveloper forum triggered me to have another look at how MakeMDL handles custom animations and suddenly I realized it is not that different from how XtoMDL does it. Because I thought it might not be too hard to implement therefore, I decided to give it another try.

Of course reality is always different, because it still took me around 2 months to work on this. Once I had the animations exporting correctly, it turned out the reading of visibility conditions was not optimal and this affected the FS2004 aircraft mdl export as well.

But now that is all behind me and the latest development release of ModelConverterX can export a FS2004 aircraft MDL file with working animations and visibility conditions. I’m sure it will not work perfect on any aircraft around, but I think it should be a start for developers still working for FS2004. And if you encounter any issues with a specific model, just let me know via the forum.

Continue reading...
 
Thanks for putting the work in on this Arno! Looking forward to trying it out to see how it goes.

Greg
 
Last edited:
Thank you, Arno. Even a head-start on getting the work done is very welcome! Thank you for your consideration of this part of the greater FS community.
 
Hi,

Just started trying it out. It's really working well so far!

When I load my FSX CV-340 exterior model, the conversion seems to be seamless. All animations I have checked so far seem to be fine. There is a minor problem with the water rudder animation (it is reversed in FS9 vs FSX) but I can use the Hierarchy Editor to reverse those unless you can do that during export. Excellent!

My first comment:

The issue comes up when I have already converted the plane to FS9 format and want to make further edits (this would also apply if you are importing an FS9 model from the start). When you load an FS9 aircraft the Set Condition Variables box comes up and you have to choose a visible prop for the plane - still, slow, or blurred. But I want all three props to be present when I export the plane again. This would entail isolating the slow and blurred props, saving them to MDL files, and Merging them back into the model. A long process. It would be really great if the Set Condition Variables box could have a check box - "Include all parts". In fact, I cannot think of a time I would NOT want to include all parts, except if I wanted to look at one of the props without the others in the way, an unusual situation. So it might be better to have the default state be "load all the parts" and the checkbox could say something like "Set values to limit visible parts".

I'm not sure what you would do with the VC model in this case, though? See comment 3.

Second comment:

The prop animations do not have any visibilities set when you import the FS9 model. The prop0_still animations should have prop0_still visibilities, etc. I was wondering if you were thinking of doing that, or expecting us to do that? If all props are included per issue 1 it would include slow and blurred props as well. So currently you cannot import and then export an FS9 model without some work.

Third comment:

When importing an FSX model you only get the exterior model. Is there a way to import the interior (VC) model so they can be combined in export? Currently this also applies to loading an FS9 model, since the Set Condition Variables box limits you to one model or the other. Most of us using GMAX use Middleman to include the VC model during the compile process and to set default MakeMDL options (most of which you already include in MCX Options). To add a VC model Middleman will rename the my_interior file to my_interior.x and add it to the LOD list in makemdl.

Fourth comment:

Now loaded into FS9, the wheels rotate backwards.

Fifth comment:

The props rotate backwards.

Sixth comment:

The nosewheel steering (that used a custom c_wheel_FS9 animation in the FSX model because the sims are different) used this code in my modeldef.xml file:


XML:
<Animation name="c_wheel_FS9" guid="BC935F16-43CD-4042-8EF3-06E44A5940AB" length="200" type="Sim" typeparam2="c_wheel_FS9" typeparam="AutoPlay" />

    <PartInfo>
        <Name>c_wheel_FS9</Name>
        <AnimLength>200</AnimLength>
        <Animation>
            <Parameter>
          <Code>
            (A:GEAR CENTER STEER ANGLE, grads) 0 &gt; if{ (A:GEAR CENTER STEER ANGLE, grads) 0.5 * 100 + } els{ (A:GEAR CENTER STEER ANGLE, grads) 0.5 * 200 + }
          </Code>
            </Parameter>
        </Animation>
    </PartInfo>

Note the animation length of 200.

This is what is in the modeldef Editor in MCX:

XML:
<Animation name="custom_anim_GEAR_CENTER_STEER_ANGLE_00" guid="24aec24d-e308-4cbe-b175-c0d645d29afb" length="100" type="Sim" typeParam2="custom_anim_GEAR_CENTER_STEER_ANGLE_00" typeParam="AutoPlay" />
  <PartInfo>
    <Name>custom_anim_GEAR_CENTER_STEER_ANGLE_00</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:GEAR CENTER STEER ANGLE, grads) 0 &gt; if{ (A:GEAR CENTER STEER ANGLE, grads) 0.5 * 100 + } els{ (A:GEAR CENTER STEER ANGLE, grads) 0.5 * 200 + }</Code>
      </Parameter>
    </Animation>
  </PartInfo>
</ModelInfo>

Note the animation length is incorrect, only 100 in both sections. If the prop situation in comment 1 could be changed, I could edit and re-export the plane.

So all in all an impressive result - wow. I hope my comments will help make it even better.

Thanks,
 
Hi Tom,
When I load my FSX CV-340 exterior model, the conversion seems to be seamless. All animations I have checked so far seem to be fine. There is a minor problem with the water rudder animation (it is reversed in FS9 vs FSX) but I can use the Hierarchy Editor to reverse those unless you can do that during export. Excellent!
When testing I also had the impression that the prop direction was sometimes reversed. So I guess this is something I should check in more detail.
The issue comes up when I have already converted the plane to FS9 format and want to make further edits (this would also apply if you are importing an FS9 model from the start). When you load an FS9 aircraft the Set Condition Variables box comes up and you have to choose a visible prop for the plane - still, slow, or blurred. But I want all three props to be present when I export the plane again. This would entail isolating the slow and blurred props, saving them to MDL files, and Merging them back into the model. A long process. It would be really great if the Set Condition Variables box could have a check box - "Include all parts". In fact, I cannot think of a time I would NOT want to include all parts, except if I wanted to look at one of the props without the others in the way, an unusual situation. So it might be better to have the default state be "load all the parts" and the checkbox could say something like "Set values to limit visible parts".
If you use visibility conditions instead of used specified for the condition values you would get all prop states. That also includes other visibility conditions like navigation lights or even the wheel blocks on your DC-6 model.
The prop animations do not have any visibilities set when you import the FS9 model. The prop0_still animations should have prop0_still visibilities, etc. I was wondering if you were thinking of doing that, or expecting us to do that? If all props are included per issue 1 it would include slow and blurred props as well. So currently you cannot import and then export an FS9 model without some work.
If you use the visibility condition setting like I mentioned above the prop will get the right visibility conditions and these are used on export as well.
When importing an FSX model you only get the exterior model. Is there a way to import the interior (VC) model so they can be combined in export? Currently this also applies to loading an FS9 model, since the Set Condition Variables box limits you to one model or the other. Most of us using GMAX use Middleman to include the VC model during the compile process and to set default MakeMDL options (most of which you already include in MCX Options). To add a VC model Middleman will rename the my_interior file to my_interior.x and add it to the LOD list in makemdl.
How to do the VC is something I still wanted to discuss here with users. Like you say FS2004 and FSX are different here.

For FSX if you read from the aircraft.cfg file you get both models loaded as objects into MCX. Maybe I could do the same for the FS2004 model. On export they would somehow have to be combined in one mdl again.

Another option would be to load both the interior and exterior models into the same model and somehow tag them as the part they are. Maybe this second approach is easier to understand for users.
Now loaded into FS9, the wheels rotate backwards.

The props rotate backwards.
Like I mentioned before I noticed this partly while testing. Does this apply to any rotation or only specific ones?
The nosewheel steering (that used a custom c_wheel_FS9 animation in the FSX model because the sims are different) used this code in my modeldef.xml file:


XML:
<Animation name="c_wheel_FS9" guid="BC935F16-43CD-4042-8EF3-06E44A5940AB" length="200" type="Sim" typeparam2="c_wheel_FS9" typeparam="AutoPlay" />

    <PartInfo>
        <Name>c_wheel_FS9</Name>
        <AnimLength>200</AnimLength>
        <Animation>
            <Parameter>
          <Code>
            (A:GEAR CENTER STEER ANGLE, grads) 0 &gt; if{ (A:GEAR CENTER STEER ANGLE, grads) 0.5 * 100 + } els{ (A:GEAR CENTER STEER ANGLE, grads) 0.5 * 200 + }
          </Code>
            </Parameter>
        </Animation>
    </PartInfo>

Note the animation length of 200.

This is what is in the modeldef Editor in MCX:

XML:
<Animation name="custom_anim_GEAR_CENTER_STEER_ANGLE_00" guid="24aec24d-e308-4cbe-b175-c0d645d29afb" length="100" type="Sim" typeParam2="custom_anim_GEAR_CENTER_STEER_ANGLE_00" typeParam="AutoPlay" />
  <PartInfo>
    <Name>custom_anim_GEAR_CENTER_STEER_ANGLE_00</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:GEAR CENTER STEER ANGLE, grads) 0 &gt; if{ (A:GEAR CENTER STEER ANGLE, grads) 0.5 * 100 + } els{ (A:GEAR CENTER STEER ANGLE, grads) 0.5 * 200 + }</Code>
      </Parameter>
    </Animation>
  </PartInfo>
</ModelInfo>

Note the animation length is incorrect, only 100 in both sections. If the prop situation in comment 1 could be changed, I could edit and re-export the plane.
The animation length attribute of the modeldef.xml is not used when exporting to FS2004, so it should not matter. But let me check why it is not read correctly.
So all in all an impressive result - wow. I hope my comments will help make it even better.
Yes, this kind of feedback is very useful for me to make MCX better. Thanks for it!
 
Hi again,

No problem, happy to help.

OK, setting the Importer settings to Visibility Conditions did fix the two things in my original post that you mentioned - great! I had avoided that setting in the past since setting it led to incorrect animations in the exported model back when we were trying this the first time. I just checked it and it doesn't do that now, so I can import an FS9 model and then export it directly. Super.

I have started with my Convair 340 model since it is a little simpler than the DC-6B, but I will be checking that soon. So the things that rotate backward are c_tire, l_tire, and r_tire, along with prop0_still and prop1_still. It's difficult to know if the slow or blurred props are reversed due to the complex animation, but I assume so? I just checked the DC-6B and props 2_still and 3_still are also reversed.

Now that I can load FS9 aircraft complete, there is an issue with Importing my FS9 Convair 340 model. The rudder and elevators are being assigned the _d versions of the textures, which do not exist. I can change them back to the correct _t versions in the Hierarchy Editor which works fine, but I'm not sure why MCX is creating a _d texture when it doesn't exist? After Exporting the model and Importing it again this does not occur. The MDL is attached below, you can see the _d textures listed in the Material Editor. You can also download the entire plane here:


The FS9 DC-6B model suffers from the same issue.

The nosewheel animation is only a problem when it comes from an FSX model using the custom animation tag. If coming from an FS9 model using c_wheel as the animation tag it animates correctly.

New issue - when I export FS9 or FSX planes to FS9, the alpha channels are being used for transparency instead of for reflections. In GMAX any texture ending in _t are used for reflections. FSDS had no such convention but you could select transparency or reflection for each part. Is that an option in MCX? I don't see it in the Material Editor properties. Can you read that from the FS9 MDL file? For FSX it should be readable since you already include it in the Material Editor settings (Blend Environment by Diffuse Inverse Alpha).

Finally, when I load an FSX model using the aircraft.cfg file I do get both models loaded, displayed using the green arrows - exterior then VC for each livery - neat. When I load an FS9 model it instead steps through only the exterior liveries/models. I do not see a VC there. If that behavior could be changed to that of an FSX model then hopefully we can get them both stuffed into the FS9 MDL file.

Hope this helps,
 

Attachments

  • cv340 MDL.zip
    688.5 KB · Views: 89
I have started with my Convair 340 model since it is a little simpler than the DC-6B, but I will be checking that soon. So the things that rotate backward are c_tire, l_tire, and r_tire, along with prop0_still and prop1_still. It's difficult to know if the slow or blurred props are reversed due to the complex animation, but I assume so? I just checked the DC-6B and props 2_still and 3_still are also reversed.
Ok, guess I need to reverse them somehow then. Other rotations like the aileron and rudder seem ok, so it's not that all rotations are wrong.
Now that I can load FS9 aircraft complete, there is an issue with Importing my FS9 Convair 340 model. The rudder and elevators are being assigned the _d versions of the textures, which do not exist. I can change them back to the correct _t versions in the Hierarchy Editor which works fine, but I'm not sure why MCX is creating a _d texture when it doesn't exist? After Exporting the model and Importing it again this does not occur. The MDL is attached below, you can see the _d textures listed in the Material Editor. You can also download the entire plane here:

Let me check with your model how MCX finds that _d texture, sounds like a bug.
New issue - when I export FS9 or FSX planes to FS9, the alpha channels are being used for transparency instead of for reflections. In GMAX any texture ending in _t are used for reflections. FSDS had no such convention but you could select transparency or reflection for each part. Is that an option in MCX? I don't see it in the Material Editor properties. Can you read that from the FS9 MDL file? For FSX it should be readable since you already include it in the Material Editor settings (Blend Environment by Diffuse Inverse Alpha).
Let me check how that should be defined, I guess I'm missing something when writing the material to the X file.
Finally, when I load an FSX model using the aircraft.cfg file I do get both models loaded, displayed using the green arrows - exterior then VC for each livery - neat. When I load an FS9 model it instead steps through only the exterior liveries/models. I do not see a VC there. If that behavior could be changed to that of an FSX model then hopefully we can get them both stuffed into the FS9 MDL file.
That is correct, for FSX they are separate models in the cfg file. For FS2004 I would have to read them both from the same mdl file, but that is not yet implemented.
 
Here are the X file descriptions for each type of FS9 texture from the FS9 SDK (MakeMDL SDK). Note that these documents have many errors. Night Map = LM (scenery), Light Map = L (aircraft).

Code:
The following example shows the only combinations of material files that MakeMDL can use.

Note  When you use a reflection map, make sure the file name of the reflection texture matches the file name of both the diffuse texture and the texture.

Material Base_Texture_With_NightMap {
  0.000000; 1.000000; 0.000000; 1.000000;;
  0.000000;
  1.000000; 1.000000; 1.000000;;
  0.000000; 0.000000; 0.000000;;
  TextureFileName {
     "BaseTexture.bmp";
  }
  DiffuseTextureFileName  {
     "BaseTexture.bmp";
  }
  AmbientTextureFileName  {
    "NightMap.bmp";
  }

Material Base_Texture_With_LightMap {
  0.000000; 0.000000; 1.000000; 1.000000;;
  0.000000;
  1.000000; 1.000000; 1.000000;;
  0.000000; 0.000000; 0.000000;;
  TextureFileName {
     "BaseTexture.bmp";
  }
  DiffuseTextureFileName  {
    "BaseTexture.bmp";
  }
  EmissiveTextureFileName  {
    "LightMap.bmp";
  }

Material Base_Texture_With_ReflectionMap {
  1.000000; 0.000000; 0.000000; 1.000000;;
  0.000000;
  1.000000; 1.000000; 1.000000;;
  0.000000; 0.000000; 0.000000;;
  TextureFileName {
     "BaseTexture.bmp";
  }
  DiffuseTextureFileName  {
    "BaseTexture.bmp";
  }
  ReflectionTextureFileName {
    "BaseTexture.bmp";
  }

Material Base_Texture_With_ReflectionMap_And_LightMap {
  1.000000; 0.000000; 0.000000; 1.000000;;
  0.000000;
  1.000000; 1.000000; 1.000000;;
  0.000000; 0.000000; 0.000000;;
  TextureFileName {
     "BaseTexture.bmp";
  }
  DiffuseTextureFileName  {
    "BaseTexture.bmp";
  }
  EmissiveTextureFileName  {
    "LightMap.bmp";
  }
  ReflectionTextureFileName {
    "BaseTexture.bmp";
  }

Note that I don't see this format in the X files I've created from GMAX. The only reference to reflection in my CV-340 X file is:

Code:
template ReflectionTextureFileName {
 <E00200E2-D4AB-481a-9B85-E20F9AE07404>
 STRING filename;
}

I tried adding a Specular texture file name (identical to the Diffuse texture name) in the MCX Material Editor but it didn't change anything. So the above may be suspect?

I didn't specify a Specular Texture in GMAX, since it is not necessary for a reflective texture. The _t extension in the bitmap name is all that is required. How that translates into the X and the MDL file I have no idea...

I can create X and/or asm files from GMAX if you need them.

Hope this helps,
 
If you never specified them in gmax it might also be a makemdl option on export. I'll have to check this when I'm back at my PC (now I'm traveling).
 
The rudder and elevators are being assigned the _d versions of the textures, which do not exist.

Same here. This happens in MCX V.1.6.0 and in the Developer Release. In V.1.5.0 this does not happen.
 
Same here. This happens in MCX V.1.6.0 and in the Developer Release. In V.1.5.0 this does not happen.
Does it only happen when the visibility conditions are enabled?
 
Hello guys from another FS9 user.


I am very excited about your progress.

Hope you can make experiments with AI jets which were released by AIG and UTT.
Like A330neo, A330, A340 of AIG and A350 of UTT.


@arno
One big Item that I hope to get solved in the future with your MCX is the max vertices problem.

I have managed to convert many AI ships or buildings for FS9.

But many models cant be converted because of the Max vertices problem.

Do you think that your MCX could be able to solve this problem, too?

Thanks for your help and support for the FS9!
 
Do you think that your MCX could be able to solve this problem, too?
MCX does already try to split the object in parts that are within the limits that the FS2004 MDL format allows. But it seems that might not always work correctly then.
 
I have problens with the max vertices when I try to convert AI ships of Henrik Nielsen.

I already converted many ships successfully.


However most of the military ships and some Cruise ships, like OASIS OF THE SEAS, I cant convert.
Same for Containerships, for example of ONE company with the pink livery.
These models are in the GAIST V3 release of Henrik Nielsen.

Is there a chance to have a look on the problem after you have solved the problems with AI aircrafts, please?
 
What is the model part and vertex count of the models that have issues?

I will see if I can find some of these models to have a look at.
 
Back
Top