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

Effects conditions (DAY/NIGHT)

Messages
96
Country
greece
Hello to all the good people here!

I am trying to build a big suspension bridge with a lot of lights to show during dawn/dusk/night only. I followed a few threads here mentioning that I need to attach an effect twice, once for night/day conditions and once for dusk/dawn, so I did that. Indeed it works, when you load a flight in day time the lights do not show.

However, when you switch time to dusk and the lights switch on, changing time to day again does not switch them off, they remain on. I also tried advancing time starting from day towards dusk. If the flight started at day, the lights switched on at dusk. Advancing time from dawn to day though did not switch them off.

It seems that the light will not go off is they go on once in a session. I'd appreciate your thoughts and input.
 
Try ending the flight then changing the time to daylight. I don't know for certain but maybe the effects don't get turned off if you change time in the flight.
 
Thanks! I suspected that and this is why I started a flight at dawn with the lights on and waited until it became day (with multiplied time to make it faster) but the lights never went off.
 
I just ran into a very similar problem. But in my case it looks like the condition parameters are ignored completely.
I set DAY=0;NIGHT=1 but the lights still remain on during day.

Any Idea what may have caused this?
 
Check my first post. As mentioned in several threads here also by Arno, you have to attach the effect twice, one with day/night conditions and one with dusk/dawn conditions. It will then not show as off if you load a flight during day, but if it is on and day comes it will not switch off.
 
Why would you want to simulate flight at the same bridge for the duration of time that it takes for the effect to fail to simulate reality.
 
Hi Dimus:

IIUC, the light Effect(s) are "attached" via a AttachPoint on a MDL rather than via a stand-alone BGLComp-XML type "placement" BGL ? :scratchch

Regardless, did you use a 2-Fx-file strategy, so the Fx file "attached" or "placed" is actually a 'Controller' that "calls" the 'Basic' Effect ?


Perhaps the higher FS simulation rate speed test scenario you described above- (especially if loaded from a saved flight when FS has been allowed to use a "default flight" so it engages Windows' optional SuperFetch feature on top of Windows' default PreFetch engine, thus loading FS and saved flights faster-) might prove to be quicker and easier to test with, since one can observe Effects over a entire FS run time 'day' ...within a shorter period of elapsed 'real' time. ;)

If you have not seen this info already, you may wish to review this thread: :idea:

http://www.fsdeveloper.com/forum/threads/effectparams.426780/



BTW: If you have not encountered this info elsewhere yet, also be aware that for accurate testing, when any new Effect file is added to- or any Effect file is edited within- the Fx file location in [FS install path]\Effects sub-folder, a full re-start of FS is required ...prior to any subsequent flight session (whether at a normal or alternate 'simulation rate').

Note that this means each and every Fx file edit must be 're-processed' via a full FS re-start in order to be displayed. :alert:

This is so that the new or edited 'Effect' Fx files can be read and their code pre-processed by the FS scenery loading rendering engine; then- and only then- any such new or edited Fx files are able to be displayed by the run time FS scenery rendering engine. :pushpin:


Hope this helps ! :)

GaryGB
 
Last edited:
Regardless, did you use a 2-Fx-file strategy, so the Fx file "attached" or "placed" is actually a 'Controller' that "calls" the 'Basic' Effect ?
GaryGB
Please be so kind as to review the Microsoft ESP SDK article titled "Creating Special Effects." You will see that the effect controller does not actually control the time of day for an effect, nor is it required to invoke a single effect. Controllers are for multiple linked effects, like fireworks. What is required to render an effect within the simulator is an attach point to a .bgl, either a placement .bgl or an object .bgl. It is in that operation that relative values are assigned to the effect, such as when and where to appear. The link Gary included explains very well the nuances of the dawn/dusk, day/night parameters, but it mentions nothing of an equally valid parameter, HOD, that specifically triggers the hour of day to start and end the effect. Using the "calendar" parameters (month-of-year, day-of-month, second-of-minute) one can specify a particular effect to activate one single time on one single day of the year and any multiple beyond that. Whether this parameter is subject to the same night to day glitch described above is untested by me.

Ultimately however, the platform is a flight simulator, as opposed to a reality simulator. All of these effects and parameters are intended to support the illusion of real flight and not to substitute for reality.
 
Hi Dimus:

