Func precipitation: Difference between revisions
Jump to navigation
Jump to search
Important:This is a preserved entity in 
.
If the game has round restart mechanics this entity may not behave as expected:
Note:The "Particle" precipitation types are generated using the PCF files of a game, allowing users to alter the look of the precipitation in more ways than just the used material.
Warning:
Note:The precipitation created by this entity is not gpu-accelerated. In resource-intensive multiplayer games such as
, it's recommended to use a particle system to create weather effects rather than relying on this entity.
m (→Related Console Commands: swapped look of table to the other version.) |
SirYodaJedi (talk | contribs) |
||
Line 8: | Line 8: | ||
{{KV|Density (0-100%)|intn=renderamt|integer|This is the amount of particles that fall down from the top side of the brush. However, distance from first particle to second depends on a brush volume size!}} | {{KV|Density (0-100%)|intn=renderamt|integer|This is the amount of particles that fall down from the top side of the brush. However, distance from first particle to second depends on a brush volume size!}} | ||
{{KV|Color (R G B)|intn=rendercolor|color255|Color added to sprites which are rendered transparently (probably rain and snow particles)}} | {{KV|Color (R G B)|intn=rendercolor|color255|Color added to sprites which are rendered transparently (probably rain and snow particles)}} | ||
{{KV|Precipitation Type|intn=preciptype| | {{KV|Precipitation Type|intn=preciptype|integerchoices|Precipitation type}} | ||
{{Table | {{Table | ||
| {{tr | | {{tr | ||
| {{th| Type }} {{th| Availability}} {{th| Description }} | | {{th|Value}} {{th| Type }} {{th| Availability}} {{th| Description }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Rain|dark=1}} | | {{td|0|dark=1}}{{td|Rain|dark=1}} | ||
{{td| }} | {{td| }} | ||
{{td|Seen in [[Counter-Strike: Source|CS:S]] map "<code>de_aztec</code>"}} | {{td|Seen in [[Counter-Strike: Source|CS:S]] map "<code>de_aztec</code>"}} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Snow|dark=1}} | | {{td|1|dark=1}}{{td|Snow|dark=1}} | ||
{{td| }} | {{td| }} | ||
{{td|Identical to Rain, use "Snowfall" instead. }} | {{td|Identical to Rain, use "Snowfall" instead. }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Ash|dark=1}} | | {{td|2|dark=1}}{{td|Ash|dark=1}} | ||
{{td| }} | {{td| }} | ||
{{td|Seen throughout [[Half-Life 2: Episode One]] | {{td|Seen throughout [[Half-Life 2: Episode One]] | ||
Line 30: | Line 31: | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Snowfall|dark=1}} | | {{td|3|dark=1}}{{td|Snowfall|dark=1}} | ||
{{td| }} | {{td| }} | ||
{{td|Seen in [[Day of Defeat: Source|DoD:S]] map "<code>dod_colmar</code>" }} | {{td|Seen in [[Day of Defeat: Source|DoD:S]] map "<code>dod_colmar</code>" }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Particle Rain|dark=1}} | | {{td|{{confirm}}|dark=1}}{{td|Particle Rain|dark=1}} | ||
{{td|{{since|{{l4d}}}} }} | {{td|{{since|{{l4d}}}} }} | ||
{{td|Seen in [[Left 4 Dead|Left 4 Dead's]] "No Mercy" campaign, [[Counter-Strike: Global Offensive|CS:GO]] map "<code>de_aztec</code>"<br> | {{td|Seen in [[Left 4 Dead|Left 4 Dead's]] "No Mercy" campaign, [[Counter-Strike: Global Offensive|CS:GO]] map "<code>de_aztec</code>"<br> | ||
Line 41: | Line 42: | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Particle Ash|dark=1}} | | {{td|{{confirm}}|dark=1}}{{td|Particle Ash|dark=1}} | ||
{{td|{{since|{{l4d}}}} }} | {{td|{{since|{{l4d}}}} }} | ||
{{td|Seen in in Left 4 Dead's "Dead Air" campaign. }} | {{td|Seen in in Left 4 Dead's "Dead Air" campaign. }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Particle Rain Storm |dark=1}} | | {{td|{{confirm}}|dark=1}}{{td|Particle Rain Storm |dark=1}} | ||
{{td|{{since|{{l4d2}}}} }} | {{td|{{since|{{l4d2}}}} }} | ||
{{td|Seen in [[Left 4 Dead 2|Left 4 Dead 2's]] "Hard Rain" and "The Passing" campaigns.<br> | {{td|Seen in [[Left 4 Dead 2|Left 4 Dead 2's]] "Hard Rain" and "The Passing" campaigns.<br> | ||
Line 52: | Line 53: | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Particle Snow|dark=1}} | | {{td|{{confirm}}|dark=1}}{{td|Particle Snow|dark=1}} | ||
{{td|{{since|{{as}}}} }} | {{td|{{since|{{as}}}} }} | ||
{{td|Seen in CS:GO map "<code>ar_monastery</code>" }} | {{td|Seen in CS:GO map "<code>ar_monastery</code>" }} | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Particle Bugs|dark=1}} | | {{td|{{confirm}}|dark=1}}{{td|Particle Bugs|dark=1}} | ||
{{td|{{only|{{l4d2}}}} }} | {{td|{{only|{{l4d2}}}} }} | ||
{{td|Seen in Left 4 Dead 2's "Swamp Fever" campaign.<br> | {{td|Seen in Left 4 Dead 2's "Swamp Fever" campaign.<br> | ||
Line 63: | Line 64: | ||
}} | }} | ||
{{tr | {{tr | ||
| {{td|Particle Smoke|dark=1}} | | {{td|{{confirm}}|dark=1}}{{td|Particle Smoke|dark=1}} | ||
{{td|{{only|{{l4d2}}}} }} | {{td|{{only|{{l4d2}}}} }} | ||
{{td|Seen in Left 4 Dead 2's "Dead Center" campaign.<br> | {{td|Seen in Left 4 Dead 2's "Dead Center" campaign.<br> |
Revision as of 11:16, 13 September 2024
func_precipitation
is a brush entity available in all Source games. It creates rain, snow, or ash inside its volume.
![]() |
---|
CPrecipitation |
![]() |



If the game has round restart mechanics this entity may not behave as expected:
|
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Density (0-100%) (renderamt) <integer>
- This is the amount of particles that fall down from the top side of the brush. However, distance from first particle to second depends on a brush volume size!
- Color (R G B) (rendercolor) <color255>
- Color added to sprites which are rendered transparently (probably rain and snow particles)
- Precipitation Type (preciptype) <integerchoices>
- Precipitation type
Value | Type | Availability | Description |
---|---|---|---|
0 | Rain | Seen in CS:S map "de_aztec " |
|
1 | Snow | Identical to Rain, use "Snowfall" instead. | |
2 | Ash | Seen throughout Half-Life 2: Episode One
![]() materials/effects/fleck_ash* and materials/effects/ember_swirling001 files from ep1_pak_dir.vpk and ship it with your game/map. |
|
3 | Snowfall | Seen in DoD:S map "dod_colmar " |
|
[confirm] | Particle Rain | (in all games since ![]() |
Seen in Left 4 Dead's "No Mercy" campaign, CS:GO map "de_aztec "Particle rain with slight mist and refraction. |
[confirm] | Particle Ash | (in all games since ![]() |
Seen in in Left 4 Dead's "Dead Air" campaign. |
[confirm] | Particle Rain Storm | (in all games since ![]() |
Seen in Left 4 Dead 2's "Hard Rain" and "The Passing" campaigns. Particle rain with no mist/refraction and more angled particles. Alpha values over 100 enable an additional flying leaves effect seen during the storm event. |
[confirm] | Particle Snow | (in all games since ![]() |
Seen in CS:GO map "ar_monastery " |
[confirm] | Particle Bugs | (only in ![]() |
Seen in Left 4 Dead 2's "Swamp Fever" campaign. Particle flying bugs. In later games, this value is used by Particle Snow instead. |
[confirm] | Particle Smoke | (only in ![]() |
Seen in Left 4 Dead 2's "Dead Center" campaign. Particle smoke with variable density. |

Inputs
- Alpha <integer > !FGD
- Changes the density of the rain, and may add additional particle effects like fog or leafs. It accepts inputs from -1 to 255.
Related Console Commands
There are a number of console commands that control precipitation rendering. See the Precipitation issues page for details on various issues and workarounds involving this entity.
Command Name | Value | Description |
---|---|---|
r_RainParticleDensity ![]() ![]() |
<float> | Set the density to enable or disable any precipitation particle. Value 1 to enable and 0 to disable. |
r_rainalpha | <float> | Adjusts transparency of rain particles. |
r_rainProfile | <bool> | Displays stats on rain rendering costs. |
r_RainHack | <bool> | Overrides density values set in Hammer. Enabling will result in longer and more dense rain than at 100%. Can help solve visibility issues. ![]() |
r_rainspeed | <float> | Lower values will cause rain to disappear sooner and fall slower. Default value is 600.0f |
r_RainSideVel | <float> | Controls sideways movement of the rain particles. |
r_RainSimulate | <bool> | Toggles animation on the rain; freezes the rain when set to 0. |
r_rainwidth | <float> | Widens the rain's alpha to desired value. Default value is 0.5 |
r_RainRadius | <float> | Distance from the brush where the rain starts/stops rendering. |
r_rainlength | <float> | Changes the length of the rain particles. Default value is 0.1f |
r_RainSplashPercentage | <float> | Percent chance of splash particles spawning when a particle is used. |
r_raindensity | <float> | No function. Use r_RainParticleDensity instead. |
r_rainalphapow | <float> | Raises the value of r_rainalpha exponentially. ![]() |

func_precipitation
brushes should not overlap func_smokevolume
brushes, as it can freeze the game. The exact cause of this is not clear.
