FS2004 Need Help Opening Some Scenery BGL's

#1
Hi All,

I'm new here and trying to not only enhance some scenery but complete it as well.

The project I'm working on is some freeware scenery of McChord AFB. I've contacted the author and he no longer has any of the source files so I'm learning and doing what I can to try to complete the unfinished scenery. It was released as a work in progress with promise of updates along the way, but none were ever given to the public. The scenery is actually the best for McChord I've come across for FS9, so I've taken it upon myself to complete it and use it as a learning project.

A) The first major issue is that the control tower has no exterior textures.. a texture is provided but apparently not used by the BGL file.

B) The second issue is with the night textures for buildings/hangars.. they also are provided, but not used by the BGL files.

C) And finally the last major issue is that the author has used the landing light effect to illuminate the flightline from the perspective of the lighting poles... while this really looks nice, it is overbearing and a huge framerate hog, so I'd like to either remove the effect or use an alternate method.

My learning process has basically been halted, because I can't even open the BGL files to decompile them. I've used several programs found on the web, but none of them seem to work properly giving me errors messages.

I am hoping to find someone willing to have a look at these BGL's and maybe offer some help with getting them open.

Here's a link to the entire McChord scenery file by Brian Voigt, this is the 16 April, 2005 version and not the version he released for Megascenery corrections.
http://www.aircraft.bz/modules.php?name=Flight_Simulator_2004&d_op=getit&lid=782

I've also attached a zip containing only the Tower BGL and the tower texture provided with the original scenery.

To anyone willing to help me out, thanks very much in advance :)

Cheers,
Chris
 

Attachments

Last edited:
#2
Hello:

Looks like a nice project in the works ! ;)


See these threads for an overview of dealing with legacy format scenery created using SCASM:

http://forums1.avsim.net/index.php?showtopic=286931

http://forums1.avsim.net/index.php?showtopic=287026


The object BGLs in your KTCM - McChord AFB scenery by Brian Voigt appear to all be SCASM - type BGLs.


Usually I can see a SCASM descriptive header in those BGLs via a file viewer, but curiously these look different than I've seen before; regardless, they decompiled fine using an older version of BGLAnalyze (version 3.1):

http://library.avsim.net/esearch.php?CatID=fs2002sd&DLID=27375


Looking at the texture file name for the tower in a file viewer and in the decompiled SCASM code from "ktcmtower.bgl", it seems that the mapped texture should properly be named "KTCMTOWER.BMP", and may have been accidentally overlooked by the author.

Try re-naming "tower.bmp" to "KTCMTOWER.BMP", re-start FS9... and see if it is visible.


NOTE: ModelConverterX also could not initially map the textures onto the 3-D model due to the mis-naming of the texture; after I re-named "tower.bmp" to "KTCMTOWER.BMP", it rendered OK:




Try decompiling the KTCM BGLs for the buildings that have texture problems and see what their mapped texture file names are supposed to be, then check whether another KTCM texture file can be re-named to the required name so the buildings then render in FS. :idea:



PS: See Bill Leaming's and Sid Schwartz' ramp lights... they are FS scenery object libraries that have several types of lights one can place in FS:


http://library.avsim.net/esearch.php?CatID=fs2004scen&DLID=140457

http://library.avsim.net/esearch.php?CatID=fs2004sd&DLID=142190



NOTE: You may need to disable the following files by renaming them to a "BAK" file extension to eradicate original KTCM "BGL/Taxi/Landing lights":

"ktcmlightsb.bgl"
"ktcmlightsc.bgl"
"ktcmlightsd.bgl"
"ktcmlightsj.bgl"


Hope this helps ! :)

GaryGB
 

Attachments

Last edited:
#3
WOW!!! Thanks very much Gary! :D I really appreciate your time and effort with my questions.

Renaming the tower bmp did the trick, now the tower textures are visible :)

Regarding the light poles.. I did try to rename the light pole BGL files but then I can't use them at all and they are perfect reproductions of the real ones at McChord, so I'm hoping that I might be able to use the lightpole as an object in instant scenery... just have to figure out how.

I never even thought about using an older version of BGLAnalyze.. thanks for that!

Thanks for all the reference links.. l have some reading to do. :)

Again, thanks very much for your help Gary!!

Cheers,
Chris
 
#4
Hello:

Just had a moment for another couple of tips... ;)


Try importing the decompiled BGLs (*.SCA files) into ModelConverterX (aka "MCX")

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

http://www.fsdeveloper.com/wiki/index.php?title=ModelConverterX



NOTE: If MCX version 1.2 won't work with the *.SCA files (or won't render some objects within them), try using MCX version 1.0or one of the newer "development versions" available through the MCX forum download links.




Output as MDLs, and make scenery libraries with Library Creator XML 2.0.2:

http://www.fsdeveloper.com/forum/downloads.php?do=file&id=8

http://www.fsdeveloper.com/wiki/index.php?title=Library_Creator_XML_2.0



BTW: Remember to create a "friendly name" list ("Objects.txt") for the objects in the output library, and put it in the in the nested SBuilder\Tools folder so SBuilder will be able to display those names as well as the "GUID" names in its pick-list when placing objects.

