Jump to content
Sign in to follow this  
cmpbellsjc

Looking for some light balls

Recommended Posts

...if only you had a tiny custom MDL of a non-textured object with an attached Effect file.
Yeah, that seems to be the main problem at the moment is not having some type of little model to attach the effect to.
Maybe Sid Schwartz would consider making this type of "object/Effect" library available as an alternative to his other collection of ramp lights etc. ? :(
I am not aware off the top of my head who Sid Schwartz is, but after seeing you mention his name I am going to look him up in the Avsim library and see if there are any packages by him that may have a contact email in them. If they do, I will try contacting him and I will reference this post giving him an idea of what I am looking for. I wouldn't imagine that for someone with a lot of experience working with GMAX and the other tools, that it would be a big project or something very difficult for them to make.I will try that and see if I can contact him and if not, I will start asking some of the scenery devs who I talk to every now and them and see if one of them could put something together like that for me.Thanks for the idea.Sean

Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Hi Sean:Such a library might be something others would like to use as well, and IMHO, it would be good to have it accessible for all via AVSIM and/or other FS download sites. :( Perhaps either "Sidney Schwartz" or "Ron Jeffers" might be receptive to contributing such a library to the FS Community; a search of the AVSIM File Library might interest you in some of their existing generous contributions:"Sidney Schwartz": http://library.avsim.net/search.php?CatID=root&SearchTerm=sidney+schwartz&Sort=Added&ScanMode=1&Go=Change+View"Ron Jeffers": http://library.avsim.net/search.php?CatID=root&SearchTerm=ron+jeffers&Sort=Added&ScanMode=1&Go=Change+ViewHope this helps ! :( GaryGB

Share this post


Link to post
Share on other sites

Light point MDLs can be made with ASM code, and compiled as an FS9 library. That library can be used in FS9 or FSX.

    db  'R','I','F','F'                ; RIFF file identifier    dd  bgl_data_end - $ - 4            ; size of RIFF data    db  'M','D','L','9'                ; file identifier (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  "rhumbaflappy",0ver_end label word       bounding_box_riff_start    label    word    db  'B','B','O','X'       dd  bounding_box_riff_end - $ - 4    real4  -0.005, -0.005, -0.005      real4  0.005, 0.005, 0.005 bounding_box_riff_end label word       exterior_riff_start_0 label BGLCODE    db  'E','X','T','E'       dd  exterior_riff_end_0 - $ - 4    db    'B','G','L',' '    dd    bgl_riff_end_Light - $ - 4    IFIN1 nolight, tod, 2, 4      BGL_LIGHT 0, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0    nolight       label BGLCODE      BGL_RETURN    BGL_END      BGL_RETURNbgl_riff_end_Light    label    BGLCODEexterior_riff_end_0    label    BGLCODEbgl_data_end label     BGLCODE    

The color of the light point is in the code 000FFFFFFh with the FF 'words' controlling the color R-B-G. Red would be 000FF0000h. The above is a white light model. None of the other attributes of the BGL_LIGHT command have any function, and that's why they are zeroed.IFIN1 nolight, tod, 2, 4 makes the lights show only at dark. You can make a library of lights as an FS9 XML library:

<?xml version="1.0"?><FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd"><ModelData name="16D7C28B496E9DA42C0194A55C2F590E" sourceFile="WhiteLight.mdl" /><ModelData name="D5348175404ACA60FA35EC9D352BD568" sourceFile="RedLight.mdl" /><ModelData name="BFF745AA4AE358ECB50133BAEF1C068F" sourceFile="GreenLight.mdl" /><ModelData name="2682D4684DE962464BE58D866A3F10D3" sourceFile="BlueLight.mdl" /></FSData>

The FSX library names would be:WhiteLight = {16d7c28b-9da4-496e-a594-012c0e592f5c}RedLight = {d5348175-ca60-404a-9dec-35fa68d52b35}GreenLight = {bff745aa-58ec-4ae3-ba33-01b58f061cef}BlueLight = {2682d468-6246-4de9-868d-e54bd3103f6a}The FS9 library names would be:WhiteLight = 16D7C28B496E9DA42C0194A55C2F590ERedLight = D5348175404ACA60FA35EC9D352BD568GreenLight = BFF745AA4AE358ECB50133BAEF1C068FBlueLight = 2682D4684DE962464BE58D866A3F10D3LightPointLibrary.bgl needs to be in an active folder, and then you can make placement bgls as needed for FS9 or FSX.LightPointLibraryDick

Share this post


Link to post
Share on other sites

Hi Dick.Almost everything you wrote in your post is way over my head when it comes to the XML and the other code written in the other shaded box at the top of your post.However, I did understand the bottom part where you said that the bgl included in the zip must be in an active scenery folder.I downloaded it and will place it in one of my active library folders and try it out.Thanks for making these lights for me and I will give it a shot and report back.Regards,Sean@GaryGB - Thanks for the link of Sid and Ron's work. I will give Dick's bgl a shot and that maybe all I need to get started.Thanks again guys for the help.


Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Hi Dick.I just tried the light models in FSX using Instant Scenery and it worked like a charm. Not only that, the lights were the right size and brightness I was looking for and the distance that they came into view was right on as well.Basically, all in all the package you made is spot on as far as what I was wanting and I REALLY appreciate you making the package for me.I do have a question though. As long as I use the lights in moderation how much of an FPS hit should I expect to take from these? I know that is a hard question to answer, but basically if I am just using them to surround an airports perimeter roads and stuff like that it shouldn't make to much difference would it?Also do you think you might consider uploading the lights to the Avsim library? The reason I ask is that if for some reason I do some lighting effects for some airports and wanted to upload the bgl to the library, would other users need your library to be installed for it to work on their system?Thanks again for the package you did.Regards,Sean


Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

That's pretty handy, thanks, Dick. Great to see that old code again, still working fine. Seems to be no problem adding the library to SBuilderX and placing the objects as lines:Best regards.Luis

Share this post


Link to post
Share on other sites

I looked into this code due to a discussion at another fsdeveloper forum ;)Placing lights as effects seems to have some problems with visibility distance, and has some adverse FPS hits. This code should have almost no FPS hit. The only bad thing about this legacy code is you can basically only change the color. The glow size and intensity are hard-coded in the sim. Code can be changed to offset the position, but that is probably best done by the positioning BGL.I didn't try this as an attached object through gmax... that might be interesting to place it on an object.Sean, I will upload it to AVSIM today along with the ASM and MDL codes for others to play with. I might even add some other colors. Anyone can freely include the objects or use the code as they see fit, for any purpose.Hi Luis.I condensed the ASM code as much as I could... even added "rhumbaflappy" as the source. It's too bad some of the legacy code doesn't work. The basis of the code came from using LIGHT_BEACON_ as a material prefix in gmax, and looking at the saved ASM code from MakeMDL ( FS9 ).This is the BGLC_9 source of the ASM macro:

BGL_LIGHT   macro ltype,x,y,z,intensity,li_atten,sq_atten,color,nx,ny,nz      dw    BGLOP_LIGHT     ; 0ADh      dw    ltype       ; light type      real4   x,y,z           ; light offset      dd      intensity       ; light intensity      real4 li_atten    ; linear attenuation factor      real4 sq_atten    ; squared attenuation factor      dd      color           ; light color      real4 nx,ny,nz    ; light direction      endm

The xyz offsets do work, and the RGB of the color works ( alpha doesn't seem to work ). Intensity doesn't work, nor do the attenuation factors. Light direction would be for taxi and landing lights... but probably won't work for scenery.It will be interesting to see how the new sim ( Flight ) will be coded, and if we'll need these old tricks.Dick

Share this post


Link to post
Share on other sites

Wow, that's excellent... many thanks Dick, for that tutorial and object/Effect library! :( Thanks as well to Luis for presenting the options in SBuilderX for such placement (I really must allocate some time to studying up on SBuilderX again :( ) ! And thanks to Sean for initiating an inquiry that resulted in the generous contribution of a unique new resource for the FS Community by one of the "FS Wizards" ! :Applause:Regards,GaryGB

Share this post


Link to post
Share on other sites

Hi Sean. I've not forgotten, but some family issues are intruding on my real life, so it may be a day or two before I get a library uploaded to the AVSIM Library.meanwhile, I fooled with some old code buried within the BGLC_9 source. The older codes used a PNT instruction.

    db  'R','I','F','F'                ; RIFF file identifier    dd  bgl_data_end - $ - 4            ; size of RIFF data    db  'M','D','L','9'                ; file identifier (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  "rhumbaflappy",0ver_end label word       bounding_box_riff_start    label    word    db  'B','B','O','X'       dd  bounding_box_riff_end - $ - 4    real4  -0.005, -0.005, -0.005      real4  0.005, 0.005, 0.005 bounding_box_riff_end label word       exterior_riff_start_0 label BGLCODE    db  'E','X','T','E'       dd  exterior_riff_end_0 - $ - 4    db    'B','G','L',' '    dd    bgl_riff_end_Light - $ - 4;--------------------------------------------------------    IFIN1 nolight, tod, 2, 4      IFMSK beacon_white,beacnt,3        LCOLOR      C_BRIGHT_GREEN      JUMP  beacon_on       beacon_white  label word        IFMSK nolight,beacnt,0300h        LCOLOR      C_BRIGHT_WHITE            beacon_on  label word        PNT   0,0,0              nolight  label word        BGL_RETURN                BGL_END        BGL_RETURN;--------------------------------------------------------        bgl_riff_end_Light    label    BGLCODEexterior_riff_end_0    label    BGLCODEbgl_data_end label     BGLCODE    

These PNT lights are similar to the BGL_LIGHT, but they fade quite a bit quicker than the BGL_LIGHT. In the above code, I think you stick a color variable on the 'stack', and it gets pulled from the stack by the PNT command. Pretty dull stuff for most people, but it interested me. The fading rate appears to be the same as the effects (.fx ) lights... which some folks don't like.The above code flashes a light... first white, then off, then green, then off, then white...Dick

Share this post


Link to post
Share on other sites
Hi Sean. I've not forgotten, but some family issues are intruding on my real life, so it may be a day or two before I get a library uploaded to the AVSIM Library.
Hi Dick.No problem with the Avsim upload. I am using the one you put in the zip. The only reason I asked is if for some reason I ever upload anything that uses your light library, then I will have to be able to reference it here.As far the the zip package you uploaded it seems to be working well.I have to admit that the info you posted is Greek to me, lol. I have no knowledge of any of that code or how to change the lights you made even if I wanted to. Since I dont want to complicate anything, I will just use them as you made them. :-)Thanks again though for making the library. I have been interested in some lights like that for years now and regret never posting or asking about them.Regards,Sean

Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
The above code flashes a light... first white, then off, then green, then off, then white...Dick
Hi Dick,You certainly let the cat out of the bag :( I too have been searching for a light, but what I would really like would be ... first white, then off, then white, then off ....George

Share this post


Link to post
Share on other sites

Hi George.This would work:

    db  'R','I','F','F'                ; RIFF file identifier    dd  bgl_data_end - $ - 4            ; size of RIFF data    db  'M','D','L','9'                ; file identifier (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  "rhumbaflappy",0ver_end label word       bounding_box_riff_start    label    word    db  'B','B','O','X'       dd  bounding_box_riff_end - $ - 4    real4  -0.005, -0.005, -0.005      real4  0.005, 0.005, 0.005 bounding_box_riff_end label word       exterior_riff_start_0 label BGLCODE    db  'E','X','T','E'       dd  exterior_riff_end_0 - $ - 4    db    'B','G','L',' '    dd    bgl_riff_end_Light - $ - 4;--------------------------------------------------------    IFIN1 nolight, tod, 2, 4      IFMSK beacon_white,beacnt,3      JUMP  beacon_on       beacon_white  label word        IFMSK nolight,beacnt,0300h            beacon_on  label word      BGL_LIGHT 0, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0              nolight  label word        BGL_RETURN                BGL_END        BGL_RETURN;--------------------------------------------------------        bgl_riff_end_Light    label    BGLCODEexterior_riff_end_0    label    BGLCODEbgl_data_end label     BGLCODE  

White_White.zipDick

Share this post


Link to post
Share on other sites

Thanks Dick,Just the ticket :( George

Share this post


Link to post
Share on other sites

im trying to get this to work

ive downloaded Dick's library
un fortunetly Luis's pics are no longer available
can someone pls walk me through getting the library working in SbuilderX

Share this post


Link to post
Share on other sites

Hello:

 

I just discovered this un-answered thread today (July 3rd).

 

 

1.) Download Rhumbaflappy's LightPoint FS Scenery object library pre-packaged in a BGL:

 

https://skydrive.live.com/?cid=f3950c5bbd2bcfa1&id=F3950C5BBD2BCFA1!565#cid=F3950C5BBD2BCFA1&id=F3950C5BBD2BCFA1!393

 

 

 

2.) This object library can be used by SBuilder for FS9 or SBuilder for FSX (aka "SBuilderX"), ADE9X, Instant Scenery version 2, Whisplacer etc.

 

 

In SbuilderX, for example info on adding FS scenery library object BGLs to enable placing the objects within them:

 

SBuilder Menu > Help > Search Tab > Search String: "object" > click 'List Topics' > Select "Object Library Manager" > click 'Display'

 

 

Hope this helps ! :smile:

 

GaryGB

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...