Jump to content

Shadow Optimization for SSE


DoubleYou

Recommended Posts

Shadow Optimization for SSE
 
The goal of this thread is to discover the best vanilla shadow settings for SSE.

Sun-Shadow Transitions

Skyrim.ini

[Display]
bDisableShadowJumps=1
fSunShadowUpdateTime=1.0000
fSunStaticTimeUpdateScale=0.1000
fSunUpdateThreshold=0.5000

These settings control sun-shadow movement. SSE modified shadows so that they move constantly with the movement of the sun by default (bDisableShadowJumps=1), in which case fSunShadowUpdateTime and fSunUpdateThreshold are ignored. This can cause constant shadow flickering at places, so many users find it best to go back to the Oldrim method by setting bDisableShadowJumps=0 and utilizing the fSunShadowUpdateTime and fSunUpdateThreshold to modify how often the shadows update in relation to the sun. However, setting bDisableShadowJumps to 0 may cause blinking shadows, so it is recommended to leave it at its default of 1 if you experience blinking shadows.

  • fSunShadowUpdateTime sets the speed of sun-shadow transitions in seconds when bDisableShadowJumps=0. It is recommended to be adjusted to minimize the transitions.
  • fSunStaticTimeUpdateScale sets the amount of time in seconds that passes between updating the shadows with the sun when bDisableShadowJumps=1. There is no transition using this method.
  • fSunUpdateThreshold sets the time between sun-shadow transitions when bDisableShadowJumps=0. A value of 0.05 is equal to 1 second, so a value of 1 equals 20 seconds. Increasing this also increases the distance the shadows will move during the transition. It is recommended to be adjusted to minimize the transitions.

Current recommendation:

Skyrim.ini

[Display]
bDisableShadowJumps=1
fSunShadowUpdateTime=0.25
fSunStaticTimeUpdateScale=0.1000
fSunUpdateThreshold=1.5

Shadow Bias

Skyrim.ini

[Display]
fShadowDirectionalBiasScale=0.3
  • fShadowDirectionalBiasScale sets the directional bias of the shadows applied to surfaces.Low values reduce peter-panning (detached shadows), but cause more shadow acne (AKA shadow striping). Please note that while fShadowBiasScale does exist in the INI files, it does not appear to work, and is presumed to be a leftover from Oldrim.

Current recommendation:

Skyrim.ini

[Display]
fShadowDirectionalBiasScale=0.47

Land Shadows

SkyrimPrefs.ini

[Display]
bDrawLandShadows=0
  • bDrawLandShadows toggles the ability of land objects such as rocks and mountains to cast shadows.

bDrawLandShadows=0 b-Draw-Land-Shadows-0.jpg

bDrawLandShadows=1 b-Draw-Land-Shadows-1-Default.jpg


 
Current recommendation:

SkyrimPrefs.ini

[Display]
bDrawLandShadows=1

Tree Shadows

SkyrimPrefs.ini

[Display]
bTreesReceiveShadows=1
  • bTreesReceiveShadows toggles the ability of trees to cast shadows on themselves.

bTreesReceiveShadows=1 Default.jpg

bTreesReceiveShadows=0 Tree-Shadows-Off.jpg
 
Current recommendation:

SkyrimPrefs.ini

[Display]
bTreesReceiveShadows=1

Interior Shadow Draw Distance

SkyrimPrefs.ini

[Display]
fInteriorShadowDistance=3000
  • fInteriorShadowDistance sets the distance that shadows are cast from the player while indoors. In Oldrim, and presumably also in SSE, increasing this greatly increased the likelihood of seeing blinking lights, so it is recommended to be left at its default value.

Current recommendation:

SkyrimPrefs.ini

[Display]
fInteriorShadowDistance=3000

Exterior Shadow Draw Distance

SkyrimPrefs.ini

[Display]
fShadowDistance=8000
  • fShadowDistance sets the distance that shadows are cast from the player outdoors. Increasing this decreases the relative resolution of shadows. Increasing this has a small performance cost.

fShadowDistance=8000 Default.jpg

fShadowDistance=2800 f-Shadow-Distance-2800.jpg

Current recommendation:

 

Reasoning for recommendation:

1 cell is 4096 units.

2 cells is 8192 units. 2 cells seems far enough.

SkyrimPrefs.ini

[Display]
fShadowDistance=8192

Detailed Shadow Draw Distance

Skyrim.ini

[Display]
fFirstSliceDistance=1250
  • fFirstSliceDistance sets the distance that full resolution shadows are cast from the player. You can sometimes visibly see the line where the detailed shadows (fFirstSliceDistance) stop and the lower resolution shadows (fShadowDistance) begins. I believe this value is used only in exteriors. Increasing this does not lower the relative resolution of shadows like fShadowDistance does. Increasing it has a small performance cost.

fFirstSliceDistance=2800 Default.jpg

fFirstSliceDistance=0 f-First-Slice-Distance-0.jpg

Current recommendation: 

 

Reasoning for recommendation:

1 cell is 4096 units.

Hypotenuse of cell is 4096√2 ≈ 5,792.6188

