Lights in Scenery

Status
Not open for further replies.

rhumbaflappy

Moderator
Staff member
Resource contributor
#1
Hi all.

A long post concerning the use of lights in scenery:

As far as the sim goes, there are only 2 types of scenery lights… a spotlight and a glowing ball:

BGL_LIGHT LIGHT_LANDING, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0; 000FFFFFFh is the color ( white in this case )
BGL_LIGHT LIGHT_NAV, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0; the color is the only variable used

The difference between strobe, beacon, and nav is that strobe and beacon have conditional display added. There appears to be no difference between taxi and landing lights. Color is the only variable used.

Taxi and landing lights point horizontally, and to the north by default. That can be changed by a transformation in the MDL to have them pitched 89.99* down.


Here’s a downward pointing spotlight. I made the transform for -89.99 degrees along the X axis, pitching it downward. Taxi could have been the type, with no difference in the sim:

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
bgl_riff_start_Light01	label	BGLCODE
    db	'B','G','L',' '
    dd	bgl_riff_end_Light01 - $ - 4
LOD_0_Light01	label	BGLCODE

; Alpha
LIGHT_TAXI_beta_Alpha label BGLCODE

    ; Node 1 - MasterScale transform:

     BGL_SET_MATRIX_INDIRECT	0
    BGL_CALL_32 LIGHT_TAXI_beta_MasterScale_1        ; Node 1 - MasterScale
    BGL_END
    BGL_RETURN


LIGHT_TAXI_beta_MasterScale_1 label BGLCODE

    ; Node 2 - MasterUnitConversion transform:

     BGL_SET_MATRIX_INDIRECT	1

    ; Node 3 - RotateAroundX transform:

     BGL_SET_MATRIX_INDIRECT	2

    ; Node 4 - LightCone transform:

     BGL_SET_MATRIX_INDIRECT	3


    BGL_LIGHT LIGHT_TAXI, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FFABABABh, 0.000000, 0.000000, 0.000000 ; Color is AB AB AB (rgb)

    BGL_RETURN


bgl_riff_end_Light01	label	BGLCODE
;
; STATIC ANIMATION BLOCK
;
static_matrix_list_riff_start_Light01	label	word
    db  'T','R','A','N'   
    dd  static_matrix_list_riff_end_Light01 - $ - 4

; Static matrix parameters for transform: 0
    real4      0.000997,     0.000000,     0.000000,     0.000000  
    real4      0.000000,     0.000997,     0.000000,     0.000000  
    real4      0.000000,     0.000000,     0.000997,     0.000000  
    real4      0.000000,     0.000000,     0.000000,     1.000000  

; Static matrix parameters for transform: 1
    real4   1024.000000,     0.000000,     0.000000,     0.000000  
    real4      0.000000,  1024.000000,     0.000000,     0.000000  
    real4      0.000000,     0.000000,  1024.000000,     0.000000  
    real4      0.000000,     0.000000,     0.000000,     1.000000  

; Static matrix parameters for transform: 2
    real4      1.000000,     0.000000,     0.000000,     0.000000  
    real4      0.000000,     0.000000,     1.000000,     0.000000  
    real4      0.000000,    -1.000000,     0.000000,     0.000000  
    real4      0.000000,     0.000000,     0.000000,     1.000000  

; Static matrix parameters for transform: 3
    real4      1.000000,     0.000000,     0.000000,     0.000000  
    real4      0.000000,     1.000000,     0.000000,     0.000000  
    real4      0.000000,    -0.000001,     1.000000,     0.000000  
    real4      0.000000,     0.000000,     0.000000,     1.000000  
static_matrix_list_riff_end_Light01 label word       

;
; ANIMATION PARAMETER BLOCK
;
animation_parameters_riff_start_Light01	label	word
    db  'A','N','I','P'   
    dd  animation_parameters_riff_end_Light01 - $ - 4
animation_parameters_riff_end_Light01 label word       

;
; ANIMATION COMMAND BLOCK
;
animation_commands_riff_start_Light01	label	word
    db  'A','N','I','C'   
    dd  animation_commands_riff_end_Light01 - $ - 4

; Animation command for transform: 0  output index: 0
bgl_animation_command_start_LIGHT_LANDING_beta_0	label	BGLCODE

     BGL_TRANSFORM_INDIRECT  0, 0
 bgl_animation_command_end_LIGHT_LANDING_beta_0	label	BGLCODE

; Animation command for transform: 1  output index: 1
bgl_animation_command_start_LIGHT_LANDING_beta_1	label	BGLCODE

     BGL_TRANSFORM_INDIRECT  1, 1
 bgl_animation_command_end_LIGHT_LANDING_beta_1	label	BGLCODE

