Prop static/zh

From Valve Developer Community
< Prop static(Redirected from Prop static:zh-cn)
Jump to: navigation, search

它用于廉价English地向世界添加模型English。它不能移动、播放动画或接受输入,并且在地图编译后不作为实体存在。典型地图中的绝大多数模型都是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将无法编译地图。

一致性

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

键值

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

Reflection:
Render in Fast Reflections (drawinfastreflection) <boolean> | 布尔值 (in all games since 传送门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> | 浮点型
Distance at which the prop starts to fade.
End Fade Dist (fademaxdist) <float> | 浮点型
Max fade distance at which the prop is visible.
  • If start fade is <0, the prop will disappear instantly when end fade is hit.
  • If end fade is <0, the prop won't disappear at all. (This is the default behavior.)
The values will scale appropriately if the prop 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 起源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.

DXLevelChoice:

Minimum / Maximum DX Level (mindxlevel / maxdxlevel) <choices> (被移除求生之路 以来)
The entity will not exist if the engine is running outside the given range of DirectX Versions.
Choices
Warning.png警告:If these are used, the object may break when the user switches their DirectX settings.

SystemLevelChoice:

Minimum / Maximum Effect Details Level (mincpulevel / maxcpulevel) <choices> (存在于自 求生之路 以来)
Don't render for players with Effect Details levels that exceed the minimum or maximum.[Note.pngKey names are related to cpu_level cvar used by Effect Details.]
Choices
  • 0: Default ("Low" formincpulevel, "High" formaxcpulevel)
  • 1: Low
  • 2: Medium
  • 3: High
Minimum / Maximum Shader Details Level (mingpulevel / maxgpulevel) <choices> (存在于自 求生之路 以来)
Don't render for players with Shader Details levels that exceed the minimum or maximum.[Note.pngKey names are related to gpu_level cvar used by Shader Details.]
Choices
  • 0: Default ("Low" formingpulevel, "Very High" formaxgpulevel)
  • 1: Low
  • 2: Medium
  • 3: High
  • 4: Very High

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,如果你想要它有物理效果。


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

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

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

另请参阅