• 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

tgibson

Resource contributor
Messages
11,300
Country
us-california
I imported the FSX L188 model into MCX and the taxi lights use a custom visibility condition, for some reason.

XML:
  <PartInfo>
    <Name>custom_vis_LIGHT_TAXI_00_mcx</Name>
    <Visibility>
      <Parameter>
        <Sim>
          <Variable>LIGHT TAXI</Variable>
          <Units>bool</Units>
        </Sim>
      </Parameter>
    </Visibility>
  </PartInfo>

In the resulting FS9 model the visibility condition is light_landing_vis, turning it into a landing light.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
If the visibility condition is not light_taxi_vis, then on export to FS2004 MCX will not be able to set the correct light type (taxi light) on export. But I would expect the light to be skipped completely, instead of becoming a landing light. I can check why there is a custom visiblity condition, as it looks a lot like the default one.

I have made good progress with the animations that are wrong as well. Only remaining issue is that on some models the prop direction is right and on others not. For example now the default Curtiss Jenny works fine, but the DC-6 not yet. So hopefully I can fix that tomorrow.
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
I believe you are detecting the reflective textures just fine - they all have specular textures listed in the materials, while transparent (or regular) textures do not. The problem is not the detection, it's the naming of the specular texture.

In the case of the L188 the converted plane's reflective materials list the old FSX specular texture in the specular texture slot - it needs to be the name of the diffuse texture instead. So if possible MCX should change that name from whatever it is (or from nothing) to the name of the diffuse texture if MCX detects that this material should be reflective.
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
Here are the results of my confirming my opacity results (or lack thereof):

The default 255;255;255;128

mcx_128.jpg


255;255;255;5

mcx_5.jpg


255;255;255;255

mcx_255.jpg


My current 50;50;50;25

mcx_50.jpg


Again, no effect changing the opacity value. I don't know how to check these values in the MDL files using MCX. The color and opacity of attachpoints are not listed in the Hierarchy Editor.

Hope this helps,
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
And I agree, the correct opacity values are being written to the X file, so I'm at a loss...

But comparing the landing light cube X file produced by GMAX with the L188 X file produced by MCX, the second and third lines of the landing light materials in the two X files are different. Second lines are 0 vs 50 and third lines are 0.9;0.9;0.9 vs 0;0;0.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
I believe you are detecting the reflective textures just fine - they all have specular textures listed in the materials, while transparent (or regular) textures do not. The problem is not the detection, it's the naming of the specular texture.

In the case of the L188 the converted plane's reflective materials list the old FSX specular texture in the specular texture slot - it needs to be the name of the diffuse texture instead. So if possible MCX should change that name from whatever it is (or from nothing) to the name of the diffuse texture if MCX detects that this material should be reflective.
So in FS2004 you can never have a seperate texture for that, it should always be the diffuse texture name if there is reflection present?

Because if I just take the diffuse texture while something else is listed it might not work, as the alpha channel of the diffuse texture should contain the reflection for it to work. So this might be a manual step that MCX can not take automatically.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
Again, no effect changing the opacity value. I don't know how to check these values in the MDL files using MCX. The color and opacity of attachpoints are not listed in the Hierarchy Editor.
OK, I'll have to check the ASM code generated by MakeMDL to see why the color from the X file is not taken over correctly.
And I agree, the correct opacity values are being written to the X file, so I'm at a loss...

But comparing the landing light cube X file produced by GMAX with the L188 X file produced by MCX, the second and third lines of the landing light materials in the two X files are different. Second lines are 0 vs 50 and third lines are 0.9;0.9;0.9 vs 0;0;0.
The second line is the specular power and the third is the ambient color if I remember correctly. But I am sure that I am missing something in the X file I write. I'll check.
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
Correct, FS9 does not allow a separate specular texture. In fact, I think those three numbers you say are the ambient color might be the specular color. That is all that is allowed in FS9 - a specular color and a specular power. I will need to compare the GMAX X file to the specular settings in GMAX to see where those numbers are in the X file.