; Animation command for transform: 2  output index: 2
bgl_animation_command_start_LIGHT_LANDING_beta_2	label	BGLCODE

     BGL_TRANSFORM_INDIRECT  2, 2
 bgl_animation_command_end_LIGHT_LANDING_beta_2	label	BGLCODE

; Animation command for transform: 3  output index: 3
bgl_animation_command_start_LIGHT_LANDING_beta_3	label	BGLCODE

     BGL_TRANSFORM_INDIRECT  3, 3
 bgl_animation_command_end_LIGHT_LANDING_beta_3	label	BGLCODE
animation_commands_riff_end_Light01 label word       

;
; SCENE GRAPH RIFF BLOCK
;
scene_graph_riff_start_Light01	label	word
    db  'S','C','E','N'   
    dd  scene_graph_riff_end_Light01 - $ - 4

    dw 4
bgl_scene_graph_entry_LIGHT_LANDING_beta_0	label	byte
BGL_SCENEGRAPH_ENTRY	0, 1, -1, bgl_animation_command_end_LIGHT_LANDING_beta_0 - bgl_animation_command_start_LIGHT_LANDING_beta_0, bgl_animation_command_start_LIGHT_LANDING_beta_0 - bgl_scene_graph_entry_LIGHT_LANDING_beta_0
bgl_scene_graph_entry_LIGHT_LANDING_beta_1	label	byte
BGL_SCENEGRAPH_ENTRY	1, 2, -1, bgl_animation_command_end_LIGHT_LANDING_beta_1 - bgl_animation_command_start_LIGHT_LANDING_beta_1, bgl_animation_command_start_LIGHT_LANDING_beta_1 - bgl_scene_graph_entry_LIGHT_LANDING_beta_1
bgl_scene_graph_entry_LIGHT_LANDING_beta_2	label	byte
BGL_SCENEGRAPH_ENTRY	2, 3, -1, bgl_animation_command_end_LIGHT_LANDING_beta_2 - bgl_animation_command_start_LIGHT_LANDING_beta_2, bgl_animation_command_start_LIGHT_LANDING_beta_2 - bgl_scene_graph_entry_LIGHT_LANDING_beta_2
bgl_scene_graph_entry_LIGHT_LANDING_beta_3	label	byte
BGL_SCENEGRAPH_ENTRY	3, -1, -1, bgl_animation_command_end_LIGHT_LANDING_beta_3 - bgl_animation_command_start_LIGHT_LANDING_beta_3, bgl_animation_command_start_LIGHT_LANDING_beta_3 - bgl_scene_graph_entry_LIGHT_LANDING_beta_3
scene_graph_riff_end_Light01 label word       


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

Here is a nav light:

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

    BGL_LIGHT LIGHT_NAV, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FFABABABh, 0.000000, 0.000000, 0.000000 ; Color is AB AB AB (rgb)
    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
Here is a strobe light. Note that the type could be NAV or STROBE:

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_STROBE_beta_top label BGLCODE

bgl_riff_start_LIGHT_STROBE_beta	label	BGLCODE
    db	'B','G','L',' '
    dd	bgl_riff_end_LIGHT_STROBE_beta - $ - 4
LOD_0_LIGHT_STROBE_beta	label	BGLCODE

; Alpha
LIGHT_STROBE_beta_Alpha label BGLCODE
    BGL_CALL_32 LIGHT_STROBE_beta_MasterScale_1        ; Node 1 - MasterScale
    BGL_END
    BGL_RETURN


LIGHT_STROBE_beta_MasterScale_1 label BGLCODE

    VAR_BASE_OVERRIDE VAR_BASE_GLOBAL
    IFMSK       nolgt_2, beacnt, 00002h
    BGL_LIGHT LIGHT_STROBE, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FFABABABh, 0.000000, 0.000000, 0.000000 ; Color is AB AB AB (rgb)
    nolgt_2       label BGLCODE
    BGL_RETURN


bgl_riff_end_LIGHT_STROBE_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
Here is a beacon. Again, NAV could replace BEACON:

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_BEACON_beta_top label BGLCODE

bgl_riff_start_LIGHT_BEACON_beta	label	BGLCODE
    db	'B','G','L',' '
    dd	bgl_riff_end_LIGHT_BEACON_beta - $ - 4
LOD_0_LIGHT_BEACON_beta	label	BGLCODE

