• 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.

Problems with gmax-made ground scenery

Messages
5
Country
finland
Hello everybody,

As most of you probably know, we released a new version of our Helsinki-Vantaa (EFHK) scenery a couple of weeks ago. The scenery features a gmax-based ground scenery which works just fine on most computers. However, after the release, I recieved reports that some users are experiencing some really weird problems with the ground scenery. They reported that the ground works as it should when they are departing the airport but on approach it has completely disappeared. Interestingly, this peculiar problem occurs only on some computers, excluding mine, which makes it really hard for me to try to solve this issue.

Two of those who are experiencing this problem have been willing to test some modified ground bgls for me and so far we've concluded that everything works fine as long as you start your flight at EFHK and stay within about 10nm distance from the airport. However, when they slewed to the distance of about 25nm from the airport and then slewed back, the ground scenery had disappeared leaving only the VTP polygon underneath visible. As I'm starting to run out of ideas on how to solve this issue, I decided to give you a detailed description of the problem and hope that you could be able help me out.

First of all, the basic structure of our ground scenery is that underneath everything else there is a Ground2k-made VTP grass polygon which is there only to confine the autogen trees to areas outside the airport itself. The culprit, that is, the gmax-based ground scenery, lies right on top of it. It initially consisted of various ADDCAT layers, but as I tried to troubleshoot this problem I consolidated the whole ground scenery into one layer. Here is the source code of the wrapper file for the ground scenery:

Code:
;compile with BGLC /BGL D:\EFHK-scenery\uusi_pohja\pohja.asm
header label word
    dw      0001            ; 00 World set number   
    dd      000665DA4H          ; 02 North bound        
    dd      0006639DEH          ; 06 South bound        
    dd      011C174CEH          ; 10 East bound         
    dd      011C174CCH          ; 14 West bound         
    dw      20 dup(0)                               
    dd      (offset OBJECT_DATA) - (offset header)
    dw      33 dup(0)                               

OBJECT_DATA label word                                  
    db  21              ;;LATBAND_REL                   
    dw  0331Ch          ;;lat min (inclusive) 512M units
    dw  0332Fh          ;;lat max (exclusive)           
    dd  (offset OBJECT_0) - (offset OBJECT_DATA)        
    db  0               ;;EOL                           
OBJECT_0 label    BGLCODE
    db  12                      ; NEAR_FAR_HUGE_OBJECT_HEADER
    dd  000664BC1h,011C174CDh           ; latitude,longitude          
    db  100                     ; image power                 
    dd  (offset OBJECT_0_END) - (offset OBJECT_0)             
OBJECT_0_START label word
    ADDCAT OBJECT_0_SCALE, 8
    INSTANCE_CALL  R, 0, 0, 0
    BGL_JUMP_32 OBJECT_0_END 
R label word
    BGL_RETURN
OBJECT_0_SCALE label    BGLCODE
    SCALE_AGL   OBJECT_0_RETURN, 50000, 4579, 131072, 000664BC1h, 06E15h, 011C174CDh, 0998Dh, 0, 0
    BGL_CALL        OBJECT_0_BEGIN
OBJECT_0_RETURN label word
    BGL_RETURN
OBJECT_0_BEGIN label word
model_outside    label    BGLCODE
model_shadow label BGLCODE

LOD_0    label    BGLCODE
    BGL_JUMP_32    LOD_0L

model_inside  label    BGLCODE
    BGL_RETURN
LOD_0L    label    BGLCODE
    BGL_BEGIN 0800h ; version = 8.00
    ;BGL_TRANSFORM_MAT 0.000000,0.100000,0.000000, 1.000000,0.000000,0.000000, 0.000000,1.000000,0.000000, 0.000000,0.000000,1.000000
    include    D:\EFHK-scenery\uusi_pohja\pohja_0.asm
    include    D:\EFHK-scenery\uusi_pohja\pohja_paikat_y_0.asm
    include    D:\EFHK-scenery\uusi_pohja\pohja_paikat_x_0.asm
    include    D:\EFHK-scenery\uusi_pohja\pohja_rwy_3_0.asm
    include    D:\EFHK-scenery\uusi_pohja\pohja_rwy_2_0.asm
    include    D:\EFHK-scenery\uusi_pohja\pohja_rwy_0.asm
    include    D:\EFHK-scenery\uusi_pohja\pohja_hi_res_0.asm
    include    D:\EFHK-scenery\uusi_pohja\pohja_hi_res_2_0.asm
    include    D:\EFHK-scenery\uusi_pohja\rwy1533_0.asm
    include    D:\EFHK-scenery\uusi_pohja\rwy22R04L_0.asm
    include    D:\EFHK-scenery\uusi_pohja\rwy22L04R_0.asm
    include    D:\EFHK-scenery\uusi_pohja\service_road_0.asm
    include    D:\EFHK-scenery\uusi_pohja\twy_line_0.asm
    include    D:\EFHK-scenery\uusi_pohja\ground_markings_0.asm
    ;BGL_TRANSFORM_END
    BGL_END
    BGL_RETURN

