Template:KV CBaseAnimating: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Mention bug)
m (Fix modelscale only showing up when it shouldn't, and add uniformscale)
Line 2: Line 2:
<includeonly><onlyinclude>{{ScrollBox|title=Studiomodel|noscroll={{{noscroll|1}}}|
<includeonly><onlyinclude>{{ScrollBox|title=Studiomodel|noscroll={{{noscroll|1}}}|
{{KV|World Model|intn=model|string|The [[model]] this entity should appear as. 128-character limit.}}
{{KV|World Model|intn=model|string|The [[model]] this entity should appear as. 128-character limit.}}
{{KV|Skin|intn=skin|int|Some models have multiple [[$texturegroup|skins]]. This value selects from the index, starting with 0. {{tip|Hammer's model browser automatically updates this value if you use it to view different skins.}}{{#if:{{{static|}}}|{{bug|Lightmap shadows from transparent materials will always be applied from the default skin.}}|}}}}}}
{{KV|Skin|intn=skin|int|Some models have multiple [[$texturegroup|skins]]. This value selects from the index, starting with 0. {{tip|Hammer's model browser automatically updates this value if you use it to view different skins.}}{{#if:{{{static|}}}|{{bug|Static props with multiple [[skin]]s will always use the alpha channel(s) from the default skin's texture(s), even though the alternative skins' alpha textures are loaded by VRAD. (tested in {{dods}}){{tip|This bug can be exploited give the appearance of casting lightmap shadows from the alpha channel of brushes or displacements on vanilla compilers, by creating a static prop with two skins: one with the same texture as the brush, and the other with {{cmd|$no_draw|1}}, and setting the prop's skin to the latter.}} }}|}}}}}}
{{#if:{{{static|}}} | {{KV|Model Scale|intn=modelscale|float|A multiplier for the size of the model.|since={{Src13}}|}}}}
{{#if:{{{static|}}}
| {{KV|Uniform Scale Override|intn=uniformscale|float|A multiplier for the size of the model.|since={{csgo}}|}}
| {{KV|Model Scale|intn=modelscale|float|A multiplier for the size of the model.|since={{Src13}}|}}
}}
{{KV Shadow|prep2={{{prep2|}}}}}
{{KV Shadow|prep2={{{prep2|}}}}}
{{#if: {{{prep2|}}} || {{KV Reflection}}}}
{{#if: {{{prep2|}}} || {{KV Reflection}}}}
}}</onlyinclude></includeonly>{{doc}}
}}</onlyinclude></includeonly>{{doc}}

Revision as of 12:16, 14 February 2024

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

Usage

Note.pngNote:model, skin, body, and sequence KVs can be hidden individually with {{{no model}}}, {{{no skin}}}, {{{no body}}}, and {{{no sequence}}}, respectively.
Parameter Description Example Preview
prep2 Call this template with |prep2=1 to hide KVs added in Portal 2 Portal 2. {{KV Studiomodel|prep2=1}}
Studiomodel:
World Model (model) <string>
The model this entity should appear as. 128-character limit.
Skin (skin) <integer>
Some models have multiple skins. This value selects from the index, starting with 0.
Tip.pngTip:Hammer's model browser automatically updates this value if you use it to view different skins.
Model Scale (modelscale) <float> (in all games since Source 2013)
A multiplier for the size of the model.

Shadow:

Disable Shadows (disableshadows) <boolean>
Prevents the entity from creating cheap render-to-texture shadows, or lightmap shadows if the entity is a prop_static. Does not affect shadow mapping.
Disable Receiving Shadows (disablereceiveshadows) <boolean>
Prevent the entity from receiving dynamic shadows on itself.
Shadow Cast Distance (shadowcastdist) <integer> !FGD
Sets how far the entity casts dynamic shadows. 0 means default distance from the shadow_control entity.


}}

No Parameter N/A {{KV Studiomodel}}
Studiomodel:
World Model (model) <string>
The model this entity should appear as. 128-character limit.
Skin (skin) <integer>
Some models have multiple skins. This value selects from the index, starting with 0.
Tip.pngTip:Hammer's model browser automatically updates this value if you use it to view different skins.
Model Scale (modelscale) <float> (in all games since Source 2013)
A multiplier for the size of the model.

Shadow:

Disable Shadows (disableshadows) <boolean>
Prevents the entity from creating cheap render-to-texture shadows, or lightmap shadows if the entity is a prop_static. Does not affect shadow mapping.
Disable Receiving Shadows (disablereceiveshadows) <boolean>
Prevent the entity from receiving dynamic shadows on itself.
Shadow Cast Distance (shadowcastdist) <integer> !FGD
Sets how far the entity casts dynamic shadows. 0 means default distance from the shadow_control entity.
Disable Shadow Depth (disableshadowdepth) <boolean> (in all games since Portal 2)
Used to disable rendering into shadow depth (for projected textures) for this entity.
Disable flashlight (disableflashlight) <boolean> (in all games since Portal 2)
Used to disable projected texture lighting and shadows on this entity.
Projected Texture Cache (shadowdepthnocache) <integer choices> (in all games since Portal 2)
Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
Choices
  • 0 : Default
  • 1 : No cache - render every frame
  • 2 : Cache it - render only once
Render in Fast Reflections (drawinfastreflection) <boolean> (in all games since Portal 2)
If enabled, this entity will render in fast water reflections (i.e. when a water material specifies $reflectonlymarkedentities) and in the world impostor pass.

}}