; Alpha
LIGHT_BEACON_beta_Alpha label BGLCODE
    BGL_CALL_32 LIGHT_BEACON_beta_MasterScale_1        ; Node 1 - MasterScale
    BGL_END
    BGL_RETURN


LIGHT_BEACON_beta_MasterScale_1 label BGLCODE

    VAR_BASE_OVERRIDE VAR_BASE_GLOBAL
    IFMSK       lgt_1, becon4, 0c000h
    BGL_JUMP_32 nolgt_1
    lgt_1      label BGLCODE
    BGL_LIGHT LIGHT_BEACON, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FFF8F3ABh, 0.000000, 0.000000, 0.000000 ; source poly num = 1
    nolgt_1       label BGLCODE
    BGL_RETURN


bgl_riff_end_LIGHT_BEACON_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
All these codes can be compiled with BGLC_9 to make MDLs of scenery lights. The color/brightness can be altered by changing the hex numbers for rgb. In the case of the downward pointing spotlights, the placement altitude affects the size of the light circle… a tighter spot needs less altitude for placement. The bitmap for the spot is fixed by the sim.


Dick
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#2
Hi all.

A short follow-up.

First understand that ALL scenery MDLs become library objects... even if they are declared within the placement XML code. An advantage of thinking of scenery lights as Library objects, is that they can be attached to other objects.

Now that you see the code for making lights into MDLs, these MDLS can in turn declared as Library objects within the XML code for other objects:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">

	<SceneryObject lat="47 25.89" lon="-122 18.43" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
		<LibraryObject name="1032944E44E2961C2CC58AAA1DAD583B" scale="1.0" />
	</SceneryObject>

	<ModelData name="1032944E44E2961C2CC58AAA1DAD583B" sourceFile="LightOnPole.mdl" />

	<ModelData name="EA05F59AF5704A17A71696B8705D8D3D" sourceFile="White_SpotLight.mdl" />

</FSData>
The LightOnPole MDL has an attachpoint for the White_SpotLight. By containing the declaration for the White_SpotLight within the XML code here, we can now simply place the LightOnPole, and the spotlight will be automatically attached ( and contained inside the MDL ).

We don't need to worry if a library of scenery lights is present on the enduser's computer... because we made sure it was compiled with the LightOnPole. This nesting of MDLs when using attached objects is a good way to assure the MDLs are always present for the sim.

There are other methods, but using an object attachpoint for the lights allows you to place and point the lights from within gmax... and no worries about code tweaking, or bounding boxes for the lights every time you want to use them.

In fact, all the objects and their placement can be stuck inside one XML code... which is what MS did with much of the default scenery. In that way, none of the library objects ever gets left out of the scenery.

Locally declared Library objects, residing within the placement XML, seem to co-exist with identical GUIDs of other libraries without conflict.

=======================================

While on the topic of placement, Scenery Lights are like effects, in that you can intensify the light by multiple placement at the same location.

NAV, STROBE, and BEACON show more intense during the day. LANDING and TAXI lights do not show during the day.

Dick
 
Last edited:

rhumbaflappy

Moderator
Staff member
Resource contributor
#3
Hi all.

Here's the smallest light ASM code I can make:

Code:
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
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
Use BGLC_9 to compile as a MDL. 000FFFFFFh is the RGB value for the brightest white. LIGHT_TAXI is needed unless you want landing lights that can be moved by the cockpit keyboard commands.

Dick
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#5
Hi all.
Another tidbit:

This is a taxi light ground display only:
Code:
BGL_LIGHT LIGHT_TAXI_0, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
This is a taxi light cone only ( nothing shows on the ground ):
Code:
BGL_LIGHT LIGHT_TAXI_1, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
This is a taxi light cone and ground display:
Code:
BGL_LIGHT LIGHT_TAXI, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
Dick
 
#6
I would first like to say .... THANK YOU...THANK YOU...THANK YOU...!!!! :wizard:

You have helped me solve a problem that has plagued me for the past 2 months.

I do have a questions:

1) Is there a way to control the intensity of the light at a distance? Like a fading or dimming ability?

Thanx again for this great information. I am putting it to great use! :p

Sean E.
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#7
Hi Sean.

Arno has some more experience than I at conditional display.

The RGB coloring can control the intensity of the light. And, light intensity is also additive.... meaning if you have 2 lights at the same lat-long-altitude, they are brighter than one light.

So, you should be able to add ASM code to check view distance from the the object, and conditionally display more lights at the same spot... and the light will be brighter nearby, and dimmer further away.

Or display a dimmer ( RGB ) light at further distances.

Dick
 
#8
here is a lighted windsock im currently working on....these were created using nothing but custom effects and still have to tweek them but hopefully the reflection on the groung will blend in nicely.
 
