Jump to content


Photo

Shadow Optimization


  • Please log in to reply
109 replies to this topic

#1 z929669

z929669

    Ixian Inventor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,249 posts

Posted 01 January 2014 - 06:48 PM

We'd like some user input into the effects of the following [Display] INI settings that affect shadows (all eslse being equal!):

Default SkyrimPrefs.ini settings (vanilla presets):
iBlurDeferredShadowMask = 3    ;higher values 'blur' shadows and decrease resolution, but also decreases edge pixellation ... ideally, this should remainl rather low, but who knows for sure?
fShadowLODStartFade = 200.0000
bShadowMaskZPrepass = 0

bDrawShadows = 1

bDeferredShadows = 1
fShadowBiasScale = 0.1500
iShadowMapResolution = 1024

iShadowFilter = 3
iShadowMode = 3


Problem: Skyrim shadows are bad, even on the default 'Ultra' settings. Outdoor sjadows have pixellated edjecs, so they appear as shadows of "Lego versions" of the actual ojects. There are limited known ways of enhancing shadows, especially outdoors. fShadowDistance also impacts outdoor shadow quality in that smaller values drastically improve shadow resolution, but also decrease the rendered shadow distance ... but edjes are clocky no matter what.

Objective: Maximize shadow draw distance, resolution and edge smoothness ALL AT ONCE if possible. 
Testing conditions:

Please establish the default INIs using the STEP-recommended Skyrim Launcher setup and the following INI adjustments. No other custom modifications to the base config please (it does not matter if you have mods installed or not as long as they are not altering the vanilla configuration files):

bTreesReceiveShadows = 1
bDrawLandShadows = 1
fShadowDistance = 8000.0000 ;this is the 'ultra' value, 'high' is 4000.0000


Please only mess with the default INI settings indicated above and nothing else in the game or otherwise (monitor res, gamma, brightness, contrast, etc). The goal is to try and define settings that actually have a positive impact towards obtaining the Objective and to identify shadow settings that simply don't need to be messed with (have no impact or have a high performance impact).


Thanks for helping out!

 

Below is a recommendation based on testing for Skyrim shadows:

 

Vanilla shadow users:

 

SkyrimPrefs.ini

[Display]
bDeferredShadows=1
bShadowMaskZPrepass=0
fInteriorShadowDistance=4000.0000
fShadowBiasScale=1
fShadowDistance=4000.0000
;May increase fShadowDistance to higher values
iBlurDeferredShadowMask=4
iShadowFilter=3
iShadowMapResolution=2048
;set iShadowMapResolution to 1024 (medium), 2048 (high), or 4096 (ultra) depending on the preset the Launcher assigned to you

ENB shadow users:

 

SkyrimPrefs.ini

[Display]
bDeferredShadows=1
bShadowMaskZPrepass=0
fInteriorShadowDistance=4000
fShadowBiasScale=0.4
;Somewhere between 0.4 and 1.0 is best for fShadowBiasScale
fShadowDistance=4000
;May increase fShadowDistance to higher values
iBlurDeferredShadowMask=1
;Setting iBlurDeferredShadowMask to 0 will cause buggy ENB shadows. This may be increased at user discretion.
iShadowFilter=3
iShadowMapResolution=2048
;set iShadowMapResolution to 1024 (medium), 2048 (high), or 4096 (ultra) depending on the preset the Launcher assigned to you


#2 RafaelValeira

RafaelValeira

    Prisoner

  • Members
  • 7 posts

Posted 05 January 2014 - 04:01 PM

I think that fShadowBiasScale defaults to 0.2500, doesn't it? But, anyway, I didn't get exactly what you need. Perceptions? Benchmark? Both?
  • 0

#3 Spock

Spock

    Jarl

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 556 posts

Posted 09 January 2014 - 06:29 AM

As far as I know the shadow quality of Skyrim will degrade with larger draw distance. That is because the Skyrim engine renders one big shadow for the whole scene. If it is larger with the same resolution the quality will be lower. Another point is that some .ini settings regarding shadows look odd with certain ENB configs. Opethfeldt's ENB for example looks best at iBlurDeferredShadowMask=3 while a setting of 4 helped with my vanilla shadows. I'm sorry that I cannot make comparison shots to back up my claims atm because I sold my GPU and am still waiting for a new one.
  • 0

#4 Cgr33k

Cgr33k

    Prisoner

  • Members
  • 2 posts

Posted 22 January 2014 - 02:54 AM

