Bug #14276

Z-fighting reappears when player is close to objects

Added by stargun over 4 years ago. Updated about 1 month ago.

Status:Assigned Start date:10/09/2010
Priority:Normal Due date:
Assignee:hladas % Done:

0%

Category:Rendering
Target version:-
Affected ArmA II version:1.63 Beta First affected build:
Reproduced by another DH user:Yes First affected ArmA II version:
I am using some Mods:No Single / Multi Player?:
I am using:OA only BIForumURL:
Reproducible for you:Yes NGUrl:
Related to content of DLC: WIKIurl:

Description

Expected:
The new z-fighting fix implemented in beta 73968 should work in all conditions.

Observed:
Z-fighting is FIXED when standing or kneeling in an open area, at a certain distance of any object (building/vehicle).
Z-fighting reappears when player standing close to any object (building/vehicle) - about 3-4 m distance is the limit.

Reproduction:
1. Put a sniper player unit in the editor.
2. Stand in an open area - be sure that the closest object/building/vehicle is not closer than 4-5 meters. Look through the sniper scope at a distant object and observe ZERO z-fighting.
3. Move close to any object/building/vehicle - about 2-3 meters is enough. Look through the sniper scope at a distant object and observe NORMAL z-fighting.

CIT__14276_z-fighting.Takistan.pbo (1.7 kB) stargun, 10/09/2010 10:10

20101009_205904.zip - settings and mission used for the video (6 kB) alef, 10/09/2010 19:20

zFightingContinues.Takistan.7z (806 Bytes) kju, 11/24/2010 16:56

14276_crouch.Desert_E.avi (3.5 MB) kju, 12/25/2010 15:20

14276_stand.avi (4.9 MB) kju, 12/25/2010 15:20

14276_standToCrouch.avi (3.2 MB) kju, 12/25/2010 15:20

14276_stones.avi (3 MB) kju, 12/25/2010 15:20

14276_vegetation.avi (3.4 MB) kju, 12/25/2010 15:20

bigStonesFlickerCloseTOHeli.avi (1.7 MB) kju, 12/25/2010 15:31

bigStonesFlickerLayingOnGround.avi (1.2 MB) kju, 12/25/2010 15:31

NoBigStonesFlicker.avi (1.4 MB) kju, 12/25/2010 15:31

withoutZoomFlickerIsHardlyVisible.avi (5.1 MB) kju, 12/25/2010 15:31


Related issues

related to ARMA2 Community Issue Tracker - Bug #1771: Textures flickering of objects at distance (z fighting). Closed 06/03/2009
related to ARMA2 Community Issue Tracker - Feature #44645: Add video setting to show vegetation not in highest resol... Assigned 09/02/2012
related to ARMA2 Community Issue Tracker - Feature #16673: Reduce the default thermal intensity for vehicles without... Closed 01/12/2011
duplicated by ARMA2 Community Issue Tracker - Bug #14259: Z-Fighting fix does not work while prone Duplicate 10/08/2010

History

Updated by kju over 4 years ago

  • Due date set to 11/01/2010
  • Status changed from New to Assigned
  • Assignee set to Dwarden

Updated by Dwarden over 4 years ago

  • Assignee changed from Dwarden to Suma
  • Target version set to Upcoming version
  • Reproduced by another DH user changed from No to Yes

confirmed, re-assign

Updated by Suma over 4 years ago

stargun wrote:

Expected:
The new z-fighting fix implemented in beta 73968 should work in all conditions.

I understand you could not know this, but this is not possible. The principle of the fix is that as long as there are no objects nearby, we can shift the near clipping plane further away from you to increase the z-buffer precision.

We will check if there are perhaps some other ways how to reduce the artifact, but I currently doubt it.

Updated by kju over 4 years ago

Maybe a video helps to stop any possible source or to see at least what stargun means.

Updated by stargun over 4 years ago

Suma wrote:

The principle of the fix is that as long as there are no objects nearby, we can shift the near clipping plane further away from you to increase the z-buffer precision.

Exactly what was my first idea also :) In that case the other ticket (Bug #14259) is closely related to this solution: in prone mode the ground will be the nearby object for the viewpoint of the player...

Is this theory can help?:
Logarithmic Depth Buffer in Outerra engine
http://outerra.blogspot.com/2009/08/logarithmic-z-buffer.html

Thanks for all the efforts.

Updated by alef over 4 years ago

Updated by alef over 4 years ago

http://www.youtube.com/watch?v=3d1CyJXn14Q

You probably need to view in HD. Mission and settings attached.

Updated by stargun over 4 years ago

Thanks Alef for the video, and sorry for my laziness. :)

One more hint for Suma: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350&reply_id=3513134

It's really interesting to read such a comment about this solution by the author: "...I went so far as testing a city with centimeter to meter details seen from thousands of kilometers away using a very very small field-of-view to simulate zooming. I'm amazed by the quality I got. It's almost magical. ZBuffer precision problems will become a thing of the past, even when using large scales such as needed for a planetary engine."

Updated by MadDogX over 4 years ago

Still reproducable in latest beta 74094.

Updated by stargun over 4 years ago

I think that if they decide to change the current method of the fix (moving the near clipping plane) to any different algorithm then it'll take quite a bit of time. Especially if the engine should be changed to handle the z-values differently. I hope that we'll get some feedback from the devs upon the feasibility.

Updated by Suma over 4 years ago

  • Status changed from Assigned to Resolved

A different z buffer representation is out of question. The log-z technique described is a lot harder to get right than it might seem at first sight (esp. the issue with triangles going back is hard to solve). Even without this, there are too many places in various shaders (esp. post effects) where current representation is assumed.

