Sim City 4 Devotion Forums

SimCity 4 General Discussion and Tutorials => SimCity 4 General Discussion => Topic started by: GMT on June 12, 2012, 07:22:24 AM

Title: shadows vs performance: a tip
Post by: GMT on June 12, 2012, 07:22:24 AM
well I keep this little finding I just made as brief as possible... and hope this has not been adressed earlier.

We all know that the shadow casting does really take it's toll on performance, but we also know that the lowest shadow settings are rearend-ugly and that there's no chance to turn them off.
I dug a little further and found out that in the graphics rules.sgr, maxis itself said there's no shadow off available, and instead they provide us with 4 pieces of code for shadows, two low with one claimed to be "off", medium high.
Now I tested both low settings and found out that there's about no difference at all in the way low quality shadows are depicted, except that one of the 2 settings chops off the shadows after 2 tiles.
looking at the other numbers I started testing, what happens if...
And found a way to completely turn off shadows. unfortunately only those that are rendered ingame, not those that are on the buildings etc themselves as they are not rendered ingame.
this does give you the performance benefit of low shadow quality without spoiling your visuals too hard with the ugly patches of shadow.

now, what you need to do is open up your graphics rules.sgr (make sure you disable read-only via it's properties) in editor, find the "optionGroup $Shadows" entry which is pretty much at the top of this file and change the lightingupdatealpha to 1. I did this with the shadow off parameter and enabled it, while opting out the shadow low parameter so I basically don't mess up with the original shadow low setting.
now my "optionGroup $Shadows" looks like this:
Quote
optionGroup $Shadows
# Sadly, we have no off
#      option $Off
      option $Low
      property shadowQuality 0 # off
      property shadowModelThreshold 40
      property lightingUpdateDelta 1
   
#   option $Low
#     property shadowQuality 2
#      property shadowModelThreshold 40
#      property lightingUpdateDelta 0.2
   
   option $Medium
      property shadowQuality 3
      property shadowModelThreshold 22
      property lightingUpdateDelta 0.05
   
   option $High
      property shadowQuality 5
      property shadowModelThreshold 12
      property lightingUpdateDelta 1e-4

and ingame, set to low shadow quality, I have no game-rendered shadows at all, with all the perfomance benefits from setting the shadows to low.  :thumbsup:
Title: Re: shadows vs performance: a tip
Post by: FrankU on June 14, 2012, 02:56:06 AM
 ;D # Sadly, we have no off  ;D

Nice finding! Thanks.  &apls
Title: Re: shadows vs performance: a tip
Post by: mrbisonm on June 14, 2012, 09:42:20 AM
An "Off" possiblity would be perfect. I usually have no problems with max shadows, but when I play in a big city on a big tile, I would love to be able to turn off shadows completely temporarily while I am building or modifying the city.
Maybe someone could make a MOD for this? Great find, GMT!

Fred
Title: Re: shadows vs performance: a tip
Post by: NCGAIO on June 14, 2012, 11:07:12 AM
Maybe someone could make a MOD for this? Great find, GMT!

Fred


The trick is mentioned a change to the file Graphics Rules.sgr in this game's installation directory is not the case then do mod. One would therefore provide the aquivo modified to download and then the User would replace ..