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

Lights in Scenery

Status
Not open for further replies.
Messages
120
Hi Stevo,
Color and brightness are dependent on each other. When you change color - you change brightness and vice versa, although different colors of same brightness exist as well. A color is defined by amount (brightness) of basic color components (RGB in our case). On the other hand brightness can be roughly calculated as an average of basic colors amounts as follows:

L=(R+G+B)/3

where L is brightness; R - amount of red component; G - amount of green and B - amount of blue. As I said, this equation is very rough because it doesn't takes in account sensitivity of human eye to different wave lengths (i.e. colors), which is significantly higher in green area than in red and blue.

To your second question. Add IFIN1 command as follows:

db 'R','I','F','F'
dd bgl_data_end - $ - 4
db 'M','D','L','9'

db 'M','D','L','H'
dd visual_model_header_end - $ - 4
dd visual_model_header_end - $ - 4
dd 0
dd 0
dd 2
dd 0
dd 0
dd 156
db 'F','S','8','0'
dd 2304
visual_model_header_end label dword

db 'B','B','O','X'
dd bounding_box_riff_end - $ - 4
real4 -100.000, -100.000, -100.000
real4 100.000, 100.000, 100.000
bounding_box_riff_end label word

db 'E','X','T','E'
dd exterior_riff_end_0 - $ - 4
db 'B','G','L',' '
dd bgl_riff_end_DicksLight - $ - 4
IFIN1 bgl_riff_end_DicksLight, tod, 2, 4
BGL_LIGHT LIGHT_TAXI, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
bgl_riff_end_DicksLight label word
exterior_riff_end_0 label word

bgl_data_end label word
 
Last edited:
Messages
383
Country
unitedkingdom
Cheers Stranger

Thanks thats a great help :) Sounds like you know your colours ;)

I'll give it a go

Stevo ;)
 
Messages
12
Country
italy
Stranger said:
The 000FFFFFFh hex number in BGL_LIGHT command is RGB intensity. To reduce brightness to about a half of original use 0007F7F7Fh value instead. By using of different values for Red-Green-Blue you can adjust light color. For example 000FF0000h will result pure red light.

About what's quoted above, I'd just need to check if what I've thought about conversion from RGB decimal values to HEX is the right thing.......I'm not so familiar with high-end mathematics.... :eek:

Once it's assumed the HEX color statement must be always started with '000', then color's RGB values are given by the usual three values, expressed in HEX and 'writtenalltogether', then the statement must be always terminated with an 'h', so that BGLC_9 knows it's an HEX value.
So a 255, 0, 0 red will be 000FF0000h as in the example above, a 0, 0, 255 blue will be 0000000FFh, 00000FF00h is a full bright green, 0007F7F7Fh is a midtone grey and so on........have I got it right?
 
Messages
12
Country
italy
Not to answer to myself but.......I'm afraid I haven't got it fully right.
Here's what I've found into another file I've generated........
Code:
0FFD5C34Ah
'D5C34A' is a 213, 195, 74 midtone yellow, but what the 'FF' at the second and third digits does mean? :confused:
 
Messages
120
Do you talking about BGL_LIGHT color? There are several representations of color value probably dependent on macro in which they are is used:

R,G,B
R,G,B,A
R,G,B,Bright
R,G,B,A,Bright
UNICOL32
 

arno

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

If I remember correct the order is ABGR (the reversing is due to the byte order in the hex format). So the first are indeed the alpha component of your color.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Could very well be that it has no use :). I did some tests with the light parameters a few years ago and a lot of them have no effect. But I can not remember if the alpha was one of them.

From the file format point of view it is logical to include the alpha. Without it you would only have 3 bytes for the three colors, but now you have 4 and that fits nicely into an integer :).
 
Messages
12
Country
italy
I removed the 2nd and the 3rd digit from the color expression (i.e. I removed the alpha information - 000 instead of 0FF) and nothing seems to be changed.
Maybe the alpha information is used in some way to control the opacity of the light?.........Stupid question indeed.........If it should be that way, then I should have got totally transparent lights when I switched to 000, since '00' should correspond to a full black alpha.......if that's the way it's intended to work...... :confused:

Btw: is there a way to control light's brightness and to increase their visibility range (not meaning here the 033B conditional branching)? I'm sure this has been answered somewhere else yet, but this forum is so wide........ :eek:
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
raf777 said:
Btw: is there a way to control light's brightness and to increase their visibility range (not meaning here the 033B conditional branching)? I'm sure

Nope, the brightness is one of the other parameters that doesn't seem to work :). The maximum distance is hardcoded in the scenery engine somewhere, as you can't seem to increase it.
 
Messages
12
Country
italy
Sad to hear that Arno, even if seems so stupid - on MS's end - not to have provided a way to control such 'elementary' parameters like brightness and visual range (ok, we have the 033B variable for this, but it can be used to only reduce the visual range, not also to increase that.......) :(

About the idea to resize the scale parameter in the XML wrapper in order to affect the light's intensity (just read it into another thread), this may work for single lightpoints only (I haven't tested it yet), not also for multiple lightpoints combined within the same file (think to a PAPI), because the scale will also affect the distance between the ligtpoints, their height AGL etc.
Maybe this can be 'tricked' altering the distances between the points and their height AGL in Gmax, so that, if we'll apply a "0.5" scale factor to decrease light's intensity, we'll have to double all of the measures in Gmax.
 
Messages
180
Country
belgium
Hi

just a question. I saw a movie where LIGHT_NAV was used for the rwy lights, approach etc, so is there a way that I can place the mdl or bgl into Gmax so that I can place them at the correct heigt om my lights poles and also the correct place (middle of the pole). If there is a way pls let me know.

Regards Jessy
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
The position of your dummy box that you give the LIGHT_NAV material determines where they are drawn. So if you place that one at the correct altitude and position before exporting from GMax it should work.
 
Messages
180
Country
belgium
@ arno

wait, dummy box? material? I'mm still quit new to SD so what si that dummybox and what material shiuld i give it?
 

arno

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

Well, you started to talk about positioning the BGL_LIGHT lights, so I assumed that you knew at least how to create one. Have a look at the MakeMDL SDK.

What you do to create such a light is:
  1. Make a simple box, the origin of it will become the position of your light
  2. Create a material that has the name light_nav, the color determines your light color
  3. Apply this material to your box and you are ready!

PS. When using the Fs2004 gamepack you need to tweak the resulting MDL file for the lights to show. MDL Tweaker II can do this for you (but this thread also discusses how to do it manually).
 
Messages
180
Country
belgium
hi,

got a new prob, MDL tweaker gives me an error upon opening the dummy box

error in procedure timerpreview_Timer of form frmPreview

what to do?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Could you please post trouble related to a tool in the correct forum? This thread is not about MDL Tweaker and because this is a very long thread already it should not go that much offtopic (else nobody can follow it anymore).

About the question, are you sure you are using the latest version? Errors like that should have been solved in it.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
I have closed this thread, as it is going to much offtopic from the origional question. If you have more questions about lights, feel free to open a new topic. We'll keep this one as a good source of information.
 
Status
Not open for further replies.
Top