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

Zbias Layers

Messages
103
Country
belgium
Hello,

Recently there was a topic about Ground Polygons created in Gmax ( http://www.scenerydesign.org/forum/showthread.php?t=479 ). In order for the ground textures to appear above the default ground you had to specify a zbias-layer number > 0. But in some cases you had the problem of buildings dissapearing into the ground. Now we 'think' we have found the solution for this problem.

As far as we know, the problem will probably be caused by the building textures that have a lower zbias layer than the ground textures. So if your ground polygons have a zbias layer of 1 and your buildings don't have a zbias layer assigned (so default = 0) then they will dissapear into the ground, because the ground has a 'higher drawing priority' than the buildings. Thinking about this, we assigned a higher zbias layer value to the building textures. So for example:
ground zbias layer 1
buildings zbias layer 5

When you go up, you will see that the building doesn't dissapear into the ground anymore, because the building has a higher drawing priority (zbias 5) than the ground.

We have tested multiple values for the zbias layer numbers, and we found out that your building textures should have a zbias value < 15. When you assign a value between 15 and 25, then your building even appears in front of the clouds (which is not desired off course).

We still have to test a lot, but a good example should be like this:
zbias layer 1: ground
zbias layer 2: apron
zbias layer 3: taxiways
zbias layer 4: lines
...
zbias layer 9: buildings

That way everything should be drawn in the right order.

Thomas
 

arno

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

This is interesting. Do you have the ground and buildings in the same GMax scene in this case or are they separate MDL files?
 
Messages
103
Country
belgium
Hi,

The Ground and the Buildings are separate mdl files (and compiled to separate bgl files). I tweaked the asm code of the ground files (shadow kill and stuff...).


Thomas
 

arno

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

Hummm, very insteresting. I always thought that the zbias only regulated the drawing order of objects inside an object. But it seems it has more influence.

Although I still think it is easier to use the Fs2002 gampack for the ground polygons (with a small ASM tweak). That would also save you the trouble of having to ZBias all your buildings (this could even have an performance influence).
 
Messages
17
Country
belgium
we have been doing several tests with the zbias and it looks real good now..
the order is very important and apparently FS9 uses it for much more than only
the scenery textures
As Thomas said - zbias 15 and higher results in a very strange effect: your building/ground/... is drawn in front of the clouds :eek:

probably other objects have also a zbias layer number - I'm thinking of multiplayer aircraft or AI models drawing....
(as they disapear behind the clouds my guess is they are somewhere between zbias layer 10-14 ??)

the biggest advantage is that you can put everything in separate layers which have a top/bottom drawing order.
(and you can easily switch the zbias layer number in the asm files using find/replace)

My biggest fear is that the FS2002 SDK will not be compatible with FS2006 ...
don't think it has any performance issues though

it would be great if some more people could experiment with this ...
which zbias layers are "available" ? (our guess is 1-10, not sure about 11-14..)
 

arno

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

As far as I know MS is not using ZBias in all of their default objects. So that makes me wonder if this approach is really useful. Are you now adding a ZBias to all your objects to make sure they display correctly on the ground polygons?

I will try to do some testing with the ZBias command, because I wonder if it is really like the old LayerCall command. That would open some new possibilities, although GMax is still not really optimal for making ground sceneries of course (from the output code format point of view).

And if you are really worried about compatibility with Fs2006, then the safest way is to make the markings as MS intended us to do, with the XML code. But as this approach is rather limited almost nobody does that :).
 
Messages
17
Country
belgium
arno,
are they still using their FS2002 SDK in FS9 for default objects then??

or is there even another functionality in FS9 SDK we don't know about (yet) ?
 

arno

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

No, they are using the Fs2004 gamepack (or at least similar code). The fact is that MS make no ground polygons with GMax, these are all in the XML or mesh scenery. GMax and MakeMDL are design for 3D objects only and not to design your total scenery.

In that case the zbias is not needed. Only when you want to place an additional polygon with a logo on top of a building or so, to prevent bleed through, and that is what I thought teh zbias option was only meant for. But your discoveries give a new view on it.
 
Top