prop_static

From Valve Developer Community
Jump to: navigation, search
English Русский
不要与 $staticprop 这个QC 指令混淆.

静态道具-不移动的模型,prop_static is an internal point entity available in all Source games. 它是一个cheapmodel 。不包含任何物理道具或者碰撞数据,不能打破,不能和其他物体关联或者动画及输入输入。产生光照贴图阴影,渲染不太费资源。  例子: 管道, 固定灯, 石头, 电线杆。一副地图里大多数模型都是 这个prop static。


当prop_static碰到其它东西时会有collision mesh, 不同于其它实体的是, 这个实体的照明和投射都会到lightmap上。

Note:Models with $bumpmaped materials are never lit per-vertex.

可在关卡中放置1000个。 可在Hammer editor中放置。 可与为它们设置碰撞和关联。 可对光照贴图产生影响。 可以产生静态光照贴图阴影。 对投射到上面的光线使用的是标准顶点着色方法。   可以使用细节控制系统( LOD system.,就是根据距离远近不同决定其渲染精度)。 在低配置电脑上用户可选择是否显示(渲染)该道具。  衰减距离(淡出)可在Hammmer编辑器中设置。  必须使用通过静态道具的qc文件编译成的模型。   不会让你的网络过载 + 内存使用极低。  不是一个真正意义的实体,没有输入输出。  没有动画或者连接.

Consistency

In order to enforce consistency of behaviour, embedded physics data类模型不能成为 prop_static. 用hammer的模型浏览器的info选项卡查看支持。

See also

Keyvalues

Collisions <choices>
How the prop should interact with other objects.
  • Not solid
  • Use bounding box
  • Use VPhysics (default)
    Note:Using this setting on models without a collision mesh will cause the engine to throw a warning upon loading the map. If you see such a warning, reset the collision of all props using the noted model to one of the other two choices.
Screen Space Fade <bool>
If enabled, the prop will fade out based on how many screen pixels it covers. The start and end fade distances come to represent the pixels that the prop covers at the start and end of its fade when this is enabled.
Lighting Origin <targetname>
An info_lighting from which to sample lighting (instead of the model's origin). Disables per-vertex lighting.
Disable Vertex lighting <bool>
Prop will be lit uniformly with a lighting value sampled from its origin. Enable this if the entity is not shadowed by another object.
Disable Self-Shadowing with vertex lighting <bool>
Prop will not cast shadows on itself when per-vertex lighting is calculated.
Ignore surface normal for computing vertex lighting <bool>
A surface normal defines the direction from which each polygon is brightest-lit, and how much light is received. You can ignore this setting most of the time.

Studiomodel:

World Model <string>
The model this entity should appear as. 128-character limit.
Skin <int>
Some models have multiple skins. This value selects from the index, starting with 0.
Tip:Hammer's model browser automatically updates this value if you use it to view different skins.
modelscale <float> (New with Team Fortress 2)
The scaling factor for the model

Shadow:

Disable shadows <boolean>
Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
Disable ShadowDepth <boolean> (New with Portal 2)
Used to disable rendering into shadow depth (for projected textures) for this entity.
Projected Texture Cache <choices> (New with Portal 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.
  • 0 : Default
  • 1 : No cache - render every frame
  • 2 : Cache it - render only once
Disable flashlight <boolean> (New with Portal 2)
Used to disable projected texture lighting and shadows on this entity.
Note:Disable shadows applies to lightmap shadows for prop_static, not RTTs.

BaseFadeProp:

Start Fade Dist <float>
End Fade Dist <float>
Distances at which the prop start and finish fading.
  • 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 behaviour.)
The values will scale appropriately if the prop is in a 3D Skybox.
Fade Scale <float>
If you specify so in worldspawn, or if the engine is running below DirectX 8 (DX7 in Ep1), 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, and 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 DX Level (mindxlevel)<choices>
Maximum DX Level (maxdxlevel)<choices>
The entity will not exist if the engine is running outside the given range of DirectX Versions. Only used by Orange Box and 2013 SDK games.
Warning: If these are used, the object may break when the user switches their DirectX settings.
  • Default (no bounding)
  • DX7
  • DX8
  • DX8.1
  • DX9 SM2
  • DX9 SM3

Angles:

Pitch Yaw Roll (Y Z X) <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.

<The Ship> The Ship KVs

targetname <target_source>
The name that ship_base_interaction entities refer to this entity by.