• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Editing an ground poly

Don't want to sound like the "pope", and I want to help, but I think it reaches my border of personal ethics to help you edit someone else's payware scenery. The developers, many of whom visit these forums, may have other plans for their products, perhaps a free upgrade or payware upgrade. Remember that when you buy a scenery, it is essentially a license for personal use for a specific sim version.
That's why MCX asks you "is this your scenery, do you have permission from the owner, etc" before compiling".

Signing out from this one!
Good luck.


Indeed it sounds a little bit like the pope :D *just kidding*

This is because I wrote "I don´t want to make a big thing of that". Of course it only was meant to be for my personally use as long as we hoppefully get an officially update ...
Behind that I have also an interest in how such things work in order to learn something new about scenery developing.

So no worries and just let us forget my request :)

Best regards,
Holger
 
I deleted it bro......I sounded like a pope too much. LOL

Who am I to police anyone. :p

Carry on..........you are all blessed
 
Ah, you didn't tell me the error message before.

I just checked and opcode 62 is the IfVis command, which is currently not supported when reading BGL files. If encountered it will be skipped, but that could mean that the call to the drawing code is also skipped, so you get an empty object. If it's just this opcode I can probably add support to at least continue reading without too much effort.
 
Meanwhile I´m more interested in the the story behind than in the converting story itself ;) I tried different tools BGL2XML, BGLAnalyzer without any success. BGL2XML says that this files are not compiled with bglcomp. I just can say for sure that they are groundpolys which work fine in FSX and in P3D V3 too. Mysterious ...

Are they groundpoly bgl files around which are not made with bglcomp (SDK)??
 
Without intending to seem impertinent, I could offer that there are many types of .bgl's in a scenery. If assessing by name alone, some .bgl's can appear to be ground polygons, further, the symptom you have is that they are not visible and the condition causing it, you assume, is the fact that you are attempting to view them in P3Dv4. A very, very simple consequence of improperly activated payware is that the carefully composed ground polygons are not rendered. I am not suggesting the scenery is pirated, I am suggesting that there are many causes for a ground .bgl, in payware scenery, to be visible in FSX and not P3D and it is a rather extreme leap to automatically assume it is the format of the ground .bgl itself, without considering other causes.
Toward a better understanding, I would ask you what about the .bgl convinces you it is a ground polygon. Did you open it in TmfViewer to confirm? Also, you did not say exactly which scenery. Many people here have these products, or a familiarity with them and a "for instance" wouldn't be close enough. As a paid owner of the software, you would be extremely protective of the publisher to disguise by not naming a thread that describes how to decompile their product.
 
"rk"

Did you read the whole story!? To tell you the truth it has a very bad taste when you are talking about something like activation problems or piracy whereas I´m having a serious intention!

You can be pretty sure that it is not an activation problem. BTW as far as I know there is not a single scenery which has a copy protection which let disappear the groundpoly. Further more I´m talking about sceneries which have a very easy activation process.

My intention is only to find out why a single bgl don´t work in P3D V4 whereas it works fine in FSX and as well P3D V2 V3 and why it can´t be open in MCX.

How can I be sure that it is a ground poly? The file itself is named as XXXXground.bgl. I deactivated it in FSX/P3DV3 and the Apron has disappered. TMFViewer is the wrong tool to confirm it as it is intended to open fotosceneries bgl´s and not groundpolys ...

Which airports I´m talking about? It is not my intention to make a "how to" so I have avoided to go to deeper in details. But above I already gave you some examples and further more it is a well known issue which has already been diskussed in the community. Here is one example:

https://www.avsim.com/forums/topic/520185-aerosoft-dublin-in-p3d-v4/

And again my intention. I´m looking for a temporary solution to make some airports work in P3DV4 until there is a officially update by the developers. 95% of the FSX/P3D airports works fine or need only simple corrections which can be easily done by ADE. Further more i´m exteremely interested in the story behind as I´m a scenery developer myself.

Holger
 
Are they groundpoly bgl files around which are not made with bglcomp (SDK)??

Maybe there are still old scenes that are associated with the old SceneryAssemblerCode. In some old scenes for the fs2002, the groundpolys were SCASM coded. If the bgl file is opened with a regular text editor, you can read the compiler in the header. With SCASM-Compilation there would be something like "assembeld with scenery assembler v2.9x" etc. This could also be the reason why some old bgl files can not be opened with the Modelconverter.
 
  • Like
Reactions: NGX
Hello:

IIUC, your "Ground Polygons" (AKA "G-Polys" / "G-P's") are created in SCASM / ASM code, and are not MDL-based flat 3D objects.

Although Arno has kindly offered to look into adding the ability to support reading of such a "IfVis" BGL OpCode in a future release of ModelConverterX (aka "MCX"), AFAIK, it is uncommon to encounter that BGL OpCode in a SCASM / ASM-compiled G-Poly intended for use in FSX.

