• Welcome to SC4 Devotion Forum Archives.

NVIDIA Z-fighting Issues - Possible Fix

Started by Wthrwyz, February 02, 2012, 08:09:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Wthrwyz

Any of you with NVIDIA graphics cards are I'm sure familiar with the z-fighting issue which occurs in hardware rendering mode when two parallel (or nearly parallel) planes are rendered very close to one another.  Instead of one plane obscuring the other as expected, the two are "combined" in a rather unpleasant crosshatching, like so...

Those poor traffic signals never had a chance! :'(

So, this evening I finally got fed up enough :angrymore: that I decided to play around with the NVIDIA Control Panel settings in an attempt to find something...anything...that might help. ()testing() I am happy to report that I have resolved the issue, at least for my particular hardware. %BUd%

It seems that forcing the video card to use Coverage Sampling Antialiasing (CSAA) in SC4 is what does the trick.  SC4 has no built-in support for AA, so what needs to happen is to override the defaults for the game.  There are two caveats to this "fix..."  1) You probably need to update to the latest drivers (285.62 as of this writing), and 2) only GeForce 8 series and newer cards are able to use CSAA.

Here's how to make the change:

  • First, open the NVIDIA Control Panel and choose Manage 3D settings from the menu to the left.
  • Next, choose the Program Settings tab.
  • From the drop-down menu of programs, select SC4.  If it is not in the list, click the Add button and navigate to the SC4 .exe on your hard drive.
  • Set the Antialiasing Mode to Override any application setting and set the Antialiasing Setting to any of the "CSAA" options.
  • You might want to hit the Apply button so your changes actually take effect.

Some people are visual learners, so here's a picture for ya. &smrt

With luck, that ugly zebra striping should become a thing of the past...

More like a thing of beauty. :satisfied:

My guess is that this is a recent fix in the drivers, because I seem to remember forcing Antialiasing in the past and still having problems.  It seems that whatever the card is doing in CSAA mode is causing it to properly calculate z-index values where it fails in MSAA mode and with AA turned off.

Here's my setup.  Again, I make no claims that this will fix the issue for everyone, just that it worked for me.
Windows 7 x64
Core i7-920/12GB/1TB
Dual GTX-260s in SLi
CS4 Command Line: -intro:off -w -CustomResolution:enabled -r1680x1050x32 -d:DirectX -CPUCount:8

Yes, CPUCount:8 is stable for me.  Dunno why, but it is.
Wthrwyz: It's "weather wise." You see, it has to fit on a license plate...
Oh, just call me Nathan.

MandelSoft

What a clever discovery! Maybe this can reduce the Z-Fighting issues for everyone :thumbsup:
Lurk mode: ACTIVE

HappyDays

Well gosh darn. This really does work. I can now play the game on my Windows 7.

Updated my drivers, set it to 16xQ CSAA, and my SimCity 4 no longer corrupts the image when I'm scrolling, or zooming, or doing nothing...

<_<

See, my problem was much more severe than yours. But, apparently, it was still the same problem. I figured it could have been, since what I was seeing was like what you encountered on your traffic control signals, except on a larger scale.

Cool. Very cool. Give this man a reputation point!

Tarkus

Quote from: HappyDays on February 03, 2012, 03:49:33 PM
Cool. Very cool. Give this man a reputation point!

Done.   :thumbsup:  This sounds like this might fix some of the issues folks have reported with the "wealthified" transitions on the NWM, so this might be becoming a link in the FAQ there soon.

-Alex

Shadow Assassin

#4
Some AMD cards suffer from Z-fighting issues as well (notably the 6950 and 6970). The AMD equivalent is 16xEQAA (unfortunately only available on the 6900 series of cards), and with Catalyst 12.2 you can now set application profiles, which makes it easier.

I'm currently testing with the new EQAA settings, see if any issues crop up.

Unfortunately, from what I've noticed so far, transparency is affected:
- preview models become barely visible
- zones become barely visible until they're plopped
- road construction disappears
- cars appear in front of buildings when they're supposed to pass behind

Other problems include: Building seams are quite obvious. On larger buildings, do you see a faint black or white line cutting through buildings where texture mats join up? (edit: just adjusted a few settings for SC4 in Catalyst, it seems that Adaptive Multi-sampling needs to be enabled as well)

