Prop static: Difference between revisions
mNo edit summary |
(there are COUNTLESS maps that have static props "inside" displacements without crashing. COUNTLESS.) |
||
Line 12: | Line 12: | ||
{{note|In [[Source 2013]] MP-based games, static props can use lightmaps using the static prop's UVs. They come with the same limitations as per-vertex lit props, and cannot be used on models with bump maps.}} | {{note|In [[Source 2013]] MP-based games, static props can use lightmaps using the static prop's UVs. They come with the same limitations as per-vertex lit props, and cannot be used on models with bump maps.}} | ||
{{warning|In most Source games, a single level is limited to 4096 <code>prop_static</code>s. The limit is 8192 in {{As}}{{portal2}} and 16384 in {{csgo}}. If the limit is reached, [[VBSP]] will fail to compile the map.}} | {{warning|In most Source games, a single level is limited to 4096 <code>prop_static</code>s. The limit is 8192 in {{As}}{{portal2}} and 16384 in {{csgo}}. If the limit is reached, [[VBSP]] will fail to compile the map.}} | ||
:{{bug|Placing a static prop inside of a [[Displacement]] will often lead to a crash upon loading the map. (tested in {{Game link|Source 2013}} and {{tf2}}.)}} | :{{bug|Placing a static prop inside{{clarify}} of a [[Displacement]] will often lead to a crash upon loading the map. (tested in {{Game link|Source 2013}} and {{tf2}}.)}} | ||
== Consistency == | == Consistency == |
Revision as of 15:28, 6 August 2021
- Not to be confused with the $staticprop and allowstatic (Prop_data) QC commands.
Template:Base point It is used to cheaply add a model to the world. It cannot move, animate, or accept input, and doesn't exist as an entity after the map has been compiled. The vast majority of models in a typical map are prop_static
s.
A prop_static
will collide with other objects assuming it has a collision mesh, and, unlike all other model entities, can be lit per-vertex and cast shadows onto lightmaps.




prop_static
s. The limit is 8192 in 


Bug:Placing a static prop inside[Clarify] of a Displacement will often lead to a crash upon loading the map. (tested in
Source 2013 and
.) [todo tested in ?]
Consistency
In order to enforce consistency of behaviour, models with embedded physics data cannot be prop_static
. Use the Hammer Model Browser's info tab to check for support.
See Also
Keyvalues
- Collisions (solid) <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 (screenspacefade) <boolean>
- 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 (lightingorigin) <targetname>
- An info_lighting from which to sample lighting (instead of the model's origin). Disables per-vertex lighting.
- Disable Vertex lighting (disablevertexlighting) <boolean>
- 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 (disableselfshadowing) <boolean>
- When vertex lighting is enabled, prevent the geometry from self-shadowing -- casting shadows onto itself.
- Ignore surface normal for computing vertex lighting (ignorenormals) <boolean>
- When vertex lighting is enabled, ignore the surface normal of faces when calculating the vertex lighting.
Tip:Useful for thin, translucent objects such as leaves on foliage props.
- Alpha (renderamt) <integer> (in all games since
)
- Alpha of the fade, where 0 is fully transparent and 255 is fully opaque.
- Generate (and use) lightmaps for this static prop (generatelightmaps) <boolean> (only in
)
- Generate a lightmap for this prop. Requires
-StaticPropLighting
to be enabled in VRAD. For more information, visit tf2maps.net. Note:Lightmapping can be also faked on static props using the Modulate shader in all games, although syncing the lighting can be difficult.
Bug:
This setting doesn't work on models with multiple skins. [todo tested in ?]
- Lightmap Resolution X (lightmapresolutionx) <integer> (only in
)
- The resolution of the generated lightmap in the X (or U) direction. (Only used if Generate Lightmaps is Yes.)
- Lightmap Resolution Y (lightmapresolutiony) <integer> (only in
)
- The resolution of the generated lightmap in the Y (or V) direction. (Only used if Generate Lightmaps is Yes.)
- Enable Bounced Lighting (enablelightbounce) <boolean> (only in
)
- Whether VRAD should create indirect lighting from this prop.
- Disable Prop Combine (preventpropcombine) <boolean> (only in
)
- Prevent this static prop from combining with any other static props in vbsp.
- Uniform Scaling (uniformscale) <float> (only in
)
- Evenly scales a given model along the X Y Z axis.
Bug:In Hammer, undoing/redoing any changes (whether they are slight unit movements or scale changes) will result in the prop appearing 'normal' sized in the 3D Textured Viewport (the model only appears normal sized and the value given is still shown upon reload of the vmf). [todo tested in ?]
- World Model (model) <model path>
- 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. May be overridden by game code.
Tip:Hammer's model browser automatically updates this value if you use it to view different skins.
- 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 and cubemaps instead of the entity's $illumposition.
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 Shadow Depth (disableshadowdepth) <boolean> (in all games since
)
- Used to disable rendering into shadow depth (for projected textures) for this entity.
- Disable flashlight (disableflashlight) <boolean> (in all games since
)
- Used to disable projected texture lighting and shadows on this entity.
- Projected Texture Cache (shadowdepthnocache) <integer choices> (in all games since
)
- 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
- Render in Fast Reflections (drawinfastreflection) <boolean> (in all games since
)
- 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.
- Minimum / Maximum DX Level (mindxlevel / maxdxlevel) <integer choices> (removed since
)
- The entity will not exist if the engine is running outside the given range of DirectX Versions.
Choices Warning:If these are used, the object may break when the user switches their DirectX settings.[missing string]
- 0 - Default (no bounding)
- 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 аналогичен DirectX 9 Shader Model 2 (using ToGL;
only) !FGD
- 95 - DirectX 9 Shader Model 3 (in all games since
)
- 98 - DirectX 9 Shader Model 3 on Xbox 360 (
only) !FGD
- Minimum / Maximum Effect Details Level (mincpulevel / maxcpulevel) <integer choices> (in all games since
)
- Don't render for players with Effect Details levels that exceed the minimum or maximum.
Choices - 0: Default ("Low" for
mincpulevel
, "High" formaxcpulevel
) - 1: Low
- 2: Medium
- 3: High
- 0: Default ("Low" for
- Minimum / Maximum Shader Details Level (mingpulevel / maxgpulevel) <integer choices> (in all games since
)
- Don't render for players with Shader Details levels that exceed the minimum or maximum.
Choices - 0: Default ("Low" for
mingpulevel
, "Very High" formaxgpulevel
) - 1: Low
- 2: Medium
- 3: High
- 4: Very High
See also: cpu_level / gpu_level convars- 0: Default ("Low" for
- Pitch Yaw Roll (Y Z X) (angles) <QAngle>
- 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 KVs
- targetname <target_source>
- The name that ship_base_interaction entities refer to this entity by.
Common mistakes
Error! prop_static using model "[model]", which must be used on a dynamic entity (i.e. prop_physics). Deleted.
The prop is not compatible to be used as prop_static. You need to use prop_dynamic_override instead, or prop_physics if you want it to have physics.
if its your custom model:
- Either your model is missing $staticprop or there is no "allowstatic 1" in prop_data qc file.
Example:
$KeyValues
{
prop_data
{
"base" "Metal.Medium"
"allowstatic" "1"
}
}
- If for some reason your model located incorrectly, check declared bone name in $definebone of a model, it should be without any slashes, also check position there, values should be zeroed.
- Additional info about prop_static can be found there.