OBJECT_0_END label word
EOF

The sources for the ground polygons can be downloaded here.

As I scrutinized this issue, I noticed that it doesn't matter whether you construct the ground using various ADDCAT layers or using the technique above. Regardless of the method used, the same problem still persists. The TRANSFORM commands were an experimentation to raise the ground a little and see if it helps but, unfortunately, it didn't. I also tried to convert each of the ground polygons into library objects and place them using SCASM and its LayerCall but it worked neither. Once again, the ground was gone when the test pilots flew far enough from Helsinki and then returned back there.

Strangely, one of the testers reported that the ground scenery of our Helsinki-Malmi (EFHF) works just fine. The ground of EFHF is created using the same methods I used at EFHK but apparently there is a vital difference somewhere. I wasn't able to locate the crucial distinction myself but maybe you are. The source code of EFHF ground scenery is available here.

This finding led me into thinking that there might be a problem with the flatten file our our EFHK scenery. I've, however, double checked that both the flatten and the invisible runways used to create the PAPI lights are placed at the same altitude of 54.57 meters - and as far as I know, those are the only files which include information on the altitude of the airport. Here's the SCASM source of the flatten file:

Code:
Header( 1 N89 S89 W179 E179 )

LatRange( N89 S89 )

Area16N
    Elevation( 54.57
      N60:21:09.0146 E024:57:19.9214
      N60:20:04.6652 E024:56:09.6300
      N60:19:21.9978 E024:54:37.1542
      N60:18:41.7278 E024:53:16.9679
      N60:18:30.3240 E024:53:01.2822
      N60:17:48.9524 E024:52:16.7500
      N60:17:27.6997 E024:55:09.4276
      N60:17:20.9611 E024:59:22.9017
      N60:17:50.2484 E025:00:34.0702
      N60:20:09.1684 E025:00:37.8261
      N60:20:40.5291 E025:00:33.3966
      N60:21:10.3833 E024:57:40.3441
    )
End16

The testers reported that when I experimented with zbiased ground polygons without the ADDCAT command this problem didn't appear. That approach, however, leads into an abundance of other difficult issues such as layering, flickering, bleed-through and tranparency problems which are gone when using the ADDCAT command.

Now, after this lengthy account of this problem, I look forward to hearing if anyone of you has run into this kind of problem before and, better still, would have an idea on how to solve this. As far as I know, only a minority of users are experiencing this problem, but I would like to give them as well a possibility to enjoy our newly-released scenery.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,858
Country
netherlands
Hi Mikael,

Unfortunately I don't really have an answer. The only strange thing I noticed in your code is the INSTANCE_CALL command (looks like a dummy RotatedCall or so), is this done to keep the autogen exclusion small?

I know that some users of our NL2000 scenery have reported similar problems with our Schiphol scenery (parts are gone when you arrive back). I can't remember if they solved it. I will have another look in our forum to see if it contains useful info.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,858
Country
netherlands
Hi Mikael,

I had a quick look at our forum and found two things that might be interesting:

  1. Some of the problems of dissapearing scenery were solved by the users by updating their video drivers. It had nothing to do with the BGL file itself.
  2. On another issue it seemed to be caused by the other BGL files we used around the airport. We provided different versions of these files and in one variant it happened and in others it did not. So it might be interesting to see if you can find a BGL file not related to your airport that causes this.
 
Messages
5
Country
finland
It's encouraging to hear that the problem might have nothing to do with our bgls after all. I now have the scenery.cfgs of both the testers so I'm quite easily able to compare their installed sceneries to mine. Do you happen to recall what kind of bgls caused this problem with your scenery? Was it somekind of an exclusion file or something else?

And yes, you're correct that the dummy rotate is there to make the autogen trees appear in the vicinity of the airport. It's a handy trick when you're working with gmax ground polygons.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,858
Country
netherlands
Hi Mikael,

In our case we offered two version of our based scenery. One has SCASM polygons all over the country (including the rivers etc). In the second version we cut out the rivers, so that you could see the LWM water below. With this last version the problem was gone.

But as the technique in both these versions was rather common, I don't really know why this solved the problem.
 
Top