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

FSX - Z sorting between objects?

Hi Martin,

Thanks, this last post explains your problem clearly. Let's try to focus on the problem from now on, instead of guessing what others might be thinking here :).

I'll try to do some tests in the coming days (probably won't have the time today), to see if I can reproduce your problem and understand what causes it. Until now I always thought that the position of the reference point was enough to control the drawing order, unless you have a very long object (for example a kilomter long fence) with other objects close by. But reading from your post it seems that that might have changed. But I don't want to guess more now, I should explore it first :).
 
Hi Martin.

A recent post by Doug Matthews gives us the info that the default buildings were shipped without crashboxes, because they had a problem.

I wonder if the overlapping of wrongly-sized crash boxes could lead to rendering problems, as well as crash-detection problems. If so, that would be one source of Z-biasing problems between closely-placed large objects.

( A "stab in the dark" solution for sure. )

If you could provide the source files for an example of the problem, it would help greatly. gmax + textures + xml-placement.

Dick.
 
I love this concept that old-jurassic designers are the ones stuck with past-thinking and its time for a fresh generation to produce artistic masterpieces for FSX.

That isn't even remotely close to what I wrote, Martin... ;)

All I've suggested is that "old-jurassic designers" (among whom I am one*, BTW) try to set aside our preconceptions and begin thinking "outside the box," beginning with what IS, not what WAS... :coffee:

* Admittedly, most of my experience has been aircraft & gauge programming, but I've done a modest amount of scenery as well.
 
All I've suggested is that "old-jurassic designers" (among whom I am one*, BTW) try to set aside our preconceptions and begin thinking "outside the box," beginning with what IS, not what WAS... :coffee:

Sorry, I see you didn't mean it that way :) Been a bit sensitive lately because as I point to any possible legitimate little issue that FSX may have I often immediately get trashed as contra-FSX-hater. Elsewhere I heard a solution to my Z-problem as simple as "in FSX you have to place scenery objects more sparsely & further apart". Thats unfortunately what some others consider "new-thinking" :(

PS: Now I also had time to test the "set_final_alpha_at_render_time" slider, which seems to be the replacement for the old Gmax material opacity value. With this material-alpha & using a texture that has no alpha channel, I also experience the Z problems. From some view angles it renders fine, from others the objects behind it vanishes. All the objects I am talking about are not very large, no kilometer-long fences, everything is in a small area covering about 500x500 meters.

I'll put a sample scene together and upload it later.
 
Last edited:
Testfile attached.

1. The sample placed at the center of the TNCM runway was compiled as one single MDL (z_test_all_together).

2. The same set of objects was also compiled as separate MDLs at the threshold of TNCM runway 09 (on the beach). All MDLs using the same ref-point in this case.

The objects themselves as well as their material setup is the same for both samples, consisting of a multi-sub with FSX-material subs. Each of them has the respective diffuse texture and the following options:

Source Blend: ScrAlpha
Desination Blend: InvSrcAlpha
Allow Bloom: off
Z-Write Alpha: On
No Shadow: On
No Base Material Specular: On

- The all_in_one_MDL sample at the center of the runway behaves best but not perfect.

- The all_separate_MDLs sample at the 09 threshold behaves badly.

- The same objects compiled separately with different ref-points for each (not included) behaves badly as well.

Sorry I had to include the source sample in 3DS format.
I tried a number of texture formats including DDS without success.
 

Attachments

and here a screenshot of the result I am getting.
 

Attachments

  • z_test.jpg
    z_test.jpg
    57.8 KB · Views: 635
Hi Martin.

I've been fighting with your example all day! Very slow going. :(

The only clue I can offer right now, is that the railing of the OilRig example does seem to display alpha-transparency correctly.

Of interest was Emissive Properties Blend

The Z-Test Alpha is checked, and the slider set at 128.

Alpha Test Mode is Greater

And under enhanced parameters, Z-Write Alpha is checked.


Dick
 
I have produced several objects with Gmax and have so far not had any problems. So I am interested under what specific conditions does one get these sorting “Z” problems? so I can avoid them as far as possible in the future. (This question is not directed at anyone in particular).

Oh, and my resolutions for the new year are to remain civil, and to cease ACES bashing based on uninformed speculation, personal aggravation and frustration.

Best Regards
 
Hi Martin.

I do have the z-bias solution for alpha transparency. The solution was the Oil_Rig example from the SDK.

http://webpages.charter.net/ludowr/My_Z_Alpha.zip

Z-Bias.JPG



The basic material was "ripped" from the Oil_Rig_Sample from the SDK.

The Object was created, and then the material attached.

