FS2002 groundpolys + autogen supression

Hi Arno,

As usual, you nailed it. Thanks! :D That did the trick - plenty of autogen trees now just where they are supposed to be. I'm going to make adding that tweak my standard operating procedure for all 2002-generated ground textures. Thanks again - just a few more additions and Leros will be finished - perhaps now, by this weekend.:cool:
 
I had the same problem today, with disapearing autogen, caused by the runway and runway markers BGL I made with the FS2002 gamepack and the BGLC_9 compiler.
Inserting the line in the .asm file did the trick and brought back the autogen.

But now I have a new problem: Since I inserted the new runway and markers BGL files, I get flickering shaddows from all my 3D objects in the scenery, even on default ground polys and they are about 100 m away from the runway.
Any idea about that?
Aircraft shaddows on the runway itself however are just fine.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Which layers did you use for the different ground polygons?
 
8 for tarmac, taxi and the turn around area at the end of runway,
12 for the runway and 16 for the rw markings.

only in runway and markers, I included the new line of code in the asm files.
The flickering shaddows however are with all the airport buildings on the tarmac and the default grass ground.
If I delete the runway and markers bgl, the shaddow problem on the remaining tarmac bgl is gone.
Maybe I should try to include the line of code also in the tarmac.bgl, even as this is not causing the autogen problem?

Here is the latest runway asm code, never mind about the FS2004, I am using the files later in FSX:

Code:
;compile with BGLC /BGL C:\FS2004\0_My Scenery\RPVT\runway.asm
header label word
    dw      0001            ; 00 World set number   
    dd      0001066CCH          ; 02 North bound        
    dd      000105FCCH          ; 06 South bound        
    dd      05812E233H          ; 10 East bound         
    dd      05812E231H          ; 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  0082Fh          ;;lat min (inclusive) 512M units
    dw  00834h          ;;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  00010634Ch,05812E232h           ; latitude,longitude          
    db  100                     ; image power                 
    dd  (offset OBJECT_0_END) - (offset OBJECT_0)             
OBJECT_0_START label word
    IFIN1       OBJECT_0_FAIL, image_complex, 1, 32767
    [COLOR="Red"]ADDCAT    OBJECT_0_SCALE, 12[/COLOR]
    
OBJECT_0_FAIL label    BGLCODE
    BGL_JUMP_32 OBJECT_0_END  
OBJECT_0_SCALE label    BGLCODE
    SCALE_AGL   OBJECT_0_RETURN, 30000, 896, 131072, 00010634Ch, 00797h, 05812E232h, 03A1Bh, 0, 0
    INSTANCE_CALL   OBJECT_0_BEGIN, 0, 0, 0BB05h
[B][COLOR="Red"]SCALE_AGL   OBJECT_0_RETURN, 0, 0, 0, 0, 0, 0, 0, 0, 0[/COLOR][/B]
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
    include    C:\FS2004\0_My Scenery\RPVT\runway_0.asm

OBJECT_0_END label word
EOF
 
I just recompiled everything with the new line of code in it but still flickering shaddows.

Update: Tried with higher Levels: 12, 16, 20 no success!
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

That's weird, I can't remember that I have seen this effect before. What if you use lower layers (start at 0 and increase by 4 every time)?
 
It looks a little better but still flickering. Also, some of the default taxi etc. is comming through.
The flickering shaddows are only on the 3D objects I made. If I look at some default library objects, like the fuel car, the shaddows are normal.

The flickering effect also stops, when I move my viewing position out of the airport area, like when I look at the buildings from outside the airport boundery.
It will also stop if I delete the runway bgl. and the rw.markers bgl., even if the tarmac.bgl is still there. So the problem only comes from the two bgl files that cover a large area like the runway.
I am just wondering, if nobody had a similar problem before when using this trick?
Could you have a look at the runway.asm file I posted above? Maybe it's something wrong with that one?
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Maybe a stupid question, but you do have a flatten active for the area and the polygons have vertices every 100 meter?
 
