这篇条目有关 Source引擎。如需详情,点击这里。

prop_static

From Valve Developer Community
< Zh
Jump to: navigation, search
English (en)Русский (ru)中文 (zh)Translate (Translate)
''不要混淆 $staticprop 或者 allowstatic (prop_data) QC 命令。

prop_static是一个内部的(en)点实体(en),可在所有的 起源 起源 游戏中使用。 它用于廉价English地向世界添加模型English。它不能移动、播放动画或接受输入(en),并且在地图编译后不作为实体存在。典型地图中的绝大多数模型都是prop_static

prop_static与其他对象发生碰撞,假设它有一个碰撞网格English,并且与所有其他模型实体不同,它可以按顶点点亮并将阴影投射到光照贴图English上。

Note.png注意:使用凹凸贴图English的模型不能按顶点点亮,除了 CS:GO 引擎分支 CS:GO 引擎分支
Note.png注意:在基于起源2013 多人分支 起源2013 多人分支的游戏中,静态道具(prop_static)可以使用静态道具的 UV 来使用光照贴图。它们具有与逐顶点光照道具相同的限制,并且不能用于具有凹凸贴图的模型。
Warning.png警告:在大多数起源游戏中,单个关卡的prop_static数量限制为4096个。异形丛生 引擎分支 异形丛生 引擎分支传送门 2 引擎分支 传送门 2 引擎分支限制为8192个,CS:GO 引擎分支 CS:GO 引擎分支为16384个。如果达到限制,VBSP(en)将无法编译地图。

一致性

为了加强行为的一致性,带有嵌入prop_data的模型不能是prop_static实体。使用 Hammer 模型浏览器的信息(Info)选项卡(译者注:浏览模型时右侧下方会显示模型的属性)检查模型是否支持。

键值

Collisions (solid) <choices>
道具应该如何与其他对象碰撞。
  • Not Solid | 非固体
  • Use Bounding Box | 使用边界框
  • Use VPhysics(en) | 使用VPhysics English(默认值)
    Note.png注意:在没有碰撞网格English的模型上使用此设置将导致引擎在加载地图时发出警告。如果你看到这样的警告,请将使用被标注的模型的所有道具(译者注:以prop_开头的实体)的碰撞重置为其他两个选项之一。
Screen Space Fade (screenspacefade) <boolean(en)>
如果启用,道具将根据它覆盖的屏幕像素数淡出。开始和结束淡入淡出距离表示启用时道具在淡入淡出开始和结束时覆盖的像素。
Lighting Origin (lightingorigin) <string(en)>
从中采样照明的info_lighting(而不是模型的原点)。禁用逐顶点光照。
Disable Vertex lighting (disablevertexlighting) <boolean(en)>
道具将使用从其原点采样的照明值均匀照亮。如果实体没有被另一个对象遮挡,则启用此选项。
Disable Self-Shadowing with vertex lighting (disableselfshadowing) <boolean(en)>
启用顶点光照后(译者注:即上方的选项),防止几何体产生自阴影——将阴影投射到自身上。
Ignore surface normal for computing vertex lighting (ignorenormals) <boolean(en)>
启用顶点光照后,计算顶点光照时忽略法线面。
Tip.png提示:适用于薄薄的半透明物体,例如树叶道具上的叶子。
Alpha (renderamt) <integer(en)> (存在于自 求生之路 以来)
渐变的透明通道,其中 0 表示完全透明,255 表示完全不透明。
Render Color (R G B) (rendercolor) <color255(en)> (存在于自 求生之路 以来)
用这种颜色为模型着色。
Generate (and use) lightmaps for this static prop (generatelightmaps) <boolean(en)> (存在于 起源2013 多人分支 之中)
为这个道具生成一个光照贴图。需要在VRAD中启用-StaticPropLighting。若想了解更多信息,请访问 tf2maps.net
Note.png注意:光照贴图也可以在所有游戏中使用调制(en)着色器在静态道具上创造出一个假的,尽管同步光照可能很困难。
Icon-Bug.png错误:反恐精英:起源 此设置不适用于具有多个皮肤(skin)的模型。  [todo tested in?]
Lightmap Resolution X (lightmapresolutionx) <integer(en)> (存在于 起源2013 多人分支 之中)
生成的光照贴图在X或U)方向的分辨率。(仅在Generate Lightmaps为Yes时使用。)
Lightmap Resolution Y (lightmapresolutiony) <integer(en)> (存在于 起源2013 多人分支 之中)
生成的光照贴图在Y或V)方向的分辨率。(仅在Generate Lightmaps为Yes时使用。)
Enable Bounced Lighting (enablelightbounce) <boolean(en)> (存在于 CS:GO 引擎分支 之中)
VRAD 是否应该从这个道具创建间接照明。
Disable Prop Combine (preventpropcombine) <boolean(en)> (存在于 CS:GO 引擎分支 之中)
防止此静态道具与VBSP中的任何其他静态道具结合使用。
Uniform Scaling (uniformscale) <float(en)> (存在于 CS:GO 引擎分支 之中)
沿 X Y Z 轴均匀缩放给定模型。
Icon-Bug.png错误:在Hammer中,撤消/重做任何更改(无论是轻微的单位移动还是缩放更改)都将导致道具在 3D 纹理视图中显示为“正常”大小(模型仅显示为正常大小,并且在重新加载时仍会显示给定的值的vmf)。  [todo tested in?]
Targetname (targetname) <string(en)> (存在于 The Ship: Murder PartyTeamSpen's Hammer Addons 之中)
ship_base_interaction 实体引用该实体的名称。

Studiomodel:

World Model (model) <string(en)>
The model this entity should appear as. 128-character limit.
Skin (skin) <integer(en)>
Some models have multiple skins. This value selects from the index, starting with 0.
Tip.png提示:Hammer's model browser automatically updates this value if you use it to view different skins.
Model Scale (modelscale) <float(en)> (存在于自 异形丛生 以来) (也存在于 起源2013 之中)
A multiplier for the size of the model.
Tip.png提示:In Hammer++ 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 or SetBodyGroup) <integer(en)>
Some models have multiple submodels. This value selects from the index, starting with 0. May be overridden by animations and/or game code.
Note.png注意:If both body and SetBodyGroup are present (even if set to 0), body will be prioritized.
Sequence (sequence) <integer(en)> 不存在于FGD!
Default animation sequence for the model to be playing after spawning. May be overridden by game code.
Lighting Origin (lightingorigin) <targetname(en)>
Select an entity (not info_lighting!) from which to sample lighting instead of the entity's origin or $illumposition.

