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

Effect LODs? Are they even possible?

RicherSims

Resource contributor
Messages
566
Country
dominica
After 3 days of reading here, I've successfully made my own runway and taxi lights using effects and I'm satisfied with the look.
My last issue is the biggest of them all: the dim lights as distance increases.
The wiki mentions adding brighter effects to different LODs, which makes sense in theory, but doesn't detail how this is done. I haven't found a thread that details this either.

I'm using MCX to generate LODs and also to attach my effect to my model. Problem is, after I generate and choose an LOD other than 100 to attach my effect to, MCX reverts to LOD 100 again. So I have no idea how to add a brighter effect to a lower LOD.
(Not sure if this should be in the MCX forum, please move if neccessary.)

Another possibility could be to use a controller to control the visibility of each level of brightness. For example the brightest at 3km-2km. The next from 2km-1km and the last from 1km-0m. But I've had limited success with the distance parameter as it only seems to control an outer limit for visibility (with the inner one always set at 0).

So, has anybody successfully made lights brighter using any of these methods?
 

RicherSims

Resource contributor
Messages
566
Country
dominica
So I'm assuming that its not possible... since 4 days and 60 reads later, nobody has replied.

Ok.

I got around the issue of brigthness by using a combination of BGL lights and effects. The BGLs give great visibility at distance and shrink to almost nothing up close, while the effects make things very pretty at a close distance.

I had originally used a package of someone else's (can't remember the name on this forum) FS9 BGL lights and they worked great.
However, I want to change the colour so I learnt about creating ASM code for my own lights.
I eventuallly got BGLC9 to output a light MDL which opens in MCX when you set Time of Day to 2,3 or 4. I can also attach them as library objects in MCX to a model runway light by referencing the GUID.
However they do not show up in FSX at any time of day.

I have confirmed that the library BGL containing the light models are in the active scenery folder. The object also shows up as correctly attached in MCX. So I assume the problem is my code. Would someone be able to identify what the problem might be?

Code:
db  'R','I','F','F'				; RIFF file identifier
    dd  bgl_data_end - $ - 4		    ; size of RIFF data
    db  'M','D','L','9'				; file identifire (FS9 model)

    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  'I','S','F','T'   
    dd  ver_end - $ - 4  
    db  "BGLC_9",0
ver_end label word       

bounding_box_riff_start	label	word
    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       


model_outside    label    BGLCODE
model_shadow label BGLCODE
model_inside  label    BGLCODE
exterior_riff_start_0 label BGLCODE
    db  'E','X','T','E'   
    dd  exterior_riff_end_0 - $ - 4
LOD_0L    label    BGLCODE

LIGHT_NAV_beta_top label BGLCODE

bgl_riff_start_LIGHT_NAV_beta	label	BGLCODE
    db	'B','G','L',' '
    dd	bgl_riff_end_LIGHT_NAV_beta - $ - 4
LOD_0_LIGHT_NAV_beta	label	BGLCODE

; Alpha
LIGHT_NAV_beta_Alpha label BGLCODE
    BGL_CALL_32 LIGHT_NAV_beta_MasterScale_1        ; Node 1 - MasterScale
    BGL_END
    BGL_RETURN


LIGHT_NAV_beta_MasterScale_1 label BGLCODE

    IFIN1 nolight, tod, 2, 4
    BGL_LIGHT LIGHT_NAV, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FFcccdaeh, 0.000000, 0.000000, 0.000000 ; Color is AB AB AB (rgb)
    nolight label word  
    BGL_RETURN


bgl_riff_end_LIGHT_NAV_beta	label	BGLCODE
exterior_riff_end_0	label	BGLCODE


shadow_riff_start_0 label BGLCODE
  db 'S','H','A','D' 
  dd shadow_riff_end_0 - $ - 4
SHADOW_0L label BGLCODE

Kill_Shadow_top label BGLCODE
bgl_riff_start_Kill_Shadow label BGLCODE
  db 'B','G','L',' '
  dd bgl_riff_end_Kill_Shadow - $ - 4

LOD_0_Kill_Shadow label BGLCODE
  BGL_END
  BGL_RETURN

bgl_riff_end_Kill_Shadow label BGLCODE
shadow_riff_end_0 label BGLCODE


bgl_data_end label     BGLCODE

Thanks in advance.
 
Messages
7,450
Country
us-illinois
Hello:

Arno, rhumbaflappy (aka Dick Ludowise) and others here are familiar with these arcane mysteries, and may take a while to reply if they are busy.

But don't give up, as Google Search and the FSDeveloper Search function will "shed more light" on your subject, eventually revealing additional secrets.


Perhaps these links might be helpful (if you haven't seen them yet):

http://www.fsdeveloper.com/forum/showthread.php?t=629&

http://www.fsdeveloper.com/forum/showthread.php?t=690highlight="light+point"

http://www.fsdeveloper.com/forum/showthread.php?t=6674

http://forum.avsim.net/topic/296289-looking-for-some-light-balls/


This thread may have some interesting and related info on other airport area night lighting and street lights etc. as well:

http://forum.avsim.net/topic/311168-fs9-autogen-issues/


Hope this helps ! :)

GaryGB
 
Last edited:

RicherSims

Resource contributor
Messages
566
Country
dominica
GaryGB thank you very much for the resources. Most of them I have already read. The first 2 gave great insight.

I believe I MAY have found my problem.
Using MDL Tweaker II to open my models and export the BGLC code, I notice that the hex values for my colours get converted to negative decimal numbers, whereas the others created by rhumbaflappy (I remember the forum name now), all have positive values.

Example: rhumbaflappy's green (hex: #00ff00) stays green (decimal: 65280)
However: my green (hex: #4eda57) becomes decimal -11609513 (which according to an online hex converter, is negative B125A9, a purple! :( )

The incorrect negative values are the only difference between rhumbaflappys compiled code and mine, and may be why nothing shows up in FSX. I have no idea how to fix it. Any ideas?
 

RicherSims

Resource contributor
Messages
566
Country
dominica
Scratch the previous post... the code is correct.

My GUIDs were not properly converted from the FS9 format to the FSX format. That's why they weren't showing up.
Thank you for your help again Gary.
 
Top