1/2 of that is about 2896

Skyrim.ini

[Display]
fFirstSliceDistance=2896

Shadow Splits

SkyrimPrefs.ini

[Display]
iNumSplits=2
  • iNumSplits sets the number of shadow splits. Acceptable values appear to be 2 or 3. More experimentation with iNumSplits=3 is warranted. Setting this to 0 or lower crashes the game. A setting of 1 is buggy. 4 is buggy. It may prove in future that iNumSplits=3 is the superior value, as initial testing indicated that it vastly improved shadows. However, in-game testing reveals that it seems to cause issues in some areas, showing a shadow render line more often. Therefore, it is recommended to leave it at 2 unless this issue can be solved.

iNumSplits=2 b-Draw-Land-Shadows-1-Default.jpg
iNumSplits=3 i-Num-Splits-3-seems-to-be-okay.jpg
 
Current recommendation:

SkyrimPrefs.ini

[Display]
iNumSplits=2

Shadow Resolution

SkyrimPrefs.ini

[Display]
iShadowMapResolution=2048
  • iShadowMapResolution sets the resolution of shadows. This value controls virtually the entire performance impact of shadows.

Current recommendation:

SkyrimPrefs.ini

[Display]
iShadowMapResolution=2048



Settings to Be Tested
 
The following shadow settings (or presumed shadow settings -- some might not do anything to shadows at all) are relatively unknown and need to be tested to determine exactly what they control and how they can be usefully modified:

Skyrim.ini
[Display]
bCreateShadowRenderTarget=0
bDirShadowMapFullViewPort=1
bDisableHighTreeShadow=1
fExponentialShadowMapScale=10.0000
fLoadingMenuShadowBias=30.6400
fLoadingMenuShadowFallOff=0.0000
fMaxFocusShadowMapDistance=450.0000
fMaxHeightShadowCastingTrees=5000.0000
fShadowClampValue=0.3000
fShadowSparkleIntensity=0.2500
iEnableShadowCastingFlag=2
iLoadingMenuShadowLightFlags=1
  • fShadowSparkleIntensity propably modifies the intensity of snow sparkles in shadowed areas.

fShadowClampValue=0.3 b-Draw-Land-Shadows-1-Default.jpg
fShadowClampValue=3 f-Shadow-Clamp-Value-3.jpg
fShadowClampValue=-100 f-Shadow-Clamp-Value-100.jpg
 
iEnableShadowCastingFlag=2 b-Draw-Land-Shadows-1-Default.jpg
iEnableShadowCastingFlag=0 i-Enable-Shadow-Casting-Flag-0.jpg
 
SkyrimPrefs.ini
 

[Display]
ffocusShadowMapDoubleEveryXUnit=450.0000
iNumFocusShadow=4

Unused/Broken Settings
 
The following shadow settings are believed to be unused or broken:

Skyrim.ini

[Display]
bActorSelfShadowing=0
bShadowsOnGrass=1
fShadowBiasScale=1.0000
  • bActorSelfShadowing is leftover from previous games and did not work in Oldrim.
  • bShadowsOnGrass toggled the ability of shadows to be cast upon grass in Oldrim, but disabling it appears to break grass entirely in SSE.
  • fShadowBiasScale set the shadow bias in Oldrim, but appears to have been replaced by fShadowDirectionalBiasScale in SSE.

SkyrimPrefs.ini

[Display]
iShadowMaskQuarter=4
  • iShadowMaskQuarter actually works in SSE. However, changing it only produces bugs. Here is an example of iShadowMaskQuarter=2 so that you get an idea of what it is doing. Basically, by halving the value, it removes a quarter of the shadow mask. In order to have all 4 quarters of the shadow mask, you need to set it to 4. Setting it higher or lower produces game-breaking bugs.

iShadowMaskQuarter=2 2020-09-06-14-08-01.jpg
 



Current Recommendations

Skyrim.ini
[Display]
bDisableShadowJumps=1
fFirstSliceDistance=2896
fShadowDirectionalBiasScale=0.47
fSunShadowUpdateTime=0.25
fSunStaticTimeUpdateScale=0.1000
fSunUpdateThreshold=1.5

SkyrimPrefs.ini

[Display]
bDrawLandShadows=1
bTreesReceiveShadows=1
fInteriorShadowDistance=3000
fShadowDistance=8192
iNumSplits=2
iShadowMapResolution=2048
Edited by DoubleYou
Link to comment
Share on other sites

Shadow Optimization for SSE

 

The goal of this thread is to discover the best vanilla shadow settings for SSE.

 

Sun-Shadow Transitions

 

Skyrim.ini

bDisableShadowJumps=1
fSunShadowUpdateTime=1.0000
fSunStaticTimeUpdateScale=0.1000

These settings control sun-shadow movement. SSE modified shadows so that they move constantly with the movement of the sun by default (bDisableShadowJumps=1), in which case fSunShadowUpdateTime and fSunStaticTimeUpdateScale are ignored. This can cause constant shadow flickering at places, so many users find it best to go back to the Oldrim method by setting bDisableShadowJumps=0 and utilizing the fSunShadowUpdateTime and fSunStaticTimeUpdateScale to modify how often the shadows update in relation to the sun.

 

