Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat

Author Topic: shadows vs performance: a tip  (Read 3257 times)

0 Members and 1 Guest are viewing this topic.

Offline GMT

  • Forums Mayor
  • *
  • Posts: 191
  • Total likes: 2
  • Reputation: 2
  • Sweet home Arizona. Where the skies are so blue.
shadows vs performance: a tip
« 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:

... really, it is. I swear.

Offline FrankU

  • It's Frank, the U is just for the suspense
  • BeNeLux Team
  • Forums Guru
  • *
  • Posts: 3348
  • Total likes: 225
  • Reputation: 14
  • Dutch Housing Project
  • CL:
    U Grow It
Re: shadows vs performance: a tip
« Reply #1 on: June 14, 2012, 02:56:06 AM »
 ;D # Sadly, we have no off  ;D

Nice finding! Thanks.  &apls

Offline mrbisonm

  • Forums Guru
  • *
  • Posts: 2361
  • Total likes: 693
  • Reputation: 11
  • The Nexian
  • CL: In Fred We Trust
Re: shadows vs performance: a tip
« Reply #2 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


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

Offline NCGAIO

Re: shadows vs performance: a tip
« Reply #3 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 ..