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

BGL Light em low visibility

Messages
53
Country
brazil
I made BGL Light for my scenery and I'd like to show them in low visibility. I know to place them in Dawn, Dusk and Night, but not in this condition.

How can I do?? It would be a condition display??

Thanks, Matheus Vallim
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,858
Country
netherlands
Hi,

Unfortunately there are no variables that the scenery can check that tell us something about the weather. So making an object appear based on the visibility is not possible.
 
Messages
4
Country
denmark
I am looking for a solution to this problem too. I can see that some airport sceneries contain custom built light that has this behaviour. But there seems to be no description of the required technique available neither from this site nor from Google in general.
So far I have tried to contact the authors of some of the airports that have this kind of light, hoping they will tell me how they did it. But I didn't get any replies yet. If I find the solution I will post it here.

Regards,
Frank
 
Last edited:
Messages
4
Country
denmark
I have done some further research on weather variables available for scenery objects, but the results are not good however. First of all I created some special scenery objects that can either show the value of one specific variable, or test all bglc variables from 0000 to 2FFE for a specific value. In the FSUIPC variables there are at least three variables containing information about the visibility: 04C0, 0E8A, and 0F8C. All three variables have a value of 300 if the visibility is 3 miles. So I tested all bglc variables from 0000 to 2FFE for a value of 300, but unfortunately none of them had a value of 300. This further seems to confirm that weather variables are not available to the scenery. Too bad really.

I also made another discovery about the airports that seem to have solved this issue. In all the cases it turns out that they are using a Scasm runway for the lighting system. The base Afcad runway has no lights, the Scasm runway has lights, but an invisible Surface (-1 or FF), and the custom surface of the runway is made with FS2002 ground polygons placed in the layers from 16 to 23. The taxiway lights may still be made with variations of BGL_LIGHT, but they are not turned on in the daytime during low visibility conditions.

Finally there is a performance issue: I made a complete custom lighting system with BGL_LIGHT implementing a lot of conditions and separation planes. The only problem was the fact they would not turn on automatically if there is a fog in the daytime. But it also really takes up a lot of frames, running around 20FPS. I replaced my own lights with the Scasm runway and now it is running at more than 40FPS. So I think I will go with the Scasm solution even though they are not placed quite as accurately as the custom lights.
 
Messages
3
Country
poland
Hi!

As I really wanted this to work, I've made a little module which keeps track of FS visibility and sets user_variable_5 LSB according if visibility range is below 6 miles. It clears the bit if visibility changes back. It is for FS2004 only and does not require fsuipc or any other modules.

It's updated once a second, and only if plane's lat/lon is within defined range so that it does not interfere with other sceneries. You simply put this module into Modules directory of FS9 and add an entry to svisibility.ini file:

LAT;LON;LAT_RNG;LON_RNG;NAME

Example:
Code:
[b]svisibility.ini:[/b]
50.07;19.78;2.0;2.0;EPKK

[b]lights_0.asm:[/b]
...
IFMSK CHECK_TOD, 031Ah, 01h
JUMP ShowLights

;check time of day
CHECK_TOD:
IFIN1 NoLights, tod, 2, 4

ShowLights:
BGL_LIGHT ..
...
NoLights:
...

Cheers,
Peter
 

Attachments

  • svisibility.zip
    42.5 KB · Views: 581
Messages
10
Country
brazil
Hello,
Could not understand very well your guidance.
Where I have to add that?

...
IFMSK CHECK_TOD, 031Ah, 01h
JUMP ShowLights

; Check time of day
CHECK_TOD:
IFIN1 NoLights, tod, 2, 4

ShowLights:
BGL_LIGHT ..
...
NoLights:


Ask an example with the ICAO SBRJ
 
Messages
3
Country
poland
Hi, I assume that you are familiar with hand modifying ASM files.. so once you've exported your model, you'll get two asm files.. Open the one with _0.asm postfix, and there you will have a few of BGL_LIGHT commands. If they are scattered all over the file try to group them together so that you don't need multiple conditional statements.. Once you got them, simply insert them between these commands:
Code:
IFMSK CHECK_TOD, 031Ah, 01h
JUMP ShowLights

; Check time of day
CHECK_TOD:
IFIN1 NoLights, tod, 2, 4

ShowLights:
[b]{INSERT THEM HERE}[/b]
NoLights:
 
Messages
10
Country
brazil
Thank you for your explanation.
I would be so?

Code:
SBRJ_iluminacaopista_MasterScale_1 label BGLCODE
    IFMSK CHECK_TOD, 031Ah, 01h
    JUMP ShowLights
    ;check time of day
    CHECK_TOD:
    IFIN1 NoLights, tod, 2, 4
	ShowLights:
    BGL_LIGHT LIGHT_NAV, 24.920, 0.100, 52.098, 20, 0.60, 0.40, 0FFFFBF00h, 0.000000, 0.000000, 1.000000 ; source poly num = 1

    BGL_LIGHT LIGHT_NAV, 24.920, 0.100, -15.724, 20, 0.60, 0.40, 0FFFFBF00h, 0.000000, 0.000000, 1.000000 ; source poly num = 2

    BGL_LIGHT LIGHT_NAV, 24.920, 0.100, -58.887, 20, 0.60, 0.40, 0FFFFBF00h, 0.000000, 0.000000, 1.000000 ; source poly num = 3

    NoLights:
    BGL_RETURN


bgl_riff_end_SBRJ_iluminacaopista	label	BGLCODE
 
Messages
61
Country
italy
Mod kind request!

Hi Peter,
very useful module; I'm considering using it to support
a new freeware scenery.
Unfortunately it fights with Arno's ActiGate (also used to
detect rain/snow) as you selected usrvr5 BIT0 (LSB) that
Arno already used for the "parking brake set" indication.

So, is it possible to modify svisibility.dll to set the
MSB (or one of the 6 MSB) that is/are unused by ActiGate?

Also, can you consider setting the visibility limit to 3.00 NM
as this is the limit that usually is defined "LowVis"?
(Another choice could be to use 2 bits, 3 and 6 miles)

Thankyou very much

GianP
 
Last edited:
Messages
3
Country
poland
Hi!

Sorry for such a late reply.. I wasn't here for a while.. I'll compile modified version, and I think I'll use two bits.. one for 6nm and the other for 3nm visibility.

It's done now.. it uses the MSB 0x8000 of user var 5, and you can specify minimum visibility in the svisibility.ini for your lat/lon range.

Example:
50.07;19.78;2.0;2.0;EPKK;3.5

=> 3.5 nm limit
 

Attachments

  • svisibility.zip
    42.3 KB · Views: 510
Last edited:
Messages
61
Country
italy
Hi Peter,
many thanks and Marry Christmas!

I've done a quick test of the new version.
Unfortunately it looks like Arno's ActiGate is getting in the middle again by keeping the bits it doesn't use to zero! So, looking at usrvr5 with FSInterrogate, the MSB is now going up and down - gee!!

Also, (less important) it looks like the customizable visibility parameter in the .ini file isn't working. The bit is on when the visibility is 5NM and off when it goes to 10NM. (up to now I've checked with the "User-defined weather" only set to 2.8 or 3.5)

I'm trying to involve Arno in this metter, hoping he's not fully devoted to X now!

Thanks again, cheers
GianP
 
Top