$lod: Difference between revisions
Jump to navigation
Jump to search
Tip:The LOD metric is based on an inverse of the screen space. The smaller the model is on-screen, the larger the LOD metric will become. You can use the LOD functions in the Model tab of HLMV to determine the proper metrics for a model.
Tip: When distance from the model doubles, the apparent vertical and horizontal 'resolution' (screen pixels) of the model is halved. Therefore these standard 'double' distances provide a useful benchmark both for modelling and compiling LOD Models:
(cleanup) |
(minor cleanup and info) |
||
Line 1: | Line 1: | ||
Begins a block of commands to describe how to perform LOD ('''L'''evel '''o'''f '''D'''etail) on the model. The ''distance'' parameter represents that this particular set of LOD commands should be run when the camera is farther away from the model. The commands allow you to replace various materials, textures, etc. The commands you can include in the lod block are shown below. | |||
== | {{tip|The LOD metric is based on an inverse of the screen space. The smaller the model is on-screen, the larger the LOD metric will become. You can use the LOD functions in the Model tab of [[HLMV]] to determine the proper metrics for a model.}} | ||
* See [[LOD Models]] for in-depth information on generating LOD models. | |||
== Syntax == | |||
$lod <distance1> { <lod commands here> } | $lod <distance1> { <lod commands here> } | ||
$lod <distance2> { <lod commands here> } | $lod <distance2> { <lod commands here> } | ||
* Each [[$lod]] [[QC command]] begins a list of commands to perform on the Model when the Player is further than the '''<distance>'''(in meters) away from the Model. 1 meter ia approximately 53.333 game units (see [[Dimensions]]). | * Each [[$lod]] [[QC command]] begins a list of commands to perform on the Model when the Player is further than the '''<distance>'''(in meters) away from the Model. 1 meter ia approximately 53.333 game units (see [[Dimensions]]). | ||
{{tip| When distance from the model doubles, the apparent vertical and horizontal 'resolution' (screen pixels) of the model is halved. Therefore these standard 'double' distances provide a useful benchmark both for modelling and compiling [[LOD Models]]:}} | {{tip| When distance from the model doubles, the apparent vertical and horizontal 'resolution' (screen pixels) of the model is halved. Therefore these standard 'double' distances provide a useful benchmark both for modelling and compiling [[LOD Models]]:}} | ||
::{| | ::{| | ||
Line 12: | Line 17: | ||
|meters ||0.6 ||1.2 ||2.4 ||4.9 ||9.75 ||19.5 ||39.0 ||78.0 ||156.0 | |meters ||0.6 ||1.2 ||2.4 ||4.9 ||9.75 ||19.5 ||39.0 ||78.0 ||156.0 | ||
|} | |} | ||
* The commands allow you to replace various materials, textures, etc. | |||
== $lod options == | |||
<div id="replacemodel"></div> | |||
* Causes the <reference_model_name> to be replaced with the <replacement_model_name>. | ;<code>replacemodel (model name) (replacement model) [reverse]</code> | ||
* The <replacement_model_name> should be a lower polygon-count version of the <reference_model_name>. | |||
* Causes the <reference_model_name> to be replaced with the <replacement_model_name>. | |||
* The <replacement_model_name> should be a lower polygon-count version of the <reference_model_name>. | |||
* If '''reverse''' is specified, the normals of the replacement model are reversed. | * If '''reverse''' is specified, the normals of the replacement model are reversed. | ||
* | * If the replacement model name is 'blank', then the source model is not rendered at all. | ||
<div id="removemodel"></div> | |||
* Causes the model to not be rendered at this | ;<code>removemodel (model name)</code> | ||
* Causes the model to not be rendered at this LOD. | |||
<div id="replacematerial"></div> | |||
;<code>replacematerial (original material name) (replacement material name)</code> | |||
* Replaces all instances of a particular material on a model with the replacement material. | * Replaces all instances of a particular material on a model with the replacement material. | ||
* This can be used to remove expensive shaders like Normal Maps or the eye shader. | * This can be used to remove expensive shaders like [[Normal Maps]] or the eye shader. | ||
<div id="removemesh"></div> | |||
* Removes all the triangles attached to the named material | ;<code>removemesh (material name)</code> | ||
* Removes all the triangles attached to the named material at this LOD. | |||
<div id="nofacial"></div> | |||
* Causes facial animation to be deactivated for this | ;<code>nofacial</code> | ||
* Causes facial animation to be deactivated for this LOD. | |||
<div id="replacebone"></div> | |||
;<code>replacebone (original bone) (replacement bone)</code> | |||
* Causes a bone to be used in place of the original bone in the reference model. | * Causes a bone to be used in place of the original bone in the reference model. | ||
* This can be useful for collapsing all of the bones in the hand together. Instead of using the ‘finger’ bone, the finger could just be tied to the | * This can be useful for collapsing all of the bones in the hand together. Instead of using the ‘finger’ bone, the finger could just be tied to the 'hand' bone. See also <code>bonetreecollapse</code>. | ||
<div id="bonetreecollapse"></div> | |||
;<code>bonetreecollapse (bone name)</code> | |||
* Causes all child bones of the specified bone to use the specified bone instead of whatever they currently are attached to. It's a simpler way to use <code>replacebone</code> in the case where you want to collapse a large number of bones; hands especially can use this feature. | |||
[[Category:QC Commands]] | [[Category:QC Commands|lod]]__NOTOC__ |
Revision as of 15:29, 28 April 2008
Begins a block of commands to describe how to perform LOD (Level of Detail) on the model. The distance parameter represents that this particular set of LOD commands should be run when the camera is farther away from the model. The commands allow you to replace various materials, textures, etc. The commands you can include in the lod block are shown below.

- See LOD Models for in-depth information on generating LOD models.
Syntax
$lod <distance1> { <lod commands here> } $lod <distance2> { <lod commands here> }
- Each $lod QC command begins a list of commands to perform on the Model when the Player is further than the <distance>(in meters) away from the Model. 1 meter ia approximately 53.333 game units (see Dimensions).

game units 32 64 128 256 512 1024 2048 4096 8192 meters 0.6 1.2 2.4 4.9 9.75 19.5 39.0 78.0 156.0
- The commands allow you to replace various materials, textures, etc.
$lod options
replacemodel (model name) (replacement model) [reverse]
- Causes the <reference_model_name> to be replaced with the <replacement_model_name>.
- The <replacement_model_name> should be a lower polygon-count version of the <reference_model_name>.
- If reverse is specified, the normals of the replacement model are reversed.
- If the replacement model name is 'blank', then the source model is not rendered at all.
removemodel (model name)
- Causes the model to not be rendered at this LOD.
replacematerial (original material name) (replacement material name)
- Replaces all instances of a particular material on a model with the replacement material.
- This can be used to remove expensive shaders like Normal Maps or the eye shader.
removemesh (material name)
- Removes all the triangles attached to the named material at this LOD.
nofacial
- Causes facial animation to be deactivated for this LOD.
replacebone (original bone) (replacement bone)
- Causes a bone to be used in place of the original bone in the reference model.
- This can be useful for collapsing all of the bones in the hand together. Instead of using the ‘finger’ bone, the finger could just be tied to the 'hand' bone. See also
bonetreecollapse
.
bonetreecollapse (bone name)
- Causes all child bones of the specified bone to use the specified bone instead of whatever they currently are attached to. It's a simpler way to use
replacebone
in the case where you want to collapse a large number of bones; hands especially can use this feature.