• 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

I have made transparent and reflective FS9 cube objects - otherwise identical. I checked in the sim and they appear correctly. The resulting X files appear identical to me, other than the bitmap file names - test.bmp and test_t.bmp, and the material names - Mtl_10 and Mtl_20. The X and MDL files are attached in case you want to look at them. If they are indeed identical then the texture file name itself is guiding one of the programs (the GMAX compiler or MakeMDL) to set a switch in the MDL file that this material should be reflective or transparent. Since you use MakeMDL to create FS9 aircraft and they end up transparent with textures including _t I would assume it's the GMAX compiler, but that is just a guess.

In addition I did not add a Self Illumination bitmap to the materials but the reflective model lights up anyway (using a bitmap with the day texture name plus _L, test_t.bmp and test_L.bmp). The transparent model does not, however. (which uses an identical texture but called test.bmp). If the bitmap name does not include _t then it must be added manually to the Self Illumination slot for the Light Map to be used.

I can provide the textures as well if needed. I added the objects to my CV-440 aircraft folder as separate model folders with entries in the aircraft.cfg file for easy selection. I can provide that as well.

Hope this helps,
 

Attachments

Last edited:
Thanks Tom, I'll explore the files ones I'm home again.
 
I think (hope) I figured it out. When exporting a plane from GMAX using Middleman, the MakeMDL options are available. These are the default options that Middleman suggests for FS9 aircraft:

makemdl_options.jpg


