func_precipitation

From Source Entities
Jump to navigation Jump to search
Snow from Dods.pngdod_colmar.

Code classes:

Trigger.png

func_precipitation is a brush entity present in all Source games. It creates precipitation effects inside its volume.

Warning: func_precipitations should not intersect with func_smokevolumes, 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 Tf2.png this entity is known to cause large amounts of lag. Use a particle system instead.

Bug: Known to cause visual issues in P2.png 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/CommandParameters or default valueParameter TypeEffect
r_rainProfile00 disables, 1 enablesShows 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_DrawRain10 disables, 1 enablesEnables precipitation rendering. Requires sv_cheats 1 in the console before taking effect.
r_RainSimulate10 disables, 1 enablesEnables precipitation moving. Requires sv_cheats 1 in the console before taking effect.
r_RainRadius1500World unitsHow 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 Hl2.pngEpisodic. A fix can be applied by extracting all 3 materials/effects/fleck_ash* textures and materials/effects/ember_swirling001 from ep1_pak_dir.vpk.
  • 3: Snowfall
  • 4: Particle Rain (available in all games since L4d.png) - Better-looking rain. Broken in Csgo-small.png.
  • 5: Particle Ash (available in all games since L4d.png) - Broken in Csgo-small.png.
  • 6: Particle Rain Storm (available in all games since L4d2-small.png) - Very hard rain. Broken in Csgo-small.png.
  • 7: Particle Bugs (only available in L4d2-small.png) - Bugs flying around.
  • 7: Particle Snow (available in all games since Asw.png) - Dusty snow. Used in outside parts of Asw.pngLanding Bay. Broken in Csgo-small.png.
  • 8: Particle Smoke (only available in L4d2-small.png) - Smoke, used in Dead Center.
Minimum speed (Snowfall only) (minSpeed) <float> (only available in L4d.pngL4d2-small.png)
Minimum speed Snowfall particles descend at.
Maximum speed (Snowfall only) (maxSpeed) <float> (only available in L4d.pngL4d2-small.png)
Maximum speed Snowfall particles descend at.
Amount of snow dusting (1-100) (snowDustAmt) <float> (only available in Asw.png)
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.

See Also[edit | edit source]