http://www.scasm.de/doc/sca_cmd2.htm#ifv


IMHO, that "IfVis" BGL OpCode would suggest a more complex code structure may have been used by the developer which is distinct from that currently used by Arno, Don Grovestine, and Luis Sa' to create legacy FS2Kx format Ground Polygons.

Thus, the full code of that BGL for the GP's should best be examined after it is de-compiled, to see if further modification of a copy of the source code may be required prior to re-compilation by SCASM ...to allow successful display in P3Dv3 and/or P3Dv4.


The SCASM type BGLs can usually be decompiled using Winfried Orthmann's BGLAnalyze version 3.1, and the output is a *.SCA text file.

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


Alternatively Takuya Murakami's ScDIS version 2.3 may be used:

http://sourceforge.net/projects/freesc/files/scdis/scdis 2.3/


Hope this helps with the learning process. :)


GaryGB
 
Last edited:
Gary, you are a darling of gold. Simply priceless ... :)
Where do you just take all this knowledge :wave:
 
Thank you very much Gary!

As already written above I already have tried to decompile the bgl with BGLAnalyze unfortuneately without success so far. The SCA File was built but I wasn´t be able to load it into MCE (gave me the same error message like if I try to load the original bgl. This was not the case with other scasm files which I have decompiled before.
I will give it another try and will do a deeper look into it. Also I will test the second tool you have mentioned.

Thanks again,
Holger
 
"rk"

Did you read the whole story!? To tell you the truth it has a very bad taste when you are talking about something like activation problems or piracy whereas I´m having a serious intention!
Yes, I did read the whole story, in order to better inform myself as to help you with your problem. I told you many things can cause ground polygons to not show up among them activation issues. I have seen cases, my own self included, where activation security prevented a valid user from using a product they'd paid for, as if it had been pirated. It is unfortunate for both of us that such a conversation causes you to have a very bad taste.

You can be pretty sure that it is not an activation problem. BTW as far as I know there is not a single scenery which has a copy protection which let disappear the groundpoly. Further more I´m talking about sceneries which have a very easy activation process.
Wow that really clears things up and you know what? You're right, I found several examples of payware scenery improperly activated that only rendered the custom photographic ground polygon and none of the objects were visible and I guess since yours is the opposite case, it can't be an activation problem, so ya, good luck with it. I'm sure someone will help you figure out what about your easy activating payware scenery with example links to "it doesn't work" forum posts, that doesn't open with the normal tools and nobody can figure out what it really is because you wont tell us, makes it not work in P3Dv4.
 
Rick,

your intention was to help and I have to say thank you. Thank you! i really appreciate your intention to help. But as already said your are on a completely wrong way. I know what your are mean if objects disappear after a short time period (demo mode FSDT e.g.) Activation problems are something that take place if you want to install a complete scenery. I´m talking about a single bgl file. All sceneries I´m talking about work fine in FSX and P3D without any activations problems. They also work fine in P3D v4 appart from some bgl´s and this is because they were not made for P3D V4 and need some adaptation. So this is not a activation issue because the scenery was simply not made for P3D V4.

What I meant with a easily installation/activation of that the sceneries I´m talking about is that they are only need a simple password and email in order to get a online valdidation. There are only two possibilities. Online validation works then the secenry works, online valdiation failed then nothing works.

It was not my intention to make you angry. So again, thank you for your help!! I think Gary and Christian are on the right way what my inital question affects.

Holger
 
Here are an extract of the .sca file. Í can´t open the sca file with MCX because it gave me the same error messages I get if I try to open the original bgl file.

; ----------------------------------------
; XXXX_Ground.BGL disassembled by BGLAnalyze (c) on Sat Jan 27 13:44:55 2018

; ----------------------------------------
Header( 1 N53:26:34.47 N53:24:40.70 W006:15:29.23 W006:15:29.23 )
LatRange( N53:24:40.70 N53:26:34.47 )
; since SCASM does not support multiple latitude ranges
; the range has been set to the minimum/maximum latitude.
; LatRange information in the BGL file is given as comment.
; If you want to use band separation, you must edit
; the source file manually.

; Insert the "Set( FSVers 0x800 )" instruction at the beginning
; of the file, if you want to use the FS2002 instructions
; for the facilities section
mif( [$Version < 285] )
Error( You need at least SCASM version 2.85 to compile this code )
mifend

; ----------------------------------------
; Procedural scenery
; ----------------------------------------


; LatRange( N53:24:40.31 N53:26:36.41 )
; ----------------------------------------
; ----------------------------------------
; Object # 1, offset: 0x000A size: 973562 bytes (0xEDAFA)
;; Lat: 0005A98E8h Lon: 0FB8CBE78h
; ----------------------------------------
Area( C N53:25:37.58 W006:15:29.23 100 )
IfVarRange( :L00002E 0346 2 32767 )
LayerCall( :L000034 12 )
LayerCall( :L00007E 16 )
:L00002E
Jump32( : )
:L000034
RefPoint( rel :L0000C8 0.50 N53:25:37.60 W006:15:29.23
V1= 10000 V2= 1756 )
:L000054
Jump( :L00005C )
:L000058
; unreachable code, possibly data area
Dbx( 0D 00 1E 00 )
:L00005C
VarBase( :LFFFFFFF8 )
SetVar( 0000 2 )
SetVar( 0002 2 )
VarBase( :[0] )
Return
:L000076
; unreachable code, possibly data area
Dbx( 8A 00 54 00 00 00 22 00 )
:L00007E
RefPoint( rel :L0000C8 0.50 N53:25:37.60 W006:15:29.23
V1= 10000 V2= 2539 )
:L00009E
Jump( :L0000A6 )
:L0000A2
; unreachable code, possibly data area
Dbx( 0D 00 1E 00 )
:L0000A6
VarBase( :LFFFFFFF8 )
SetVar( 0000 2 )
SetVar( 0002 2 )
VarBase( :[0] )
Return
:L0000C0
; unreachable code, possibly data area
Dbx( 8A 00 3A 75 01 00 22 00 )
:L0000C8
Return
:L0000CA
; unreachable code, possibly data area
Dbx( BC 00 00 08 00 00 B7 00 02 00 00 00 )
Dbx( 00 00 01 00 00 00 FF FF FF FF 00 00 )
 
I did a comaprsen with a .SCA file which works in MCX and there are look quite the same but the working file has not this lines:

; unreachable code, possibly data area
Dbx( BC 00 00 08 00 00 B7 00 18 00 00 00 )
Dbx( 00 00 01 00 00 00 FF FF FF FF 00 00 )
Dbx( 00 00 C8 7E AC 40 44 49 52 54 5F 30 )
Dbx( 30 32 2E 44 44 53 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 01 )
Dbx( 00 00 FF FF FF FF 00 00 00 00 C8 7E )
Dbx( AC 40 44 49 52 54 5F 30 30 32 5F 4C )
Dbx( 4D 2E 44 44 53 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 01 00 00 00 FF FF )
Dbx( FF FF 00 00 00 00 02 81 88 41 44 49 )
Dbx( 52 54 5F 30 30 34 2E 44 44 53 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 01 00 00 FF FF FF FF 00 00 )
Dbx( 00 00 02 81 88 41 44 49 52 54 5F 30 )
Dbx( 30 34 5F 4C 4D 2E 44 44 53 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 00 00 )
Dbx( 00 00 00 00 00 00 00 00 00 00 01 00 )
Dbx( 00 00 FF FF FF FF 00 00 00 00 A2 29 )
Dbx( 7C 42 44 49 52 54 5F 30 30 35 2E 44 )

goes on and on ....



The working file looks instead so:


; unreachable code, possibly data area
Dbx( 22 00 )
:L000078
RefPoint( rel :L000076 1.00 N37:01:02.00 W007:58:15.81
V1= 22000 V2= 1832 )
BGLVersion( 0800 )
MaterialList( 0
; material 0
1.000 1.000 1.000 1.000 ; diffuse color
1.000 1.000 1.000 1.000 ; ambient color
0.000 0.000 0.000 1.000 ; specular color
0.000 0.000 0.000 1.000 ; emissive color
0.000 ; specular power
)
TextureList( 0
5 00 128 128 128 0 1000.00000
XXXX0000.BMP ; texture 0
0 00 128 128 128 0 1000.00000
XXXX0000_LM.BMP ; texture 1
5 00 128 128 128 0 1000.00000
XXXX0001.BMP ; texture 2
0 00 128 128 128 0 1000.00000
XXXX0001_LM.BMP ; texture 3
5 00 128 128 128 0 1000.00000
XXXX0002.BMP ; texture 4
0 00 128 128 128 0 1000.00000
XXXX0002_LM.BMP ; texture 5
5 00 128 128 128 0 1000.00000
XXXX0003.BMP ; texture 6
0 00 128 128 128 0 1000.00000
XXXX0003_LM.BMP ; texture 7
5 00 128 128 128 0 1000.00000

and so on ...
 
So it seems that BGLAnalyze also can't decompile the BGL opcodes correctly. There must be something special with how the developer made the code.
 
I have just pushed a new build of MCX that can read the opcode 62. Maybe that's enough to read the file.
 
  • Like
Reactions: NGX
I have just pushed a new build of MCX that can read the opcode 62. Maybe that's enough to read the file.

Unfortuneately not Arno but thank you very muxch for your effort!!

Fortuneately I made a big step forward in using the second tool which Gary has mentioned. It makes a completely different de-compile of the files I´ve tested so far and meanwhile I was able to make some of them visible. Need some more resarch at some variables but it seems I´m on the right way :)
 
Back
Top