While the above linked Microsoft ESP SDK article titled "Creating Special Effects is indeed a very informative and valuable reference, you may also wish to refer to the "Using Modeling Tools" SDK document for some example Effect-related coding which utilizes the "HOD=" (aka "Hour Of Day=)" and related parameters:

https://msdn.microsoft.com/en-us/library/cc526976.aspx#TheAttachTool


NOTE: Although Rick describes the HOD= parameter option as "an equally valid parameter," one must take care to not utilize it in combination with the "higher-precedence" ex: "DAWN," "DAY," etc. parameters ... as discussed under "Notes: Parameter Precedence" ...in the above linked "Creating Special Effects" SDK document. :pushpin:


FYI: In the event that you opt to utilize a AttachPoint on a MDL rather than via a stand-alone BGLComp-XML type "placement" BGL, you may save some work and time re-exporting a MDL and placing it inside a scenery object library every time you edit the 'Effect' *.Fx file during testing ...by attaching a "controller" *.Fx file rather than a "Basic" or other 1-piece *.Fx file to your 3D model. ;)


PS: Be sure to use MIPMAPS with your Effect light textures ! :alert:

http://www.fsdeveloper.com/forum/threads/flood-lights-effect-visibility-problem.430877/


Hope this helps a bit more ! :)

GaryGB
 
Last edited:
I create effects regularly for commercial clients. I have created a convincing sand storm effect, strobe style airport marker lights and if a popular publisher ever releases their ground services addon, the fire retardant spray foam effect you will be able to see was authored by me. I don't just read and write about these things and then make big posts filled with unrelated links that confuse people.
When we ask the OP if he "used a 2-FX file strategy" we imply that it is a requirement. It is not and the implication only confuses the issue. I do not need an effect controller to create and edit effects. The whole idea of setting one up for testing would be more effort than I would want to endure -- but thanks for the idea. I use the .fx tool from the drop down menu. I create and edit the effect in the simulator environment and when I feel it is ready, I place it in the scenery using Instant Scenery.
The OP does not appear to have issues with placement or controllers, the OP has issues with the parameters that control visibility conditions and nothing about anything the OP has written gives the impression that he is creating his own effect bitmaps. I rarely edit bitmaps when I create new effects, but the OP is not even suggesting doing that. Information about mipmaps that control visibility will not solve parametric visibility condition issues and the original poster can rest assured that his effects already have mipmaps and he does not have to check for the existence of them.
 
Thank you all for your replies. This is the first time I use effects in modelling so I do need to study the SDK and your suggested links. Indeed, I used effects that were already in the FSX "Effects" folder (Hazard lights), of which I copied the fx file, renamed it and only fiddled with the color settings in the fx file to create yellowish white, red, and green hazard lights. I then attached them in my mdl using MCX and defining location and parameters. I did create duplicate effects for DAY/NIGHT and DUSK/DAWN parameters.

Rick, I agree the fact that lights do not switch off when day comes is not major and I can live with it. The "only problem" would be when someone is flying over the bridge at the exact time when ground night textures switch to day and the lights stay on. Not an issue really, I just wondered why this happened and if there was a way to correct it. Do you think using HOD instead of DAY/NIGHT DUSK/DAWN would work better? If it did then I would have to pick hours that would be OK as an average for all seasons. I will try it.
 
This is my point: it is a simulator. To be entirely honest, I never explore these parameters. I would say it is because they don't matter, but the truth is that there are factors and settings that matter a lot more - and I am constantly trying to perfect those. When I see the day start and the lights stay on I think, "if it was bright enough that the lights weren't needed, they wouldn't be visible," or, "maybe the guy had a bad night, is late for work and hasn't turned them off yet." The state of the lights does not diminish my simulation experience.

So, there are still two reasons to nail down the day/night condition and probably more. The first would be because it is a personal challenge, the glitch bothers many developers and to solve it would be a real accomplishment. The second reason would be to gain experience. You and I agree that there are a myriad of adjustments and settings one can apply to effects. This isn't the thread for going into it, but I can say the things I have discovered editing and using effects are - well, far more "effective" than one would expect. Effect manipulation is a real art, they are incredibly dynamic in terms of visual representation and the in-sim .fx tool makes it as fun and easy as playing with watercolors; enjoy.
 
Back
Top