Well, not a stupid question. I did follow this rule with the runway and the markings (center line) but forgot it on the tamac which was 140 x 60 meters.
However, I made new polygones, compiled it new and it did not solve the problem. Now the whole scenery seems to be messed up. I have default taxiways flickering on the default runway, flickering hold short nodes and the default taxi is on top of my ground poly. Seems I have to start from scratch by setting up the scenery.
I increased the level for tarmac to 12, rw to 16 and markers to 20. Still, the default markers are on to of my groundpoly. And yes, there is an active flatten.
By the way, this 100 meter rule only applies to ground polys, not to long airport buildings?



Uploaded with ImageShack.us
 
I can not solve this problem. I rebuild the airport in ADE and fixed the problem with the taxi lines by setting the wide to zero and also not drawing the default tarmac surface.
But with the ground polys, still the same problem:
Without the metioned line of code I have no autogen, if I add the line in the asm files I have flickering shaddows from the airport buildings and also the default runway is flickering through the new runway groundpoly but only when looking from far away. Even as I set the runway and markers of the groundpoly to 0.01 altitude in gmax to avoid flickering.
The key should be this line of code here but does anybody have any suggestiones? Why does nobody else seems have this problem?
 

jtanabodee

Resource contributor
I know that this is quite an old thread.
But I did try this in FS2002 style in FSX, what I found is a reverse effect.
All autogens are disappear from the scene!!!!!!! I do not mean just near the ground poly but all of the autogen disappear far .....far....far away from the surrounding area.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

For FSX the tweak is different indeed. You need a dummy reference point at the end. This is what ModelConverterX does in the wizard.

This does give trouble with the shadows though. And it only works if there are not too many polygons in the reference point.
 

gadgets

Resource contributor
Arno, can you be a liitle more specific please and, hopefully, offer a workaround.

My new airport (not yet released) uses your SCALE_AGL "tweak" to avoid suppression of autogen). It was working just fine until yesterday when I added a couple new ground polys. Now, all shadows are flickering.

My polys are distributed across 5 layers. However, I must delete all 5 bgls to eliminate the problem - which, of course, also eliminates a good deal of autogen. This suggests the issue is a little more complex than simply the number of polys at a given reference point.

Any insight you can offer will be greatly appreciated.

Best regards,
Don
 

gadgets

Resource contributor
I spent most of yesterday looking for a workaround to this problem - without success. While it's of little consolation, I have confirmed that the problem is not due entirely to the number of polys - at a single reference point or in total. Here's what I've done so far:

* split polys across two files with the same reference point;
* split polys across several files with different reference points;
* eliminated all but a single poly;

No change. I then replaced all the "split" files with the single file that had worked until a couple days ago and, presto, things are back to normal. (But, I want to keep the features I added yesterday!) So, That confirms it's not likely a FSX initialization issue.

It appears the fundamental problem is due to a data-sensitivity. Something I've done in the past 48 hours has "upset the apple-cart".

A QMV11 boundary splits the airport. That's my next focus.

If anyone has any other ideas, please jump in.

Don
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Don,

You mean the autogen suppression keeps working, but the shadows go flickering? I also had cases where the autogen suppression stopped working. And like I said before I always noticed flickering shadows on the ground polygons with the tweak.
 

gadgets

Resource contributor
Yes, the autogen continues to be suppressed but all the shadows are flickering.

I have now pretty much ruled out QMV boundaries because I still get flickering when all polys lies within one QMV15 area. Actually, that was a shot-in-the-dark because those boundaries were crossed before I started having this problem.

If I get rid of the empty SCALE_AGL command, all is well - except the autogen is suppressed.

Any suggestions as to what to look for in the .asm code?

Don