I found that these settings gave me the best shadows' appearance:
iBlurDeferredShadowMask=5
fInteriorShadowDistance=2500.0000
fShadowDistance=2500.0000
iShadowMapResolutionSecondary=4096
iShadowMapResolutionPrimary=4096
iShadowSplitCount=2
iShadowFilter=4
iShadowMode=4
iShadowMapResolution=4096
fShadowBiasScale=0.1500
iShadowMaskQuarter=4

Edit:
Screenshots:

Without Enb:
Posted Image

Posted Image

Posted Image

With Enb (Bleak Enb):

Posted Image

Posted Image
  • 0

#5 Spock

Spock

    Jarl

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 556 posts

Posted 26 January 2014 - 08:55 PM

There seems to be someone one the nexus who already had an indepth look into this. He made 9 presets for different hardware and different fov. Low: http://www.nexusmods...im/mods/19632/? Medium: http://www.nexusmods...yrim/mods/283/? Ultra: http://www.nexusmods...rim/mods/7638/? His video about LOD shadow issues (seems to be FOV dependent): Since ENB boost is very desirable anyway and there is a shadow fix ENB boost version out there, wouldn't it be best to use that instead of ini tweaking? http://www.nexusmods...yrim/mods/50244
  • 1

#6 miran

miran

    Prisoner

  • Members
  • 42 posts

Posted 09 February 2014 - 03:14 PM

I tried making changes one at a time leaving all others at the default as defined in the OP. The differences are very, very small.

There are now a bunch of photos, the settings are in the name and I uploaded a 7zip here:
http://www.mediafire...ge_at_a_time.7z
2 pictures of each setting: one picture of bush shadows & one of a rock with vertical lines. Curious about that, what is it?

I'm not sure how you want to test performance differences. Top of the steps at Whiterun? stay there for a minute? or run down to the gate?
  • 0

#7 z929669

z929669

    Ixian Inventor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,249 posts

Posted 09 February 2014 - 04:01 PM

Thanks all for the info. I'll take a look and post back when I have some more time!

#8 Spock

Spock

    Jarl

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 556 posts

Posted 22 May 2014 - 07:36 PM

On a small side note for ENB users, the only two shadow quality settings (meaning strictly quality, not view distance or sunupdate) to play with are shadow map resolution and iBlurDeferredShadowMask. On a r9 290 @1440p amd 8k shadow distance, 2k shadow map resolution and iBlurDeferredShadowMask=5 were the perfect settings for me. 1k shadow map resolution got me ~1 fps and a perceivable quality loss while 4k cost me ~4-5 FPS with almost no gain leaving iBlurDeferredShadowMask the only setting to really play with. Sadly I cannot provide comparison shots atm but I prefer a value of 5 as a good mix of sharpness and hiding some edge imperfections.


  • 1

#9 zyg0tic

zyg0tic

    Prisoner

  • Members
  • 3 posts

Posted 27 May 2014 - 11:29 AM

I have discovered how to fix the aura/glow around player, npc and object in front of a shadow.

 

I have published a guide here:

http://www.nexusmods...im/mods/54335/?

 

Basically you use whatever shadow settings you like for performance, quality and draw distance.

 

But do this to remove the aura/glow:

 

1. In skyrimprefs.ini

iBlurDeferredShadowMask=1 iMultiSample=0 bFXAAEnabled=0 bTransparencyMultisampling=0 bDeferredShadows=1

 

2. Use ENB with enblocal.ini settings:

UsePatchSpeedhackWithoutGraphics=false

EnableEdgeAA=true EnableTemporalAA=false EnableSubPixelAA=true EnableTransparencyAA=true

 

3. Use enbseries.ini settings to adjust ShadowBlurRange to your liking. Dont change iBlurDeferredShadowMask anymore.

 

4. It is compatible with injectSMAA so you can use that too.

 

This will result in the aura/glow being removed, but also no issues with a one-pixel white edge or blocky shadows.

 

If you set iBlurDeferredShadowMask=0 you can also remove the aura, but it isnt a real solution because shadows will be blocky (edges not blurred at all). And also the ENB blurring effects wont work nicely. My fix avoids those problems.


  • 0

#10 Garfink

Garfink

    Jarl

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 615 posts

Posted 28 May 2014 - 04:42 AM

Does the aura/glow changes alter performance in anyway?


  • 0

#11 zyg0tic

zyg0tic

    Prisoner

  • Members
  • 3 posts

Posted 28 May 2014 - 09:38 AM

