Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GMAX ground polygon flickering - layering

Featured Replies

Arno,Fantastic! That last trick about the apis dealt a final blow to that annoying issue! Thanks a million as usual. They should name this forum after you. :-)One other development on the api, I had to set a V2 value with the apis produced by your method. With no V2 value I was getting polygons disappearing from different angle views.Regards and thanks again!Shez

Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

  • Replies 32
  • Views 3.3k
  • Created
  • Last Reply

Top Posters In This Topic

Arno,A related issue I have discovered. If you view the buildings and aircraft from the ground level the scenery is fine, however if you raise your spot view higher the buildings and aircraft (all 3d objects) tend to 'sink' into the ground. The LayerCall is set to 8. Appears to me to be an issue with the ground polygons not sitting on the surrounding ground altitude. Wonder why this is as the 3d objects are fine...Sorry to keep picking your brains on this...ThanksShez

Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

  • Author
  • Commercial Member

This should not happen :).Do you have a separate library object for your ground polygon or do you have buildings and ground polygons mixed in one object?And are you sure that the correct altitude has been set when you placed the API?

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

The building and the ramp polygon which it aligns with are in the same GMAX file but exported separately and then put into one api as separate GUIDs. The main ground polygon which is the base of the scenery is a separate api and gmax file. The altitude is correct.ThanksShez

Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

  • Author
  • Commercial Member

Hi Shez,That all sounds correct, so I would expect that it should work fine.Can you maybe post the API you used for the ground polygons here? Maybe something is wrong there.

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Arno,Here is the ground polygon api,; --- Created by FsRegen v0.31bmif (0)Area( 5 %1 %2 1 )RotatedCall( :symbol 0 0 %5 )Jump( :endsymbl ):symbolRefPoint( 7 : 0.5 %1 %2 )Points( 0-2784 0 -2858-2784 0 30121901 0 30121901 0 -2858-441 0 77)Poly( a 0 1 2 3 )Poly( a 0 4 3 )Return:endsymblEndAmifendArea( 5 %1 %2 22 ) LayerCall( :OBJ 6 ) Jump( : ) :OBJ mif( %11 ) refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 V2= 750 ) melse refpoint( 7 :END %4 %1 %2 v1= %10 V2= 750 ) mifend RotatedCall( :ROT 0 0 %5 ) Return :ROTcallLibobj( 0 9F3B301B 4E797CCB D04EACAB B164C59B ):ENDreturnEndAHere is the multi-object api,; --- Created by FsRegen v0.31bmif (0)Area( 5 %1 %2 1 )RotatedCall( :symbol 0 0 %5 )Jump( :endsymbl ):symbolRefPoint( 7 : 0.5 %1 %2 )Points( 0-1928 0 -325-1928 0 1251894 0 1251894 0 -325-17 0 -100)Poly( a 0 1 2 3 )Poly( a 0 4 3 )Return:endsymblEndAmifendArea( 5 %1 %2 22 ) PerspectiveCall( :OBJ ) ShadowCall( :OBJ )LayerCall( :OBJ2 8 )Jump( : ) :OBJ mif( %11 ) refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 V2= 750 ) melse refpoint( 7 :END %4 %1 %2 v1= %10 V2= 750 ) mifend RotatedCall( :ROT 0 0 %5 ) Return :ROT CallLibObj( 0 9F3B3019 4E797CCB D04EACAB B164C59B ) Return :OBJ2 mif( %11 ) refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 V2= 750 ) melse refpoint( 7 :END %4 %1 %2 v1= %10 V2= 750 ) mifend RotatedCall( :ROT2 0 0 %5 ) Return One thing that may be wrong is that all the materials are named zbias_ground?ThanksShez

Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

  • Author
  • Commercial Member

This code all looks correct (only the last part of the multi object macro seems to be missing, I expect the library call is still below there, as well as the Return and EndA.I don't expect that the zbias_ would influence the scenery in such a way, but you might want to try that as well.Do you have a flatten at your airport btw? Otherwise that might also be a reason for the altitude problems.

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Hi,If you used a 'flatten'ed area in APW, it could be the problem.Basically you get 2 ground levels when the flattened level is at some point(s) above the original one. Both work in some way, so that you may look at the underside of the flattened level when you slew from outside the flattened area into the flatened area.Not sure if that's your problem, but I've had it many times, making a grounded plane only partly visible when partly under the flattened level.Hope it makes sense and helps.voscon.

I have tried this with and without the flatten area. Reducing the flatten area altitude setting does eliminate the problem but causes other (commonly noticed) problems with non-flattened areas.RegardsShez

Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

Voscon,I think you mean that there might be a flatten area on a different level than the base ground? AFW actually calculates the level based on the altitude of the main scenery so have not changed that.ThanksShez

Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

  • Author
  • Commercial Member

This is strange, it sounds like you are using two different altitudes for your airport. Otherwise I would not be able to explain why you get this.

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Hi Shez,Because the terrain may be undulating and the flattened area (f.a)is obviously flat, not all points of the f.a need to UNDER or ON the main scenery level (m.s.l), hence you may have the situation where some of the m.s.l. are still lower than the f.a. to give the effect I mentioned.Cheers,voscon

That is a fair point you make.The summary of the problem I am having is like this, there is a GMAX created ground polygon (ramp) along with the GMAX created terminal. When one views the aircraft and the buildings from any distance close to about 1000ft at an altitude of about 1200ft in spot view, both start to sink into the ground! This effect increases the higher you go and until by 2500ft both the a/c and terminal have sunk underneath the ground! (Strange indeed). If you view the aircraft/building from anything less then 1000ft in spot view things are OK.I am not sure if anyone can do a simple polygon (GMAX plane) and building and let me know if they experience the same. It has to be done through the FSRegen/api method.I guess if nothing works I can go back to the old SCASM method of hand coding :(Thanks Shez

Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

  • Author
  • Commercial Member

I think this has nothing to do with SCASM coding or GMax.It sounds like the mesh you are building on changes to a lower LOD level when you move away and that does effect the altitude of the airport. I would say that this should then also suggest that it is not flatten properly, have you already tried using a bigger flatten?Or another idea, did you enter an altitude when you place the macros? In that case they might be using the RefPoint type 2, while with type 7 they should always be at the altitude of the ground. You could give that a try as well.

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

I have done some experimentation on a generic scenery and it seems it is the same issue. The ground polygon is layered in such a way that aircraft and buildings sink.As regards the Ref2 and Ref7 here is the api code. What do you suggest changing?Area( 5 %1 %2 22 ) LayerCall( :OBJ 0 ) Jump( : ) :OBJ mif( %11 ) refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 %13 %14 ) melse refpoint( 7 :END %4 %1 %2 v1= %10 %13 %14 ) mifend RotatedCall( :ROT 0 0 %5 ) Return :ROTcallLibobj( 0 9F3B301C 4E797CCB D04EACAB B164C59B ):ENDreturnEndAI have already experimented with the MSL AGL altitude and this does not work either.Shez

Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.