Jump to content

Stuttering with No Grass in Objects


S-Matrix

Recommended Posts

8 hours ago, DoubleYou said:

I just looked into this a bit. It seems that with the new Grass LOD loaded into Object LOD, some systems will not be able to quite keep up with the generally accepted TerrainManager settings used by most people. These settings can be tweaked within the DynDOLOD MCM menu, and the most important one is the first block distance.


[TerrainManager]
fBlockLevel0Distance=35000
fBlockLevel1Distance=70000
fBlockMaximumDistance=250000
fSplitDistanceMult=1.5

Tweaking these settings, especially the first one, will help users the most with their new Grass LOD performance.

Just some quick tweaking on my setup, I changed mine to the following, and I'm getting much better performance. I'll be playing with this more to see what kind of balance I can strike up.

image.png

But this also affects all object LOD4 like trees. I personally think LOD trees look much better at a min of fBlockLevel0Distance=50000 (or as high as your system can handle it). I also personally think tree object LOD is much more important and noticeable than grass object LOD, so 'dumbing' down tree LOD to accommodate the relatively unimportant grass LOD performance is an undesirable trade-off, IMO.

In other words, I don't think grass LOD is important enough unless the system can handle it without throttling fBlockLevel0Distance (so "optimal, no grass" DynDOLOD settings are what I recommend for most systems).

Link to comment
Share on other sites

Yeah, I was getting some huge frame drops from NGIO today. I normally stay very close to 72fps, but it would suddenly dip down to 35 for a second because of loading all the extra LOD, which is not okay. I'd rather not even have grass LOD if I have to endure that kind of issue. I was able to tweak my INIs down to where the dip would only hit 50 fps every once in a blue moon, which is somewhat acceptable, but I'm not even on an ENB and having that kind of issues on rather good hardware.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/17/2021 at 11:26 PM, DoubleYou said:

Yeah, I was getting some huge frame drops from NGIO today. I normally stay very close to 72fps, but it would suddenly dip down to 35 for a second because of loading all the extra LOD, which is not okay. I'd rather not even have grass LOD if I have to endure that kind of issue. I was able to tweak my INIs down to where the dip would only hit 50 fps every once in a blue moon, which is somewhat acceptable, but I'm not even on an ENB and having that kind of issues on rather good hardware.