ADE may have a similar requirement in its setup.

For Instant Scenery etc. to be able to display library object "friendly names" as well as the "GUID" names in its pick-list when placing objects, a text (*.txt) file that has the same name as the scenery library bgl file must be placed in the nested \Scenery folder along with the finished library BGL.

http://www.simforums.com/forums/forum_posts.asp?TID=28640&PID=162851


PS: Brian Voigt may wish to use ModelConverterX to re-create his 3-D models and update his work to FSX-compatible versions.; if the SCASM BGL-type ramp lights aren't FPS-efficient, perhaps the models can be modified in the 3DS output file imported into GMAX and the newer methods could be used:

http://www.fsdeveloper.com/forum/showthread.php?t=17846&highlight=BGL+light


Hope this helps ! :)

GaryGB
 
Last edited:
#5
This is great info Gary, thank you so much for your time and all the links!! :D

I emailed the original author and asked him about the scenery a month or so ago, it was then that he told me all the original files had been lost over the years due to hard drive crashes, formats, etc. That's more or less when I decided to take it upon myself to fix the things I could find wrong and add to the scenery to enhance it even more.

I gotta thank all the programing wizzes out there making all these utilities that in turn make the scenery process go smoother and easier!

What made me get re-interested in this scenery package is that I live in the Northwest and fly in and out of McChord with the Alphasim C-17A. I didn't like flying at night with the scenery due to all those landing lights washing out the flightline and making FS stutter with the FPS hit. Then the program "Airport Wizard" came along and allows for light spots to be placed in the scenery at no hit on FPS.. that way I could eliminate the need for the landing light effect. The only problem I face is that I believe there is no way to share these effects in a scenery package due to the copyright requirements, but that wouldn't stop someone from purchasing Airport Wizard themselves and adding the effect that way from their own PC.

Anyway... Gary that's loads again for your help!! :)
 
#6
Hello:

IIUC, the 3-D light effects are an implementation of the concepts recently discusssed by Bill Leaming in the thread linked above:

http://www.fsdeveloper.com/forum/showthread.php?t=17846&highlight=BGL+light

Once the 3DS file(s) of the KTCM ramp light(s) are exported by MCX (with author's permission), one could open them in GMAX and implement the 3-D lights as described by Bill Leaming into the KTCM 3-D ramp light models, thereby yielding a 3-D ramp light effect using the visual models of the lights you seem to prefer for that airport.

It is a somewhat advanced undertaking, but do-able... if one follows that thread and related threads via the FSDeveloper Search function. ;)

Best wishes with your project ! :)

GaryGB
 
#7
Thanks again Gary, you have been a wealth of knowledge and help to me! :)

I've emailed the original author of the scenery Brian Voigt and he has given me his blessings to do what ever needs to be done with the files to make the project work... so now I just need to sit down, start reading all the info you've provided, get the feel for these new utilites mentioned, and start experimenting.

I'll keep you updated on my progress Gary, and I'm sure I'll have more questions. :D

Cheers,
Chris
 
#8
Hi All,

I've had so time to play with all these utilities and I've learned one thing for sure.. SCASM files are difficult to deal with. I tried to follow a few of the forum topics Gary provided to me especially those about SCASM file.. here's what I have so far.

I've used BGLanalyze 3.1 to decompile the BGL's which gives me a SCA file.

I then used MCX to import the SCA file and then export to a FS9 MDL file which gives me a MDL file and a FX file.

the MCX log file is as follows:
11:04 AM SCASMReader Information Starting reading of file D:\Scenery\McChord Lamp SCA's\LightsB\ktcmlightsb.sca
11:04 AM SCASMReader Information Starting reading of subobject 0
11:04 AM SCASMReader Warning Unsupported command IfVarRange in line 32
11:04 AM SCASMReader Warning Unsupported command IfVarRange in line 9295
11:04 AM SCASMReader Information Finished reading of subobject 0
11:04 AM SCASMReader Information Finished reading objects
11:04 AM Renderer Information Loaded texture: LIGHTPOLE.BMP
11:05 AM MDL9Writer Information Starting writing of file D:\Scenery\McChord Lamp SCA's\LightsB\ktcmlightsb.mdl
11:05 AM XWriter Information Starting writing of file D:\Scenery\McChord Lamp SCA's\LightsB\_MCX_temp.x
11:05 AM XWriter Information Finished writing of file D:\Scenery\McChord Lamp SCA's\LightsB\_MCX_temp.x
11:05 AM MDL9Writer Information Finished writing of file D:\Scenery\McChord Lamp SCA's\LightsB\ktcmlightsb.mdl


I tried to use LibraryCreatorXML to make a scenery object, but each of the four ktcmlight bgl's have multiple light pole objects in them and I could not figure out how to edit or eliminate all the poles and just make a single pole that I can use Instant Scenery with, so... I decided to go at it from a different angle.

I though if I could just eliminate the landing light effect from each SCA file then I would be just as happy. I opened the SCA file in notepad but can't for the life of me figure out where it mentions anything about the FX file.

