1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apron Edge Lighting

Discussion in 'BGLComp XML, AFCAD, SceneGenX' started by gadgets, 9/3/07.

  1. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,081
    Country:
    ca-britishcolumbia
    In FS9, I specified numerous strings of apron edge lights for my CYYJ add-on using AFCAD 2.21. These lights all worked - until AF2_CYYJ.bgl was decompiled (to, for example, adjust a taxiway sign) and then recompiled. Then, none of the lights at the specified locations (ends, corners) worked. An examination of the XML file showed all specified vertices bounded by <EdgeLights> and </EdgeLights>, yet only the intermediate auto-generated lights were illuminated in the sim. Viewing the re-compiled bgl with AFCAD 2.21 showed all apron edge lights still in place, but only the intermediate lights were shown as illuminated. If the non-illuminated lights were moved slightly, they once-again became illuminated - both in the AFCAD 2.21 display and in the sim after saving the newly-modified file. I worked around this by removing all the non-AFCAD 2.21 contents (e.g., taxiway signs, approaches, etc) into separate files.

    Now I want to move the FS9 apron edge lights into FSX. First, I decompiled AF2_CYYJ.bgl, added the new FSX data and recompiled. Many of my apron edge lights were missing in FSX. Then I tried loading the working FS9 AFCAD (the version with all the lights on) with SceneGenX and dumping the XML. However, the XML related to the apron-edge lights was a long list of vertices bounded by a single set of <EdgeLights> and </EdgeLights>. That didn't seem very useful, so I used the new SDE to access my FS9 AFCAD in the hopes it would provide a solution. But, no. The XML (related to edge lights) it produces appears identical to that in the decompiled FS9 file and corner lights still do not illuminate in the sim.

    I assume this is a known problem with AFCAD 2.21, but I can't find any reference to it in the forum.

    Any help appreciate.

    Don
  2. José

    José

    Joined:
    10/11/06
    Messages:
    490
    Country:
    brazil
    FS9 to FSX

    Hi,

    I´d suggest you to follow those steps:

    1 - Make all modifications on your airport with AFCAD, saving the bgl file; Although some FSX characteristics can´t be implemented using AFCAD, the one you want can (apron edge lights);

    2 - Decompile the bgl file created by AFCAD, with SDE;

    3 - Make manually, in the XML decompiled code, others modifications that could not be done with AFCAD;

    4 - Compile the modified XML code with bglcomp.exe, from FSX SDK (SP1 version); If there will be no error, you´ll have a FSX bgl file.

    I´m working this way while there isn´t a new AFXCAD version.

    Regards,

    José
    Last edited: 9/3/07
  3. jvile

    jvile

    Joined:
    24/1/05
    Messages:
    7,607
    Jon has apron edge lights on his list to look at more closely with SDE.

    In FS9 the AFCAD program (right mouse click on apron lights) allows us to specifiy the distance/spacing of the lights, brightness (default=13 Lee set it to 8) and setting the end vertex to end with a light at the corners etc.

    What AFCAD does with apron lights is not a function of the vertex in the string that we see with a decompiled record for FSX.

    Because there is no AFCAD for FSX then the vertex of each light, spacing and brightness is controlled by the sim regardless of what you specify with AFCAD or SceneGenX.
  4. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,081
    Country:
    ca-britishcolumbia
    Thanks, Jose and Jim.

    Jose, the procedure you set out above was essentially the one I was using.

    Jim, are most people sticking with their FS9 AFCADs (which, in my case, will do everything I need except place a leading "0" in front of the runway numbers)?
    My AFCAD 2.21 display shows a light at each of the vertices set out in the XML file and, where those vertices are quite far apart, intermediate lights as well. Is the XML produced by the decompiler (BglAnalyse) not correct (i.e. does not produce the proper code whgen recompiled)? Is there no workaround?

    Thanks for your insight,
    Don
  5. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    24,144
    Country:
    wales
    As far as I know the latest version of SDE (0.90.2624) handles apron lights correctly. If this is not the case then please let me know.

    As Jim points out at the moment there is no way to adjust, color, spacing, brightness etc of these lights in FSX. This is because there is no way to change these using the XML Source. Future versions of SDE will allow direct 'tweaking' of the Bgl code directly bypassing XML limitations.
  6. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,081
    Country:
    ca-britishcolumbia
    Sorry to report, Jon, that the latest release (2624) doesn't make any difference. As well, the following error message was produced when I open my FS9 bgl (an apparently-valid AFCAD, including the apron edge lighting):

    "Decompiler Output...

    . 216 48546 1 ... Airport

    ByteArray Error Source array was not long enough. Check srcIndex and length, and the array's lower bounds.

    ByteArray Error Source array was not long enough. Check srcIndex and length, and the array's lower bounds.

    ByteArray Error Source array was not long enough. Check srcIndex and length, and the array's lower bounds.

    ByteArray Error Source array was not long enough. Check srcIndex and length, and the array's lower bounds.

    . 48762 220 2 ... Vor_Ils
    . 48982 80 1 ... Vor_Ils
    . 49062 36 3 ... Vor_Ils2
    . 49098 130 1 ... NameList"

    The previous version produced only one small error message - something about the file containing an unknown object - which didn't seem to have any effect. In the case of the latest versiuon, I was still bale to work on the file despirte the lengthy error message.

    Don
  7. José

    José

    Joined:
    10/11/06
    Messages:
    490
    Country:
    brazil
    I opened without any problem a bgl compiled from manualy edited XML code, with almost every component found at an airport FSX file, including <ApronEdgeLights>.

    Of course, for those, there are only their vertices coordinates. I was foolished by AFCAD by thinking I could make some configuration on apron lights. Now I'm adviced, thanks to Jim.

    Regards,

    José
  8. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    24,144
    Country:
    wales

    I am getting that message here also. I will see where it is coming from.

    EDIT

    OK this is not a significant error - it relates to the code that provides the BGL Format view and has no effect on xml and bgl compiles. It is now fixed for the next build
    Last edited: 10/3/07
  9. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,081
    Country:
    ca-britishcolumbia
    Now that I understand what's going on, thanks to Jon (scruffyduck), there is an obvious workaround, i.e., supplement the FSX AFCAD with the FS9 AFCAD.

    What's happening is that AFCAD 2.21 is putting a "little extra" into the .bgl it produces to control apron lighting spacing and brightness. When this .bgl is decompiled and re-compiled, this "little extra" is lost and the display of apron edge lighting reverts to standard spacing which, unfortunately, gets rid of many lights. (There is a good explanation in AFCAD 2.21 Help.) Since this "little extra" is outside the scope of BGL_Comp, it can't easily be replaced.

    Until Jon and friends figure out how to replace it in FSX, the way to keep all the apron edge lights illuminated in FSX is to compile them with AFCAD 2.21 and put that .bgl into the FSX scenery folder along with the FSX AFCAD. The FSX AFCAD should disable (deleteAirport) everything in the FS9 bgl except apron edge lighting and all the apron edge lighting vertex specs must be removed from it.

    So that the FS9 .bgl isn't left in control, it must be named such that it gets loaded before the FSX AFCAD. For example, if the FSX AFCAD is named AF2_xxxx.bgl, then the FS9 version should be named AF3_xxxx.bgl.

    Don
  10. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    24,144
    Country:
    wales
    Don

    SDE will be able to handle these. I am adding ' tweaker' functionality so that you will be able to change stuff that is not accessible via XML. To do this it is necessary to bypass BglComp. Lee did this with AFCAD, it does its own compiling. SDE could do this but I think it better to use BglComp as far as possible. The tweaker will allow changes to things like apron lights and some other stuff that is not accessible via XML.

    In the meantime your workaround sounds like it should work
  11. DougMatthews

    DougMatthews

    Joined:
    23/10/06
    Messages:
    288
    Country:
    us-washington
    Not recommended - there are stability (program crash) risks, as well as this jeopardizes backward compatibility. Also, note that this will likely get much harder to do in the future.

    Perhaps allowing the XML to be hand-tweaked before calling BglComp would work?

    What do you mean by "not accessible via XML?" We (ACES) intend for ALL add-on scenery to go through our SDK compilers. Every bit of the default scenery did.

    Please ask for help. I cannot promise an answer to every question (the community can answer the noob questions) or instant turnaround, but in my area of knowledge (bglcomp, shp2vec) I want to help and learn. Note that I cannot help with de-compiling our formats.

    I recognize that our SDK story is not perfect. There are things that cannot be done or are extremely difficult. We need to know what those are. Many (not all) 3rd party scenery issues will be addressed by SP1. We want to continue to improve our SDK. We want to facilitate the creation of first-class add-on content for the Flight Sim franchise.

    -Doug
    Last edited: 13/3/07
  12. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    24,144
    Country:
    wales
    Hi Doug

    I agree with that 100%, and it would be very nice if we could get the XML extended in areas where we might get tempted to 'tweak'

    Not sure how that would work. Presumably tweaking it means using elements and attributes and if they exist we know about them and if you add some then we can use them in constructing the scenery in the first place. Also I assume that means that BGLComp can handle stuff that is not delivered by XML?


    The issue here relates to some variables on apron edge lighting which cannot be adjusted using XML attributes. These appear to be spacing of the lights, and maybe some other stuff like intensity and color. Maybe these are things that you do not intend to be variable and given you comment on how the default scenery is created I guess all the default airports have fixed values for these things. Never the less it does appear that there are fields in the file which can affect these.

    And I certainly would not ask :)

    Thank you. My interest is in providing good third party scenery development tools which others can use and which conform to the standards and best practices set out by you guys.
  13. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,081
    Country:
    ca-britishcolumbia
    Doug, you obviously follow these forums quite closely and you appear to be receptive to input. Aside from the apron edge lighting situation (which has been around since FS9) could I ask if the attachpt problems I highlighted in my post http://fsdeveloper.agerrius.nl/forum/showthread.php?t=4297 will be corrected in SP1.

    Don
  14. DougMatthews

    DougMatthews

    Joined:
    23/10/06
    Messages:
    288
    Country:
    us-washington
    I don't know if the attachpt tool issues you raised have been addressed. I forwarded a link to your thread to the developer responsible. Please file bugs at www.fsdeveloper.com for anything like this.

    -Doug
  15. DougMatthews

    DougMatthews

    Joined:
    23/10/06
    Messages:
    288
    Country:
    us-washington
    Understood. I can see where those values are hard-coded inside BglComp. There may be reason to prevent modification of some of the parameters. Some of those reasons may be obsolete. It is my desire, in the future, to expose as much as possible of this in the XML.

    -Doug
  16. José

    José

    Joined:
    10/11/06
    Messages:
    490
    Country:
    brazil
    Tricks

    Hi, Don and Jon

    I didn't read the AFCAD help and deduced that apron edge lights configuration could not done by the program. I was wrong. It can be done, really, for FS9.

    The "solution" pointed out by Don is very creative, although somehow hard to be made. I tested and it worked well. Now, I can configure my apron edge lights for FSX.

    It seems Jon can make with SDE, for FSX, the same AFCAD does for FS9. I ask: why not? We want good solutions, it doesn't matter if is not "standard".

    I hope I could configure apron edge lights with SDE, soon.

    By now, I'll follow Don's suggestion.

    Thanks,

    José
  17. xavios

    xavios

    Joined:
    13/2/07
    Messages:
    82
    Country:
    france
    I wanted to thanks Don for its solution about the edgelight treatment to manage the spacing.
    I have created the new one and then removed with AFCAD2 absolutely everything except the ARP and then draw my aprons lights. What I wonder is if the "FS9"name is still important as far as nothing else remains in this file except the edgelights.
    Thanks again for this finding.
    Xavier
  18. Helli

    Helli

    Joined:
    22/6/06
    Messages:
    1,701
    Country:
    germany
    "Help" function in AFCAD 2.21

    Hello,

    Don (Gadgets) wrote on 12.03.07
    In my AFCAD-program version the "Help"-function does not provide anything.

    Am I missing a help-file or does Don refer to the HTML-file "Readme.htm" which of course I have?

    regards

    Helli
  19. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,081
    Country:
    ca-britishcolumbia
    On my system, the Readme is brought up under the AFCAD 2.21 Help menu. So, yes, I'm also referring to the readme.

    DOn
  20. Helli

    Helli

    Joined:
    22/6/06
    Messages:
    1,701
    Country:
    germany
    Thank you Don!

    OK, so it probabely caused by the installation, that I do not see it under "Help"
    But that doesn't matter.

    Good to know.

    All the best

    Helli

Share This Page