The Object was then cloned as a copy. The copy was then subjected to Normal flipping.

The original Obect was then selected, and the clone attached to it to form a single object.

In this was, each object was dual-sided, and textured.

The textures are DXT1, Mipped, in the sim... nothing special.

"Z_Alpha_Test" is a single MDL consisting of 4 objects, placed by a single XML.
"Z_Alpha_Test_Separate" is 4 separate objects ( 3 MDLs ) placed by a single XML.

Both seem to use Alpha and z-bias correctly in the sim.


Dick
 
Thanks Dick,

In the meantime I had some success as well by using a DS material instead of flipped normals (thanks Runwaypimp).

The Z-test-alpha threshold slider must definitely have some effect on results, tho I don't really understand yet what the value does.

Glad to see this won't be an issue afterall, Z sorting has often given me a headache with complex scenery in FS.
 
Hi all.

Here's the appropriate settings in Gmax:

Material_Alpha_Test.JPG


It appears the slider should be near 128. Double-sided textures should work as well as cloning/flipping-normals/attaching.

:)

Dick
 
Dick, you are a genius! That fixed up my control tower issue nicely!

Only one problem: my control tower windows are showing as 100% transparent, despite being DDS DXT3 with a gray alpha. Any ideas?

EDIT: note that there are opaque parts of this texture too, so I can't set the alpha at render time.

Jon
 
Last edited:
For glass in your tower you would be better using un-textured polys with some opacity. You can then use a cubemap & specular for reflection & spec hits.
 
Hi guys,

I also did some testing (without seeing the results of Dick btw) and just like Dick I could not reproduce the problems of Martin. Here is what I did, I made a long plane (like a fence) with a transparant texture on it. Then I placed objects behind that plane at different distances. Some of these had transparant textures as well and others have not.

I placed these objects so that from certain angles the reference point of the fence would be closer, but from other points of view the reference point of the objects behind the plane would be closer.

I did not use all the material settings that Dick mentions. I only used the "double sided" option and the option to make sure the alpha display (by clicking the "set default transparant" button). That was enough for me, but I will test if some of the settings Dick mentions can solve the problems I still have (see below).

To me it seems that the z sorting of FsX is better than in Fs2004. Because in Fs2004 objects behind a transparant plane, but whose reference point was actually closer to the viewer than the reference point of the plane, would not display correctly. In FsX this no longer seems to happen, with the exception of objects that have a transparant texture themself. There I still see this problem (see the screenshot with the planes with the letter A on them). Maybe that can be solved with some of the settings Dick mentioned, I'll check that.
 

Attachments

  • Image2007-01-03 1026.20.156.jpg
    Image2007-01-03 1026.20.156.jpg
    27.6 KB · Views: 581
  • Image2007-01-03 1026.34.081.jpg
    Image2007-01-03 1026.34.081.jpg
    26.5 KB · Views: 568
Hi,

Did some more testing. The "Material alpha test" settings Dick mentioned seem to affect the material itself. When you set it to 128 or above as Dick did, all alpha channel values below that threshold are ignored. So my semi transparant texture lost most of its information, all parts where I had used color <64,64,64> came out as fully transparant now. But doing this indeed solved the problems I had with the drawing order.

Btw, I did also enable the "Z-write alpha" option to get this result. So for texture with only a 1 bit alpha channel this must be enough to get things working. For semi-transparant textures I still need to do some more searching.
 
For glass in your tower you would be better using un-textured polys with some opacity. You can then use a cubemap & specular for reflection & spec hits.

Understood, thanks. I'm still curious though why my DXT3 gray alpha shows as transparent.

Jon
 
Hi Arno.

Using Martin's attached test file, I did reproduce his problem. For the solution, I essentially just copied the material from the Oil_Rig_Sample Railing, and replaced the bitmap for the material.

Without the method from the OilRig, I got other objects using transparency showing through the solid part of the bitmap.

There is a border fence to the airport Martin used, and that shows the problem quite well, as the fence poles pop through the textures of the cube. With the MS solution, no poppng through.

I'll play with semi-transparent materials and see what gives.

EDITED-------

OK.

SkinnedMesh.JPG


For semi-transparency, I used a 0-255 greyscale Alpha channel.
I used DXT5, mipped, to get the texture.

Under "Material Alpha Test":
I then unchecked Z Test Alpha, and set Alpha Test Level to 0.

Under "Enhanced Parameters":
I unchecked Z_Write Alpha, and checked Skinned Mesh.

This idea came from the Oil_Rig_Sample materials... looking at the AircraftGlass Material.

Dick
 
Last edited:
Back
Top