EDIT> Arno, something that might be relevant. I've noticed that the flickering only occurs when the ground polys are in view. If I move or rotate the user aircraft so that the pground polys are no longer visible, then the flickering stops.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Don,

Would indeed be interesting to see if we can fix this bug as well. It seems in certain conditions you don't get the flickering, while I always had it.

I am not surprised that it stops when the polygons are out of view. The tweaking we do is to fool the scenery engine. So when nothing is drawn it won't be fooled into flickering shadows as well.
 

gadgets

Resource contributor
I'm happy to say that I have resolved the difficulty. I'm less happy to say I don't know why.

I have one Gmax file providing all the ground polys and apron markings for my airport. (The big polys have been broken up to satisfy the "100m rule".) The polys are in five layers - each with a SCALE_AGL 0, ... Things were fine until yesterday when I added a few new polys. Suddenly, every shadow at the airport began to flicker.

Previously, I had always handled these five layers as a set. I had made extensive changes/additions to them without difficulty. What I have discovered is that, individually, flickering occurs with each layer - even those made prior to yesterday. It is only when using them all in combination that flickering is eliminated. After yesterday's edits, I can get the first 4 layers to "cooperate" when used in combination with the 5th layer from before yesterday. I was unable to get the edited 5th layer to work with the other four. Fortunately, the top layer doesn't cause any autogen suppression and, when I remove the SCALE_AGL 0,... line, all 5 work together - even though none of them work individually.

What this tells me is that there is unlikely to be a simple fix for this problem. At one point I thought the total ground poly count was somehow important. This now appearsd not to be the case, since I still had flickering even after adding a few extra polys to bring my current count back up to the pre-yesterday value. (Since the concensus from several threads seemed to be that it was a poly-count issue, after encountering the difficulty, I consolidated a number of polys - to no avail, of course.)

So, if you get away with using SCALE_AGL 0,..., great. If not, it seems the only reliable solution is to break up your ground polys into smaller groups so as to minimize the autogen suppression and dispense with SCALE_AGL 0,....

Don
 

gadgets

Resource contributor
It turns out, the saga is not over. In fact, I may have found a workaround to the shadow-flickering problem!

First, the flickering problem when using SCALE_AGL 0,... is not confined to FSX. When I added ground illumination to the FS9 version of my new airport, I had flickering of the illumination planes over most (but not all) of my airport. (For night illumination in FS9, I use translucent ground polys at a layer number higher than all other ground polys.) I had used Layer 8 for some of my ground polys and Layer 10 for my ground illumination. The flickering went away when I removed the SCALE_AGL 0,... command from my Layer 8 polys. Why?

I had replaced some roads at Layer 8, so I assumed this was the cause of the interaction. However, changing my roads to a different layer made no difference. Indeed, I disabled all my road/terrain/flatten replacement files. But, the flickering was still there. I renumbered all my layers starting at 50 and I have no more flickering. So, it appears there is some senstivity in FS9 to using SCALE_AGL 0,... in Layer 8. Hopefully, someome can explain it.

Turning now to FSX, I have been able to eliminate flickering of shadows by ensuring that the .bgl file containing the highest-layer FS8 ground polys does not contain SCALE_AGL 0,... . In my case, my highest-layer polys do not suppress any needed autogen, so I don't need SCALE_AGL 0,.... It may be that the shadow flickering problem in FSX can be avoided by adding another layer with a single small ground poly in an inconspicuous place not using SCALE_AGL 0,... .

Hope this helps someone else.

Don

EDIT: Re the FS9 issue, I have just discovered that the file that did not flicker used INSTANCE_CALL rather than BGL_CALL. Perhaps that will help (someone) understand what is going on in FS9.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Don,

What I do in ModelConverterX is put all the different layers in one BGL file. I then only add one empty SCALE_AGL command at the end of the area with all the different layers. Before I added one for each layer, but that indeed gave more problems.

But I still have some flickering shadows now and then. I might need to vary the layer numbers as you mention.
 
Top