$lod: Difference between revisions
Jump to navigation
Jump to search
Tip:The practical way to achieve a good set of LOD threshholds for your LOD Models is to use the HLMV Model tab to find numbers where the LOD transitions with a low amount of visual popping.
(cleanup and update : see diff notes) |
mNo edit summary |
||
Line 1: | Line 1: | ||
Each [[$lod]] [[QC command]] begins a block of commands describing how to perform [[LOD system|LOD ('''L'''evel '''o'''f '''D'''etail)]] on the model. Each block specifies a single ''threshold'' parameter which represents a distance between the Model and the Viewer. When the Model is rendered beyond this distance that block of LOD commands are executed. The commands allow the [[LOD system]] to remove or replace various "expensive" parts of the Model so it can be rendered more efficiently. | Each [[$lod]] [[QC command]] begins a block of commands describing how to perform [[LOD system|LOD ('''L'''evel '''o'''f '''D'''etail)]] on the model. Each block specifies a single ''threshold'' parameter which represents a distance between the Model and the Viewer. When the Model is rendered beyond this distance that block of LOD commands are executed. The commands allow the [[LOD system]] to remove or replace various "expensive" parts of the Model so it can be rendered more efficiently. | ||
<!--:{{note|LODs are not inherited.}} // inherited by what ?--> | |||
See [[LOD Models]] for in-depth information on generating LOD models | * See [[LOD Models]] for in-depth information on generating LOD models | ||
* See [[LOD system]] for a better overview. | |||
* See also [[$shadowlod]] for cheaper [[Dynamic Shadows]]. | |||
== Syntax == | == Syntax == |
Revision as of 20:08, 1 May 2008
Each $lod QC command begins a block of commands describing how to perform LOD (Level of Detail) on the model. Each block specifies a single threshold parameter which represents a distance between the Model and the Viewer. When the Model is rendered beyond this distance that block of LOD commands are executed. The commands allow the LOD system to remove or replace various "expensive" parts of the Model so it can be rendered more efficiently.
- See LOD Models for in-depth information on generating LOD models
- See LOD system for a better overview.
- See also $shadowlod for cheaper Dynamic Shadows.
Syntax
$lod <int|threshhold> { <options> }
where
<int|threshhold>
is the LOD threshhold is based on an inverse of the screen space. The smaller the model is on-screen, the larger the LOD threshhold will become.

Options
replacemodel <original $body name> <replacement reference mesh SMD> [reverse]
- Replaces one reference mesh with another of lower detail.
reverse
will cause the new mesh to be reversed.Todo: The point of which is...removemodel <$body name>
- Stops the specified $body from being rendered at all.
removemesh <material name>
- Removes all meshes using the given material.
replacematerial <original material name> <replacement material name>
- Replaces all instances of a particular material on a model. This is used to remove expensive shaders like Normal Maps or the eye shader.
nofacial
- Disables facial animation.
bonetreecollapse <bone>
- Deletes all children of the given bone, disabling movement on the client. The envelopes return to their reference position. Commonly used on fingers.
replacebone <original bone> <replacement bone>
- The precursor of
bonetreecollapse
. Accepting a replacement bone makes it slightly less user-friendly, but allows all kinds of unusual bone optimisations that a simple collapse wouldn't achieve.
Example
$lod 12 { replacemodel Police_reference "lod1_Police_reference.smd" replacemodel Manhack_reference "lod1_Manhack_reference.smd" } $lod 18 { replacemodel Police_reference "lod2_Police_reference.smd" replacemodel Manhack_reference "lod2_Manhack_reference.smd" bonetreecollapse ValveBiped.Bip01_R_Hand bonetreecollapse ValveBiped.Bip01_L_Hand } $lod 42 { replacemodel Police_reference "lod3_Police_reference.smd" replacemodel Manhack_reference "lod3_Manhack_reference.smd" bonetreecollapse ValveBiped.Bip01_R_Hand bonetreecollapse ValveBiped.Bip01_L_Hand }