#9
The effect object I am using is the nav (ball) light and creating an airport full of centerline taxi lights.

The system fades a normally compiled light, I am guessing, at around 2-3 miles from the airport. I have been successful in tweaking the same effect object with a Distance from refPoint modifier using MDLTweaker. But, this makes a 'hard' on/off break instead of a fade.

I have begun work on a LOD / Distance from refPoint coding idea. I am just lost as to how implement it.

The biggest question on my mind right now is.....can you control the diameter of the 'ball' light?

Thanx in advance.

Sean E.
 
#10
Okay, I feel that I have coded it correctly, but I am having issues compiling.
The compiler is telling me there is a problem with the IFIN1 lines of the following:
--------------------------------------------------------------------------
LIGHT_NAV_beta_MasterScale_1 label BGLCODE
IFIN1 LOD_01, 033B, 0,499 ;<-- error A2048: nondigit in number
BGL_LIGHT LIGHT_NAV, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FFFFFFFFh, 0.000000, 0.000000, 0.000000 ; Color is AB AB AB (rgb hex)
JUMP LOD_CONTINUE
LOD_01 LABEL WORD
IFIN1 LOD_02, 033B, 500,1500 ;<-- error A2048: nondigit in number
BGL_LIGHT LIGHT_NAV, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FFABABABh, 0.000000, 0.000000, 0.000000 ; Color is AB AB AB (rgb hex)
JUMP LOD_CONTINUE
LOD_02 LABEL WORD
BGL_LIGHT LIGHT_NAV, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FF707070h, 0.000000, 0.000000, 0.000000 ; Color is AB AB AB (rgb hex)
LOD_CONTINUE LABEL WORD
;;;BGL_LIGHT LIGHT_NAV, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0FFABABABh, 0.000000, 0.000000, 0.000000 ; Color is AB AB AB (rgb hex);;;
BGL_RETURN
bgl_riff_end_LIGHT_NAV_beta label BGLCODE

--------------------------------------------------------------------------
Any help is very much appreciated.

Thanx in advance

Sean E.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#11
Try to put a h behind the variable name. BGLC should now it is a hexadecimal number. So 033Bh instead of 033B.
 
#12
Hi!

Sorry, if I ask some dumb questions, but I'm pretty new to scenery design :rolleyes:

I try do do some airport scenery and want "real lights", not only the effect, "BRIGHT_" does in GMAX ...

I read this thread and found almost what I wanted, so downloaded BGLC_9 , put your source into a textfile and compiled it to a bgl file.

I use SceneGenX to arrange my scenery and therefore I need the name (I think it's the unique ID of the model I create) ... where to get it? When I export something from GMAX, I get an XML file with the ID, but where can I find the ID after using BGLC_9?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#13
Hi Georg,

Just make up the ID yourself. It is a 32 character random number. So you can else make one up yourself, just like GMax does when you export an object.
 
#14
It's a RANDOM NUMBER?!?!?!?!? :eek: :eek: :eek: :eek: :eek:

And I thought it is some kind of hash or fingerprint :banghead: :banghead: :banghead:

Edit: ARNO, you are the greatest - your answer time is below everything I know from any support!
 
#16
Sorry - I don't get the clue :(

Where do I have to put the ID?!? When I want to get a BGL-file or a MDL file into SGX, I have to CALL the ID, someone else (or GMAX) gave the object ... so where do I have to put it to call it in SGX?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#17
Hi Georg,

If you want to get a MDL file out of BGLC9 you need to compile with the option -mdl. You can also rename the BGL to MDL, as it is not a BGL file at the moment (just an MDL with the name BGL).

In SGX you can then place this MDL file like you would also place one that you made with GMax yourself. Or you could place it into a library (with Library Creator XML for example) and then just call the ID from that library.
 
#18
Thanx Arno, that was the problem.
I was using the variable listing from this forum and there wasn't an 'h' on the end of the variables. Now I know.

Thanx again.

Sean E.
 
#19
Thanks again - you "lighten up my scenery" :D

Just two further questions: :rolleyes:

a) Is there a stand alone ID Generator or is the one in BGLXML the only one available? I'm not good at inventing 32 digit random numbers :scratchch

b) My light (I used "the smallest light ASM code I can make" by rhumbaflappy) is directed to the north. I want it downward so I looked over the "pitch" attribute of the objects in SGX ... the units for pitch and bank in SGX are "m" is that METER?!? :yikes: How can I give a pitch in METERS?!?
 
Last edited:
Status
Not open for further replies.
Top