This article's documentation is for anything that uses the Source engine. Click here for more information.

R lod: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
(Update r_lod, explain exactly what it does and eliminate any confusion.)
Line 1: Line 1:
{{this is a|console variable|name=r_lod}} It allows overriding distance used in LOD. Higher distance, for example, makes models have less polygons, and textures appear smudged (i.e. less detailed).
{{this is a|console variable|name=r_lod}} It forces a specific LOD model globally. A higher value makes models have less polygons (i.e. less detailed).


== Usage ==
== Usage ==
{{syntax|r_lod <integer>}}.
{{syntax|r_lod <integer>}}.


The default value is "-1" which makes lod compute normally. Setting this to 0 will effectively make every render as if you are close to them while a large value will make everything render as if you are far from them.
The default value is "-1" which allows the engine to compute a models level of detail (LOD) normally, typically based on distance.


{{Note|Although turning {{code|r_lod}} off gives better visual quality, it also negatively affects your framerate (FPS), unless you have a more powerful graphics card.}}
Setting a number from 0 and above forces all rendered models to use that specific LOD, and disables all automatic level of detail computations. Level 0 will render the base model, and a higher number like 4 will reduce the level of detail.


Model rendering will be clamped to their maximum level of detail level, some models may have only 2 levels, some may have no LODs, but most have 4. Example: {{code|r_lod 20}} will attempt to set all models to use a very low LOD: 20. Most models do not have 20 level of detail swaps, so most models will clamp to the closest available number, typically 4.
{{Note|While forcing {{code|r_lod}} to 0 gives better visual quality, it also negatively affects your framerate (FPS), as it completely disables the engine LOD calculation system (including distance based systems).}}
{{Note|Level of detail distance computation is disabled in {{Hl2|2}}: {{strong|20th Anniversary Update}}, both by setting {{code|r_lod}} to 0 on Model Quality High, and internally the distance calculation seems to be disabled no matter what setting you pick.}}
{{ModernConfirm|Is the functionality actually removed/disabled in-engine for 20th Anniversary or is this a bug?}}
== See also ==
== See also ==
* [[LOD|Level of detail]]
* [[LOD|Level of detail]]
* [[r_rootlod]]

Revision as of 14:25, 26 November 2024

r_lod is a console variable available in all Source Source games. It forces a specific LOD model globally. A higher value makes models have less polygons (i.e. less detailed).

Usage

Syntax: r_lod <integer>.

The default value is "-1" which allows the engine to compute a models level of detail (LOD) normally, typically based on distance.

Setting a number from 0 and above forces all rendered models to use that specific LOD, and disables all automatic level of detail computations. Level 0 will render the base model, and a higher number like 4 will reduce the level of detail.

Model rendering will be clamped to their maximum level of detail level, some models may have only 2 levels, some may have no LODs, but most have 4. Example: r_lod 20 will attempt to set all models to use a very low LOD: 20. Most models do not have 20 level of detail swaps, so most models will clamp to the closest available number, typically 4.

Note.pngNote:While forcing r_lod to 0 gives better visual quality, it also negatively affects your framerate (FPS), as it completely disables the engine LOD calculation system (including distance based systems).
Note.pngNote:Level of detail distance computation is disabled in Half-Life 2 Half-Life 2: 20th Anniversary Update, both by setting r_lod to 0 on Model Quality High, and internally the distance calculation seems to be disabled no matter what setting you pick.
Confirm:Is the functionality actually removed/disabled in-engine for 20th Anniversary or is this a bug?

See also