In the vanilla game full grass only renders in active exterior cells. No Grass In Objects can render full grass outside the active exterior cells in the LOD area. Since that becomes performance intensive very quickly, consider generating grass LOD.
Grass LOD is currently supported for Skyrim Special Edition, Skyrim Anniversary Edition, Skyrim VR and Enderal SE.
Grass LOD uses grass LOD billboards in object LOD, similar to ultra tree LOD. TexGen can be used to automatically generate the grass LOD billboards. TexGen supports generating HD grass LOD billboards using ENB complex grass textures. Grass LOD is generated for LOD level 4 only.
Grass LOD generation requires a warmed (current) grass precache for the current load order. It uses the *.CGID files found in the ..\Data\Grass\ folder.
The grass cache contains grass model and placement information. Changing only the grass textures typically does not require updating the grass cache - just updating grass LOD billboards with TexGen as explained below.
The grass cache can be generated for Skyrim Special Edition, Skyrim Anniversary Edition, Skyrim VR or Enderal SE with No Grass in Objects. Refer to its documentation for how to generate the grass cache.
The grass LOD generation simply requires grass cache files and does not care about any runtime versions. Using a grass cache made by somebody else for a different load order for grass LOD generation only but not in game, means that grass LOD and full grass are not going to match placements. How noticeable the discrepancies are depends on the differences between the load orders. It is recommended to generate a grass cache for the current load order.
See the explanations at Seasons how generate and use the grass cache files for every season, so grass LOD switches accordingly.
Settings
Use the version of No Grass In Objects for the used runtime version.
The settings file for No Grass in Objects is either ..\Data\NetScriptFramework\Plugins\GrassControl.config.txt or ..\Data\SKSE\Plugins\GrassControl.ini depending on the used version. The setting names are not equal, but very similar, in the GrassCtronl.ini dashes - are inserted. Below both are given separated by forward slash /. The GrassControl.ini is created running the game once or can be downloaded from the optional files section.
Set UseGrassCache/Use-grass-cache = True
and OnlyLoadFromCache/Only-load-from-cache = True
in the settings file.
With No Grass In Objects full grass can be rendered past the active cells, so grass LOD can either start right beyond the active exterior cells (uGridsToLoad
), which has better for performance - or beyond the large reference distance (uLargeRefLODGridSize
). The DynDOLODGrassMode/DynDOLOD-Grass-Mode
1 or 2 setting controls the distance of full grass respectively to make sure it renders to the edge where the grass LOD starts.
Set the same desired Mode in the advanced mode of DynDOLOD under the Grass LOD checkbox and for DynDOLODGrassMode/DynDOLOD-Grass-Mode
in the settings file. While the DynDOLODGrassMode/DynDOLOD-Grass-Mode
setting can be changed at any time, the Mode used to generate grass LOD is baked into the object LOD meshes. See Updating below how to update the object LOD meshes.
In case No Grass In Objects is not used in the game, set Mode to 1, obviously. If full grass is rendered outside the active cells and grass LOD has been generated with Mode=2, large reference bugs will cause texture flicker in the affected cells. Use the Large Reference Bugs Workarounds to fix this.
In case the grass LOD brightness or color seems off (it might depend on weathers or ENB settings), try different Direct/Ambient settings for grass LOD billboards in TexGen. In addition or alternatively change the GrassBrightnessTop*/ComplexGrassBrightnessTop*
and GrassBrightnessBottom*/ComplexGrassBrightnessBottom*
settings in ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_SSE.ini - those settings help if the color tone is off. Especially the image based lighting effect from ENB has a big impact on the brightness and color tone of the grass LOD. Additional complex grass lighting and time of day settings will obviously not apply to object LOD, as they are separate meshes and shaders. Do not use them so full grass and grass LOD match better for all weathers/times.
When using complex grass and the side facing away from the light direction is too dark it can be brightened with the backlightmask. In the ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_SSE.ini set ComplexGrassBillboard=5
and set ComplexGrassBacklightMask
to a value like 25, which means 25% of the light is applied to the side facing away from the light source. If the result is too dark, raise the value. If the result is too bright, lower the value.
Change the Density dropdown to a lower value in the advanced mode of DynDOLOD under the Grass LOD checkbox to thin out grass LOD for better performance. Note that HD grass LOD billboards for ENB complex grass use double the triangles, so in case performance is of concern, use half the density, 50% or less.
In case the grass pre-cache was generated with SuperDenseGrass/Super-dense-grass = True
, expect really long object LOD generation times. Lower the density to 33% or less.
Internal Billboards and External Billboards
By default grass LOD uses a so called internal billboard in object LOD. 2 planes cross each other at a 90 degree angle very similar to the traditional tree LOD. HD grass LOD billboards by default uses an external billboard NIF file in order to better match the ENB complex grass effect. Note that HD grass LOD billboards for ENB complex grass use double the triangles, so in case performance is of concern, use half the density, 50% or less.
It is also possible to define external billboard models in ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_[GAME MODE].ini with the settings:GrassBillboard2=DynDOLOD_flat_2x2alt1_lod.nif
GrassBillboard3==DynDOLOD_flat_2x2alt2_lod.nif
GrassBillboard4=DynDOLOD_flat_4x2alt1_lod.nif
GrassBillboard5=DynDOLOD_flat_4x2alt2_lod.nif
GrassBillboard6=Internal
Then use the settings GrassBillboard=1
and ComplexGrassBillboard=4
to control which billboard model is used. alt1 = without backlighting, alt2 = with backlighting.
Generating
Generate or update the grass cache with No Grass In Objects according to its instructions. Check out the mod Worldspaces with Grass SSEEdit Script for No Grass In Objects, it helps speeding up the grass cache generation.
Generate grass LOD billboards with TexGen and install the TexGen output as usual.
To enable grass LOD generation, check the Grass LOD checkbox in the advanced mode of DynDOLOD.
The option is disabled if its requirements are not met. Hover the mouse pointer to see a tooltip with the number of found *.CGID grass cache files and grass LOD billboards.
Generate LOD with DynDOLOD as usual.
Updating
In case only the grass placements in the precache have changed, start DynDOLOD in expert mode, select the desired worldspace and click the Execute LODGen button. Then merge the new output with the existing output, overwriting all older files.
In case only the grass textures have been changed or different settings in TexGen are used, update the grass LOD billboards with TexGen, install the TexGen output, then start DynDOLOD in expert mode, select the desired worldspace and click the Rebuild Atlas button. Then merge the new output with the existing output, overwriting all older files.
To only change the Mode, change GrassLargeReference
to True for Mode 2 or False for Mode 1 in ..\DynDOLOD\Edit Scripts\Export\LODGen_SSE_Export_[WORLDSPACE].txt, start DynDOLOD in expert mode, select the desired worldspace and click the Execute LODGen button. Then merge the new output with the existing output, overwriting all older files. Remember to set the same desired Mode in the advanced mode options in future LOD generations.
To test different GrassBrightnessTop*/GrassBrightnessBottom*
or GrassBrightnessBottom*/ComplexGrassBrightnessBottom*
settings, change them in ..\DynDOLOD\Edit Scripts\Export\LODGen_SSE_Export_[WORLDSPACE].txt, start DynDOLOD in expert mode, select the desired worldspace and click the Execute LODGen button. Then merge the new output with the existing output, overwriting all older files. Remember to also change the settings in the ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_SSE.ini for future LOD generation.
To test different grass LOD densities, change the GrassDensity
setting in ..\DynDOLOD\Edit Scripts\Export\LODGen_SSE_Export_[WORLDSPACE].txt, start DynDOLOD in expert mode, select the desired worldspace and click the Execute LODGen button. Then merge the new output with the existing output, overwriting all older files. Remember to set the same desired Density in the advanced mode options in future LOD generations.
To speed things up, limit generation to LOD Level 4 by using the Specific Chunk dropdowns. Use the West/South coordinates to generate and test with a specific BTO file until the desired results are found. Use the DynDOLOD SkyUI MCM - You Are Here page to find the coordinates and filenames for the specific BTO file.
Performance
Unsurprisingly showing millions of grass LOD billboards on screen can require a lot of resources. Yet it is obviously much less resource intensive than extending the full grass into the LOD area.
If the generated LOD data becomes to much for the engine to handle, there can be infinite loading screen (ILS). Test if the experimental memory manager from SSE Engine Fixes can help with this issue.
To get an idea about the performance impact of grass LOD before generating it, use the No Grass In ObjectsExtendGrassDistance/Extend-grass-distance
and OverwriteGrassDistance/Overwrite-grass-distance
settings to make it load grass to about the same distance as the LOD Level 4 distance (fBlockLevel0Distance
). Now fully rendered grass is loaded about as far as grass LOD would. Grass LOD obviously uses less performance than that.
Typically using DynDOLODGrassMode 1 should have better performance than 2, since it means rendering less full grass. It does mean more grass LOD. To control the effects of grass LOD on performance, try lowering LOD Level 4 distance (fBlockLevel0Distance) in the DynDOLOD SkyUI MCM Settings page or the SkyrimPrefs.INI.
Visually the object LOD for mountains suffers from the shorter distance especially. Consider adding a mesh mask rule anywhere before the last '\' rule to compensate:
Mesh mask | mountains |
---|---|
LOD Level 4 | Level0 |
LOD Level 8 | Level0 |
LOD Level 16 | Level1 or Level2 |
Flags | VWD |
Grid | Far LOD |
Reference | Unchanged |
Remove or disable generation of select grass LOD billboards to generate less grass LOD.
Consider using less dense grass settings when generating the grass cache. To generate grass LOD with less density, lower the Grass LOD Density setting in the advanced mode. Note that HD Grass LOD billboards for ENB complex grass use double the triangles, so in case performance is of concern, use half the density.
Troubleshooting
Not all grass types have LOD / grass LOD billboards
Check that TexGen generates grass LOD billboards for all desired grass types. Plugins from mods often forget to set object bounds on base records, which filters them out from automatic tree/grass LOD billboard generation. See TexGen Configuration for further details.
Gap between full grass and grass LOD
Grass LOD was generated with mode 2 but full grass is not being rendered to the edge of the uLargeRefLODGridSize
with the DynDOLODGrassMode/DynDOLOD-Grass-Mode
setting in No Grass In Objects as explained above in the section Settings.
Error reading grass [worldspace] [x,y] / Error processing grass data *.CGID Unable to read beyond the end of the stream. System.IO.EndOfStreamException
Delete the *.CGID file. Load the game, open console and type "cow Tamriel x y" without the quotes and the values for x and y from the *.CGID filename to load directly into the cell. No Objects In Grass should then generate the file anew, which hopefully can then be read next time DynDOLOD is run to generate LOD.
LODGen takes a long time or uses a lot of memory
Unsurprisingly generating millions grass LOD billboards requires time and memory.
Test with a higher value for LODGenThreadSplit
setting in ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_[GAME MODE].ini to try to reduce peak memory usage.
If too many concurrent LODGen processes running at the same consume all available memory, limit their number by changing the MaxLODGen
setting in ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_[GAME MODE].INI.
In case there are high resolution terrain LOD meshes installed in the load order, temporarily disable them to see if using the vanilla terrain LOD meshes requires less memory.
Use less dense grass for the grass cache and/or lower the GrassDensity
in ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_SSE.ini setting so less memory is required to generate grass LOD and to increase performance in game.
Remove or disable generation of select grass LOD billboards to generate less grass LOD.
Out of memory while generating occlusion data
Set OcclusionMaxThreadsObjectLOD=1
in ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_SSE.ini in case the parallel reading of large object LOD meshes consumes to much memory.
No Grass LOD Check List
Check in the mod manager that there are ..\Data\Grass\[Worldspace]*.CGID grass cache files for the worldspace in the load order. Double that check grass cache generation completed and generate all worldspaces and files (= cells) as desired.
Make sure the default setting GrassGID=cgid
in the ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_[GAME MODE].ini is still correct or is set to gid in case the grass cache files were renamed. There is typically no need to change the grass cache filenames to *.GID at the moment, so ignore such outdated 3rd party instructions.
Make sure TexGen is generating grass LOD billboards for grasses by checking its log ..\DynDOLOD\Logs\TexGen_SSE_log.txt. Pay attention to error messages and fix them. Double-check the object bounds of the GRAS records in the plugins as explained above.
Check the grass LOD billboards textures in the TexGen output with an image viewer show grass and are not fully transparent.
Check the DynDOLOD debug log ..\DynDOLOD\Logs\DynDOLOD_SSE_Debug_log.txt contains <Notice: [Worldspace] Gathering grass data for object LOD>
Check the DynDOLOD log ..\DynDOLOD\Logs\DynDOLOD_SSE_log.txt that there were no errors in the LODGen log and check the LODGen log ..\DynDOLOD\Logs\LODGen_SSE_[Worldspace]_log.txt directly that its last line is Code: 0.
Check the object LOD atlas ..\DynDOLOD_Output\Textures\DynDOLOD\LOD\DynDOLOD_[Worldspace].dds contains some of the grass LOD billboards generated by TexGen.
Check the export file ..\DynDOLOD\Edit Scripts\Export\LODGen_SSE_Export_[Worldspace].txt contains a line like GrassMap=..\DynDOLOD\Edit Scripts\Export\LODGen_SSE_Grass_Map_[Worldspace].txt
. Check that GrassDensity is not 0. If it is very low, grass LOD may be very thin to non-existent.
Check that ..\DynDOLOD\Edit Scripts\Export\LODGen_SSE_Grass_Map_[Worldspace].txt contains lines with grass LOD billboard texture names and paths in it and that none of the expected grass LOD billboards are missing.
Check that ..\DynDOLOD\Edit Scripts\Export\LODGen_SSE_ObjectAtlasMap_[Worldspace].txt contains lines with grass LOD billboard texture names and paths in it and that none of the expected grass LOD billboards are missing.
Open ..\DynDOLOD_Output\Meshes\Terrain\[Worldspace]\Objects\[Worldspace].4.x.y.bto and check visually if there is grass LOD in there. The many tiny X planes will be obvious.
To find a BTO that contains grass LOD, set Expert=1
and Verbose=1
in the ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_SSE.ini to start DynDOLOD in expert mode. Select the worldspace and click Execute LODGen. Once its done, check the LODGen log ..\DynDOLOD\Logs\LODGen_SSE_[Worldspace]_log.txt for lines like "Found z grass placements for LOD level 4 coord [x, y]". Check the BTO for the mentioned coordinates. In addition pay attention to the "File not found *.DDS" message about grass LOD billboards. The messages are expected for example for underwater grasses and small ground covers that TexGen does not generate grass LOD billboards for by default.