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

Z-Fighting Explained

=rk=

Resource contributor
Messages
4,702
Country
us-washington
Z-fighting is the flashing seen in polygons as one changes distance in relation to them. This post is intended to describe the phenomenon so designers can understand and correct the condition. It's not intended to be technical or definitive as much is it should be illustrative. Feel free to augment or correct ideas expressed here. The conditions that produce a flashing area are the consequence of mathematical limitations expressed incrementally as part of the exact percentage of the distance involved. The condition is basically inevitable so it is best to establish provisions to minimize flashing.

Dynamic information can be represented in either one of two recognized ways, "analog" or "digital." Analog displays capture the essence of information as it changes, you see the entire field from full tank of gas to empty and the number of gallons left at half a tank matter much less than the number of miles since the last fill, which are invariably expressed in digital form. Digital displays indicate the exact value expressed within the limit of space and place; the time is 12:04, 12:04:32 if another place is added. There is no gray area allowed as with analog displays, a number is a number and if there are only two decimal places than that limits the display to steps with values that fall within those decimal places. Obviously about 99% of math is digital, including the math that calculates render priority. What happens is that the equations establishing the render priority have what turns out in this case to be a relatively limited number of decimal places.

To understand the scenario, lets assume the computer we are using was a really great deal and so the calculations it can perform are limited to one decimal place. In terms of distance it can recognize 1 meter, 1.5 meters, 2 meters, 2.5 meters, etc. Anything else gets rounded up or down, 2.2 meters is 2 meters, 2.4 meters is 2.5 meters..can you see where this is going? To create Z-flashing conditions in this computer's simulator, we will render two polygons that are parallel but slightly apart, let's say at .25 meters. Now in the simulator looking at those polygons from 5 meters away, what will the simulator render? The next closest polygon is 5.25 meters away, which the software will round to 5.5 meters, so it should render the planes more or less as expected, maybe with an exaggerated offset that we would have to get used to. Now let's move back .25 meters; both polygons will render at 5.5 meters! Oh no, the Z's will flash. You can see that as distance changes, the inevitable back and forth flashing occurs. Eventually the included distance between the polygons, expressed as a percentage of the total view distance either drops below the decimal place cut off, or grows to such a high value that the planes are never superimposed. In either case the flashing stops. a common solution is to offset the parallel polygons to a distance that is beyond the "gray area," or decimal place limit, an operation that also can make the closer plane look unnaturally distant from what it is intended to represent when viewed from nearby.
 
Back
Top