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

Experiences with FS2004 aircraft import/export

I need to ask a question.
When converting a P3D to FS9 I found some anomaly but I am not sure if it is an FS9 thing or an MCX thing. Can anybody help?

OK, so I am trying to attach a light effect to a moving part. This works quite simply.
However a tester reported that the the taxi light did not appear on the second and third aircraft of the same type in the stream. Quite obviously it was a LOD thing.
So, I created two duplicates AttachedEffects and attached them to the 100 and 50 LOD items in exactly the same place. So all three LODs would have the same effect in the same position.

It sounded logical. unfortunately the export did not work as thought. Some were removed but not the same ones each time.

So I attached the effect which has a LOD setting of -1 to the SGN for the entire undercarriage, which also had a LOD setting of -1.

This had the effect of consistancy across mdls BUT the original problem was still there.


So the question is, can you assign AttachedEffects to each LOD or not in FS9?
If you can, am i being a complete klutz or is it an issue created by the MCX or is it a limitation of an FS9 model?

I should clarify that the mdl being amended has already been converted from P3D to FS9 and is being modded in the FS9 state.

Any info would be appreciated.
 
Ive never used MCX for that, but when creating AI aircraft in GMAX I would assign them to the main model (your -1 model) and that seemed to work OK. I’ve never checked them in a long string of planes though.
 
It could be that FS9 only displays them for a certain distance from your plane?
 
Hi Tom,
It could very well be that FS9 is the issue.
We know the limitation that light definitions in the .cfg have to be static, so the ability of assigning converted AttacheEffects to a moving part is appealing in these situations.
It could very well be that I am the only idiot to try this sort of thing.

This is a case of trying something to see if it works, and asking questions to see if I have it the best that it can be. I hope that either it is a bug that that can be fixed or that I am doing it wrong.

From what I am lead to believe is that the visual effect is now where near the distance that the static effect would show up for.
 
I don’t have a lot of experience with that since I used fixed lights for almost every AI plane I created, even if they were retractable. None were on a gear leg though.
 
Hi,

I know that in the FS2004 MDL code the lights are present for each lod separately. On import of a model MCX filters out the duplicate ones as else they would multiply again on export. So on export I only write one light to the X file as Tom already said.

Be aware that not all light effects are exported. It seems for FS2004 aircraft files you can't attach effects, it will crash makemdl. Instead some types are mapped to bgl lights. These are defined in the light_mapping.ini file of MCX. Other effects are just skipped on export.
 
I have done some testing, or to be more accurate I have a Guinea Pig that is testing, and he reports that the taxi light only only shows up when you are close to the aircraft.
I have asked him for one more test where I have tried to be a bit cunning. I will report back when every option is exhausted.

Arno, I am aware of the light_mapping.ini file and have been trying to manipulate it. The two effects are the only two that are left after the export to FS9 and re-import of the FS9 mdl. Taxi Light and Landing Light. So whilst you are are absolutely right to mention the side effects there I don't believe that it is a factor in this case.

From what I understand, it would seem that the effect only shows up when you are close to the model and it disappears when you move away. It seems similar to it being a one LOD effect rather than applicable to all. When I select each LOD the effects are there, and attached so it gives the impression that the LOD -1 is working, it is just that the effect only seems to work for largest LOD.

The original P3D mdl only has one effect in each location so the dumping of duplicates should not be an issue, but it is complicated by it not liking an effect attached to each LOD.

Will report back if I find anything out, unless anybody has any ideas to try.
 
Let me know what the testing result is. If it really correlates with the lod switching I'll have to check if I write the x file correctly.
 
Arno,
As I have the x files saved from the latest test could you confirm what you would look for in the x file. Is it the AttachPoint name e.g. attpt_light00, the effect name e.g. fx_landing, the visibility condition e.g. light_landing_vis or something else.

Maybe I could do some easy checking to see if we can rule something in or out.

On this particular model the MCX viewer displays LODs of 201, 100, 50 and 10. In addition to those there are x files for 400 and 200 as well.
 
Since BGL lights are used there is no attachpoint or so. You should see parts with only a triangle that have a material name with the LIGHT_TAXI suffix.

For each LOD a X file is written, looking at the source code I think you should have the lights in all of the X files (not 100% sure).

Weird that you get additional X files for LOD 200 and 400, or are they for the interior model?
 
Yes I did post a link it's back on page 5 of this thread dated 9th Jan.

I guess really there are two separate but linked questions.
1. Why is it not being converted properly?
2. If the conversion goes wrong how do you get around it and reverse the animation?

I guess the reason that it took so long to see the issue is that tires spinning is an animation you can't see in MCX itself. Or can you?
I had a look at the Andover props now. I see what is the problem. The still props have no animation in the FSX model, but they have the prop#_still visibility condition. On FS2004 export they get the animation automatically assigned and since there is no animation in the FSX model they rotate around the center of the object. Let me see how I could fix this.
 
OK, I have some more info regarding the light effects.