Note the HasReflectMap and HasLightMap are checked. According to the SDK these do this (I'm including all the options listed in the SDK here):

Command line optionsDescription
/OUT:eek:utput_fileDefine the name of the output file.
/BATCHGenerate the model and exit.
/tsGenerate scenery.
/taGenerate aircraft.
/CRASH-Disable the generation of a crash tree.
/VIS-Disable the parts_visible tests.
/NightMapAssume a night texture exists (file ends with “_LM”).
/ReflectMapAssume a reflect map in alpha (file ends with “_T”).
/LightMapAssume a light map exists (file ends with “_L”).
/DamageMapAssume a damage map exists (file ends with “_D”). Default for aircraft.
/NightMap-Assume no night texture exists.
/ReflectMap-Assume no reflect map exists.
/DamageMap-Assume no damage map exists.
/LightMap-Assume no light map exists.
 
Last edited:
EDIT: I have gone into this topic in more detail below, read that too.

I couldn't seem to add to my previous post after pasting the table, so I'll continue here.

Note that /ReflectMap will cause MakeMDL to assume a reflect map in the alpha channel if the diffuse map file ends with _T.
Also note that /LightMap will assume a light map exists if the file ends with _L. (This turns out to only be true for diffuse maps ending in _T.)

I assume you are not using those switches when compiling aircraft? If you add those hopefully things will work out OK for aircraft originally created with GMAX.

For those created by FSDS (that I believe uses its own compiler?) I don't know how you could specify to MakeMDL which materials should be reflective, unless we could get the method of specifying the reflection map in the X file working (and you could read that setting in the original FS9 MDL file). I tried adding the diffuse bitmap to the Specular Texture slot in the MCX Material Editor (the method specified in the SDK), but I haven't checked if MCX then generates a Reflection Map entry in the resulting X file.

Hope this helps,
 
Last edited:
I have outputted an X file from an MCX export and when I specify a Specular Texture I get this in the X file:

Code:
DiffuseTextureFileName  {
     "cv440leftfwd_t.bmp";
    }
     SpecularTextureFileName  {
      "cv440leftfwd_t.bmp";
     }

Note that SpeciularTextureFileName is not listed as one of the choices in the example X file material descriptions I posted above. AFAIK it is not used by FS9 itself - "specular" is not even mentioned in the MakeMDL SDK. According to the GMAX SDK when compiling a plane it triggers the addition of a reflection map if the name is the same as the diffuse map. In GMAX for FS9 specular power is set using a number from 1 to 100 and a color, not a texture. Image below from the GMAX SDK:

gmax_material_options.jpg


So it appears that no ReflectionTextureFileName entry is generated by MCX in the X file and thus no reflection, only transparency. I wonder if you should add a Reflective Texture slot in the FS9 Material Editor properties and fill that slot with the diffuse texture name when importing an FS9 model (if that material is reflective), and then generating a ReflectionTextureFileName entry for that material in the X file when Exporting. The user could also add/remove the diffuse texture name from that slot if desired. An alternative (since the file name MUST be the diffuse bitmap name) is to just include an IsReflective check box and then have MCX add the ReflectionTextureFileName entry to the X file when checked. The Specular Texture slot in the MCX Material Editor is not really used by FS9 and could be removed?

Hope this helps,
 
Last edited:
Thanks for diving into this Tom. I guess I have to see which material attributes are easiest to allow conversion to and from FSX as well. It might make sense to still use the specular texture, but export it as a reflection map for FS2004 of that makes conversion easier. Having a is reflective flag might be harder when switching between version, but I need to think about that.
 
I’m not sure why the specular texture would be the best choice? The closest FSX equivalent to the FS9 reflection map would be the environment map. They both determine what and how much are reflected from a shiny metal surface. The specular texture in FSX determines how much of the sunlight is reflected off an object, and what color(s). This does not use a bitmap in FS9, only an intensity number between 0 and 100 and an RGB color. I believe it is specified in the X files that I posted in that way?

The only time the specular texture is used when creating FS9 planes is if you are using GMAX you place the reflection map filename in the GMAX Specular Texture slot in the material, since GMAX does not provide an Environment/Reflection Texture slot. It is converted by the GMAX compiler to a reflection texture entry in the X file (or in some other way), and and a specular texture is never mentioned again.
 
In the X files I posted above the specular level is set to 0 and the specular color is 229, 229, 229. These can be found here in the X files:

Code:
Material Mtl__20 {
  0.588000; 0.588000; 0.588000; 1.000000;;
  0.000000;
  0.900000; 0.900000; 0.900000;;
  0.000000; 0.000000; 0.000000;;

The
0.000000;
0.900000; 0.900000; 0.900000;;
Is the specular intensity followed by the specular color RGB. 1.0 = 255
This line:

0.588000; 0.588000; 0.588000; 1.000000;;

is the diffuse color RGB followed by the Opacity value (1 = opaque, 0 = fully transparent). I don't believe this Opacity property is available to FSX and later models, you must use the alpha channel instead.

I don't know what the final three numbers are.

Hope this helps,
 
The environment map in FSX is a cube map, that specifies the environment which is being reflected in the parts of the aircraft that are reflective.

But the amount of reflection is typically stored in the specular map alpha if I'm not wrong, or in the diffuse alpha (which the right material settings set). That last is quite similar to what seems to be used in the FS2004 models.
 
Indeed that can be stored in the diffuse alpha in both sims. That is the default in FS9 and also true in FSX if the Blend is set that way (which is the usual way people do that).
 
So I guess on import of a fs2004 model I should set the material in that way, so that it can be exported to FSX as well. And on fs2004 export I need to make sure the needed options are there in the x file.
 
In the latest development release I have fixed some of the issues reported in this thread. The damage texture is no longer shown on some aircraft parts and also the exporting of the reflection map is now working correctly.

The other issues like the reversed animations and the VC I still need to look at.
 
Tom,

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.
Which MDL did you load when you get this issue? I just downloaded your CV-440 base package for FSX and if I import that model the animation shows correctly with a length of 200 in the modeldef.xml editor in MCX.

Code:
 <Animation name="custom_anim_GEAR_CENTER_STEER_ANGLE_00" guid="bc935f16-43cd-4042-8ef3-06e44a5940ab" length="200" type="Sim" typeParam2="custom_anim_GEAR_CENTER_STEER_ANGLE_00" typeParam="AutoPlay" />
  <PartInfo>
    <Name>custom_anim_GEAR_CENTER_STEER_ANGLE_00</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>
 
Hi,

I loaded my CV-340 model when I saw that. There seems to be some problem with that animation as compared to the others, so I dropped it. As you say the CV-440 c_wheel animation seems OK.

Thanks for the development release update. Some observations:

Converted the FS9 CV-440 to FSX:
1. The plane is no longer transparent, so that seems to be working.
2. The plane is not reflective - the Reflection Scales in the materials are set to 0, I usually set this to 0.8.
3. The Specular color is set to 0,0,0 upon import. Since there is no specular texture in FS9 aircraft, this results in little sun reflection. I usually set this to 55,55,55 for FSX export, this FS9 model is set at 229,229.229.
4. The Visibility Condition is set in the SceneGraphNode and not in the ModelPart. This does not work - the condition must be set in the ModelPart (and not needed in the SceneGraphNode). Thus all three props (for example) are visible all the time.
5. The blurred prop and glass textures, while not set to be reflective (good) are not set for transparency.
6. The Animations seem to be incorrect - most flick to the center at some point in the animation (control surfaces, props).

Imported the FS9 CV-440 (and DC-6B) and Exported to FS9:
1. Most of the materials and all animations and visibility conditions seem to be working OK.
2. At night the areas of the Light Map that have a black alpha channel (i.e. controlled by the main light switch) are transparent in the model. This does not happen in GMAX created models.
3. The specular color is set to 0,0,0 upon import. In the CV440 model it is set to 229,229,229.

Hope this helps,
 
Last edited:
Imported FSX CV-440 (previously converted using an old version of MCX from my FS9 model) and Exported to FS9:
1. The plane is transparent and not reflective.
2. At night the areas of the Light Map that have a black alpha channel (i.e. controlled by the main light switch) are transparent in the model.
3. The specular color is set to correctly to 55,55,55 upon import.
4. Visibility conditions and animations seem OK.
 
Note that the above results were obtained Importing “naked” MDL files - no textures were loaded with the plane. I will repeat these tests loading the aircraft.cfg files instead later today after I set up the required model folders and cfg file edits.
 
I checked all three cases Importing the planes using the aircraft.cfg file. Everything is identical except when doing FS9 to FSX (the first one listed) the control surfaces and still props are animating correctly, no flicking to the center. I can't tell about the blurred props since their animation is rather odd anyway.

Hope this helps,
 
Last edited:
Hi Tom,
I loaded my CV-340 model when I saw that. There seems to be some problem with that animation as compared to the others, so I dropped it. As you say the CV-440 c_wheel animation seems OK.
OK, that was the FSX or FS2004 CV-340 that you loaded? I tried the FS2004 one, but I did not see an issue with the nose wheel animation in that one.
Converted the FS9 CV-440 to FSX:
2. The plane is not reflective - the Reflection Scales in the materials are set to 0, I usually set this to 0.8.
In the MCX preview you mean I assume or also in the sim? I was already wondering what a good default value would be. MCX used a default value of 100 before, but that gave too much reflection.
3. The Specular color is set to 0,0,0 upon import. Since there is no specular texture in FS9 aircraft, this results in little sun reflection. I usually set this to 55,55,55 for FSX export, this FS9 model is set at 229,229.229.
Let me check, but I think that specular color value is coming from the FS2004 MDL file.
4. The Visibility Condition is set in the SceneGraphNode and not in the ModelPart. This does not work - the condition must be set in the ModelPart (and not needed in the SceneGraphNode). Thus all three props (for example) are visible all the time.
I had some issues before that the prop animations and visibility conditions got detached from each other. That gave issues when I exported the DC-6B to a FS2004 MDL file. To solve that I kept them together now. But I think you are referring to FSX export here and you mean the visibility conditions are not working correctly in that case. So I guess I need to change this again.
5. The blurred prop and glass textures, while not set to be reflective (good) are not set for transparency.
Let me check why that is. I believe that used to work before, so maybe the changes I made for the reflection have something to do with this.
6. The Animations seem to be incorrect - most flick to the center at some point in the animation (control surfaces, props).
Let me see if I can reproduce that somehow, althought I am not sure how hard that will be.
Imported the FS9 CV-440 (and DC-6B) and Exported to FS9:
2. At night the areas of the Light Map that have a black alpha channel (i.e. controlled by the main light switch) are transparent in the model. This does not happen in GMAX created models.
OK, let me check if the texture is exported as a night map or a light map. That might be the difference.
3. The specular color is set to 0,0,0 upon import. In the CV440 model it is set to 229,229,229.
You mean that MCX does not read the specular color correctly as it should be different?
Imported FSX CV-440 (previously converted using an old version of MCX from my FS9 model) and Exported to FS9:
1. The plane is transparent and not reflective.
Did the FSX model have the specular texture set? Even though the FSX material might have disabled the use of the alpha texture with the blend mask, when exporting to FS2004 that has no effect.
 
So a question without taking over all of Tom's great digging here.

I have so far been playing with AI aircraft. Successfully (and easily) converted FSX model to a FS9 AI model. First issues was the night textures (not light map) and that was resolved by removing the automatically generated tag in the emissive box in the material editor which made _LM tagged texture. I removed that entry because then at night when static it was just a black modeled airplane (no livery). At night then with the plane 'powered up' I can not yet get a lightmap to display. Meaning no lights on the cabin windows or tail logo/landing light splashes. I know that FSX and further models changed how they are displayed and just wondering if there is something in the material editor or somewhere else that I need to change to fix. Maybe a naming issue but I am using the same name from the original FSX model so I doubt it. Pretty sure I have the Alpha channels correct as well. Any ideas would be appreciated. Thank you!

Yes there are some limitations in the conversion (Wingflex and control surfaces still or not flexing being one of them) but so far I can live with that.



Greg
 
Hi Tom,

OK, that was the FSX or FS2004 CV-340 that you loaded? I tried the FS2004 one, but I did not see an issue with the nose wheel animation in that one.
That was the FSX version. MDL file attached. It started out as an FS9 model I converted to FSX using the old MCX. It originally used c_wheel in the FS9 model. I don't know why MCX created a custom animation for it.
In the MCX preview you mean I assume or also in the sim? I was already wondering what a good default value would be. MCX used a default value of 100 before, but that gave too much reflection.
It was not reflective in FSX, due to the Reflection Scale being set to 0. I use 0.8 which seems to give about the same amount of reflection it had in FS9 (but quite inferior in appearance in my opinion). It uses a non-default environment file, globalenv_ac_chrome.dds.
Let me check, but I think that specular color value is coming from the FS2004 MDL file.
The DC-6B model is set for 229,229,229 in GMAX, as are most of my planes. When I load it into MCX it displays 0,0,0 in the material editor.
I had some issues before that the prop animations and visibility conditions got detached from each other. That gave issues when I exported the DC-6B to a FS2004 MDL file. To solve that I kept them together now. But I think you are referring to FSX export here and you mean the visibility conditions are not working correctly in that case. So I guess I need to change this again.
That apparently works fine for FS9, but not for FSX.
You mean that MCX does not read the specular color correctly as it should be different?
Yes.
Did the FSX model have the specular texture set? Even though the FSX material might have disabled the use of the alpha texture with the blend mask, when exporting to FS2004 that has no effect.
No, the Specular Texture slot is blank. I don't know why there needs to be anything there? It has nothing to do with reflection, I believe?

Thanks,
 

Attachments

Back
Top