Sign in to follow this  
LuisFelizTirado

Anti Collision Lights, why does LIGHT_NAV not work anym...

Recommended Posts

Dear allI've worked with GMAX already for FS2002. Now I've changed to the FS9 SDK.As I was used, I created an element in GMAX and assigned the LIGHT-Material as stated in the SDK. But the light does not work. I checked this forum, but unfortunately the only thing I found out is, that this functionality is not working anymore.Which is for FS9 the best way to create anti-collision lights in GMAX?Would an effect be the right choice?Which would be the right effect to be attached?How can I make the light show up only during the night?(I was used to tweak the asm file)Looking forward to your suggestions. Thanks.ByeJ

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Using the Attach Point tool, attach a NAV .fx file. Also, using the same tool, you can define the display conditions as "night," "raining," or whatever.

Share this post


Link to post
Share on other sites

Effects indeed. I think if you copy the light code from the Fs2002 gamepack to the Fs2004 source that it would also still work, but I haven't tested that yet. Effects are probably easier to use.Bill, now you start about "raining" as condition again, can you show me how to do that for the effects?

Share this post


Link to post
Share on other sites

Dear Arno and BillThanks for your replies.Is there a complete listing & description of effects available in FS2004? I would be very interested in that document.Arno: I've already copied and merge a light element out of my previous buildings (FS2002 design) into my new FS2004 design. But the light did not show up. So I think, I will not follow that design procedure.Thanks again.ByeJ

Share this post


Link to post
Share on other sites

Dear ArnoI've copied it from GMAX. So its now clear for me that it will not work if the new makemdl is the issue. But why did microsoft still list the material type LIGHT_NAV in the SDK? Strange for me.Anyhow, do you have an idea where to find a list of the available effects? ThanksJ

Share this post


Link to post
Share on other sites

I think there is no list of all effects, athough it would be very useful to have one.To come back to the LIGHT_STROBE option. I exported my object made in Fs2002 with the new gamepack and had a look at the source. This was the code I found at the end:[tt] IFMSK nolgt_1, dict_0_g_lightStates, LIGHT_STROBE_MASK VAR_BASE_OVERRIDE VAR_BASE_GLOBAL IFMSK nolgt_1, beacnt, 00002h BGL_LIGHT LIGHT_STROBE, 0.000, 50.650, -0.000, 40, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 2359 nolgt_1 label BGLCODE BGL_RETURN[/tt]So clearly the code for the lights is there. All you have to do is to comment out the first line. Aircraft MDL files have a DICT section, and I think the check of dict_0_g_lightStates has something to do with that (check if your strobes are on probably). But for the scenery that does not work. So remove that line and you have your light back![tt] ;IFMSK nolgt_1, dict_0_g_lightStates, LIGHT_STROBE_MASK VAR_BASE_OVERRIDE VAR_BASE_GLOBAL IFMSK nolgt_1, beacnt, 00002h BGL_LIGHT LIGHT_STROBE, 0.000, 50.650, -0.000, 40, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 2359 nolgt_1 label BGLCODE BGL_RETURN[/tt]

Share this post


Link to post
Share on other sites

This trick also works when you use LIGHT_NAV, but for LIGHT_LAND it does not. It seems there is something special about the LIGHT_LAND (it produces a lot of additional code as well, which makes no sense to me (yet)).

Share this post


Link to post
Share on other sites

>Bill, now you start about "raining" as condition again, can>you show me how to do that for the effects?Sorry Arno, it's hard for me to take off my "Aircraft Designer's Hat" whenever I visit this forum... :)It's a great pity that MS doesn't allow us to use the MakeMDL.parts.xml file to affect scenery! Imagine the possibilities were they to have allowed that! How much simpler would be trivial things such as controlled animation be using the XML schema than current techniques...Such as: hanger_doorNAV2 ACTIVE FREQUENCYMHz112.00BTW, I've never managed of overcome the issue with my existing hanger, but have successfully built another, simpler design without any problems with using CAT to control the animation(s). Go figure!BTW, good catch on discovering that we need only comment out or remove a single line to get the Material-Named "lights" working again... except sadly, not for the LIGHTS_LANDING... ;)

Share this post


Link to post
Share on other sites

Thanks Bill. I think the kind of trigger you show in the XML format is what ends up in the DICT section of the aircraft MDL. I will have another look at that, maybe it can be pasted to the scenery MDL somehow. You never know.I will also take another look at the LIGHT_LAND option. That fact that the others work, shows that there must be a way to get this one working as well (I hope). It is just less trivial as for the other lights...

Share this post


Link to post
Share on other sites

Hi all.In MyLight.asm I take out the DICT section. Then I enlarge the bounding_box to encompass the light effect ( important ).====================================

; compile with BGLC /MDL C:Documents and SettingsDickDesktopMyLightMyLight.asm	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  1	dd  0	dd  0	dd  156	db  'F','S','8','0'	dd  2304visual_model_header_end  label dword	db  'I','S','F','T'   	dd  ver_end - $ - 4  	db  "MakeMDL - FS90 (9.00.030612.02)",0ver_end label word	   ;	db  'D','I','C','T'												 ;param_extension_dictionary	 label dword							  ;	dd  28;   dict_0_g_lightStates equ 152;	dd 2,152,4, 057F0E99Dh, 04E9C0523h, 0BB12B6BCh, 0063FE72Fh;param_extension_dictionary_end  label dword							  ;bounding_box_riff_start	label	word;	db  'B','B','O','X'   ;	dd  bounding_box_riff_end - $ - 4;	real4  -0.167, 0.000, 0.167  ;	real4  -0.167, 0.000, 0.167  ;bounding_box_riff_end label word	   bounding_box_riff_start	label	word	db  'B','B','O','X'   	dd  bounding_box_riff_end - $ - 4	real4  -100.0, 0.000, 100.0  	real4  -100.0, 100.0, 100.0  bounding_box_riff_end label word	 model_outside	label	BGLCODEmodel_shadow label BGLCODEmodel_inside  label	BGLCODEexterior_riff_start_0 label BGLCODE	db  'E','X','T','E'   	dd  exterior_riff_end_0 - $ - 4LOD_0L	label	BGLCODE	include	MyLight_a_0.asmexterior_riff_end_0	label	BGLCODEbgl_data_end label	 BGLCODE

