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) <boolean >
- 如果启用,道具将根据它覆盖的屏幕像素数淡出。开始和结束淡入淡出距离表示启用时道具在淡入淡出开始和结束时覆盖的像素。
- Lighting Origin (lightingorigin) <string >
- 从中采样照明的info_lighting(而不是模型的原点)。禁用逐顶点光照。
- Disable Vertex lighting (disablevertexlighting) <boolean >
- 道具将使用从其原点采样的照明值均匀照亮。如果实体没有被另一个对象遮挡,则启用此选项。
- Disable Self-Shadowing with vertex lighting (disableselfshadowing) <boolean >
- 启用顶点光照后(译者注:即上方的选项),防止几何体产生自阴影——将阴影投射到自身上。
- Ignore surface normal for computing vertex lighting (ignorenormals) <boolean >
- 启用顶点光照后,计算顶点光照时忽略法线面。
提示:适用于薄薄的半透明物体,例如树叶道具上的叶子。
- Alpha (renderamt) <integer > (存在于自
以来)
- 渐变的透明通道,其中 0 表示完全透明,255 表示完全不透明。
- Render Color (R G B) (rendercolor) <color255 > (存在于自
以来)
- 用这种颜色为模型着色。
- Generate (and use) lightmaps for this static prop (generatelightmaps) <boolean > (仅存在于
之中)
- 为这个道具生成一个光照贴图。需要在VRAD中启用
-StaticPropLighting
。若想了解更多信息,请访问 tf2maps.net。 注意:光照贴图也可以在所有游戏中使用调制 着色器在静态道具上创造出一个假的,尽管同步光照可能很困难。
错误:
此设置不适用于具有多个皮肤(skin)的模型。 [todo tested in ?]
- Lightmap Resolution X (lightmapresolutionx) <integer > (仅存在于
之中)
- 生成的光照贴图在X或U)方向的分辨率。(仅在Generate Lightmaps为Yes时使用。)
- Lightmap Resolution Y (lightmapresolutiony) <integer > (仅存在于
之中)
- 生成的光照贴图在Y或V)方向的分辨率。(仅在Generate Lightmaps为Yes时使用。)
- Enable Bounced Lighting (enablelightbounce) <boolean > (仅存在于
之中)
- VRAD 是否应该从这个道具创建间接照明。
- Disable Prop Combine (preventpropcombine) <boolean > (仅存在于
之中)
- 防止此静态道具与VBSP中的任何其他静态道具结合使用。
- Uniform Scaling (uniformscale) <float > (仅存在于
之中)
- 沿 X Y Z 轴均匀缩放给定模型。
错误:在Hammer中,撤消/重做任何更改(无论是轻微的单位移动还是缩放更改)都将导致道具在 3D 纹理视图中显示为“正常”大小(模型仅显示为正常大小,并且在重新加载时仍会显示给定的值的vmf)。 [todo tested in ?]
- Targetname (targetname) <string > (仅存在于
之中)
- ship_base_interaction 实体引用该实体的名称。
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.
提示:Hammer's model browser automatically updates this value if you use it to view different skins.
- Model Scale (modelscale) <float > (存在于自
以来) (也存在于
之中)
- A multiplier for the size of the model.
提示:In
Hammer++ with a prop selected in 3D view, hold Ctrl and scroll the mouse wheel to change the modelscale in increments of 0.5. Holding ⇧ Shift will scale it in smaller increments of 0.05.
- Bodygroup (body / SetBodyGroup) <integer >
- Some models have multiple submodels. This value selects from the index, starting with 0. May be overridden by animations and/or game code.
注意:If both body and SetBodyGroup are present (even if set to 0), body will be prioritized.
- Sequence (sequence) <integer > 不存在于FGD!
- Default animation sequence for the model to be playing after spawning. May be overridden by game code.
- Lighting Origin (lightingorigin) <targetname >
- Select an entity (not info_lighting!) from which to sample lighting instead of the entity's origin or $illumposition.
阴影:
- 禁用阴影 (disableshadows) <boolean >
- 防止该实体生成廉价的渲染到纹理的阴影,或如果实体是 prop_static 的光照贴图阴影。不影响影子映射。
- 禁用接收阴影 (disablereceiveshadows) <boolean >
- 防止该实体接收动态阴影。
- 阴影投射距离 (shadowcastdist) <integer > 不存在于FGD!
- 设置实体投射动态阴影的距离。0 表示从 shadow_control 实体开始的默认距离。
- 禁用阴影深度 (disableshadowdepth) <boolean > (存在于自
以来)
- 用于禁用此实体的阴影深度(用于投影纹理)的渲染。
- 禁用手电筒 (disableflashlight) <boolean > (存在于自
以来)
- 用于禁用此实体的投影纹理照明和阴影。
- 投影纹理缓存 (shadowdepthnocache) <integer choices> (存在于自
以来)
- 用于提示投影纹理系统缓存此实体的阴影体积是否足够,或改为强制每帧渲染。
选项 - 0 : 默认
- 1 : 无缓存 - 每帧渲染
- 2 : 缓存 - 只渲染一次
- Render in Fast Reflections (drawinfastreflection) <boolean > (存在于自
以来)
- 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) <float >
- Distance at which the entity starts to fade.
- End Fade Dist (fademaxdist) <float >
- 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) <float >
- 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 版本范围之外运行,该实体将不存在。
选择 警告:If these are used, the object may break when the user switches their DirectX settings.[missing string]
- 0 - 默认(无界线)
- 60 - DirectX 6 (不存在于FGD! for mindxlevel)
- 70 - DirectX 7
- 80 - DirectX 8 (GeForce4 Ti & FX 5000 series)
- 81 - DirectX 8.1 (GeForce FX 5800, 5900 & Radeon 8500/9100 and 9000/9200)
- 90 - DirectX 9 Shader Model 2
- 92 - OpenGL equivalent to DirectX 9 Shader Model 2 (using ToGL;
only) 不存在于FGD!
- 95 - DirectX 9 Shader Model 3 (存在于自
以来)
- 98 - Xbox 360 上的 DirectX 9 Shader Model 3 (
only) 不存在于FGD!
- 最低/最高效果细节等级 (mincpulevel / maxcpulevel) <integer choices> (存在于自
以来)
- 不要为效果细节等级超出最低或最高限度的玩家渲染。
选择 - 0: 默认 ("Low" for
mincpulevel
, "High" formaxcpulevel
) - 1: 低
- 2: 中
- 3: 高
- 0: 默认 ("Low" for
- 最低/最高着色器细节等级 (mingpulevel / maxgpulevel) <integer choices> (存在于自
以来)
- 不要为着色器细节等级超出最低或最高限度的玩家渲染。
选择 - 0: 默认 ("Low" for
mingpulevel
, "Very High" formaxgpulevel
) - 1: 低
- 2: 中
- 3: 高
- 4: 非常高
参见: cpu_level / gpu_level convars- 0: 默认 ("Low" for
- 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
中声明的骨骼名称,它应该没有任何斜线,还要检查那里的位置,值应该为零。