.lod files are now supported in NWN:EE for models in 2020. Level of Detail allows you to have high quality up-close models at the same time distant ones become lower quality for a performance gain.

File Definition

From the patch notes: You can now specify LODs via a new file type ".lod". When the game loads the model mymodel.mdl, it will look up mymodel.lod. Inside that file, add the following lines:

40 mymodel_1
80.5 mymodel_2

The game supports LOD files with up to three levels, as shown above. You may omit the last entry. The first line is the high-resolution model; the other two are meant to be lower-resolution model files, that will be dynamically swapped out as the camera reaches the given distance.

Please note that LODs are highly dependent on the screen resolution of the client. The actual mechanisms here need to still be figured out; but for now, we'd suggest choosing LOD distances as if the user had a 1080p screen. To support other resolutions, there is a configuration slider in the debug settings (Ctrl-Shift-F12, select "Config", key: "graphics.lod.scale-factor") that users can influence LOD distances with.

Static Placeables and Tiles

Static placeables are unaffected by LOD files and always use their "maximum" quality. Client-side they load in at greater distances then the usual placeable distance of 45M.

Tiles are unaffected by LOD files.

Other models - creatures, non-static placeables and VFX are affected by LOD files.

Camera and LOD

The camera distance not the player distance determines the LOD to use. Placeables usually spawn in 45M away and creatures 35M (see ranges.2da).

This means someone using top down generally could be anywhere between 30M and 120M in camera distance away from a creature or placeable.

Driving camera can be a lot closer to the ground and therefore creatures and placeables, but at the same time less will be visible on screen at once due to the viewing angles used.

Uses of LOD

The obvious use would be on placeables, with high quality versions at near-view (sub 30 or 40M) and lower quality the further away it is.

A less obvious use is on player and even creature models. Players models especially are usually numerous. A very high quality sub-10M model, a 10M-40M model and a 40M+ model would be a good way to improve performance on a high quality head/body/arms/legs model. It can even help with NPC creature models.

  • No labels