BSP (Source)/Static prop flags: Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) (Created page with "These flags are defined in {{file|public/gamebspfile|h}}. == Flags == This is 8-bit in all versions of the static prop lump except for {{src13mp}}, where it is 32-bit. {| clas...") |
SirYodaJedi (talk | contribs) (→Flags) |
||
| (25 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
These flags are defined in {{file|public/gamebspfile|h}}. | These flags are defined in {{file|public/gamebspfile|h}}. Any undefined flags are unused by the engine and can be used by custom VRAD compilers to define additional light baking parameters (in conjunction with a modified VBSP that can write those flags). | ||
== Flags == | == Flags == | ||
This is 8-bit in all versions of the static prop lump except for {{src13mp}}, where it is 32-bit. | This is 8-bit (unsigned char) in all versions of the static prop lump except for {{src13mp}} and {{tf2branch}}, where it is 32-bit (signed int). | ||
{| class="wikitable" | {| class="wikitable" | ||
! Bit | ! Bit | ||
| Line 8: | Line 8: | ||
! Description | ! Description | ||
|- | |- | ||
| | | align=right | 0x01 | ||
| STATIC_PROP_FLAG_FADES | | STATIC_PROP_FLAG_FADES | ||
| | | none | ||
| Set by engine at runtime | | Set by engine at runtime if the model fades out at a distance. | ||
|- | |- | ||
| | | align=right | 0x02 | ||
| STATIC_PROP_USE_LIGHTING_ORIGIN | | STATIC_PROP_USE_LIGHTING_ORIGIN | ||
| | | none | ||
| Set by engine at runtime | | Set by engine at runtime if the model's lighting origin is different from its position in the world. | ||
|- | |- | ||
| | | align=right rowspan=2 | 0x04 | ||
| STATIC_PROP_NO_DRAW<br>{{since|{{src07}}}}<br>{{removed|{{portal2}}}} | |||
| computed at run time based on dx level | | computed at run time based on dx level | ||
| Set by engine at runtime | | Set by engine at runtime based upon {{code|mindxlevel}} and {{code|maxdxlevel}}. Does not work if set explicitly; set maxdxlevel to a low non-zero value such as 50 instead. | ||
|- | |- | ||
| | | STATIC_PROP_NO_FLASHLIGHT<br>{{since|{{portal2}}}}{{confirm}} | ||
| N/A (source code not public) | | N/A (source code not public) | ||
| Set | | Set if {{code|disableflashlight}} is enabled. | ||
|- | |- | ||
| | | align=right | 0x08 | ||
| STATIC_PROP_IGNORE_NORMALS | | STATIC_PROP_IGNORE_NORMALS<br>{{since|{{src07}}}} | ||
| none | | none | ||
| | | Set if {{code|ignorenormals}} is enabled. | ||
|- | |- | ||
| | | align=right | 0x10 | ||
| STATIC_PROP_NO_SHADOW | | STATIC_PROP_NO_SHADOW | ||
| none | | none | ||
| | | Set if {{code|disableshadows}} is enabled. | ||
|- | |- | ||
| | | align=right rowspan=2 | 0x20 | ||
| STATIC_PROP_SCREEN_SPACE_FADE<br>{{removed|{{portal2}}}} | |||
| none | | none | ||
| | | Set if {{code|screenspacefade}} is enabled. | ||
|- | |- | ||
| | | STATIC_PROP_MARKED_FOR_FAST_REFLECTION<br>{{since|{{portal2}}}} | ||
| | | N/A (source code not public) | ||
| | | Set if {{code|drawinfastreflection}} is enabled. | ||
| | |||
|- | |- | ||
| | | align=right | 0x40 | ||
| STATIC_PROP_NO_PER_VERTEX_LIGHTING | | STATIC_PROP_NO_PER_VERTEX_LIGHTING<br>{{since|{{src06}}}} | ||
| in vrad, compute lighting at lighting origin, not for each vertex | | in vrad, compute lighting at lighting origin, not for each vertex | ||
| | | Set if {{code|disablevertexlighting}} is enabled.<br>Contrary to the dev comment, this disables pre-baked lighting for the model altogether, making it lit the same way as {{ent|CBaseAnimating}} props (ex: {{ent|prop_dynamic}}). | ||
|- | |- | ||
| | | align=right | 0x80 | ||
| STATIC_PROP_NO_SELF_SHADOWING | | STATIC_PROP_NO_SELF_SHADOWING<br>{{since|{{src06}}}} | ||
| disable self shadowing in vrad | | disable self shadowing in vrad | ||
| | | Set if {{code|disableselfshadowing}} is enabled. | ||
|- | |- | ||
| | | align=right | 0x100 | ||
| | | STATIC_PROP_NO_PER_TEXEL_LIGHTING<br>{{since|{{src13mp}}}}{{also|{{gmod}}}} | ||
| whether we should do per-texel lightmaps in vrad. | | whether we should do per-texel lightmaps in vrad. | ||
| | | Set if {{code|generatelightmaps}} is ''disabled''.<br>If [[VRAD]] is fed an older version of the static prop lump with 8-bit flags, this flag is treated as always being enabled (not generating lightmaps for any props).<br>This flag is ''only'' read by VRAD; the engine will load the the [[PPL]] file associated with a given prop regardless of this flag, provided STATIC_PROP_NO_PER_VERTEX_LIGHTING is disabled and the checksum in the PPL file matches the checksum found in specified MDL. | ||
|- | |- | ||
| 0x200 | |||
| STATIC_PROP_ENABLE_LIGHT_BOUNCE<br>{{only|{{gmod}} }} | |||
| N/A (source code not public) | |||
| Set if {{code|enablelightbounce}} is enabled. | |||
|- | |||
|} | |} | ||
== FlagsEX == | == FlagsEX == | ||
{{csgo|2}}'s static prop lump adds an extra 32-bit set of flags, most of which are unused. | {{csgo|2}}'s static prop lump adds an extra 32-bit (signed int) set of flags, most of which are unused. | ||
{| class="wikitable" | {| class="wikitable" | ||
! Bit | ! Bit | ||
| Line 74: | Line 77: | ||
| 0x00000001 | | 0x00000001 | ||
| STATIC_PROP_FLAGS_EX_DISABLE_SHADOW_DEPTH | | STATIC_PROP_FLAGS_EX_DISABLE_SHADOW_DEPTH | ||
| | | Set if {{code|disableshadowdepth}} is enabled. | ||
|- | |- | ||
| 0x00000002 | | 0x00000002 | ||
| Line 82: | Line 85: | ||
| 0x00000004 | | 0x00000004 | ||
| STATIC_PROP_FLAGS_EX_ENABLE_LIGHT_BOUNCE | | STATIC_PROP_FLAGS_EX_ENABLE_LIGHT_BOUNCE | ||
| | | Set if {{code|enablelightbounce}} is enabled. | ||
|- | |- | ||
|} | |} | ||
== See also == | |||
* {{ent|prop_static}} | |||
Latest revision as of 16:04, 30 October 2025
These flags are defined in ![]()
public/gamebspfile.h. Any undefined flags are unused by the engine and can be used by custom VRAD compilers to define additional light baking parameters (in conjunction with a modified VBSP that can write those flags).
Flags
This is 8-bit (unsigned char) in all versions of the static prop lump except for
and
, where it is 32-bit (signed int).
| Bit | Name | Dev comment | Description |
|---|---|---|---|
| 0x01 | STATIC_PROP_FLAG_FADES | none | Set by engine at runtime if the model fades out at a distance. |
| 0x02 | STATIC_PROP_USE_LIGHTING_ORIGIN | none | Set by engine at runtime if the model's lighting origin is different from its position in the world. |
| 0x04 | STATIC_PROP_NO_DRAW (in all games since (removed since |
computed at run time based on dx level | Set by engine at runtime based upon mindxlevel and maxdxlevel. Does not work if set explicitly; set maxdxlevel to a low non-zero value such as 50 instead.
|
| STATIC_PROP_NO_FLASHLIGHT (in all games since |
N/A (source code not public) | Set if disableflashlight is enabled.
| |
| 0x08 | STATIC_PROP_IGNORE_NORMALS (in all games since |
none | Set if ignorenormals is enabled.
|
| 0x10 | STATIC_PROP_NO_SHADOW | none | Set if disableshadows is enabled.
|
| 0x20 | STATIC_PROP_SCREEN_SPACE_FADE (removed since |
none | Set if screenspacefade is enabled.
|
| STATIC_PROP_MARKED_FOR_FAST_REFLECTION (in all games since |
N/A (source code not public) | Set if drawinfastreflection is enabled.
| |
| 0x40 | STATIC_PROP_NO_PER_VERTEX_LIGHTING (in all games since |
in vrad, compute lighting at lighting origin, not for each vertex | Set if disablevertexlighting is enabled.Contrary to the dev comment, this disables pre-baked lighting for the model altogether, making it lit the same way as CBaseAnimating props (ex: prop_dynamic). |
| 0x80 | STATIC_PROP_NO_SELF_SHADOWING (in all games since |
disable self shadowing in vrad | Set if disableselfshadowing is enabled.
|
| 0x100 | STATIC_PROP_NO_PER_TEXEL_LIGHTING (in all games since |
whether we should do per-texel lightmaps in vrad. | Set if generatelightmaps is disabled.If VRAD is fed an older version of the static prop lump with 8-bit flags, this flag is treated as always being enabled (not generating lightmaps for any props). This flag is only read by VRAD; the engine will load the the PPL file associated with a given prop regardless of this flag, provided STATIC_PROP_NO_PER_VERTEX_LIGHTING is disabled and the checksum in the PPL file matches the checksum found in specified MDL. |
| 0x200 | STATIC_PROP_ENABLE_LIGHT_BOUNCE (only in |
N/A (source code not public) | Set if enablelightbounce is enabled.
|
FlagsEX
Counter-Strike: Global Offensive's static prop lump adds an extra 32-bit (signed int) set of flags, most of which are unused.
| Bit | Name | Description |
|---|---|---|
| 0x00000001 | STATIC_PROP_FLAGS_EX_DISABLE_SHADOW_DEPTH | Set if disableshadowdepth is enabled.
|
| 0x00000002 | STATIC_PROP_FLAGS_EX_DISABLE_CSM | Automatically set at runtime |
| 0x00000004 | STATIC_PROP_FLAGS_EX_ENABLE_LIGHT_BOUNCE | Set if enablelightbounce is enabled.
|