FSXA Blinking BGL Lights?

#1
Hello together...

I'm currently building a approach system.
Therefore i'm using BGLlights, they work not bad so far, but if i look at them at dawn/night/dusk they're blinking. :confused: They look good during day.

I took a short video to show you what i mean:
http://www.youtube.com/watch?v=s0Hmqxj_wWg

Is that a known issue of BGL-Lights or am I just doing something wrong? :rolleyes:


This is the code i'm using for the lights, i didn't tweak anything, except removing the lines with IFMSK... and nolgt_1...
Code:
approachlight_MasterScale_2 label BGLCODE

    BGL_LIGHT LIGHT_NAV, -1.817, 6.350, -0.136, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 1
    BGL_LIGHT LIGHT_NAV, -0.017, 6.350, -0.136, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 2
    BGL_LIGHT LIGHT_NAV, 1.783, 6.350, -0.136, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 3
    BGL_RETURN

bgl_riff_end_approachlight	label	BGLCODE
I searched already in the Wiki and the forum, but i couldn't find anything related to this.

It's really a pity that they look fine during day, as thats the time where they won't be used.

Thanks for you help
Stoll
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#3
Hi,

I can't remember I have seen this issue before. I would try two things:

  • Are you using DX10 mode in FSX? Ifso, try without it can give strange results.
  • You are not using LIGHT_NAV as the type, you might want to try another type (although I must say using LIGHT_NAV is most common).
 
#4
Hi arno

Thanks for your answer.
Well, that's really weird. I've already tried your suggestions, but also with DX10 off etc. the lights were "blinking".

And then, you start your FSX again after a few days again and the lights are perfect. :confused: :)

I really don't know what caused them to blink, but they are fine now.
 
#5
I hope you don't mind if I add another question.

I'd like to add the BGLlight to a 3D model of an approach light.
However, the BGLlight is correctly placed in gmax, but when loaded in FSX, the light is offset.




If i use a box hidden under the ground instead of the approach light, the BGLlight is correctly placed.





The .asm code of the light however is exactly the same.

3D-approachlight model:
Code:
lamp_green_MasterScale_2 label BGLCODE
	BGL_LIGHT LIGHT_NAV, -0.017, 0.440, 0.017, 20, 0.60, 0.40, 0FF00FF00h, 0.000000, 0.000000, 1.000000 ; source poly num = 1021
BGL_RETURN
simple Box instead of the approachlight:
Code:
lamp_green2_MasterScale_2 label BGLCODE
	BGL_LIGHT LIGHT_NAV, -0.017, 0.440, 0.017, 20, 0.60, 0.40, 0FF00FF00h, 0.000000, 0.000000, 1.000000 ; source poly num = 13
BGL_RETURN
I'm trying the whole day to get the BGLlight aligned with the model, without sucess. :whiteflag
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#6
Hi,

Do you have transparency or animations in your object? I have seen bugs before in such cases with parts getting an offset because of the drawing order and those transformations.

If you can show me the total _0.ASM file I can see if this situation applies.
 
#7
Hi Arno

There shouldn't be any transparency or animations.
I modelled the light in 3dsmax, maybe something went wrong when importing/exporting it into gmax.

I've attached the _0.asm file below.

Regards
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#8
Hi,

At the top of the BGL section you find this code:

Code:
; NonAlpha
lamp_green_NonAlpha label BGLCODE
    BGL_CALL_32 lamp_green_MasterScale_1        ; Node 1 - MasterScale

; Alpha
lamp_green_Alpha label BGLCODE
    BGL_CALL_32 lamp_green_MasterScale_2        ; Node 1 - MasterScale
    BGL_END
    BGL_RETURN
I would try to change it to this:

Code:
; NonAlpha
lamp_green_NonAlpha label BGLCODE
    BGL_CALL_32 lamp_green_MasterScale_2        ; Node 1 - MasterScale
    BGL_CALL_32 lamp_green_MasterScale_1        ; Node 1 - MasterScale
    BGL_END
    BGL_RETURN
I think that should fix the offset, since the code in MasterScale_1 applies some transformations. If MasterScale_2 is done afterwards it is affected by it.

If you can see the light properly I am not sure, it seems to be inside your object. So if nothing is transparent I am not sure if it will display correctly. But that is another issue :D.
 
Top