Sorry to resurrect this "old" thread, but would you mind sharing what ini settings are relevant to this outside of the ones mentioned before in the DynDOLOD settings (since the consensus appears to be that tweaking those for grass LOD isn't actually worth it), as I'm still getting stuttering after trying a lot of different things? If my hardware is good enough, I'm not sure what else could be affecting this, as I've tested in different profiles with just this mod, Display Tweaks, engine fixes, and with the inis set to BethINI low and am still getting the stutter on cell change.

EDIT: Oh, just realized I already mentioned I did this in my initial post, sorry for redundant info.

Thanks for any help!

Edited by S-Matrix
Link to comment
Share on other sites

27 minutes ago, S-Matrix said:

Sorry to resurrect this "old" thread, but would you mind sharing what ini settings are relevant to this outside of the ones mentioned before in the DynDOLOD settings (since the consensus appears to be that tweaking those for grass LOD isn't actually worth it), as I'm still getting stuttering after trying a lot of different things? If my hardware is good enough, I'm not sure what else could be affecting this, as I've tested in different profiles with just this mod, Display Tweaks, engine fixes, and with the inis set to BethINI low and am still getting the stutter on cell change.

EDIT: Oh, just realized I already mentioned I did this in my initial post, sorry for redundant info.

Thanks for any help!

Also, I don't know if it helps "narrow it down" at all, but the problems only arise when the Grass Control part is enabled in MO2, the grass cache+DynDOLOD don't cause stuttering by themselves, leading me to believe it MIGHT have something to do with the raycasting? No clue for certain, though.

Link to comment
Share on other sites

I'm still working on getting the best solution to this. Currently tweaking DynDOLOD generation to a lower standard from high, as the entire reason this stuttering exists is because the grass lods in lod4 are just so dang expensive. Sacrificing some firstborn lods in lod4 and tweaking down the density of grass lod is my plan, but I need to do a lot of experimenting to figure out and understand exactly how this all works. Another thing I might try is making lod4's primary existence be for grass lod, and turning down the TerrainManager setting (fBlockLevel0Distance) for it low, maybe just 9 cells ~36864, and making lod8 higher quality to make up for the loss of lod4 distance.

Link to comment
Share on other sites

23 minutes ago, DoubleYou said:

I'm still working on getting the best solution to this. Currently tweaking DynDOLOD generation to a lower standard from high, as the entire reason this stuttering exists is because the grass lods in lod4 is just so dang expensive. Sacrificing some firstborn lods in lod4 and tweaking down the density of grass lod is my plan, but I need to do a lot of experimenting to figure out and understand exactly how this all works. Another thing I might try is making lod4's primary existence be for grass lod, and turning down the TerrainManager setting (fBlockLevel0Distance) for it low, maybe just 9 cells ~36864, and making lod8 higher quality to make up for the loss of lod4 distance.

Ah, good luck, and please, if you make any discoveries, relay them here if it's not too much trouble! I'm sure it will be kind of slow-going since it requires tweaking cache generation AND LOD generation, so I commend your dedication. Anyway, I'm currently using DynDOLOD with the medium preset, and will try regenerating with the low preset. Should I be tweaking anything in DynDOLOD's Edit Scripts in order to appropriately tune the density of grass lod? I'll also try lowering the fBlockLevel0Distance again to the level you've prescribed, thanks for the tips!

EDIT: Nvm, found the density setting and adjusted it from 50 to 30 to try and help performance.

Edited by S-Matrix
Link to comment
Share on other sites

Basically, grass LOD costs more than it's worth, IMO. Cutting back on render % and LOD distances essentially obviates using it on my system, which is pretty beefy. I think that only those with the top-performing GPUs can afford to run it with reasonable settings without any stutter.

The screens toward bottom of this link show differences with and wo grass LOD, so judge for yourself. Toggle last two screens (Optimal vs Optimal (no grass)):

https://stepmodifications.org/wiki/SkyrimSE:2.0.0#Grass_LOD_Configuration

Link to comment
Share on other sites

5 hours ago, DoubleYou said:

I'm still working on getting the best solution to this. Currently tweaking DynDOLOD generation to a lower standard from high, as the entire reason this stuttering exists is because the grass lods in lod4 are just so dang expensive. Sacrificing some firstborn lods in lod4 and tweaking down the density of grass lod is my plan, but I need to do a lot of experimenting to figure out and understand exactly how this all works. Another thing I might try is making lod4's primary existence be for grass lod, and turning down the TerrainManager setting (fBlockLevel0Distance) for it low, maybe just 9 cells ~36864, and making lod8 higher quality to make up for the loss of lod4 distance.

Alas, no luck. I didn't tweak any INI settings, but I tried DynDOLOD generation on Low quality and turned the fBlockLevel0Distance to around 12000, but still found my game stuttering. Let me know if there's anything else I can try, if you know.

 

3 hours ago, z929669 said:

Basically, grass LOD costs more than it's worth, IMO. Cutting back on render % and LOD distances essentially obviates using it on my system, which is pretty beefy. I think that only those with the top-performing GPUs can afford to run it with reasonable settings without any stutter.

The screens toward bottom of this link show differences with and wo grass LOD, so judge for yourself. Toggle last two screens (Optimal vs Optimal (no grass)):

https://stepmodifications.org/wiki/SkyrimSE:2.0.0#Grass_LOD_Configuration

That makes sense, but I'm still left confused by how many people seem to be getting really solid results with NGIO precaching, it's odd to me. Either way, it's pretty unfortunate.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/31/2021 at 9:42 PM, z929669 said:

NGIO precaching works great without grass LOD, even at 24000 distance on my system. Also, some people don't mind a little lag in loading cells outdoors.

So if this is the case, I may have discovered something interesting, pertaining to my own problems at least. I re-generated DynDOLOD after editing the scripts in order to not generate grass LOD, and even with just NGIO and my precache active (16000 overwritegrassdistance and 8000 overwritegrassfade) and no grass LOD from DynDOLOD, I'm actually STILL getting stuttering upon changing cells. I'm wondering now if the problem is specifically with NGIO then, or maybe I simply have to re-cache grass again with DynDOLOD mode set to 0 in grasscontrolconfig.txt?

Edited by S-Matrix
Link to comment
Share on other sites

I think the problem is a fundamental misunderstanding of the settings for NGIO and what they actually do. I need to find out if I can see what some of them do myself, as my impression from reading the descriptions appears to have been fundamentally flawed. That plus I see that there are a lot of mods (read Cathedral - insert name here) that provide plugin INIs that strive to overwrite the grass settings, that I think might be causing the game to create grass and load grass at the same time, doubling the amount of grass loaded.

Some of my testing that I need to expand upon that I am just rambling on for now (I need sleep and this is getting confusing):

  1. Create grass cache like normal, but use the non-large ref version
  2. Generate grass LOD -- grass lod should start at end of ugrids
  3. Disable all grass in every INI file and plugin INI in each and every possible way.
  4. Disable NGIO
  5. Run game on god mode and sprint around Whiterun (most grass intensive area for me).
  6. Watch FPS for frame drops. Any big -15fps or more drops?
  7. Enable grass via NGIO
  8. Run game on god mode and sprint around Whiterun (most grass intensive area for me).
  9. Watch FPS for frame drops. Any big -15fps or more drops?
  10. Rename grass .cgid files to .gid files
  11. Disable NGIO
  12. Set bAllowCreateGrass to 0 and bAllowLoadGrass to 1 to load from the grass gid files.
  13. Run game on god mode and sprint around Whiterun (most grass intensive area for me).
  14. Watch FPS for frame drops. Any big -15fps or more drops?

I need to look at the source code probably when I get a chance.

Pardon me if this doesn't make any sense. Kinda trying to document my state of mind after testing this out for a bit.

Link to comment
Share on other sites

My current setup seems to be working better than it has been before, so I will document my progress here.

GrassControl.config.txt

Spoiler

########################################################################################################################
#   Ray cast enabled                                                                                                   #
#                                                                                                                      #
# Use ray casting to detect where grass shouldn't grow (inside rocks or roads).                                        #
#                                                                                                                      #
#    Type: (boolean)                                                                                                   #
########################################################################################################################

RayCast = True

########################################################################################################################
#   Ray cast height                                                                                                    #
#                                                                                                                      #
# The distance above grass that must be free. 200 is slightly more than player height.                                 #
#                                                                                                                      #
#    Type: (float)                                                                                                     #
########################################################################################################################

RayCastHeight = 150

########################################################################################################################
#   Ray cast depth                                                                                                     #
#                                                                                                                      #
# The distance below grass that must be free.                                                                          #
#                                                                                                                      #
#    Type: (float)                                                                                                     #
########################################################################################################################

RayCastDepth = 5

########################################################################################################################
#   Ray cast collision layers                                                                                          #
#                                                                                                                      #
# Which collision layers to check when raycasting. Not recommended to change unless you know what you're doing. These  #
# are collision layer index from CK separated by space.                                                                #
#                                                                                                                      #
#    Type: (string)                                                                                                    #
########################################################################################################################

RayCastCollisionLayers = "1 2 13 20 31"

########################################################################################################################
#   Ray cast ignore forms                                                                                              #
#                                                                                                                      #
# Which objects will raycast ignore. This can be useful if you want grass to still grow from some objects (such as     #
# roads). The format is formid:formfile separated by ; for example "1812A:Skyrim.esm;1812D:Skyrim.esm" would add       #
# RoadChunkL01 and RoadChunkL02 forms to ignore list. Base forms go here not object references!                        #
#                                                                                                                      #
#    Type: (string)                                                                                                    #
########################################################################################################################

RayCastIgnoreForms = ""

########################################################################################################################
#   Super dense grass                                                                                                  #
#                                                                                                                      #
# Enable much more grass without having to change mod files.                                                           #
#                                                                                                                      #
#    Type: (boolean)                                                                                                   #
########################################################################################################################

SuperDenseGrass = False

########################################################################################################################
#   Super dense mode                                                                                                   #
#                                                                                                                      #
# How the super dense mode is achieved. Not recommended to change for normal play. This does nothing unless you enable #
# SuperDenseGrass setting. 7 is normal game (meaning nothing is actually changed), 6 or less would be much less grass, #
# 8 is dense, 9 is ?, 10+ is probably crash city.                                                                      #
#                                                                                                                      #
#    Type: (int32)                                                                                                     #
########################################################################################################################

SuperDenseMode = 8

########################################################################################################################
#   Profiler report                                                                                                    #
#                                                                                                                      #
# Whether to track how much time is taken to generate grass. Whenever you open console the result is reported. Try     #
# disabling all settings except profiler, go to game and in main menu 'coc riverwood', after loading open console to   #
# see normal game time. Then enable settings and check again how it changed. Remember to coc from main menu instead of #
# loading save because it might not be accurate otherwise.                                                             #
#                                                                                                                      #
#    Type: (boolean)                                                                                                   #
########################################################################################################################

ProfilerReport = False

########################################################################################################################
#   Use grass cache                                                                                                    #
#                                                                                                                      #
# This will generate cache files in /Data/Grass/ and use those when we have them. Any time you change anything with    #
# your mod setup you must delete the contents of that directory so new cache can be generated or you will have bugs    #
# like floating grass or still grass in objects (that were changed by mods).                                           #
#                                                                                                                      #
#    Type: (boolean)                                                                                                   #
########################################################################################################################

UseGrassCache = True

########################################################################################################################
#   Extend grass distance                                                                                              #
#                                                                                                                      #
# Set true if you want to enable extended grass distance mode. This will allow grass to appear outside of loaded       #
# cells. Relevant ini settings:                                                                                        #
# SkyrimPrefs.ini [Grass] fGrassStartFadeDistance                                                                      #
#                                                                                                                      #
#    Type: (boolean)                                                                                                   #
########################################################################################################################

ExtendGrassDistance = False

########################################################################################################################
#   Extend grass count                                                                                                 #
#                                                                                                                      #
# Allow more grass to be made in total. This is needed if you use very dense grass or have large draw distance.        #
# Otherwise it will reach a limit and just stop making grass leaving weird empty squares.                              #
#                                                                                                                      #
#    Type: (boolean)                                                                                                   #
########################################################################################################################

ExtendGrassCount = False

########################################################################################################################
#   Ensure max grass types setting                                                                                     #
#                                                                                                                      #
# Makes sure that the max grass types per texture setting is set to at least this much. Can be useful to make sure     #
# your INI isn't being overwritten by anything. Most grass replacer mods require this. Set 0 to disable any            #
# verification.                                                                                                        #
#                                                                                                                      #
#    Type: (int32)                                                                                                     #
########################################################################################################################

EnsureMaxGrassTypesPerTextureSetting = 15

########################################################################################################################
#   Overwrite grass distance                                                                                           #
#                                                                                                                      #
# Overwrite fGrassStartFadeDistance from any INI. If this is zero or higher then the grass distance will always be     #
# taken from this configuration instead of any INI. This can be useful if you have a million things overwriting your   #
# INI files and don't know what to edit, so you can just set it here. For example 7000 is vanilla highest in-game      #
# grass slider. If you want to set higher you need to enable ExtendGrassDistance setting as well or it will not look   #
# right in-game. What the setting actually means is that grass will start to fade out at this distance. Actual total   #
# grass distance is this value + fade range value.                                                                     #
#                                                                                                                      #
#    Type: (float)                                                                                                     #
########################################################################################################################

OverwriteGrassDistance = 6144

########################################################################################################################
#   Overwrite grass fade range                                                                                         #
#                                                                                                                      #
# Overwrite fGrassFadeRange from any INI. If this is zero or higher then the grass fade range will always be taken     #
# from this configuration instead of any INI. This determines the distance it takes for grass to completely fade out   #
# starting from OverwriteGrassDistance (or fGrassStartFadeDistance if you didn't use the overwrite). If you want the   #
# grass fade out to not be so sudden then increase this value. Probably recommended to keep this at least half of the  #
# other setting.                                                                                                       #
#                                                                                                                      #
#    Type: (float)                                                                                                     #
########################################################################################################################

OverwriteGrassFadeRange = 10596

########################################################################################################################
#   Overwrite min grass size                                                                                           #
#                                                                                                                      #
# Overwrite iMinGrassSize from any INI. If this is zero or higher then the grass density setting (iMinGrassSize) will  #
# be taken from here instead of INI files. Lower values means more dense grass. 50 or 60 is normal mode with somewhat  #
# sparse grass (good performance). Lowering the value increases density! 20 is very high density. You should probably  #
# not set lower than 20 if you decide to change it. The grass form density setting itself still mostly controls the    #
# actual density of grass, think of iMinGrassSize more of as a cap for that setting.                                   #
#                                                                                                                      #
#    Type: (int32)                                                                                                     #
########################################################################################################################

OverwriteMinGrassSize = 60

########################################################################################################################
#   Only load from cache                                                                                               #
#                                                                                                                      #
# This will change how grass works. It means grass can only ever be loaded from files and not generated during play.   #
#                                                                                                                      #
#    Type: (boolean)                                                                                                   #
########################################################################################################################

OnlyLoadFromCache = True

########################################################################################################################
#   Skip pregenerate world spaces                                                                                      #
#                                                                                                                      #
# When pre-generating grass then skip worldspaces with this editor IDs. This can greatly speed up generating if we     #
# know the worldspace will not need grass at all.                                                                      #
#                                                                                                                      #
#    Type: (string)                                                                                                    #
########################################################################################################################

SkipPregenerateWorldSpaces = "DLC2ApocryphaWorld;DLC01Boneyard;WindhelmPitWorldspace"

########################################################################################################################
#   Only pregenerate world spaces                                                                                      #
#                                                                                                                      #
# If this is not empty then skip every worldspace that isn't in this list.                                             #
#                                                                                                                      #
#    Type: (string)                                                                                                    #
########################################################################################################################

OnlyPregenerateWorldSpaces = ""

########################################################################################################################
#   DynDOLOD Grass Mode                                                                                                #
#                                                                                                                      #
# Enable grass compatibility mode with DynDOLOD Grass LODs. Valid values:                                              #
# 0 = Disabled                                                                                                         #
# 1 = Display grass only in active cells (without fade) and let DynDOLOD handle inactive cell Grass                    #
# 2 = Display grass only in active cells and large ref loaded cells (without fade) and let DynDOLOD handle grass       #
# outside of large ref cells                                                                                           #
#                                                                                                                      #
#    Type: (int32)                                                                                                     #
########################################################################################################################

DynDOLODGrassMode = 1

 

Skyrim.ini

[Grass]
bAllowCreateGrass=1
bAllowLoadGrass=0
bDrawShaderGrass=1
bEnableGrassFade=0
bGrassPointLighting=0

SkyrimPrefs.ini

[TerrainManager]
fBlockLevel0Distance=56472.0000
fBlockLevel1Distance=152040.0000
fBlockMaximumDistance=343900.0000
fSplitDistanceMult=1.0000
fTreeLoadDistance=0.0000

DynDOLOD_SSE.ini

Spoiler

; This is the DynDOLOD.INI for Skyrim Special Edition and Skyrim VR / SSE or TES5VR game modes (see docs\help\GameMode.html)

[DynDOLOD]
; set to 1 to start in wizard mode, 0 to start in advanced mode
Wizard=1

; set to 1 for expert LODGen options in advanced mode, disables wizard automatically
Expert=1

; see ..\DynDOLOD\Docs\trees.ultra\DynDOLOD-Trees.html
;TreeLOD=1 This setting does not work anymore, check [x] Ultra in the advanced options window for generating LOD for trees in object LOD

; Vertexcolor multipliers for tree LOD models used in object LOD, see ..\DynDOLOD\Docs\trees.ultra\DynDOLOD-Trees.html
CrownBrightness=1
TrunkBrightness=1
FlatTrunkBrightness=1

; Do not change this setting
; set to 0 to use tree full model for static object LOD instead of billboard if a tree 3D LOD model is not found
; this can create HUGE static object LOD files and can potentially cause CTD because of invalid nif settings copied to *.bto
; identify the largest full models and create 3D LOD models, see ..\DynDOLOD\Docs\trees.ultra\tools\DynDOLOD_CreateStaticTree.html
; 0 -> FullModel; 1 -> Billboard, 2 -> Billboard2, 3 -> Billboard3 etc. 
; NOTE: This setting changed meaning in version 2.44
; RTFM before changing this setting
; Do not change this setting
TreeFullFallBack=1

; Billboard template to use for tree LOD done in static object LOD
; set to desired billboard NIF file or Internal (traditional tree LOD style 2 plane X similar to DynDOLOD_flat_lod_2x2.nif)
; files with same name found in games ..\Data\DynDOLOD\ folder have priority over files found in this ..\DynDOLOD\Edit Scripts\DynDOLOD\ folder
; Internal will be used automatically if NIF file can not be found
Billboard1=Internal
Billboard2=DynDOLOD_flat_2x2_lod.nif
Billboard3=DynDOLOD_flat_3x2_lod.nif
Billboard4=DynDOLOD_flat_4x2_lod.nif
Billboard5=Internal
Billboard6=LODGen_flat_lod.nif

; tree LOD ignores X/Y rotation values. If the rotation exceeds the max tilt, the tree will be done as object LOD
TreeLODMaxTilt=30

; set to 1 to generate LOD Level 32 *.bto files (indentical to LOD Level 16 but without billboard trees when generating with TreeLOD=0)
; set [MapMenu] uLockedObjectMapLOD=32 in Skyrim.ini
Level32=1

; Because Bethesda simply does not comprehend people are modding exterior worldspaces ...
; set to 1 if uLargeRefLODGridSize=5 (value of uGridsToLoad) in SkyrimPrefs.ini, do this if it is certain that the large references system will not be used, so that no DynDOLOD.esm is created
; set to 0 if uLargeRefLODGridSize>5 (value of uGridsToLoad) in SkyrimPrefs.ini
IgnoreLargeReferences=0

; set to 1 to create empty *.btt files for the quads covered by object LOD meshes instead of creating an empty *.lst when generating ultra LOD
; allows keeping vanilla tree LOD for worldspaces with cut content
CreateEmptyBTT=0

; value to set BSLightingShaderProperty Lighting Effect 1 used by SLSF2_Soft_Lighting flag for billboards used in static object LOD, higher values are brighter
FlatLODLightingEffect=0.0

; 3rd texture used for SLSF2_Soft_Lighting flag by billboards used in static object LOD
FlatLODGlowMap=textures\white.dds

; Set vertex colors for billboards used in static object LOD, 0.0 to 1.0, if value < 0.0 = no vertex color
; all 3 colors will be set to this same value so this acts as a brightness setting
FlatLODVertexColor=0.55

; Set vertex colors for billboards with normal map texture used in static object LOD, 0.0 to 1.0, if value < 0.0 = no vertex color
; all 3 colors will be set to this same value so this acts as a brightness setting
FlatLODWithNormalMapVertexColor=0.50

; Randomly change vertex color for billboards used in static object LOD, if value < 0.0 = no change
FlatLODColorVariance=0.1

; Randomly change height of billboards used in static object LOD to counter butterfly effect, set to 0.0 for no height change
FlatLODHeightVariance=0.0

; Set SLSF2_LOD_Objects flag for LOD levels equal or higher on billboards used in static object LOD
; Setting SLSF2_LOD_Objects flag disables all lighting effects
; 0 = none, 1 = LOD4, 2 = LOD8, 3 = LOD16, 4 = LOD32
FlatLODLevelLODFlag=0

; set to 1 to set transparent background of billboards to their average color, requires TreeLODDiffuseFormat with alpha channel like BC2 (DXT3), BC3 (DXT5) or A8R8G8B8
TreeLODAverageColor=1

; path to texture to set the transparent background of billboards to, requires TreeLODAverageColor=0, requires TreeLODDiffuseFormat with alpha channel like BC2 (DXT3), BC3 (DXT5) or A8R8G8B8
TreeLODBackgroundTexture=none
;TreeLODBackgroundTexture=textures\DynDOLOD\lod\dyndolodbackgroundtreelod.dds

; set to 1 to set transparent background of object LOD textures to their average color, requires ObjectLODAlphaDiffuseFormat with alpha channel like BC2 (DXT3), BC3 (DXT5) or A8R8G8B8
ObjectLODAlphaAverageColor=1

; Set LOD texture atlas formats
; Traditional 2D tree LOD does not use normal textures, but 2D tree LOD in static object LOD can make use of normal map if normals and bi/tangents are set
; NOTE: BC7 uses the included external tool Texconv. Compressing large textures with BC7 Max can take a while and can temporarily freeze the screen.
; BC1 (DXT1) = 200 - for diffuse converts any source alpha to transparency with threshold 128, for normal removes specular (alpha) which usually is not used by LOD
; BC2 (DXT3) = 201 - LOD only uses transparency and the threshold is 128
; BC3 (DXT5) = 202 - LOD only uses transparency and the threshold is 128
; BC7 Quick = 225 - LOD only uses transparency and the threshold is 128
; BC7 Max = 226 - LOD only uses transparency and the threshold is 128
; R8G8B8 = 87 - has no alpha, so do not use for alpha diffuse
; A8R8G8B8 = 88  - LOD only uses transparency and the threshold is 128
; If ObjectLODDiffuseFormat and ObjectLODAlphaDiffuseFormat are the same format one atlas texture file will be created. Otherwise two files, one for each format.
ObjectLODDiffuseFormat=225
ObjectLODAlphaDiffuseFormat=225
ObjectLODNormalFormat=225
TreeLODDiffuseFormat=225

; 0 = no mipmaps, 1 = texconv, 2 = internally
ObjectLODGenerateMipMaps=2
TreeLODGenerateMipMaps=2

; Texconv mipmap alpha coverage
AlphaCoverage=0.85

; Internal mipmap alpha factor
AlphaFactor=0.25

; File mask of textures not to add to the object LOD atlas texture. They will be used directly instead.
IgnoreTexture=mountainslab01.dds, mountainslab02.dds, atlas, treelod.dds, treelod1.dds, treelod2.dds, treelod3.dds, treelod01.dds, treelod02.dds, treelod03.dds

; set to 1 to add ShowLocalMap flag, opening/closing map causes water to reflect references with the flag set (requires [Water] bReflectSky=1 in Skyrim.ini) - can cause CTD when opening map
GlowLODLocalMap=0

; Fake Lights: minimum scale of glowing orb mesh required to add LOD for it, 1 equals 256 units
FakeLightsMinScale=1

; Fake Lights: minimum scale of glowing orb mesh required to add LOD for it in parent world, 1 equals 256 units
FakeLightsChildWorldMinScale=1

; Fake Lights: intensity of the glowing orb mesh, valid values from 1 to 9
FakeLightsIntensity=6

; Set to 1 to create a new plugin file with LOD added to STAT base elements to use in CK old style static object LOD generation
; There should be no existing DynDOLOD plugin in the load order
; Same as starting in expert mode and clicking 'Create Mod' button
CreateMod=0

; Base record signatures to process for LOD
BaseSignatures=STAT,TREE,ACTI,MSTT,CONT,FURN,DOOR

; leave at 5 even if using higher uGridsToLoad in the game
uGridsToLoad=5

; vanilla default is fMinSecondsForLoadFadeIn=1.5, set default seconds for in-game MCM setting to hide dyanmic LOD switching after fast travel
fMinSecondsForLoadFadeIn=2.7

; default mutiplier for in-game MCM window glow setting
fNearMultiple=1.25

; default mutiplier for in-game MCM window glow setting
fFarMultiple=1.5

; default mutiplier for in-game MCM window glow setting
fNeverMultiple=1.75

; Adjust terrain height for remove unseen faces function of LODGen.exe
RemoveUnseenZShift=10.0

; Changes the base records to a copy without the Has Distant LOD flag for references with enable parents to counter briefly showing object LOD when object are enabled
ConvertEnabledReferences=1

; Change PortalBoxes in processed worldspaces to just Boxes - can help with performance in Skyrim/Enderal
PortalBoxFix=0

; use decal flag from source mesh for static object LOD generated by LODGen.exe, can help with z-fighting of trimmings (flat shape on another flat shape)
; if decals fading behaves wierd see DynDOLOD_Manual.html#11a
UseDecalFlag=0

; (partial) mod file names to ignore, comma separated
; this will ignore references added by these mods, but process their overwrites
; do not ignore masters used by mods that are processed or else ...
IgnoreModFileName=Bashed Patch, SDO Full-LOD, SolitudeExterior, WhiterunExterior, holycow, DynDOLOD Addon, DynDOLOD - Addon, JKs Markarth, JKs LITE - Markarth, JKs SuperLITE - Markarth, JKs Riften, JKs LITE - Riften, JKs SuperLITE - Riften, JKs Solitude, JKs LITE - Solitude, JKs SuperLITE - Solitude, JKs Windhelm, JKs LITE - Windhelm, JKs SuperLITE - Windhelm, RedMountainErupts, DawnofWindhelm, TAVERiften, TAVESolitude, TAVEWindhelm, TownsandVillagesEnhancedPro, VolumeticMists

; (partial) mods that are obsolete
ReplaceModFileName=SDO Full-LOD, Distant Detail, NSUTR_LOD, Full LOD, SPTKatlaSailReangle, TVDT Removed;OcclusionCulling, Dragonsreach Balcony Landscape Fix, DVLaSS Skyrim Underside;Underside, CullingFix, Culling Glitch Fix;OcclusionCulling, PlocktonFollowingMercerPatch;OcclusionCulling, OCWcellsettingsPlocktonsPatch;OcclusionCulling, PlocktonsWinterholdRestoredPatch;OcclusionCulling, Bigger Gildergreen LODs.esp, Bigger Gildergreen OCS LODs.esp

; (partial) mod file names to warn about, comma separated, remove "Open Cities Skyrim;OpenCities, " after reading in the manual about it
WarnModFileName=Open Cities Skyrim;OpenCities, Occlusion

; order to scan for *_lod*.nif files. Indentical filenames (sans path!) found *last* will overwrite win
Folder1=meshes
Folder2=meshes\dlc01\lod
Folder3=meshes\dlc02\lod
Folder4=meshes\lod
Folder5=meshes\dyndolod

; ignore LOD models for auto discovery with this (partial) path - comma separated list. Because adhering to simple Bethesda filename conventions is hard
IgnoreLODMesh=.mohidden,\aom\,\enderal\,\smskyrim\,\anthelius\,\nsurlod\,\rigmorcyrodiil\trees\

; ignore full models for auto discovery with this (partial) path - comma separated list. Because adhering to the simple Bethesda filename conventions is hard
IgnoreFullMesh=.mohidden,\aom\,\enderal\,\smskyrim\,\anthelius\

; (partial) EditorID of base element to ignore
IgnoreBaseEDID=loadscreen, _invis_, dbm_arrivalship

; Warn about and avoid using NIF that do not have any of these root blocks
ValidRootBlocks=BSFadeNode, BSLeafAnimNode, BSTreeNode

; Set to 1 to add activators as temporary references if possible. Will result in more plugins used as masters and larger plugin size because of additional CELL data that needs to be copied to the DynDOLOD plugin
; See https://www.reddit.com/r/skyrimmods/comments/ag4wm7/psa_the_reference_handle_cap_or_diagnosing_one_of/
Temporary=0

; Update TVDT occlusion data. Will result in more plugins used as masters and larger plugin size because of additional CELL records that needs to be copied to the DynDOLOD plugin
; requires Generate dynamic LOD to be checked
Occlusion=0

; Limit the number of threads in case updating height map from terrain/object LOD meshes requires large amounts of memory
; -1 = no limit, otherwise set to a number greater than 0
OcclusionMaxThreadsTerrainLOD=-1
OcclusionMaxThreadsObjectLOD=4

; default setting to use in case specific worldspace settings are not defined
; Samples per cell, 1 = 1, 2 = 4, 3 = 16 - the more samples are used the more distant cells are likely to be disabled and the longer the calculations take
OcclusionQuality=2
; additional height to add to oberserver height
OcclusionHeight=0
; max render distance
OcclusionRadius=100
; All = update all CELLs that have terrain height data
; +Border = "All" with a border region
; -Flat = "All" terrain that is not flat
; -Flat +Border = "All" terrain that is not flat and a border region
; +TVDT = "All" with a TVDT record
; +TVDT +Border = "All" with a TVDT record and a border region
; +TVDT -Flat = "All" with a TVDT record and terrain that is not flat
; +TVDT -Flat +Border = "All" with a TVDT record and terrain that is not flat and a border region
; -TVDT = "All" without a TVDT record
; -TVDT +Border = "All" without a TVDT record and with a border region
; -TVDT -Flat = "All" without a TVDT record and with terrain that is not flat
; -TVDT -Flat +Border = "All" without a TVDT record and with terrain that is not flat and a border region
; In any case, only CELLs that are part of the dynamic LOD Near/Far grids are updated
OcclusionMode=-TVDT -Flat +Border

; world specific settings *_[Worldspace name] (EditorID)
; by default worlds that have the small world flag set are skipped automatically
; force enable small world
;Occlusion_ExampleWorld=1
; force disable large world
Occlusion_ArnimaDagonRealm=0
; different modes
OcclusionMode_Tamriel=-Flat +Border
OcclusionMode_Sovngarde=-TVDT -Flat
OcclusionMode_DLC01SoulCairn=-TVDT -Flat

; set to 1 to enable grass LOD for the nearest object LOD level 4, requires *.cgid grass files in data\grass\ folder from Grass Control and grass LOD billboards generated by TexGen
Grass=1

; 0 to 100%; 0 = no grass - unlike Grass=0, the grass LOD billboards will still be added to the object LOD texture atlas
GrassDensity=35

; set to 1 to flag grass LOD as LargeReference, so that it unloads at the distance of uLargeRefLODGridSize instead of the usual uGridsToLoad distance
GrassLargeReference=0

; grass LOD brightness multipliers
;GrassBrightnessTopR=0.41
;GrassBrightnessTopG=0.415
;GrassBrightnessTopB=0.4
GrassBrightnessTopR=0.31
GrassBrightnessTopG=0.315
GrassBrightnessTopB=0.3
; make bottom darker to fake shadowing
;GrassBrightnessBottomR=0.200
;GrassBrightnessBottomG=0.203
;GrassBrightnessBottomB=0.195
GrassBrightnessBottomR=0.150
GrassBrightnessBottomG=0.153
GrassBrightnessBottomB=0.145

; set to 1 to run LODGen.exe with --verbose
Verbose=0

; set to a value >= 0 and <= number of logical CPU cores
; 0 = automatically set number of main threads to number of physical cores
; lower values = more main threads = more memory usage - not nessarily faster/slower
; higher values = less main threads = less memory usage - not nessarily slower/faster
LODGenThreadSplit=0

; set the double_sided shader flag in object LOD *.bto meshes on these lists of meshes / textures masks (partial filename) for mods like Dynamic Volumetric Lighting and Sun Shadows
DoubleSidedTextureMask=mountain,mtn
DoubleSidedMeshMask=mountain,mtn

; set to 1 to generate a terrain NIF that is placed under the actual terrain in order to block light for mods like Dynamic Volumetric Lighting and Sun Shadows
; current DynDOLOD output can be quickly updated by keeping plugins activated and then deselecting all LOD generation options, then install new output overwriting old output
TerrainUnderside=1
; Quality of the terrain NIF, higher numbers = less quality/smaller file size. If the quality is too low its shapes might pierce through the ground near steep terrain
TerrainUndersideQuality=10
; z position of the reference placing the terrain NIF, if too high its shapes might pierce through the ground
TerrainUndersideHeigth=-500
; EditorID of worldspaces with LOD to ignore for terrain underside generation
TerrainUndersideIgnoreWorlds=Blackreach, DLC01SoulCairn, DLC2ApocryphaWorld

; set to 1 to enable notices
Notice=0

; set to 1 to enable warning messages
Warning=1

; set to 1 to enable debug messages; enables notices and warnings automatically
Debug=0

; 
; !!! NO NEED TO COMMENT OUT ANYTHING FOR OPEN CITIES !!!
;
; Parent world name
[Skyrim Tamriel]

IgnoreIfPluginExists=Open Cities Skyrim.esp

; Child Town worlds to check for new LOD
ChildWorlds=MarkarthWorld, RiftenWorld, SolitudeWorld, WhiterunWorld, WindhelmWorld

; ignore the references linking to this (partial) EditorID base element
Ignore=treereach, treepine, treeaspen, treeclover, treegourd, treekelp, treethicket, treevine, gkbtree, jungletree, cedartree, shrub, fern, flora, wrtreecircle, windmill, mountain, rock, fxwater, water1024, rapids, dirtcliff, drift, road, hay, wrpondwall, fence, stonewall, shackroof, impstoneblock, whprisonwallcap, whouterwallstatue, mrkmillroof01, crafting, fxglow, whgate, whdoorfrontgate, slightpost, signrtpost, mrkkeepcollonadecolm, mrkbrazierhangingdeco, mrkwarrensarch, mrkarch, candlehorn, candlel, candles, candle0, rtcanals, rtlamppost, fxmist, door

; Child Town worlds bounds, SW, NE, min height - used to automatically do LOD for trees as object LOD and to copy back disabled NeverFades added by confused mod authors
MarkarthWorld=-44,1,-40,2
RiftenWorld=41,-25,43,-23
SolitudeWorld=-15,24,-11,27,-10000
WhiterunWorld=4,-3,7,1
WindhelmWorld=31,8,34,10

[Skyrim arnimaDUPLICATE003]

NoDynamicLOD=Arnimatown

 

Other notable change was the Cathedral 3d Pine Grass mod was installed.

Over the course of a 7.5 minute period while sprinting from coc Whiterun past Rorikstead, I experienced 7 big frame drops, where big frame drop is defined as a drop of 10fps or more. I think about 4 of these were rather noticeable below 60fps, where the worst two were down to 38fps and 48fps. This is actually significantly better than it was, and I wasn't sprinting before. Sprinting is basically the stress test I'm using to quantify these stutters. This seems almost acceptable to me at this point, but I want to tweak it further. I need to tweak the grass lighting settings a bit brighter, as I noticed they were too bright, so I went for big changes to see how much they affected it. Got rather close to what I want, but it needs a bit more brightness. 

 

Link to comment
Share on other sites

@DoubleYou
I only noted three drops (0:39, 3:15, 5:09). The only thing I could discern was you're not having issues from grass crossing/loading cells. You're running through cells fine. 0:39 isn't even discernible unless you're watching the counter. There is no hitch in the video. There isn't enough onscreen to see anything at 3:15, however, I noted at 5:09 the background pops into focus directly before the drop.

The only thing all have in common is there is some sort of AI running around you while you're in these spots (combat event at Whiterun with giant, rabbits/deer running and wolves attacking). You might turn off the AI to see if this stuff still happens (TAI & TCAI).

EDIT
I did your run on my system and it actually drops in the exact some places.

Link to comment
Share on other sites

Well, I think I have the answer, and it's a rather hacky fix. It seems that NGIO is causing these stutters, which I have now been able to repeat several times.

Here is the repeatable sequence that I employed to find a stutter location that always happens:

  1. Use the settings as I posted above for successful grass cache/lod generation
  2. Get to the bridge in front of Robber's Gorge traveling down from Rorikstead and make a save. This will be your start location.
  3. Travel toward the Gorge. A bandit will greet you and try to extort a toll. Rocks will fall down. All will be good so far, except for the mean old bandits. Tell them to get out of your way.
  4. Continue running along the road underneath the bridge at the Gorge. Here you will experience the big stutter.

Video (stutters at 25-26 second mark):

Now the fix:

This fix involves modifying the game INI settings to load the generated grass cache by the vanilla game without requiring NGIO. This requires fixing the bugs caused by loading the erroneous grass cache files contained within the Skyrim - Misc.bsa.

To remove the erroneous grass cache files from Skyrim - Misc.bsa:

  1. Load Skyrim - Misc.bsa into Bethesda Archive Extractor and extract the scripts and seq folders into a directory, preferably into a new folder on your desktop or somewhere else handy. Do not extract the grass folder. 
  2. Run the official Archive.exe bundles with the SSE Creation Kit (location will be Skyrim Special Edition\Tools\Archive\Archive.exe).
  3. Beside Root Dir, click the 3 dots and select the directory you placed the scripts and seq folders into.
  4. Under Edit menu, choose Add Directory, and select same directory you just did for Root Dir.
  5. Under Edit menu, select Check All Items
  6. Tick Misc and Retain File Names
  7. Under File menu, click Save and use the name Skyrim - Misc.bsa.

You now have a modified Skyrim - Misc.bsa that no longer contains erroneous grass cache files. We will load this file as a mod in Mod Organizer so that it will overwrite the vanilla Skyrim - Misc.bsa so we don't have to remove the original version of the file from the game data directory. Alternatively, you could simply backup the vanilla BSA and replace with the modified file. Or you could name the Skyrim - Misc.bsa to something else and modify the sResourceArchiveList INI setting to point to the new file. I do NOT recommend these methods, as loading it through Mod Organizer is way simpler. To do so:

  1. In the left pane of Mod Organizer, right-click, hover over All Mods, and select Create empty mod above.
  2. Name it Skyrim - Misc BSA without buggy grass cache or something similar.
  3. Right-click your new mod and select Open in Explorer.
  4. Copy your modified Skyrim - Misc.bsa into the new mod. The bsl file is unnecessary.
  5. Checkmark your mod in Mod Organizer. Order shouldn't matter, as all you're doing is overwriting a vanilla bsa.

Great. So now you removed the erroneous grass cache. Now how do you make your NGIO grass cache compatible with the vanilla game? Easy. Just rename all the *.cgid files to the *.gid file extension. My grass cache has over 8000 files. That might take awhile by hand. Let's do this via a batch file:

  1. Open Notepad
  2. Paste the following code: 
    rename *.cgid *.gid
  3. Under File menu, click Save As
  4. Change Save as type dropdown to say All Files (*.*)
  5. Navigate to the directory where you have your grass cache. You will know you are in the right place when you see all the *.cgid files.
  6. In File name, enter the following: 
    1-rename-grass-cache-to-gid.bat
  7. Click Save
  8. Exit Notepad
  9. Navigate to the directory where you have your grass cache. You should now have your fancy-dancy batch file there.
  10. Double-click 1-rename-grass-cache-to-gid.bat to run the batch file.

Now all your grass cache files have the *.gid extension and are able to be read by SSE. How can we load our grass cache with SSE? INI settings! However, since there are many, many mods that like to modify the settings necessary to use the grass cache successfully, we are going to make a plugin INI of our own to override any of their foolishness.

  1. Occlusion.esp is the last plugin you should have loaded in your load order. If it is not, whatever plugin you have in your load order that loads last should be the name you use. In this example, we use Occlusion, but if you have Your-Awesome-Mod, you should use Your-Awesome-Mod instead.
  2. In the left pane of Mod Organizer, right-click, hover over All Mods, and select Create empty mod above.
  3. Name it Force Load Grass Cache.
  4. Right-click your new mod and select Open in Explorer.
  5. Right-click on meta.ini and choose Copy
  6. Right-click inside the directory and choose Paste.
  7. Right-click on meta - Copy.ini and choose Rename
  8. Type Occlusion
  9. Hit enter.
  10. Hit enter. Yes. Do it again.
  11. Delete all the contents of this file in the text editor that opens and instead paste the following: 
    [Grass]
    bAllowCreateGrass=0
    bAllowLoadGrass=1
    bDrawShaderGrass=1
    bEnableGrassFade=0
    iMinGrassSize=60
  12. Save the file.
  13. Enable the mod in the left pane of Mod Organizer.
  14. Any time you wish to modify the grass density, you can modify it in this new INI file within the Mod Information window for the mod under the INI files tab. Alternatively, remove the iMinGrassSize line and modify the value elsewhere.

Okay. So now your grass cache should load using the vanilla game mechanism for loading cached grass files. Be aware that you should modify Grass Fade settings via your INI files to your liking. I find it needless to go beyond the following when you are going only up to the uGridsToLoad distance:

Skyrim.ini

[Grass]
fGrassFadeRange=10596

SkyrimPrefs.ini

[Grass]
fGrassStartFadeDistance=6144

Video at the same spot after these changes. No stutter. This was repeatable. Do happy dance!

Now, why does this fix this stutter? Honestly, I don't know. I disabled ai and combat ai via the console and it still existed. I disabled everything in NGIO except the UseGrassCache and OnlyLoadFromCache line and it persisted. As soon as I remove the NGIO plugin, it's gone. I think there must be some hitch with it that only seems to occur at some locations. Perhaps it is checking for missing cgid grass files?

Can it be fixed? Probably. However, this exercise is good, as this knowledge is useful to potentially be used for the other games that do not currently have the NGIO mod. Generation of the grass cache for those games are tricky at the moment.

Notice: It may be possible for a grass cache file to NOT be generated when pre-caching grass. If you find a place that is missing grass that should have grass, you will need to reenable NGIO to create the necessary cgid file at that location. This file will then need to be renamed gid as mentioned above.

Full test run. Also increased DynDOLOD rules to high from medium, and still no big stutters:

 

Edited by DoubleYou
Added full test run video
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.