User:Kesta/WhatIsLOD

From Step Mods | Change The Game
Weapon.png

WIP

I had to go before finishing writing all this so... come back later ;)

Q : What is LOD ?
A : Baby don't hurt me.

This page aim to provide a general and easy-to-understand overview of what LODs are in Skyrim, how they work, and how they can be modded.

In case you really have no idea what this is about, a LOD is what is "seen is the distance". This is used in today's game to visualize far-away objects without being to costly in term of performances. Older games used to "hide" what was in the distance with fog, and in the future maybe games won't use LOD at all and render the complete game in real-time. For now, we have LODs, and we have to deal with it.

Here are two screenshots from skyrim : One with LODs (what you probably see when you play), and one where LOD have been de-activated :

Fundamentals[edit | edit source]

Before jumping right in, there is a few basics that need to be understood to properly understand what LODs are.

Cells and Worldspaces[edit | edit source]

There are two different kinds of "environment" in Skyrim: Cells and Worldspaces. A cell is an interior place, while a worldspace is an exterior. There are a few exceptions, where interiors are actually worldpsaces surrounded by walls and ceiling.

There are many differences:

  • Only worldspaces have LOD, and use the Grid-based loading system,
  • Only worldspaces have an actual ground. The floor in cells is simply a static mesh.
  • Worldspaces use weathers where Cells use Lighting Templates.

The first two points are those of interest in this page.

The also have many commonalities:

  • They're "containers" for a lot of references, all of the forms found in this area.
  • They're navmeshed (or should be).


References and Base Objects[edit | edit source]

Everything you see/interact with in game is only references of base objects. For instance, there is only a few variety of rocks defined in Skyrim. However, there is thousands of references of them, placing these rocks in different position/orientation/scale and agglomerating them together to give the feel of variety.

The base object define the model and the properties of the object, the references only tell the game "there is one of those object located at this position".

What is important to understand when talking about LOD is :

  • The fact that a reference will or won't be seen as LOD is defined by this reference itself.
  • The model that will be used for this LOD is defined by its base-object.

The Grid System[edit | edit source]

The grid system is what tell the engine which part of the world to load, and at which "level". The grid-system is specific to worldspaces (interiors cells are always fully loaded when you're inside).

A worldspace is divided in a series of square exterior cells which define a grid. For a better idea, here is an in-game screenshot with visible grids :

The number of cells fully loaded around the player is controlled by the uGridToLoad parameter in Skyrim.ini

All of the other cells for the current worldspace are displayed as "LOD", and there is nothing active in them (no NPCs, no scripts running, etc...)

To further improve the performance/quality ratio, not all of the cell outside of the uGridToLoad range are loaded at the same "level". Instead, cells are "packed" :

  • Cells near the uGridToLoad limit are packed by groups of 16 (4x4), and still have a lot details. They're "LOD4"
  • Cells further are packed by group of 64 (8x8), and have less details the "near" ones. They're "LOD8"
  • Very far cells are packed by groups of 256 (16x16), and have even less details. They're "LOD16"

The minimap use the same mechanic as LOD, where Cells are grouped by 1024 (32x32) for the landscape, and 256 (16x16) for the objects. Kind of a bastard combination between LOD32 and LOD16.

The distance at which a cell is treated as LOD4/8/16 is determined by INI parameters.

Here you can see a colored screenshot visualizing the three different levels of Cell LOD (non-vanilla INI) :

Where red is for cell within the LOD4 range, green within the LOD8 range, and blue for LOD16.


The position of an exterior cell in the grid is available both from the CK and xEdit :

In the CK :

  • In the "Coords" column,
  • Next to the cell's name in the top-right of the Cell View window.

In xEdit :

  • In the "Name" column for this cell's record
  • In the XCLC record contain

Three and a half different kind of LODs[edit | edit source]

There is actually three different kinds of LODs. Each with own purpose, his own set of files, and his own set of tools to mod them. However, they all follow the same pattern :

Each worldspace have its LOD files of a given type located under a folder named after this worldspace.

In there, files match this naming convention : worldspace.L.X.Y.ext

Where :

  • worldspace is the name of the worldpsace
  • L is the lod-level this file define (4, 8, 16 or 32).
  • X is the X coordinate of the pack of cell defined.
  • Y is the Y coordinate of this pack of cell.

Landscape[edit | edit source]

The landscape (what was colored in the previous screenshot) have its own LOD, both models and textures. The model is generated in order to match the ground geometry of the whole worldspace.

The landscape LOD model is almost never modded, because small modifications to the ground geometry a mod might do (flattening an area to put a shrine for instance) wouldn't be noticeable in the distance anyway.

Defined in .btr files

Objects[edit | edit source]

Defined in .bto files

Trees[edit | edit source]

View distance defined in SkyrimPrefs.ini

[TerrainManager] 
fTreeLoadDistance = 90000.0000

.btt files used in correlation with the Atlas.

Atlas can be rebuilt by LODgen out of billboards

DynDOLOD Utra tree = No tree lod (~deal with Trees as if they were objects, putting them in Object lods, i.e. .bto)

Neverfade references[edit | edit source]