====================================In MyLight_a_0.asm, I take out all lines in the 'light section' except the diplay line. I also changed LIGHT_BEACON to LIGHT_LANDING.The result is a landing light in a scenery object file.====================================

;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------;; This file was automatically generated from C:Documents and SettingsDickDesktopMyLightMyLight; using the MakeMDL tool.  Do not edit by hand, re-run the; tool instead.;; generated on 12/21/04 10:50:16;;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------; BGL model for C:Documents and SettingsDickDesktopMyLightMyLight;; $Header:$;;----------------------------------------------------------------------------;; Final Status:   0 polys; Alpha Status:   1 polys; Light Status:   0 polys; Library Status: 0 polys;; Start Time: 12/21/04 10:50:16; Stop Time : 12/21/04 10:50:16;; Modeling units = 1.0000; Radius = 0.2357; Radius in meters = 0.2357; Radius in modeling units = 1;MyLight_top label BGLCODEmaterial_riff_start_MyLight	label	word	db  'M','A','T','E'   	dd  material_riff_end_MyLight - $ - 4  	MATERIAL_LIST_BEGIN	MATERIAL_DEF 1.000000,0.984314,0.513726,1.000000,  1.000000,0.984314,0.513726,  0.000000,0.000000,0.000000,  1.000000,1.000000,1.000000,  0.000000; 0	MATERIAL_LIST_END	BGL_RETURNmaterial_riff_end_MyLight label word	   bgl_riff_start_MyLight	label	BGLCODE	db	'B','G','L',' '	dd	bgl_riff_end_MyLight - $ - 4LOD_0_MyLight	label	BGLCODE; AlphaMyLight_Alpha label BGLCODE	BGL_CALL_32 MyLight_MasterScale_1	   ; Node 1 - MasterScale	BGL_END	BGL_RETURNMyLight_MasterScale_1 label BGLCODE;	IFMSK	   nolgt_1, dict_0_g_lightStates, LIGHT_BEACON_MASK;	VAR_BASE_OVERRIDE VAR_BASE_GLOBAL;	IFMSK	   lgt_1, becon4, 0c000h;	BGL_JUMP_32 nolgt_1;	lgt_1	  label BGLCODE	BGL_LIGHT LIGHT_LANDING, -0.167, 0.000, 0.167, 20, 0.60, 0.40, 0FFFFFB83h, 0.000000, 0.000000, 1.000000; source poly num = 1;	BGL_LIGHT LIGHT_BEACON, -0.167, 0.000, 0.167, 20, 0.60, 0.40, 0FFFFFB83h, 0.000000, 0.000000, 1.000000; source poly num = 1;	nolgt_1	   label BGLCODE	BGL_RETURNbgl_riff_end_MyLight	label	BGLCODE;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------;; This file was automatically generated from C:Documents and SettingsDickDesktopMyLightMyLight; using the MakeMDL tool.  Do not edit by hand, re-run the; tool instead.;; generated on 12/21/04 10:50:16;;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------

====================================So if we strip all the junk out of the ASM file, it will show. The error seems to be in FS9 MakeMDL's way of dealing with lights, as the scenery engine will display them just fine. Remember to enlarge the bounding box, or the light will shut off when the box is not in the viewport.http://webpages.charter.net/ludowr/MyLight.zipBGLC list these types of lights:LIGHT_BEACON, LIGHT_WING, LIGHT_LOGO, LIGHT_TAXI, LIGHT_NAV, LIGHT_LANDING, LIGHT_STROBE, LIGHT_RECOGNITION, LIGHT_NONE, LIGHT_LANDING_0, LIGHT_TAXI_0, LIGHT_LANDING_1, LIGHT_TAXI_1I haven't tried all of them. You can strobe other kinds of lights than the LIGHT_STROBE:

MyLight_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_LANDING, -0.167, 0.000, 0.167, 20, 0.60, 0.40, 0FFFFFB83h, 0.000000, 0.000000, 1.000000; source poly num = 1	nolgt_1 label BGLCODE	BGL_RETURN

Dick http://forums.avsim.net/user_files/101249.jpg

Share this post


Link to post
Share on other sites

Hi Dick,Just to get it clear for me. You exported as a aircraft MDL in this case?

Share this post


Link to post
Share on other sites

Hi Arno.I exported it as Scenery. Material name: LIGHT_BEACON_mylight for the original. I'm attaching a zip of the gmax file... very simple box with the material name.Dick

Share this post


Link to post
Share on other sites

Hi Dick,I was confused by the DICT section, but I saw it was indeed also created when you export as scenery.Also, if you indeed replace one of the other lights by the LIGHT_LANDING option it works fine. That is a much easier solution, as MakeMDL puts in a lot or rubbish if you export with LIGHT_LAND there.Only to change the direction of the light we need to put rotation command in front of the BGL_LIGHT command. I still need to test that, but we indeed have a working light again. Unfortunately it requires this much of source code tweaking.

Share this post


Link to post
Share on other sites

Hi Arno.You can also change the pitch, bank and heading with XML placement code. I don't know if the light bgl can be attached to another object...Dick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this