Instead, I have extended the floating near plane idea to work more reliably even when ground or object is close. It does not reduce the z-fighting as much as when there are no close objects, but still the reduction should be significant enough to make the issue not annoying.

(Rev. 74269)

Updated by kju over 4 years ago

  • Due date deleted (11/01/2010)

Sounds good. Thanks for your efforts!

Updated by stargun over 4 years ago

Good news. I can hardly wait the next public beta patch to check it out.

Thanks for all the hard work!

Updated by kju over 4 years ago

  • Target version changed from Upcoming version to 1.55 BETA

Please give feedback with the latest beta.

Updated by stargun over 4 years ago

Unfortunately I can not see any difference in the latest beta (74630).
It seems that the z-fighting still reappears when close to objects or in prone the same amount as with the previous version.

The mentioned z-fighting reduction is not significant, but unrecognizable.

Updated by Suma over 4 years ago

You are correct, when implementing the near object part I have broken the near ground part, and as a result none of them worked.

Should be fixed in 74794

Updated by kju over 4 years ago

  • Target version changed from 1.55 BETA to Upcoming version

Updated by kju over 4 years ago

  • Target version changed from Upcoming version to 1.55 BETA

Updated by kju over 4 years ago

  • Target version changed from 1.55 BETA to 1.55.75445

Updated by kju over 4 years ago

  • File zFightingContinues.Takistan.7z added
  • Due date set to 02/01/2011
  • Status changed from Resolved to Feedback
  • Target version deleted (1.55.75445)
  • Affected ArmA II version changed from 1.55 BETA to 1.56 BETA

Can we get some feedback here please.

After having heavy z-fighting playing yesterday, I looked into it with the new beta today again
and did some extensive tests:

From what I can tell there is no improvement for the said issues:
  • when prone z-fighting still exists very noticeable
  • same when standing close to objects (vegetation, stones, objects) or units/vehicles

When inside a vehicle, there are no such issues (as well as on open area and not laying on the ground).

New demo mission attached:
  1. editor
  2. to the west there are many trees along the road
  3. to the north is a village with the typical afghan buildings built into the stone
  4. one can observe z-fighting clearly at both when
    1. prone
    2. or standing close to the said objects

Updated by Fireball about 4 years ago

  • Status changed from Feedback to Assigned

Confirming - it's almost worse now, even with 1.57 RC. :-(

Updated by kju about 4 years ago

Unfortunately I cannot see an improvement while lying on the ground or near objects.
On the positive side it is mostly only visible when looking through optics and with (RMB) zoomed in.

Updated by kju about 4 years ago

Interestingly some stones do not flicker - vegetation flicker
is the most obvious one nowadays for me.

Updated by Danil-ch almost 4 years ago

Still true in 78927.

Updated by kju almost 4 years ago

  • Due date changed from 02/01/2011 to 06/01/2011
  • Affected ArmA II version changed from 1.58 BETA to 1.59 BETA
  • Audio card deleted (Asus Xonar D1)
  • Size of OS swap file deleted (Please specify!)

Updated by kju over 3 years ago

  • Language set to Please set for missions

A good video showing very visible z-fighting in 1.59:
http://www.youtube.com/watch?v=WovKY_bjT1A

It seems something got broken after having it fixed/reduced a lot. :(

Updated by kju over 3 years ago

  • Due date changed from 06/01/2011 to 02/01/2012
  • Affected ArmA II version changed from 1.59 BETA to 1.60 BETA

Updated by Danil-ch about 3 years ago

Still true in 1.60.

Updated by Fireball about 3 years ago

  • Affected ArmA II version changed from 1.60 BETA to 1.60.87580

Updated by Danil-ch over 2 years ago

Still true in 1.62.

Updated by zava over 2 years ago

still true. I got it all the time. Not only when I snipe. Always everywhere

Updated by kju over 2 years ago

  • Due date deleted (02/01/2012)
  • Affected ArmA II version changed from 1.60.87580 to 1.63 Beta

Updated by kju over 2 years ago

Not quite sure if its z-fighting - what I see is textures of two objects fighting about which is to be shown.

http://www.youtube.com/watch?v=J83n1AGypQk
  • many buildings in Cherna
  • yellow trees around the city
http://www.youtube.com/watch?v=bHXKfxPp_v0
  • top center a tree at the edge of the forest
  • train tracks in the bottom center
  • building in the top left (and some others less visible in the bottom right)

(sorry for the bad quality)

video memory default, texture detail very high, object detail very high
viewdistance 5000m, 96493 beta with 1.60 LOD system (but same with 1.62)

Updated by OMAC over 2 years ago

Don't know if this issue is z-fighting or not, but here it is, beta 96493:

http://www.youtube.com/watch?v=8m3G46kKEC4

Alienware Area 51
ASUS X58 P6T Deluxe MB + integrated SoundMAX
Core i7 940 2.93 GHz
6 GB DDR3 RAM 1333MHZ
NVIDIA GTX 295 (2 PCB), no overclock, driver 301.42
Win 7 x64
Dell U2408 monitor, 1920x1200, 60 Hz
WD Velociraptor 300 GB 10k rpm SATA main drive
1000 watt power supply

A2 CO settings:

video resolution=1680x1050
visibility=3541m
texture detail=very high
vid mem=default
AF=high
AA=norm
(atoc=7
PPAA=3
PPAA_Level=2
terrain detail=high
object detail=very high
shadows=very high
HDR=norm
PP=low
vsync=on*

Updated by OMAC over 2 years ago

Similar issue in Bystrica, ACR:

http://www.youtube.com/watch?v=-E3gKQxuQB4

Updated by Suma about 1 month ago

  • Assignee changed from Suma to hladas

Also available in: Atom PDF