Firstly, I should have clarified that all the work I am doing is for AI aircraft, so there is no interior model.

As you mentioned the additional X files I went back and loaded up the P3D model. It consists of 4 LODs - 400, 100, 50 and 10. The conversion creates 6x X files - 400, 201, 200, 100, 50 and 10.
The conversion creates an mdl with 4 LODs - 201, 100, 50 and 10. Incidentally, the log file indicates only 4x X files created - 200, 100, 50 and 10.

Now looking at the size of the X files the 400 and 201 are identical in size at 1091 KB whilst the 200 is only slightly smaller at 1090 KB.

So to an untrained eye something definitely feels out of whack there.

Now the mdl itself has just the two AttachedEffects after the conversion, which is what is wanted. Both using the same default effect, fx_landing. One has the visibility cond of landing_light_vis and the other with a cond of landing_taxi_vis.

Now the final test I left the two effects attached to the top SGN, which has LOD = -1, the AE's themselves have the same.

Now whilst moving through the LODs in the viewer the light positions are there in every LOD. However, when I also checked the 'Only show active LOD' option in the hierarchy Editor something became apparant. The AE's did not appear in the Editor in any LOD. Which would explain the situation seen in game.
They only appear, as do several other parts once the active option is unticked.

Now in the X files themselves. I searched for 'LIGHT_TAXI'.
In the 400.x there were 4 entries. 2x Material LIGHT_TAXI_mat10382 and 2x Material LIGHT_TAXI_mat10386.
In the 201x there were 2 entries. 2x Material LIGHT_TAXI_mat10394.
In the 200x there were 2 entries. 2x Material LIGHT_TAXI_mat10396.
There were no entries in either 100x, 50x or 10x.

Now if we take this at face value then of the 4 LODs that MCX says that the conversion has only the 201 has an entry for LIGHT_TAXI. This would seem to be consistent with what is seen in game.
I did check for LIGHT_LAND and found identical outcomes.

I guess there are a few questions that spring to mind here.
Firstly, why does the 400 LOD get dropped, as it seems to have the complete components?
Where do the 201x and 200x come from?
If it creates 6x X files, including two not part of the original mdl, why doesn't it compile them?

Why doesn't the log file show all of the work? Is the compile terminating early?

One last observation. I mentioned that the 400x and 201x files were the same size but it is obvious that they are different due to, at least, the LIGHT_TAXI and LIGHT_LAND differences.

Hopefully, this info is in a good order for you to follow. If you need anything else then please ask. If you need any files then please ask.

I am hoping that it is as simple as the compilation is not completing properly although it doesn't explain why the log has 200x but the mdl has a 201 LOD.
 
OK I think I have found the cause of the weird LODs thing. However, in fixing that I either stumbled upon another issue or I screwed something else.

What I found was the Option ObjectModel settings Level of detail. It was set to 100 and I altered this to 400.
Hey presto now what is created is 4 LOD's - 400, 100, 50 and 10 and the log file says that it created the 4 files.

The trouble is that now when I load that model in it shows LOD 400 but no others. So I had to reset it back to default.

I have no idea whether the two things are related or I have managed to break something.

I forgot to mention that I did check the new X files for LIGHT_TAXI and the only that had any enries was the 400x which had 2x Material LIGHT_TAXI_mat10382 and 2x Material LIGHT_TAXI_mat10386
 
Last edited:
Can you let me know which model it is? Then I'll try to reproduce it.
 
Sure, the link to the package is here F-16. Either the A or B, it doesn't matter. Those are the exact ones that I have been using for the testing.
 
I don't know whether this is correct or not but somebody on our forum mentioned that for FS9 you have to assign the effects to every LOD.

I just did another test and checked the outcome.
IF the information is correct then MCX dumps the duplicates and you only get the effect for one LOD. They weren't dupes in terms of name but they were in terms of position.
 
I don't know whether this is correct or not but somebody on our forum mentioned that for FS9 you have to assign the effects to every LOD.
I think that's what MCX does on export, the lights are supposed to be written in each X file.
I just did another test and checked the outcome.
IF the information is correct then MCX dumps the duplicates and you only get the effect for one LOD. They weren't dupes in terms of name but they were in terms of position.
In mcx only one light is shown, that's similar to how fsx handles it as attachpoints have no lod there. So on import the duplicate ones (based on position and color) are filtered out.
Also for the landing and taxi lights they need to be exported twice in the X file for the light to work. MCX handles that automatically.
 
If I follow you correctly, are you saying that MCX should duplicate the effect(s) to each X file but that it is not?

Forgive me if am not grasping it correctly.

To be sure I loaded a version of an F-16 version that was compiled for FS9, it was a joint project. The four lights, on that version, were all attached the the top SGN of the noseleg door.
They are not duplicated in anyway and the effect works across the LODs.

The link is here if you won't to use it as a reference.
 
I'll check the model you mentioned later to double check what is going on. There must be a bug somewhere.
 
Back
Top