• Welcome to SC4 Devotion Forum Archives.

shadows vs performance: a tip

Started by GMT, June 12, 2012, 05:22:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GMT

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:
QuoteoptionGroup $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:

... really, it is. I swear.

FrankU

 ;D # Sadly, we have no off  ;D

Nice finding! Thanks.  &apls

mrbisonm

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


....Uploading the MFP 1.... (.........Finishing the MFP1)

NCGAIO

Quote from: mrbisonm on June 14, 2012, 07:42:20 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 ..