Does the aura/glow changes alter performance in anyway?

Performance wont be made any worse or better by the fix. Normal shadow performance rules still apply (draw distance, shadow resolution, enabling/disabling certain types of shadows), but none of those will have any effect on the aura.

 

ENB antialising is superior to the game's own or driver-forced AA, as far as performance is concerned anyway. So if anything itll improve performance because of that. Using only ENB AA (and only improving it beyond that with injectSMAA) is essential to the fix so that the remaining 1-pixel aura is removed.


Edited by zyg0tic, 28 May 2014 - 09:41 AM.

  • 0

#12 EssArrBee

EssArrBee

    Incompatibilism Manager

  • STEP Staff
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7,721 posts

Posted 28 May 2014 - 12:14 PM

Performance wont be made any worse or better by the fix. Normal shadow performance rules still apply (draw distance, shadow resolution, enabling/disabling certain types of shadows), but none of those will have any effect on the aura.

 

ENB antialising is superior to the game's own or driver-forced AA, as far as performance is concerned anyway. So if anything itll improve performance because of that. Using only ENB AA (and only improving it beyond that with injectSMAA) is essential to the fix so that the remaining 1-pixel aura is removed.

The ENB AA for transparency is not performance friendly at all. The other three AA types in ENB are very performance friendly, but EdgeAA can cause blurriness and Temporal can cause ghosting. I'd stick with driver forced SGSSAA (Nivdia only I believe) and play with that. Also, look at the woven fences with ENB AA and there is so much noise in them. Only, MSAA and SSAA seem to a good job fixing that.



#13 zyg0tic

zyg0tic

    Prisoner

  • Members
  • 3 posts

Posted 28 May 2014 - 06:39 PM

I found that only the ENB AA settings were the only ones that removed the 1-pixel edge. That is why I said not to use driver-forced AA. If a different form of AA could be found which does the same thing then Id happily change my recommendation, but Ive not yet tested enough options. Disabling ENB's AA and using only injectSMAA might work.

 

UPDATE: I have discovered that the only thing that causes a 1-pixel edge (like a hard glow) is the game's own AA. I tried multiple combinations of other AA types (injectSMAA, all the ENB options, driver-forced transparecy AA) and none of them gave the 1-pixel white edge except iMultiSample (game's own AA).

 

So given that discovery, I can now rethink my fix. I will recommend only the bare essentials necessary for to remove all traces of the glow - additional tweaks unrelated to the essential fix will be labelled as such.


Edited by zyg0tic, 29 May 2014 - 02:32 AM.

  • 0

#14 AyleidRuin

AyleidRuin

    Guard

  • Members
  • PipPip
  • 145 posts

Posted 31 May 2014 - 04:44 AM

Hi STEP.  A lil late but wanted to share...
 
Here are some Answers copied from Geforce.com/Guides for the Highlighted Green Default Shadow Variables z929669 posted.  I hope this isn't TMI.  If it is, Admins Please Delete it.
 
NOTE: I agree with these Answers but NOT the Tweaks:


 
 
My Successful Tweak for the Ground Shadow Lines Close to/In front of player: =uTube vid of Shadow Line.
 
STEP Z-Fighting fix= fNearDistance=20.0000-25.0000 (mine is=17.0000).  Which has also fixed my Shadow Line problem. With fNearDistance=19.0000 set, the Shadow Ground Lines that run Horizontal in front of the player disappear.  I am still trying to find the sweet spot with SkyReaLism ENB and the Shadow tweaks in the Skyrim.ini/prefs.ini.  fNearDistance=19 clips at walls (corner of screen) but fNearDistance=20+ Clips ΒΌ of the screen at Walls.  I had fNearDistance=18.0000 set but shadow lines were present, though I didn't have clipping next to walls/objects.
 
I thought it may have to do with my FieldOfView=70 that fNeardistance=19 got rid of the lines.
fShadowBiasScale=.2500-.6000 is the fix I found googling, but after trying different variables with no change, I changed fNearDistance=19.0000 and lines were gone.
 
 
Display sections for Skyrim/Prefs.ini : Only the Shadow Variables :

My shadows are coming along quite nicely :D


Edited by AyleidRuin, 29 December 2014 - 02:19 AM.

  • 0

#15 EssArrBee

EssArrBee

    Incompatibilism Manager

  • STEP Staff
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7,721 posts

Posted 31 May 2014 - 12:54 PM

Thanks for putting in the time to test this stuff out AR!!




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users