Does this happen with the nVidia cards with CSAA enabled? I'm curious as to what the differences in filtering are.
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dedgren ♦ dmscopio ♦ Ennedi
emilin ♦ Heblem ♦ jplumbley ♦ moganite ♦ M4346 ♦ papab2000
Shadow Assassin ♦ Tarkus ♦ wouanagaine
See my uploads on the LEX!

farrell1701

Wow.  :o  Huge impact on my setup (GeForce 9500 w/Intel quad core CPU running Win7 x64.) I had this same graphics glitch but on the RHW-2 underpass -- no matter how flat the land was, after plopping, I'd see the glitch after a reload of the map. This cleared that problem right up!

Also, I decided to try the DirectX and CPUCount parameters you had (though with 4 instead of 8, since I have a lowly single proc quad core CPU). The difference in performance is night and day, and so far, seems quite stable. Cheetah speed works much better -- no lagging on/around 15th-20th every month -- and scroll speed has improved.

&apls

mike3775

I often wondered what caused that on my Win 7 machine, but it only occurred every so often so I never bothered looking into it much, but thanks for this tip, it solved my issue as well.

dedgren

QuoteHere's my setup.  Again, I make no claims that this will fix the issue for everyone, just that it worked for me.
Windows 7 x64
Core i7-920/12GB/1TB
Dual GTX-260s in SLi
CS4 Command Line: -intro:off -w -CustomResolution:enabled -r1680x1050x32 -d:DirectX -CPUCount:8

With that much RAM, you could have run the space program in the 60s with room to spare.  The progress of technology is amazing.

Congrats on the K-point.  It was well deserved!


David
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

HappyDays

Tarkus,

QuoteDone.

:D

Shadow Assassin:

QuoteI'm currently testing with the new EQAA settings, see if any issues crop up.

Unfortunately, from what I've noticed so far, transparency is affected:
- preview models become barely visible
- zones become barely visible until they're plopped
- road construction disappears
- cars appear in front of buildings when they're supposed to pass behind

Other problems include: Building seams are quite obvious. On larger buildings, do you see a faint black or white line cutting through buildings where texture mats join up? (edit: just adjusted a few settings for SC4 in Catalyst, it seems that Adaptive Multi-sampling needs to be enabled as well)

My 8800GTS does not experience such issues. The only issue I notice is that pollution clouds flicker, but this is a problem on my XP too. >_<!

Although, I've done some testing and found out my issue wasn't actually related to the opening poster's. Upgrading my drivers to the latest drivers (285.62) stopped Van Gogh from showing up. No need for anti-aliasing. Oh well.

Dedgren,

QuoteWith that much RAM, you could have run the space program in the 60s with room to spare.

Room to spare? You could fill out most of Texas with that spare room!

http://ed-thelen.org/comp-hist/vs-mit-apollo-guidance.html

Assuming this is accurate, Wthrwyz's computer is many thousands of times more powerful than the ones used in the Apollo program's guidance computers.

Wthrwyz

Glad to hear this information helped a few!  Thanks for the rep, Tarkus, and yes this seems to fix more than just mrtnrln's stoplights - basically any situation where two planes intersect or are rendered in very close proximity is much cleaner now.  Things which should be transparent actually are, instead of just looking like window blinds.

Quote from: HappyDays on February 03, 2012, 03:49:33 PM
Well gosh darn. This really does work. I can now play the game on my Windows 7.

Updated my drivers, set it to 16xQ CSAA, and my SimCity 4 no longer corrupts the image when I'm scrolling, or zooming, or doing nothing...

<_<

See, my problem was much more severe than yours. But, apparently, it was still the same problem. I figured it could have been, since what I was seeing was like what you encountered on your traffic control signals, except on a larger scale.

Cool. Very cool. Give this man a reputation point!
I've seen the corruption myself, but that was with an older driver and I think it was Ambient Occlusion that did it.  The newer driver seems to know that SC4 doesn't support that and won't let it be turned on, at least on my box it won't.

Quote from: farrell1701 on February 03, 2012, 05:55:04 PM
Wow.  :o  Huge impact on my setup (GeForce 9500 w/Intel quad core CPU running Win7 x64.) I had this same graphics glitch but on the RHW-2 underpass -- no matter how flat the land was, after plopping, I'd see the glitch after a reload of the map. This cleared that problem right up!