I know that if I can edit the file I will need to compile the file again using SCASM, so I downloaded it from the SCASM website and gave it a go by dropping the SCA file on top of the SCASM.exe file. That process doesn't seem to work, a little window pops up briefly and I hear an audio beep, then the windows disapears and no BGL is created (that I can find anyway). I'm using Windows 7 and I set the file for compatibility mode with Win95, 98/ME, and XP svc pack 2, but none of these settings worked.

I'll upload the SCA and FX file here and I'm hoping someone might be able to help me identify how to eliminate the landing light effect from the file and also how to recompile the SCA file into a BGL with Win7, if at all possible.

Thanks for the assistance in advance :)

Chris
 

Attachments

Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#9
Hi Chris,

Those warnings you get from ModelConverterX are nothing to worry about, those are quite common and should not give you trouble when using the object.

If you alter the SCASM file, it might not be necessary to compile it again with SCASM. If you still want to make a MDL object out of it, you can just run it through ModelConverterX again.

In the SCASM file you will not find a reference to the FX file. This is a file that ModelConverterX made, since that is the best way to make lights in FSX. In the SCASM file you will find a command called Light that defines where the lights are supposed to be. So if you want to get rid of them, you can remove those lines. Below is an example of the lines to look for:

Code:
Light( m 5 0.00 0.00 0.00
	20 0.60 0.40 CF 126 227 255
	0.00 0.00 1.00 )
 
#10
Thanks Arno :)

I removed all the code shown in your example and remade the model. In FS9 I open Instant Scenery and I see the light poles as an object. Then I change the time of day to night and the landing light effect is no longer there which is what I want, but the light poles no longer illuminate at the actual light (where the bulbs would be). The original files did this so I'm not sure what I'm doing wrong.. I had this same problem with the first model I made as well. I wonder if the bulb effect is also part of the landing light effect?

Here is the code, can you check to see if it looks correct? I'll also include the SCA file. Thanks for any help!

Chris

BGLVersion( 0800 )
TextureList( 0
1 FF 255 255 255 0 5.79244
LIGHTPOLE.BMP ; texture 0
0 FF 255 255 255 0 5.79244
LIGHTPOLE_LM.BMP ; texture 1
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#11
Hi,

You decompiled this BGL file right? It seems the night textures are not defined correctly. The first argument for the night texture should be 256 and not 0.
 
#12
Hi Arno,

Yes, I decompiled it with BGLanalize 3.1 and I haven't edited any part of the texture code, just the "Lights" part we spoke about in a previous post.

The strange thing is that the original BGL works just fine and displays the effect that the lightbulbs are on at night, but when I decompile it and then compile it again from the MDL with MCX, the effect is no longer present.

Thanks for the help! :)

Chris
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#13
Try to replace the 0 by 256 and then I expect it will work again.

Also if you recompile the SCA file to a BGL, I expect the night texture will be broken. If that still works, I need to double check my code for bugs :).
 
#14
Hi Arno,

Changing the code to 256 does work and the night textures are visible in MCX. :)

Then to re-compile into a BGL I have to import the model into LibraryCreatorXML.. once the new file is loaded in FS9 it can be seen but the night textures don't work, the lights are dark. Wish I knew why.

Using LibraryCreatorXML is the only way I know how to compile the BGL, because I can't seem to get SCASM to work properly in my Windows 7 environment. (I drop the SCA file on top of scasm.exe and I hear a beep, but no bgl file is created).

I'm starting to think maybe I should use some different light objects, it's just that these lights are near perfect renditions of the real lights at McChord.

Thanks for the help, it's appreciated! :)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#15
Hi,

To put MDL files into a library BGLComp is indeed the right compiler. Let me try to convert the SCA file you posted to MDL and see if I notice any bugs.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#16
Hi,

It seems the night texture gets correctly into the MDL file. But what do you mean with the lights stay dark?

I think the texture is applied only to the pole. The lights were the commands that you before removed from the SCASM file.
 
#17
Hi Arno,

Well, I'm not too sure how to explain so I've uploaded some screenshots to show what I'm trying to do.

These shots are the original authors bgl files, there are 4 files that display all of the flightline lighting.

The top down shot shows the landing light effect used to illuminate the ground.. I want to eliminate that.

The spot view shot shows the lights illuminated at the top of the light pole. I was sort of under the impression that was being done by the night texture, but now I think I'm understanding what your saying.. it's also an effect, similar to the effect used in the top down view. Is that correct??

If that's the case, then I have to figure out which "Light" code needs to be remove because some of it needs to be kept so the light pole still lights up.

Is there a way to figure out how to tell which code is lighting up the ground and which is lighting up the light pole.. or is it all trial and error??

Thanks again for the help! :D

Cheers,
Chris
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#18
Hi Chris,

I took another look at the model and it seems those lights at the top are indeed also polygons that use the same night texture. So that should work if you get the object converted to a MDL file with night textures.
 
#19
Hey Crew Chief, Did this project ever get completed? I have been looking for a decent McChord for a long time! I have a really nice summertime Photoreal Base to apply these objects to, if you still have them? Also Arno's latest updates to MCX have a lot of old scenery working in P3d4 for me. Thanks Arno!

-Woog
 
Top