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 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 Runtime 6 to be installed. The higher .NET Runtime 6 version is preferred. 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.
20A 20C 20E 210
|Error processing |
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
|Error accessing |
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. 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.
|Error writing |
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 Runtime 6 or newer|
|Install/Update/Repair .Net Framework 4.8 or newer. Install/Update/Repair .NET Runtime 6 or newer.|
Check command prompt window of LODGen.exe for crash report in case the log file does not reveal anything.
Check the Windows Event log.
If the problem persist, search for the error message first or make a post to the official DynDOLOD support forum.
If 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 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.