fSunShadowUpdateTime sets the speed of sun-shadow transitions in seconds. It is recommended to be adjusted to minimize the transitions.

 

fSunUpdateThreshold sets the time between sun-shadow transitions. A value of 0.05 is equal to 1 second, so a value of 1 equals 20 seconds. Increasing this also increases the distance the shadows will move during the transition. It is recommended to be adjusted to minimize the transitions.

/snip

This setting reference is a mistake maybe? It's out of context anyway

Link to comment
Share on other sites

SSE modified shadows so that they move constantly with the movement of the sun by default (bDisableShadowJumps=1), in which case fSunShadowUpdateTime and fSunUpdateThreshold are ignored. This can cause constant shadow flickering at places...

 

Really? I have never had such an issue. Whatever is decided on, I'll likely still use bDisableShadowJumps=1 because it's the best option and, again, never seen any issue with it.

Link to comment
Share on other sites

Really? I have never had such an issue. Whatever is decided on, I'll likely still use bDisableShadowJumps=1 because it's the best option and, again, never seen any issue with it.

This is why it is "recommended" but not a part of general "Recommended Tweaks" or presets in BethINI. This issue is only an issue if you notice it, and should be left up to the user if they find it problematic.

Link to comment
Share on other sites

bDrawLandShadows=1 or bDrawLandShadows=0 .... Are you sure that you don't have these reversed in your compares? bDrawLandShadows=0 seems to cast object shadows in your shots, but I don't know where the sun is to say for sure. Seems best to set this at '1' if it really works.

 

bTreesReceiveShadows=1 or bTreesReceiveShadows=0 ... not sure if this is reversed either, since it is listed in a different order than^. Seems like a value of '1' should be best, but I like your bTreesReceiveShadows=0 image best for those trees.

 

I don't know what iEnableShadowCastingFlag is doing, but colors are way diff if set to '0' (not necessarily bad looking though).

 

iNumSplits=3 seems better from your shots.

 

fShadowClampValue

Link to comment
Share on other sites

bDrawLandShadows=1 or bDrawLandShadows=0 .... Are you sure that you don't have these reversed in your compares? bDrawLandShadows=0 seems to cast object shadows in your shots, but I don't know where the sun is to say for sure. Seems best to set this at '1' if it really works.

 

bTreesReceiveShadows=1 or bTreesReceiveShadows=0 ... not sure if this is reversed either, since it is listed in a different order than^. Seems like a value of '1' should be best, but I like your bTreesReceiveShadows=0 image best for those trees.

 

I don't know what iEnableShadowCastingFlag is doing, but colors are way diff if set to '0' (not necessarily bad looking though).

 

iNumSplits=3 seems better from your shots.

 

fShadowClampValue

bDrawLandShadows and bTreesReceiveShadows should definitely be left at 1 (enabled). The shots are marked in the correct order, so I'm not sure how you seem to like the off versions better.

 

iEnableShadowCastingFlag is rather a mystery to me. It seems like it disabled volumetric lighting (Godrays) by setting it to 0, but it also altered the shadows from simply disabling Godrays, so I really need to test more scenarios to figure out what is going on there.

 

iNumSplits=3 definitely looks better to me. I will be testing it on my playthrough and see if I run into any bugs. This is the most promising tweak for shadows that I have seen so far.

 

fShadowClampValue appears to be affecting shadowing only on grass. Lower values cause darker shadowing on the grass, whereas higher values seem to brighten the shadows to the point of removing them altogether. I doubt that it improves performance, however. The default value of 0.3 is probably best, but it may be useful for weather authors who have trouble with too bright grass.

Link to comment
Share on other sites

iShadowMaskQuarter actually works in SSE. However, changing it only produces bugs. Here is an example of iShadowMaskQuarter=2 so that you get an idea of what it is doing. Basically, by halving the value, it removes a quarter of the shadow mask. In order to have all 4 quarters of the shadow mask, you need to set it to 4. Setting it higher or lower produces game-breaking bugs.

 

2020-09-06-14-08-01.jpg

Link to comment
Share on other sites

iShadowMaskQuarter actually works in SSE. However, changing it only produces bugs. Here is an example of iShadowMaskQuarter=2 so that you get an idea of what it is doing. Basically, by halving the value, it removes a quarter of the shadow mask. In order to have all 4 quarters of the shadow mask, you need to set it to 4. Setting it higher or lower produces game-breaking bugs.

So this value is basically good for testing purposes? I.e., if set to 2 or 1, you see all shadows tweaks versus no shadows?

Link to comment
Share on other sites

iEnableShadowCastingFlag is rather a mystery to me. It seems like it disabled volumetric lighting (Godrays) by setting it to 0, but it also altered the shadows from simply disabling Godrays, so I really need to test more scenarios to figure out what is going on there.

This one seems rather odd in that the prefix implies it is an integer value and the suffix implies it is a bitmap, so it may be challenging to decipher which bits are used and what they do.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, Privacy Policy, and Terms of Use.