Sign in to follow this  
arno

GMAX ground polygon flickering - layering

Recommended Posts

Gurus,Wanted to run a question by you. By adding z-bias to the ground material in GMAX one stops the flickering. Question: How does one place one polygon on top of the other without them flickering? What z-bias settings are needed. I looked at the MakeMDL SDK and it states a setting of zbias_##. How does this work (if it does?)? Is it the same as FSDS?ThanksShez

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I would not advise using the z-bias, but I would replace the PerspectiveCall command with a LayerCall command. You can then use the layer number to order different polygons.This also has the benefit that you get the shadow of your aircraft back.Here is a tip I wrote about it:http://www.scenerydesign.org/modules.php?n...=article&sid=54PS. For FSDS the same applies, there it is also better to replace the command. That is discussed in this tip:http://www.scenerydesign.org/modules.php?n...=article&sid=49

Share this post


Link to post
Share on other sites

Thanks Arno, as usual you are the resource for a successful solution. I remember you stated this solution last time I wrote about this issue.RegardsShez

Share this post


Link to post
Share on other sites

Is raising the ground polygons a fraction of a meter a possible solution to flickering sometimes?

Share this post


Link to post
Share on other sites

Well, that would also cure the visual problems of course, but it does not remove the cause of the problems. You it might be a solution, but I prefer to replace the source with decent source instead.

Share this post


Link to post
Share on other sites

Actually already tried that but it causes the wheels to appear embedded in concrete. :) Shez

Share this post


Link to post
Share on other sites

Of course, but many ground polygons were never made for taxiing on...unless you are REALLY lost. .:-halo A parking lot near the airport for example. No doubt Arno's got a much better approach but sometimes you want to see how it looks before you invest more time.

Share this post


Link to post
Share on other sites

Arno,This does not appear to work. A few questions,1) I am using two different asm files sourced from two different GMAX source files (only ground tiles). Does this work or do the tiles have to be in the same project?2) I am using the Plane object to create a plane and then texturing it to make it like a ground polygon. Is this the correct method?3) When I used your LayerCall solution it appears to be only one entry per asm file? Is this correct?ThanksShez

Share this post


Link to post
Share on other sites

Hi Shez,Yes, it does work if you have multiple files, but you will only be able to place one LayerCall command per file. So if you have polygons that need to end up on different layers you can better export them as two BGL files with export selected from GMAx.

Share this post


Link to post
Share on other sites

Arno,I made a simple Plane and exported it to FSRegen and added it to my library file. Here is relevant asm code after making the change as per your advice.;compile with BGLC /BGL E:FS2002SCENEDB2004scenerytest1.asmheader label word dw 0001 ; 00 World set number dd 00050D929H ; 02 North bound dd 00050D405H ; 06 South bound dd 0C1E7362DH ; 10 East bound dd 0C1E7362BH ; 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 0286Ah ;;lat min (inclusive) 512M units dw 0286Dh ;;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 00050D697h,0C1E7362Ch ; 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, 2, 32767 ADDCAT OBJECT_0_SCALE, 8 OBJECT_0_FAIL label BGLCODE BGL_JUMP_32 OBJECT_0_END OBJECT_0_SCALE label BGLCODE SCALE_AGL OBJECT_0_RETURN, 10000, 658, 131072, 00050D697h, 0D82Eh, 0C1E7362Ch, 06375h, 0, 0 BGL_CALL OBJECT_0_BEGINOBJECT_0_RETURN label word BGL_RETURNOBJECT_0_BEGIN label wordmodel_outside label BGLCODE BGL_CALL model_crashmodel_shadow label BGLCODELOD_0 label BGLCODE BGL_JUMP_32 LOD_0Lmodel_inside label BGLCODE BGL_RETURNmodel_crash label BGLCODENow I compile the library via BGLC and the flickering is still there. I use AFW2.60 to place the api first then compile scenery.Thanks for your help.Shez

Share this post


Link to post
Share on other sites

Curious about this issue, I went back and re-read the MAKEMDL SDK and on page 19 it appears that Microsoft may have anticipated this whole issue, by adding z-bias to textures that have certain prefixes in the texture name. If so, this is a very simple fix.

Share this post


Link to post
Share on other sites

Yes this was the exact problem I began this thread with actually but there are two problems in this method,1) No shadows2) The main issue, overlapping tiles where one tile tends to flicker in the overlap area (even if it has z-bias named). My question on this was going back to the way FSDS worked, you could set different layers in the z-bias by numbering the z-bias. In the MakeMDL doc there is a mention of a z-bias# which I would like to understand a bit more about. Is this the same FSDS layer number?RegardsShez

Share this post


Link to post
Share on other sites

For building the z-bias option is perfect. You can use it to let a small polygon with a logo display correct on a building or so. It then works the same as in FSDS. That is probably how MS also meant that option, but GMax/MakeMDL has never been meant to make a complete ground scenery with (the same goes for FSDS). If you look at the source code it produces that is very clear. That is why for ground sceneries the tweak suggested above are better.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this