Also, I decided to try the DirectX and CPUCount parameters you had (though with 4 instead of 8, since I have a lowly single proc quad core CPU). The difference in performance is night and day, and so far, seems quite stable. Cheetah speed works much better -- no lagging on/around 15th-20th every month -- and scroll speed has improved.

&apls
Yeah, I've read about others having stability issues with multi-core machines, especially on Win 7 but these settings have served me well.  SC4 will crash on me if I have it in fullscreen mode and the application loses focus somehow (i.e. I alt-tab out or if I accidentally click on my second monitor) which is why I run in windowed mode.  Performance is better in full screen mode, though so YMMV.  Even fully-developed large tile cities run pretty smooth for me...about the only thing I can guarantee will slow my system to a crawl is to place a whole bunch of garbage infrastructure (landfill, recycling center), which generates about 200 million seagulls all over the place.

Yes, I create cities for nothing but the importation of garbage.  No, I can't actually open most of them anymore even if I want to.  Maybe it's a cheat, but my sims really hate trash. :)

Quote from: dedgren on February 04, 2012, 01:59:25 PM
With that much RAM, you could have run the space program in the 60s with room to spare.  The progress of technology is amazing.

Congrats on the K-point.  It was well deserved!


David
Thank you, sir.

And to the point of the space program, I'd like to quote some anonymous author from about a decade ago: "It took the equivalent of three Commodore 64's to get to the moon.  It takes the equivalent of a Pentium with 16 MB of RAM to run Windows 95.  Something is wrong here and it wasn't with the Apollo."  ::)

Although, reading the guidance computer specs posted by HappyDays I'd like to note that not only has performance increased by several orders of magnitude, but weight has decreased by a few as well.  The Apollo's guidance machine was spec'd at 70 lbs, and in that era a machine with the power of your average smartphone today would have taken up a small room.  Technology is indeed amazing.  :thumbsup:

Quote from: Shadow Assassin on February 03, 2012, 05:42:57 PM
Some AMD cards suffer from Z-fighting issues as well (notably the 6950 and 6970). The AMD equivalent is 16xEQAA (unfortunately only available on the 6900 series of cards), and with Catalyst 12.2 you can now set application profiles, which makes it easier.

I'm currently testing with the new EQAA settings, see if any issues crop up.

Unfortunately, from what I've noticed so far, transparency is affected:
- preview models become barely visible
- zones become barely visible until they're plopped
- road construction disappears
- cars appear in front of buildings when they're supposed to pass behind

Other problems include: Building seams are quite obvious. On larger buildings, do you see a faint black or white line cutting through buildings where texture mats join up? (edit: just adjusted a few settings for SC4 in Catalyst, it seems that Adaptive Multi-sampling needs to be enabled as well)

Does this happen with the nVidia cards with CSAA enabled? I'm curious as to what the differences in filtering are.
In general, CSAA seems to make transparency in SC4 much more...transparent, for lack of a better term.  I don't know if I'd say the preview models are more difficult to see, but I'd agree that they do look different.  I've not noticed any of those other issues with my nVidia hardware, however.
Wthrwyz: It's "weather wise." You see, it has to fit on a license plate...
Oh, just call me Nathan.

Shadow Assassin

QuoteIn general, CSAA seems to make transparency in SC4 much more...transparent, for lack of a better term.  I don't know if I'd say the preview models are more difficult to see, but I'd agree that they do look different.  I've not noticed any of those other issues with my nVidia hardware, however.

Hmm, that's a bit disappointing. Maybe I should take a look at GraphicsRules.sgr and see what the difference is. I certainly know that my card is capable of having AA while playing SC4... though, implementation may be an issue. It's possible that the limitations Maxis put into place for ATI cards (at the time) are interfering with newer cards' potential, because I certainly noticed that the game ran smoother with AA turned on.
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dedgren ♦ dmscopio ♦ Ennedi
emilin ♦ Heblem ♦ jplumbley ♦ moganite ♦ M4346 ♦ papab2000
Shadow Assassin ♦ Tarkus ♦ wouanagaine
See my uploads on the LEX!

WolfGuy100

My deep apology for bumping an OLD thread, but I have an AMD with Raedon graphic card and I still have this weird issue and not only USA Yellow large...it also happened on any large sized signals like Dutch or German.