Level of detail: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added a brief description of LOD)
 
m (SirYodaJedi moved page LOD to Level of detail over redirect)
 
(45 intermediate revisions by 31 users not shown)
Line 1: Line 1:
==LOD Overviw==
{{LanguageBar}}
To reduce the number of polygons that need to be rendered, the source engine will render lower-quality models if the model is very far away. If it moves closer to the player's point of view, it will change to a higher-quality model, with more polygons and more textures. As it continues to come closer, it will gain more detail until it reaches perfect quality.


The advantage of using LOD is obvious: Objects that are far away, where they cannot show much detail anyways, will not use up nearly as many memory and processing resources for the player. It is up to the developer then, to decide how many levels of quality are appropriate for a model, and at what distances they should be "activated" at. For example, in Half-Life 2, the G-man character model had five different models.
'''Level of Detail''' ('''LOD''') is the principle of having lower-detail versions of [[models]] in memory and switching to them when the object is small/distant. This saves a lot of unneeded processing power at the cost of a moderate memory/disk size increase.
 
Model LODs change instantly. Be careful that your LODs do not create visual noise when changing, it can be distracting. An example of this can be seen on some tree props in [[Water Hazard]] {{hl2}}.
 
In {{hl2|1}}, since 20th anniversary update, LOD appears to be disabled with the command {{Code|r_lod}} set to "0", if running on DirectX 9 level or higher,{{Cite|1}} and with Model Detail set to "High".{{Cite|2}}
{{Warning|{{csgo|4}} does not support LODs at all, they are intentionally disabled.}}
==See also==
* [[LOD Models]], a good tutorial on making LODs
* {{Command|$lod}}
* [[MIP Mapping]], the texture equivalent of LODs
* {{Ent|func_lod}}, a [[brush entity]] (fades out, not really LOD)
* {{cmd|r_lod}}, associated [[cvar]]
 
{{references|1=
{{ref2|cite id=1|According to {{file|bin\dxsupport|cfg}}.}}
{{ref2|cite id=2|[https://store.steampowered.com/news/app/220/view/6633333780228604001 Half-Life 2 20th Anniversary Update - Change Notes]<br>
{{Quote|Setting Model Detail to High will now always display the highest detail version of a model and never swap for a lower level-of-detail.}}
}}
}}
[[Category:Glossary]]
 
{{stub}}

Latest revision as of 14:52, 30 January 2025

English (en)Español (es)中文 (zh)Translate (Translate)

Level of Detail (LOD) is the principle of having lower-detail versions of models in memory and switching to them when the object is small/distant. This saves a lot of unneeded processing power at the cost of a moderate memory/disk size increase.

Model LODs change instantly. Be careful that your LODs do not create visual noise when changing, it can be distracting. An example of this can be seen on some tree props in Water Hazard Half-Life 2.

In Half-Life 2, since 20th anniversary update, LOD appears to be disabled with the command r_lod set to "0", if running on DirectX 9 level or higher,[1] and with Model Detail set to "High".[2]

Warning.pngWarning:Counter-Strike: Global Offensive Counter-Strike: Global Offensive does not support LODs at all, they are intentionally disabled.

See also

References

References
1. According to 🖿bin\dxsupport.cfg..
2. Half-Life 2 20th Anniversary Update - Change Notes
Setting Model Detail to High will now always display the highest detail version of a model and never swap for a lower level-of-detail.
.

Stub

This article or section is a stub. You can help by expanding it.