func_precipitation
Code classes:
CPrecipitation
CBaseEntity
(all ents)
func_precipitation
is a brush entity present in all Source games. It creates precipitation effects inside its volume.
Warning: func_precipitation
s should not intersect with func_smokevolume
s, as it can freeze the game. The exact cause of this is not clear.
Warning: If precipitation is so dense that more than 32,000 vertices must be rendered at once, the game will crash. One possible way this could happen is if the particles never hit anything solid and fall out of the map (due to poor brush placement).
Bug: In this entity is known to cause large amounts of lag. Use a particle system instead.
Bug: Known to cause visual issues in when portals are visible.
Bug: An active point_camera
may cause precipitation to stop rendering.
Bug: Precipitation may fall through very thin roofs.
ConVars/Commands[edit | edit source]
ConVar/Command | Parameters or default value | Parameter Type | Effect |
---|---|---|---|
r_rainProfile | 0 | 0 disables, 1 enables | Shows how long it takes to simulate precipitation (in the PVS), how many particles there are, and how long it takes to render them all. Requires sv_cheats 1 in the console before taking effect. |
r_DrawRain | 1 | 0 disables, 1 enables | Enables precipitation rendering. Requires sv_cheats 1 in the console before taking effect. |
r_RainSimulate | 1 | 0 disables, 1 enables | Enables precipitation moving. Requires sv_cheats 1 in the console before taking effect. |
r_RainRadius | 1500 | World units | How far away from the player that precipitation can be created. Requires sv_cheats 1 in the console before taking effect. |
Keyvalues[edit | edit source]
- Density (0-100%)
(renderamt)
<integer>
- How much precipitation will fall from the brush. The rate may also be influenced by the brush's size. Tip: To maintain a consistent density across your entire map, combine all your
func_precipitation
brushes into one entity. - Color (R G B)
(rendercolor)
<color255>
- Color of precipitation. Only some types of precipitation acknowledge this value.
- Precipitation Type
(preciptype)
<choices>
- What type of precipitation to make.
- 0: Rain
- 1: Snow
- 2: Ash - Appears with missing textures in most games other than
Episodic. A fix can be applied by extracting all 3
materials/effects/fleck_ash*
textures andmaterials/effects/ember_swirling001
fromep1_pak_dir.vpk
. - 3: Snowfall
- 4: Particle Rain (available in all games since
) - Better-looking rain. Broken in
.
- 5: Particle Ash (available in all games since
) - Broken in
.
- 6: Particle Rain Storm (available in all games since
) - Very hard rain. Broken in
.
- 7: Particle Bugs (only available in
) - Bugs flying around.
- 7: Particle Snow (available in all games since
) - Dusty snow. Used in outside parts of
Landing Bay. Broken in
.
- 8: Particle Smoke (only available in
) - Smoke, used in Dead Center.
- Minimum speed (Snowfall only)
(minSpeed)
<float>
(only available in)
- Minimum speed Snowfall particles descend at.
- Maximum speed (Snowfall only)
(maxSpeed)
<float>
(only available in)
- Maximum speed Snowfall particles descend at.
- Amount of snow dusting (1-100)
(snowDustAmt)
<float>
(only available in)
- If using Particle Snow, how much snow is emitted. To do: Seems to interact with Density in some way.
Inputs[edit | edit source]
- Alpha (Not in FGD)
<int>
- If Precipitation Type is Rain, sets the density.