$shadowlod: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
($shadowlod)
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Used to manipulate the shadow geometry for a particular model, to increase shadow rendering performance. Shares a similar syntax and concept with <code>[[$lod]]</code>
#redirect [[$lod]]
 
{{useful redirect}}
== Syntax ==
[[Category:Source base QC commands]]
 
$shadowlod
{
    lod commands
}
 
== Options ==
 
<div id="replacemodel"></div>
;<code>replacemodel (model name) (replacement model) [reverse]</code>
 
* 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.
 
<div id="removemesh"></div>
;<code>removemesh (material name)</code>
* Removes all the triangles attached to the named material at 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.
* 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.
 
== Example ==
 
$shadowlod
{
replacemodel "dog_reference" "dog_LOD_shadow"
bonetreecollapse "dog_model.toe_l"
bonetreecollapse "dog_model.toe_r"
bonetreecollapse "dog_model.eye"
bonetreecollapse "dog_model.hand_l"
bonetreecollapse "dog_model.hand_r"
replacebone "dog_model.spine2" "dog_model.spine1"
replacebone "dog_model.neck1_length" "dog_model.neck1"
replacebone "dog_model.neck2_length" "dog_model.neck2"
replacebone "dog_model.pully_arm_l" "dog_model.arm1_l"
replacebone "dog_model.tricep1_r" "dog_model.arm1_r"
replacebone "dog_model.tricep2_r" "dog_model.arm1_r"
replacebone "dog_model.bicep1_r" "dog_model.arm1_r"
replacebone "dog_model.bicep2_r" "dog_model.arm1_r"
replacebone "dog_model.shoulder_plate_r" "dog_model.arm1_r"
replacebone "dog_model.elbow1_r" "dog_model.arm1_r"
replacebone "dog_model.elbow1_r1" "dog_model.arm1_r"
removemesh "models/dog/eyeglass"
}
 
[[Category:QC Commands|shadowlod]]__NOTOC__

Latest revision as of 17:50, 3 August 2025

Redirect to:

This redirect is marked as something valuable, due to any number of reasons, such as:
Creating shortcuts that are easier to type or remember, redirecting users who make common typos when using the search box, entities with different name that works identically such as keyframe_rope/move_rope, avoiding browsers such as Firefox which may load pages that end with / instead of the actual page (Half-Life 2/ instead of Half-Life 2), and/or something else. Please don't delete this redirect if it's still useful.