prop_static
prop_static
是一个内部的点实体,可在所有的 起源 游戏中使用。
它用于廉价
地向世界添加模型
。它不能移动、播放动画或接受输入 ,并且在地图编译后不作为实体存在。典型地图中的绝大多数模型都是
prop_static
。
prop_static
将与其他对象发生碰撞,假设它有一个碰撞网格,并且与所有其他模型实体不同,它可以按顶点点亮并将阴影投射到光照贴图
上。
![Note.png](/w/images/thumb/c/cc/Note.png/10px-Note.png)
![English English](/w/images/3/37/Flag-en.png)
![CS:GO 引擎分支](/w/images/thumb/8/85/Csgo_icon.png/16px-Csgo_icon.png)
![Note.png](/w/images/thumb/c/cc/Note.png/10px-Note.png)
![起源2013 多人分支](/w/images/thumb/1/11/Src13mp-16px.png/48px-Src13mp-16px.png)
prop_static
)可以使用静态道具的 UV 来使用光照贴图。它们具有与逐顶点光照道具相同的限制,并且不能用于具有凹凸贴图的模型。![Warning.png](/w/images/thumb/c/cb/Warning.png/10px-Warning.png)
prop_static
数量限制为4096个。![异形丛生 引擎分支](/w/images/thumb/d/d9/As_icon.png/16px-As_icon.png)
![传送门 2 引擎分支](/w/images/thumb/3/3c/Portal2_icon.png/16px-Portal2_icon.png)
![CS:GO 引擎分支](/w/images/thumb/8/85/Csgo_icon.png/16px-Csgo_icon.png)
一致性
为了加强行为的一致性,带有嵌入prop_data
的模型不能是prop_static
实体。使用 Hammer 模型浏览器的信息(Info)选项卡(译者注:浏览模型时右侧下方会显示模型的属性)检查模型是否支持。
键值
- Collisions
(solid)
<choices> - 道具应该如何与其他对象碰撞。
- Screen Space Fade
(screenspacefade)
<布尔值 > - 如果启用,道具将根据它覆盖的屏幕像素数淡出。开始和结束淡入淡出距离表示启用时道具在淡入淡出开始和结束时覆盖的像素。
- Lighting Origin
(lightingorigin)
<target_source> - 从中采样照明的
info_lighting
(而不是模型的原点)。禁用逐顶点光照。 - Disable Vertex lighting
(disablevertexlighting)
<布尔值 > - 道具将使用从其原点采样的照明值均匀照亮。如果实体没有被另一个对象遮挡,则启用此选项。
- Disable Self-Shadowing with vertex lighting
(disableselfshadowing)
<布尔值 > - 启用顶点光照后(译者注:即上方的选项),防止几何体产生自阴影——将阴影投射到自身上。
- Ignore surface normal for computing vertex lighting
(ignorenormals)
<布尔值 > - 启用顶点光照后,计算顶点光照时忽略法线面。
提示:适用于薄薄的半透明物体,例如树叶道具上的叶子。
- Alpha
(renderamt)
<整数 > (存在于自以来)
- 渐变的透明通道,其中 0 表示完全透明,255 表示完全不透明。
- Render Color (R G B)
(rendercolor)
<color255 > (存在于自以来)
- 用这种颜色为模型着色。
- Generate (and use) lightmaps for this static prop
(generatelightmaps)
<布尔值 > (仅存在于之中)
- 为这个道具生成一个光照贴图。需要在VRAD中启用
-StaticPropLighting
。若想了解更多信息,请访问 tf2maps.net。 注意:光照贴图也可以在所有游戏中使用调制 着色器在静态道具上创造出一个假的,尽管同步光照可能很困难。
- Lightmap Resolution X
(lightmapresolutionx)
<整数 > (仅存在于之中)
- 生成的光照贴图在X或U)方向的分辨率。(仅在Generate Lightmaps为Yes时使用。)
- Lightmap Resolution Y
(lightmapresolutiony)
<整数 > (仅存在于之中)
- 生成的光照贴图在Y或V)方向的分辨率。(仅在Generate Lightmaps为Yes时使用。)
- Enable Bounced Lighting
(enablelightbounce)
<布尔值 > (仅存在于之中)
- VRAD 是否应该从这个道具创建间接照明。
- Disable Prop Combine
(preventpropcombine)
<布尔值 > (仅存在于之中)
- 防止此静态道具与VBSP中的任何其他静态道具结合使用。
- Uniform Scaling
(uniformscale)
<浮点型 > (仅存在于之中)
- 沿 X Y Z 轴均匀缩放给定模型。
错误:在Hammer中,撤消/重做任何更改(无论是轻微的单位移动还是缩放更改)都将导致道具在 3D 纹理视图中显示为“正常”大小(模型仅显示为正常大小,并且在重新加载时仍会显示给定的值的vmf)。
- Targetname
(targetname)
<target_source> (仅存在于之中)
ship_base_interaction
实体引用该实体的名称。
Studiomodel:
- Skin
(skin)
<整数 > - Some models have multiple skins. This value selects from the index, starting with 0.
提示:Hammer's model browser automatically updates this value if you use it to view different skins.
- Model Scale
(modelscale)
<浮点型 > (存在于自以来)
- A multiplier for the size of the model.
Shadow:
- Disable Shadows
(disableshadows)
<布尔值 > - 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)
<布尔值 > - Prevent the entity from receiving dynamic shadows on itself.
- Shadow Cast Distance
(shadowcastdist)
<整数 > 不存在于FGD! - Sets how far the entity casts dynamic shadows. 0 means default distance from the
shadow_control
entity. - Disable ShadowDepth
(disableshadowdepth)
<布尔值 > (存在于自以来)
- Used to disable rendering into shadow depth (for projected textures) for this entity.
- Disable flashlight
(disableflashlight)
<布尔值 > (存在于自以来)
- Used to disable projected texture lighting and shadows on this entity.
- Projected Texture Cache
(shadowdepthnocache)
<choices> (存在于自以来)
- 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.
|
Reflection:
- Render in Fast Reflections
(drawinfastreflection)
<布尔值 > (存在于自以来)
- If enabled, this entity will render in fast water reflections (i.e. when a water material specifies
$reflectonlymarkedentities
) and in the world impostor pass.
BaseFadeProp:
- Start Fade Dist
(fademindist)
<浮点型 > - Distance at which the entity starts to fade.
- End Fade Dist
(fademaxdist)
<浮点型 > - Max fade distance at which the entity is visible.
- If start fade is <0, the entity will disappear instantly when end fade is hit.
- If end fade is <0, the entity won't disappear at all. (This is the default behavior.)
- The values will scale appropriately if the entity is in a 3D Skybox.
- Fade Scale
(fadescale)
<浮点型 > - If you specify so in
worldspawn
, or if the engine is running below DirectX 8 (DX7 in), props will fade out even if the fade distances above aren't specified. This value gives you some control over when this happens: numbers smaller than 1 cause the prop to fade out at further distances, while those greater than 1 cause it to fade out at closer distances. Using 0 turns off the forced fade altogether. See also the QC command
$noforcedfade
.
- Minimum / Maximum DX Level
(mindxlevel / maxdxlevel)
<choices> (被移除于以来)
- The entity will not exist if the engine is running outside the given range of DirectX Versions.
![]()
|
- Minimum / Maximum Effect Details Level
(mincpulevel / maxcpulevel)
<choices> (存在于自以来)
- Don't render for players with Effect Details levels that exceed the minimum or maximum.[
Key names are related to
cpu_level
cvar used by Effect Details.]
|
- Minimum / Maximum Shader Details Level
(mingpulevel / maxgpulevel)
<choices> (存在于自以来)
- Don't render for players with Shader Details levels that exceed the minimum or maximum.[
Key names are related to
gpu_level
cvar used by Shader Details.]
|
Angles:
- Pitch Yaw Roll (Y Z X)
(angles)
<angle > - This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
常见错误
Error! prop_static using model "[model]", which must be used on a dynamic entity (i.e. prop_physics). Deleted.
该道具与prop_static
不兼容。你要使用prop_dynamic_override
来代替,或者prop_physics
,如果你想要它有物理效果。
如果它是你的自定义模型:
- 要么你的模型丢失
$staticprop
或者没有allowstatic 1
在prop_data
的QC文件中。
示例:
$KeyValues
{
prop_data
{
"base" "Metal.Medium"
"allowstatic" "1"
}
}
- 如果由于某种原因你的模型定位不正确,请检查模型的
$definebone
中声明的骨骼名称,它应该没有任何斜线,还要检查那里的位置,值应该为零。