Texture prefixes: Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) (Created page with "{{goldsrc topicon}} {{orphan}} WAD textures do not have any metadata for special textures. Instead, the first few characters in the texture's name are used to dictate what...") |
SirYodaJedi (talk | contribs) No edit summary |
||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{goldsrc topicon}} | {{goldsrc topicon}} | ||
[[WAD]] textures do not have any metadata for special textures. Instead, the first few characters in the texture's name are used to dictate what the texture is used for. Some prefixes also affect [[BSP_flags_(Quake_and_GoldSrc)#Contents_types|brush contents]]; mixing contents will result in compile errors. | |||
[[WAD]] textures do not have any metadata for special textures. Instead, the first few characters in the texture's name are used to dictate what the texture is used for. | |||
{| class="wikitable" | {| class="wikitable sortable" | ||
|- | |- | ||
! Prefix !! Texture type !! Description | ! Prefix !! Texture type !! Contents !! Description | ||
|- | |- | ||
| {{code|{}} || Alphatest || Texels using the last index in the [[palette]] (index 255) will be treated as pure black with an alpha channel value of zero. If tied to an entity with a {{code|rendermode}} other than 0, said texels will be transparent. | | {{code|{}} || Alphatest || Default (CONTENTS_SOLID) || Texels using the last index in the [[palette]] (index 255) will be treated as pure black with an alpha channel value of zero. If tied to an entity with a {{code|rendermode}} other than 0, said texels will be transparent. | ||
|- | |- | ||
| {{code|!}} || Liquid (water) || A liquid, usually water. The face will be drawn with ripples in the [[software renderer]] or waves in the [[OpenGL]] renderer. If part of worldspawn, it will be swimmable. If tied to an entity, only the top face will be drawn. | | {{code|!}} || Liquid (water) || CONTENTS_WATER || A liquid, usually water. The face will be drawn with ripples in the [[software renderer]] or waves in the [[OpenGL]] renderer. If part of worldspawn, it will be swimmable. If tied to an entity, only the top face will be drawn. | ||
:{{workaround|If the liquid brush doesn't need to move, use an entity that supports the {{code|angles}} KV, such as {{ent|func_door_rotating|engine=goldsrc}}. You will need one entity for each rendered face.}} | |||
Palette index 3 is used to control fog color, and the red value of palette index 4 is used to control fog thickness (with 255 being maximum fog). | |||
{{bug|hidetested=1|Liquids are always fullbright in the vanilla renders, but most compilers still generate lightmaps for them anyway, due to expecting {{quake|2}}'s prefix of {{code|<nowiki>*</nowiki>}} instead. This will not affect the engine's [[allocblock]] limit, as they aren't actually loaded{{confirm}}. {{tip|If there is a significant amount of water in a map, the BSP size can be reduced by flagging the water surfaces as "special" in {{newbspguy|4.1}}, then recompiling RAD. Alternatively, use [[ericw-tools]] and add {{code|_splitturb 0}} to worldspawn. For [[func_water]], [[VHLT]]'s {{code|zhlt_striprad}} can be used.}} }} | |||
|- | |- | ||
| {{code|!slime}} || Slime || Like water, deals damage to the player and some monsters when touched (if part of worldspawn). | | {{code|!slime}} || Slime || CONTENTS_SLIME || Like water, deals damage to the player and some monsters when touched (if part of worldspawn). | ||
|- | |- | ||
| {{code|!lava}} || Lava || Like slime, but deals double the damage (if part of worldspawn). | | {{code|!lava}} || Lava || CONTENTS_LAVA || Like slime, but deals double the damage (if part of worldspawn). | ||
|- | |- | ||
| {{code|!cur_0}} || 0° current | | {{code|!cur_0}} || 0° current || CONTENTS_CURRENT_0 | ||
| rowspan=6 | Acts like water combined with a {{ent|trigger_push (GoldSrc)|alt=trigger_push}} with a speed of 2048 in the given direction (if part of worldspawn). | | rowspan=6 | Acts like water combined with a {{ent|trigger_push (GoldSrc)|alt=trigger_push}} with a speed of 2048 in the given direction (if part of worldspawn). | ||
|- | |- | ||
| {{code|!cur_90}} || 90° current | | {{code|!cur_90}} || 90° current || CONTENTS_CURRENT_90 | ||
|- | |- | ||
| {{code|!cur_180}} || 180° current | | {{code|!cur_180}} || 180° current || CONTENTS_CURRENT_180 | ||
|- | |- | ||
| {{code|!cur_270}} || 270° current | | {{code|!cur_270}} || 270° current || CONTENTS_CURRENT_270 | ||
|- | |- | ||
| {{code|!cur_up}} || Upwards current | | {{code|!cur_up}} || Upwards current || CONTENTS_CURRENT_UP | ||
|- | |- | ||
| {{code|!cur_dwn}} || Downwards current | | {{code|!cur_dwn}} || Downwards current || CONTENTS_CURRENT_DOWN | ||
|- | |- | ||
| {{code|+0}} to {{code|+9}} | | {{code|+0}} to {{code|+9}} | ||
| rowspan=2 | Animated/Toggled | | rowspan=2 | Animated/Toggled | ||
| rowspan=2 | Plays all textures in this set in sequence (at roughly | | rowspan=3| Default (CONTENTS_SOLID) | ||
| rowspan=2 | Plays all textures in this set in sequence (at roughly 10 FPS). If tied to certain entities, such as {{ent|func_wall (GoldSrc)|alt=func_wall}} or {{ent|func_button (GoldSrc)|alt=func_button}}, the sequence will toggle between numeric and alphabetic when the entity is targeted. | |||
|- | |- | ||
| {{code|+A}} to {{code|+J}} | | {{code|+A}} to {{code|+J}} | ||
Line 37: | Line 40: | ||
{{tip|This feature does not work well on surfaces which are not 240x240 texel quads. Consider combining the variations into a larger [[megatexture]] instead.}} | {{tip|This feature does not work well on surfaces which are not 240x240 texel quads. Consider combining the variations into a larger [[megatexture]] instead.}} | ||
|- | |- | ||
| {{code|@}} || Nonsolid visblocker || Non-solid, but still blocks [[VIS]]. Does not have backface culling. | | {{code|@}} || Nonsolid visblocker || CONTENTS_TRANSLUCENT || Non-solid, but still blocks [[VIS]]. Does not have backface culling. | ||
|- | |- | ||
| {{code|scroll}} || Scrolling || Scrolls horizontally based upon {{ent|func_conveyor (GoldSrc)|alt=func_conveyor}} {{code|speed}} or other entities' {{code|rendercolor}} | | {{code|scroll}} || Scrolling || Default (CONTENTS_SOLID) || Scrolls horizontally based upon {{ent|func_conveyor (GoldSrc)|alt=func_conveyor}} {{code|speed}} or other entities' {{code|rendercolor}} | ||
|- | |- | ||
| {{code|sky}} || Sky || Not drawn in-game, but tells the engine to render the skybox behind all geometry in the current PVS. | | {{code|sky}} || Sky || CONTENTS_SKY || Not drawn in-game, but tells the engine to render the skybox behind all geometry in the current PVS. | ||
{{bug|In [[OpenGL]] mode's non-multitextured renderer, rendering bugs occur when using multiple {{code|sky}} textures.}} | {{bug|hidetested=1|In [[OpenGL]] mode's non-multitextured renderer, rendering bugs occur when using multiple {{code|sky}} textures.}} | ||
|- | |- | ||
| {{code|~}} || Self-illuminated (has fullbrights) || {{modernDeprecated|Support removed before release; only functional in Half-Life Alpha 0.52's [[software renderer]]. Nonetheless, the vanilla base game textures are still properly formatted for this feature.}} | | {{code|xeno_grapple_}} || {{op4}} Grapple point | ||
| rowspan=3 | Default (CONTENTS_SOLID) | |||
| Textures with this prefix can be hooked onto with {{op4}} {{ent|weapon_grapple (Opposing Force)|alt=weapon_grapple}} | |||
|- | |||
| {{code|~}} || Self-illuminated (has fullbrights) || {{modernDeprecated|Support removed before release; only functional in Half-Life Alpha 0.52's [[software renderer]]. Nonetheless, many of the vanilla base game textures are still properly formatted for this feature.}} | |||
The last 32 colors in the [[palette]] are supposed to always be rendered at full brightness, regardless of lightmap brightness and rendermode.<br>Unlike other prefixes, this prefix can be used in conjunction with the animated/toggled texture prefix (ex {{code|+0~}}). | The last 32 colors in the [[palette]] are supposed to always be rendered at full brightness, regardless of lightmap brightness and rendermode.<br>Unlike other prefixes, this prefix can be used in conjunction with the animated/toggled texture prefix (ex {{code|+0~}}). | ||
|- | |||
| {{code|__rad}} || Generated by [[HLRAD]] || Textures generated for brush entities using [[VHLT]]'s [[template:Hl1 kv zhlt|zhlt_embedlightmap]] feature are given this prefix. | |||
|} | |} | ||
Latest revision as of 13:03, 9 June 2025
WAD textures do not have any metadata for special textures. Instead, the first few characters in the texture's name are used to dictate what the texture is used for. Some prefixes also affect brush contents; mixing contents will result in compile errors.
Prefix | Texture type | Contents | Description |
---|---|---|---|
{ | Alphatest | Default (CONTENTS_SOLID) | Texels using the last index in the palette (index 255) will be treated as pure black with an alpha channel value of zero. If tied to an entity with a rendermode other than 0, said texels will be transparent. |
! | Liquid (water) | CONTENTS_WATER | A liquid, usually water. The face will be drawn with ripples in the software renderer or waves in the OpenGL renderer. If part of worldspawn, it will be swimmable. If tied to an entity, only the top face will be drawn.
Palette index 3 is used to control fog color, and the red value of palette index 4 is used to control fog thickness (with 255 being maximum fog). ![]() ![]() ![]() ![]() |
!slime | Slime | CONTENTS_SLIME | Like water, deals damage to the player and some monsters when touched (if part of worldspawn). |
!lava | Lava | CONTENTS_LAVA | Like slime, but deals double the damage (if part of worldspawn). |
!cur_0 | 0° current | CONTENTS_CURRENT_0 | Acts like water combined with a trigger_push with a speed of 2048 in the given direction (if part of worldspawn). |
!cur_90 | 90° current | CONTENTS_CURRENT_90 | |
!cur_180 | 180° current | CONTENTS_CURRENT_180 | |
!cur_270 | 270° current | CONTENTS_CURRENT_270 | |
!cur_up | Upwards current | CONTENTS_CURRENT_UP | |
!cur_dwn | Downwards current | CONTENTS_CURRENT_DOWN | |
+0 to +9 | Animated/Toggled | Default (CONTENTS_SOLID) | Plays all textures in this set in sequence (at roughly 10 FPS). If tied to certain entities, such as func_wall or func_button, the sequence will toggle between numeric and alphabetic when the entity is targeted. |
+A to +J | |||
-0 to -9 | Random tiling | Each time the map loads, the engine will randomly assign one of the textures in this set to each appropriate surface. In software mode, the texture changes at the edges of the texture, whereas in OpenGL mode, the texture changes at the edges of the geometry it sits on.
![]() | |
@ | Nonsolid visblocker | CONTENTS_TRANSLUCENT | Non-solid, but still blocks VIS. Does not have backface culling. |
scroll | Scrolling | Default (CONTENTS_SOLID) | Scrolls horizontally based upon func_conveyor speed or other entities' rendercolor |
sky | Sky | CONTENTS_SKY | Not drawn in-game, but tells the engine to render the skybox behind all geometry in the current PVS.
![]() |
xeno_grapple_ | ![]() |
Default (CONTENTS_SOLID) | Textures with this prefix can be hooked onto with ![]() |
~ | Self-illuminated (has fullbrights) | ![]() The last 32 colors in the palette are supposed to always be rendered at full brightness, regardless of lightmap brightness and rendermode. | |
__rad | Generated by HLRAD | Textures generated for brush entities using VHLT's zhlt_embedlightmap feature are given this prefix. |