The only reason you need to use the diffuse texture name in the specular texture slot is to trigger MakeMDL to make the material reflective instead of transparent. The diffuse texture is not used at all for the actual specular effect.
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
I have actually gone into this in a previous post. Here is the reference:


Refer to post #25 for the GMAX pic showing the relationship of the specular color and power, as well as the role of the specular texture slot to define a material as reflective - and nothing to do with determining the specular effect at all.

And refer to post #28 for a description of the location of the specular color In the X file.
 
Last edited:

tgibson

Resource contributor
Messages
11,300
Country
us-california
I have been thinking a bit more about the specular color and power. Since in GMAX this is handled material by material, it would be great if these parameters could be added to each FS9 material. MCX could start with some useful default value but the user could edit this. And something similar could also be used for the landing light color and opacity values in the attachpoint editor, with the default values the numbers in the lights INI file but again could be edited by the user attachpoint by attachpoint. Just a thought.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
Yes, of course. The user can always tune the values in the MCX editors. I hope to set default values that are a good starting point in most cases.

For example the lights are read from the MDL and then in the attached object editor you can tune the colors further. The INI comes into play when the lights are mapped to an effect and then back again to a light on FS2004 MDL export.
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
Great, that will be a great addition to the attached object editor, thanks. Looking forward to it.

And I see the specular color and power in the material editor now, I hadn't selected FS2004 in the drop down box and they were lost in the long list.

BTW, I assume that you should also mark FSX and later materials as reflective if the Blend Environment by Specular Alpha property is set to True, although I've never heard of anyone using that setting. Just to be complete. :)
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
BTW, I assume that you should also mark FSX and later materials as reflective if the Blend Environment by Specular Alpha property is set to True, although I've never heard of anyone using that setting. Just to be complete. :)
I'm not 100% sure. When that setting is enabled the the specular texture will contain the required information and that's not being used in FS2004. So it might give issues as the diffuse alpha might contain other information already.
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
I don't think the diffuse alpha can contain anything other than the amount of reflection or transparency? The only other choice in the Special Functionality section of the Material is Blend Diffuse by Diffuse Alpha, and I have no idea what that's for - it's not set to true when you choose Set Default Tranaparent. And if the author used the specular alpha for reflections instead, the diffuse alpha will most likely have a white alpha channel. So when converted to FS9 the user will then need to move that information from the specular alpha into the diffuse alpha.

But for that to work the material must be coded as reflective. As I said above, the specular texture is not used by FS9, so it doesn't matter what the FSX version of the specular texture contains. Therefore, this parameter set to True will only be used as a flag that the author intended that material be reflective. If so, then MCX needs to place the diffuse texture name into the specular texture slot, as usual. FS9 will use its global environment texture to actually create the reflections after the user has given the diffuse texture the proper alpha channel.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
OK, I'll investigate further.

This evening I have been trying to fix the animation issue first, as that is most important now. I think I have it fixed now. If all regression tests pass correctly, I will push a new release tomorrow morning.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
The new build with the animation fix is online now. I will continue to work on the other issues now.
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
Hi,

Getting closer. Using the FSX KBT Electra as my test, when converted to FS9 the still props are still a problem. While the still prop blades are now OK, the prop hubs (another part coded as still prop) are rotating in the Y axis so that's OK but their orientation is rotated 90 deg. off in the X axis (left/right axis line). The slow props are rotating in the Z axis, and all but the #2 blurred prop are the same.

However the wheels seem to be rotating properly now, at least at slow speeds.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
Ok, I'll check that. Glad to hear the other issue are fixed now.

I also got the file you mailed, thanks. Is this the same Electra that had the issue with the taxi lights?
 

tgibson

Resource contributor
Messages
11,300
Country
us-california
Correct.

I see that my reply might have been confusing. Just to clarify. still, slow, and blurred props all have issues.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,772
Country
netherlands
Ok, I'll check the different issues you reported for this model.
 
Top