prop_static
< Zh
Jump to navigation
Jump to search
prop_static
是一个内部的点实体 ,可在所有的 起源 游戏中使用。
它用于廉价
地向世界添加模型
。它不能移动、播放动画或接受输入 ,并且在地图编译后不作为实体存在。典型地图中的绝大多数模型都是
prop_static
。
prop_static
将与其他对象发生碰撞,假设它有一个碰撞网格,并且与所有其他模型实体不同,它可以按顶点点亮并将阴影投射到光照贴图
上。





prop_static
)可以使用静态道具的 UV 来使用光照贴图。它们具有与逐顶点光照道具相同的限制,并且不能用于具有凹凸贴图的模型。
prop_static
数量限制为4096个。


一致性
为了加强行为的一致性,带有嵌入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。 注意:光照贴图也可以在所有游戏中使用调制 着色器在静态道具上创造出一个假的,尽管同步光照可能很困难。
错误:
此设置不适用于具有多个皮肤(skin)的模型。 [todo tested in ?]
- 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)。 [todo tested in ?]
- 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.
错误:Static props with multiple skins will always calculate texture shadows based upon the alpha channel(s) from the default skin's texture(s), even though the alternative skins' alpha textures are loaded by VRAD. [todo tested in ?]
- Lighting Origin (LightingOrigin) <target_destination>
- Select an entity (preferably info_lighting) from which to sample lighting instead of the entity's origin, if per-vertex lighting is disabled on this prop.
阴影:
- 禁用阴影 (disableshadows) <布尔值 >
- 防止该实体生成廉价的渲染到纹理的阴影,或如果实体是 prop_static 的光照贴图阴影。不影响影子映射。
- 禁用阴影深度 (disableshadowdepth) <布尔值 > (存在于自
以来)
- 用于禁用此实体的阴影深度(用于投影纹理)的渲染。
- 禁用手电筒 (disableflashlight) <布尔值 > (存在于自
以来)
- 用于禁用此实体的投影纹理照明和阴影。
- 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.
- 最低 / 最高 DX 水平 (mindxlevel / maxdxlevel) <integer choices > (被移除于
以来)
- 如果引擎在给定的 DirectX Versions 版本范围之外运行,该实体将不存在。
选择 Expand
- 最低/最高效果细节等级 (mincpulevel / maxcpulevel) <integer choices > (存在于自
以来)
- 不要为效果细节等级超出最低或最高限度的玩家渲染。
选择 Expand
- 最低/最高着色器细节等级 (mingpulevel / maxgpulevel) <integer choices > (存在于自
以来)
- 不要为着色器细节等级超出最低或最高限度的玩家渲染。
选择 Expand 参见: cpu_level / gpu_level convars
- 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
中声明的骨骼名称,它应该没有任何斜线,还要检查那里的位置,值应该为零。