LODGen is a command line tool that generates terrain LOD and object LOD meshes. Not to be confused with xLODGen, which is a tool mode of xEdit, which makes use of LODGen to generate object LOD meshes or terrain LOD meshes. It is included in the DynDOLOD Standalone and also in the xEdit/xLODGen archives.
It requires a recent version of Microsoft Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019 and 2022 to be installed. In case the Redistributable is missing or outdated, typical error messages are LODGen returned error 259
LODGen.exe/LODGenx64.exe require .NET Framework 4.8 to be installed, which is typically included in Windows 10/11. LODGenWin.exe/LODGenx64Win.exe require .NET Desktop Runtime 6 or higher to be installed. The .NET Desktop Runtime version is preferred over the .NET Framework version. A check at startup determines if it can be used or else automatically falls back to the .Net Framework 4.8 version. To know which version is being used, check the log for the line:
External: C:\Modding\DynDOLOD\Edit Scripts\[LODGen|LODGenx64|LODGenWin|LODGenx64Win].exe
In case LODGen failed to generate object LOD for one or more worlds, check the log messages window (click OK, then click Check log) or the saved DynDOLOD log. Typically the log message show which worlds failed and which specific LODGen log file to check for additional information about the error. These messages look like:
<Error: LODGenx64.exe failed to generate object LOD for [WORLDSPACE]. Check C:\DynDOLOD\Logs\LODGen_[GAME MODE]_[WORLDSPACE]_log.txt>
- Ensure that Windows User Access Control (UAC), antivir or other third party programs do not prevent execution or read/write access.
- Do not change the load order while LODGen is running.
- Do not replace LODGen with other versions.
|File not found
The file(s) mentioned in the log message(s) have not been found.
Make sure the file(s) exist(s) and that nothing prevents LODGen from accessing or reading any file(s).
Make sure that all required BSA files are being loaded and can be accessed.
20A 20C 20E 210
If this happens with the NET Framework 4.8 version - especially when testing beta versions of Windows, install NET Runtime 6 in order to use LODGenWin.exe/LODGenx64Win.exe instead.
|Install latest Visual C++ Redistributable
Install/Update/Repair Microsoft Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019 and 2022
There is a problem reading the mentioned *.NIF. Try to reinstall the file or mod from its download archive. Run the *.NIF through Cathedral Assets Optimizer. If the mentioned file is a *.BTR terrain LOD mesh, generate a valid one with xLODGen and follow its instructions to always set a dedicated output folder outside of any game and mod manager folders. If the file opens without error in NifSkope, make a post on the official DynDOLOD support forum and upload the *.NIF or provide a link to the mod etc.
Do not generate into the game's data, any mod manager or special Windows folder like Program Files x86. Could be UAC, anti vir or other 3rd party programs blocking access. Also check there is enough space left on the disk.
|Out of memory
Use the x64 version or try less demanding settings. See more below.
|Error processing grass data *.CGID
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 LODGen is run to generate LOD.
|Install/Update/Repair .NET Desktop Runtime 6 or newer
|If happening randomly can be a sign of hardware issues like CPU or memory being unstable.
Reduce memory requirements. See Out of Memory below. See FAQ High Memory Usage / Out of Memory.
|Install/Update/Repair .Net Framework 4.8 or newer. Install/Update/Repair .NET Desktop Runtime 6 or newer.
See Microsoft .NET Framework Repair Tool.
Test with the .NET Framework 4.8 LODGen.exe/LODGenx64.exe by temporarily removing the .NET Desktop Runtime 6 LODGenWin.exe/LODGenx64Win.exe.
Check command prompt window of LODGen.exe for crash report in case the log file does not reveal anything.
Check the Windows Event log for related entries.
If the problem persist, search for the error message first or make a post to the official DynDOLOD support forum.
To restart LODGen generation for a worldspace in case there is no LODGen_[GAME MODE]_[WORLDSPACE]_log.txt or it does not contain a useful error message, start DynDOLOD in expert mode, select the desired worldspace and click Execute LODGen. Bring the LODGen command prompt window to the front to see if it prints more details to the console. If that does not give more detail, check the Windows Event Viewer for additional messages from the .Net Framework or the .NET Desktop Runtime.
Out of Memory
Let Windows handle virtual memory automatically.
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.
If a LODGen process uses a lot of memory, set LODGenThreadSplit in ..\DynDOLOD\Edit Scripts\DynDOLOD\DynDOLOD_[GAME MODE].INI to a higher number. Set to the number of virtual cores for lowest possible memory usage.