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

MCX Spot Light FX Controller File Issue

Messages
7
Country
canada
I've discovered that spot light effects stop working when you move away from the object to some great distance, and then come back (in P3D, at least).

See this thread that explains the issue, and how to resolve: https://www.fsdeveloper.com/forum/threads/apron-light-effects-disappearing-solved.445678/

Net: We need to use FX controller files.


However, there are a couple issues with how MCX deals with controller files:

1) The generated cntrl_spotlight*.fx file references itself, instead of the fx_spotlight*.fx file. For example from cntrl_spotlightFFD1B264_150_0_60_2_0_0.fx:

Code:
[controller.0]
lifetime=0.0, 0.0
type=3
distance=10000.00, 10000.00
delay=10000000.00, 10000000.00
x offset=0.00, 0.00
y offset=0.00, 0.00
z offset=0.00, 0.00
effect.0=cntrl_spotlightFFD1B264_150_0_60_2_0_0, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00

2) The model directly references the fx_spotlight*.fx file, not the cntrl_spotlight*.fx file. Hence, I have no option but to use the CustomFileName option.

Furthermore, when I use "CustomFileName" and import the .bgl, it no longer recognizes the spot lights and instead just shows generic effects. This makes it impossible to make any tweaks to the spot lights inside of MCX. Also, in changing to a custom name, the "Rotation" properties became all borked for some reason (I can repro this behavior). Took be ages to figure this out, because - of course - I couldn't see the spot light in MCX!

To me, it makes more sense read the properties from the .fx file itself, instead of using the properties that are embedded the generated filename.

As an alternative, allow the Attached Object Editor to specify whether or not the fx_spotlight or cntrl_spotlight filename is used by the model.

Thanks.
 
Last edited:
1) The generated cntrl_spotlight*.fx file references itself, instead of the fx_spotlight*.fx file. For example from cntrl_spotlightFFD1B264_150_0_60_2_0_0.fx:

Code:
[controller.0]
lifetime=0.0, 0.0
type=3
distance=10000.00, 10000.00
delay=10000000.00, 10000000.00
x offset=0.00, 0.00
y offset=0.00, 0.00
z offset=0.00, 0.00
effect.0=cntrl_spotlightFFD1B264_150_0_60_2_0_0, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
This has been fixed in the last development release already. This only happened when you overwrite the default name.
2) The model directly references the fx_spotlight*.fx file, not the cntrl_spotlight*.fx file. Hence, I have no option but to use the CustomFileName option.
I think this is related to the issue 1, so please try in the new release as well.
Furthermore, when I use "CustomFileName" and import the .bgl, it no longer recognizes the spot lights and instead just shows generic effects. This makes it impossible to make any tweaks to the spot lights inside of MCX. Also, in changing to a custom name, the "Rotation" properties became all borked for some reason (I can repro this behavior). Took be ages to figure this out, because - of course - I couldn't see the spot light in MCX!

To me, it makes more sense read the properties from the .fx file itself, instead of using the properties that are embedded the generated filename.
I can put that on the todo list, but on the other hand when reading the properties from the FX file a user would not be allowed to change them as MCX can not safely overwrite the FX without knowing if other objects also use it. With the automatic names changing the parameters results in a different name. That's why it's implemented like this.
As an alternative, allow the Attached Object Editor to specify whether or not the fx_spotlight or cntrl_spotlight filename is used by the model.
There is a setting that controls if a controller file is used or not. But that is global and not per attach point.
 
This has been fixed in the last development release already. This only happened when you overwrite the default name.
I am using the latest development version, and I still see the same in the cntrl_spotlight file: it's self-referencing. This is with UseAutoGeneratedName=true
There is a setting that controls if a controller file is used or not. But that is global and not per attach point.
What's the setting called, and on what settings page? I cannot seem to find anything related to this.

Thanks.
 
I am using the latest development version, and I still see the same in the cntrl_spotlight file: it's self-referencing. This is with UseAutoGeneratedName=true
Did you download it again today? The new version with the fix was pushed online this morning.
What's the setting called, and on what settings page? I cannot seem to find anything related to this.
It's on the exported settings in the options. I'm typing this from my phone, so can't check the exact name now.
 
Did you download it again today? The new version with the fix was pushed online this morning.
Yes. Timestamp on files is 11/19/2024 12:02 AM EST. Here is a clip of the about box:

MCX_Version.JPG


It's on the exported settings in the options. I'm typing this from my phone, so can't check the exact name now.
Okay, I will see if I can find it.
 
I'll double check tonight if I can reproduce your issue.
 
Well, I must be blind, but I see no export setting that relates to effects, let alone an effects controller.
 
You can find the setting here:

1732046806321.png


But I was also blind when I coded this feature, as it was indeed quite buggy. The controller FX referenced itself and the X file also did not call the controller correctly. I thought I saw it working when I tested, but that was completely wrong (just the old FX being called). I have fixed those issues now, so in the next development release it should work OK.
 
I have no idea how I missed that. Time to visit the optometrist I suppose lol.

Thanks Arno for your quick responses. I'll report back once I try out the next development release.
 
A new development release is available now.
 
Back
Top