阴影:

禁用阴影 (disableshadows) <boolean(en)>
防止该实体生成廉价的渲染到纹理的阴影,或如果实体是 prop_static 的光照贴图阴影。不影响影子映射。
禁用接收阴影 (disablereceiveshadows) <boolean(en)>
防止该实体接收动态阴影。
阴影投射距离 (shadowcastdist) <integer(en)> 不存在于FGD!
设置实体投射动态阴影的距离。0 表示从 shadow_control 实体开始的默认距离。
禁用阴影深度 (disableshadowdepth) <boolean(en)> (存在于自 传送门2 以来)
用于禁用此实体的阴影深度(用于投影纹理)的渲染。
禁用手电筒 (disableflashlight) <boolean(en)> (存在于自 传送门2 以来)
用于禁用此实体的投影纹理照明和阴影。
投影纹理缓存 (shadowdepthnocache) <integer(en) choices> (存在于自 传送门2 以来)
用于提示投影纹理系统缓存此实体的阴影体积是否足够,或改为强制每帧渲染。
选项
  • 0 : 默认
  • 1 : 无缓存 - 每帧渲染
  • 2 : 缓存 - 只渲染一次
Render in Fast Reflections (drawinfastreflection) <boolean(en)> (存在于自 传送门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.

BaseFadeProp:

Start Fade Dist (fademindist) <float(en)>
Distance at which the entity starts to fade.
End Fade Dist (fademaxdist) <float(en)>
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(en)>
If you specify so in worldspawn, or if the engine is running below DirectX 8 (DX7 in 起源2006), 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) <choices> (被移除求生之路 以来)
如果引擎在给定的 DirectX 版本范围之外运行,该实体将不存在。
选择
Warning.png警告:
最低/最高效果细节等级 (mincpulevel / maxcpulevel) <choices> (存在于自 求生之路 以来)
不要为效果细节等级超出最低或最高限度的玩家渲染。
选择
  • 0: ("Low" formincpulevel, "High" formaxcpulevel)
  • 1: 低
  • 2: 中
  • 3: 高
最低/最高着色器细节等级 (mingpulevel / maxgpulevel) <choices> (存在于自 求生之路 以来)
不要为着色器细节等级超出最低或最高限度的玩家渲染。
选择
  • 0: ("Low" formingpulevel, "Very High" formaxgpulevel)
  • 1: 低
  • 2: 中
  • 3: 高
  • 4: 非常高
参见:  cpu_level / gpu_level convars
Pitch Yaw Roll (Y Z X) (angles) <angle(en)>
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,如果你想要它有物理效果。


如果它是你的自定义模型:

示例: $KeyValues { prop_data { "base" "Metal.Medium" "allowstatic" "1" } }

  • 如果由于某种原因你的模型定位不正确,请检查模型的$definebone中声明的骨骼名称,它应该没有任何斜线,还要检查那里的位置,值应该为零。

另请参阅