Difference between revisions of "Rain Weather Effects"

From Wolfire Games Wiki
Jump to: navigation, search
m (Thunder and lightning hotspot: Add load item menu image)
 
(17 intermediate revisions by 3 users not shown)
Line 4: Line 4:
  
 
This adds the falling rain drop particles.
 
This adds the falling rain drop particles.
 +
 +
[[File:Rain-particles2_small.gif]]
  
 
To add this, add the '''<code>GPU Particle Field</code>''' entry to the level's script parameters. Set this value to '''<code>#RAIN</code>''' (make sure you use '''upper-case''').
 
To add this, add the '''<code>GPU Particle Field</code>''' entry to the level's script parameters. Set this value to '''<code>#RAIN</code>''' (make sure you use '''upper-case''').
  
Here's [[Shader_And_Weather_Effects#Particles|instructions for adding a <code>GPU Particle Field</code> value]].
+
Here's [[Shader_And_Weather_Effects#Particles|instructions for adding a '''<code>GPU Particle Field</code>''' value]].
 +
 
 +
== Stop rain in a certain area ==
 +
 
 +
To do that you have to go to editor mode, click in Load, and then search for '''Particle Occluder Hotspot''', and spawn it where you want rain to not have any effect.
 +
 
 +
After that, in editor mode, press "Y" and go to Custom Shaders, here write '''<code>#GPU_PARTICLE_FIELD_OCCLUSION</code>''' (make sure you use '''upper-case''').
 +
 
 +
Take in mind using this Custom shader can affect performance a bit.
  
 
== Water "rain splash" shader effect ==
 
== Water "rain splash" shader effect ==
  
 
This adds the shimmering water layer effect to all the objects in the world.
 
This adds the shimmering water layer effect to all the objects in the world.
 +
 +
[[File:Rainy-shader3-z-small.gif]]
  
 
To add this, add the '''<code>Custom Shader</code>''' entry to the level's script parameters. Set this value to '''<code>#RAINY</code>''' (make sure you use '''upper-case''', and it is '''<code>#RAINY</code>''' not '''<code>#RAIN</code>''').
 
To add this, add the '''<code>Custom Shader</code>''' entry to the level's script parameters. Set this value to '''<code>#RAINY</code>''' (make sure you use '''upper-case''', and it is '''<code>#RAINY</code>''' not '''<code>#RAIN</code>''').
  
Here's [[Shader_And_Weather_Effects#Weather_Effects.2FWorld_Shaders|instructions for adding a <code>Custom Shader</code> value]].
+
Here's [[Shader_And_Weather_Effects#Weather_Effects.2FWorld_Shaders|instructions for adding a '''<code>Custom Shader</code>''' value]].
  
 
== Thunder and lightning hotspot ==
 
== Thunder and lightning hotspot ==
  
[[File:Editor-load-load-item.png|114px|thumb|'''Load item''' menu]]
+
This add the periodic light flashes and thunder clap sound (the ambient rain sound is separate, in case you want to have a lightning storm going on nearby, but no rain).
  
This add the periodic light flashes and thunder clap sound (but not the ambient rain sound, in case you want to have a lightning storm going on nearby, but no rain).
+
[[File:Rain-hotspot-lightning-effect.gif]]
 +
 
 +
[[File:Editor-load-load-item.png|114px|thumb|'''Load item...''' menu option]]
  
 
To add this, use the '''Load item...''' menu option:
 
To add this, use the '''Load item...''' menu option:
  
# Spawn the new hotspot object: '''Top Bar''' -> '''Load''' -> '''Load item...''' (this will open a new window to browse for files. It may be easier to do this step if you have the game in windowed mode)
+
# Spawn the new hotspot object: '''Top Bar''' -> '''Load''' -> '''Load item...'''<br>(this will open a new window to browse for files. It may be easier to do this step if you have the game in windowed mode)
# Browse to <code>Data/Objects/Hotspots</code> and select <code>rain.xml</code>
+
# Browse to '''<code>Data/Objects/Hotspots</code>''' and select '''<code>rain.xml</code>'''
 
# Your cursor will turn into a '''<code>+</code>''' symbol
 
# Your cursor will turn into a '''<code>+</code>''' symbol
 
# Click somewhere in the world to place the hotspot. The location doesn't matter, since it acts globally across the level.
 
# Click somewhere in the world to place the hotspot. The location doesn't matter, since it acts globally across the level.
Line 32: Line 46:
 
There are no parameters for this hotspot, so you don't have to change anything at this point.
 
There are no parameters for this hotspot, so you don't have to change anything at this point.
  
'''Note''': If you want to customize this effect, you're going to need to make your own copy of the script for that hotspot (<code>Data/Scripts/hotspots/rain.as</code>) and edit that script. Then copy the hotspot XML (<code>Data/Objects/Hotspots/rain.xml</code>) and point it at your new script.
+
'''Note''': If you want to customize this effect, you're going to need to make your own copy of the script for that hotspot (<code>Data/Scripts/hotspots/rain.as</code>) and edit that script.<br>Then copy the hotspot XML (<code>Data/Objects/Hotspots/rain.xml</code>) and point it at your new script.
  
 
== Ambient rain sound ==
 
== Ambient rain sound ==
  
 
This adds the constant rain sound that you hear throughout the level.
 
This adds the constant rain sound that you hear throughout the level.
 +
 +
[[File:Editor-load-sounds-ambient-sound.png|139px|thumb|'''Ambient sound hotspot''' menu option]]
  
 
# Spawn the new hotspot object: '''Top Bar''' -> '''Load''' -> '''Sounds''' -> '''Ambient sound hotspot'''
 
# Spawn the new hotspot object: '''Top Bar''' -> '''Load''' -> '''Sounds''' -> '''Ambient sound hotspot'''
Line 45: Line 61:
 
# Drill down to find the script params, and set these values:
 
# Drill down to find the script params, and set these values:
  
* <code>Sound Path</code> - Set this to <code>Data/Sounds/weather/rain.wav</code>
+
=== Values for Ambient sound hotspot ===
* <code>Gain</code> - You might want to set it to <code>0.5</code> or even lower. We set ours to <code>0.57</code>, though some people have complained about that. Some people get really annoyed by loud rain sounds!
+
 
* <code>Global</code> - (default value of <code>true</code> is fine - the box appears filled when it is set to <code>true</code>)
+
[[File:Ambient-sound-rain-hotspot-settings.png|582px|thumb|Rain sound hotspot settings]]
 +
 
 +
* '''<code>Sound Path</code>''' - Set this to '''<code>Data/Sounds/weather/rain.wav</code>'''
 +
* '''<code>Gain</code>''' - You might want to set it to '''<code>0.5</code>''' or even lower. We set ours to '''<code>0.57</code>'''
 +
* '''<code>Global</code>''' - (default value of '''<code>true</code>''' is fine)
 
* <code>Delay Max</code> - (default value of <code>10</code> is fine)
 
* <code>Delay Max</code> - (default value of <code>10</code> is fine)
 
* <code>Delay Min</code> - (default value of <code>3</code> is fine)
 
* <code>Delay Min</code> - (default value of <code>3</code> is fine)
 
* <code>Fade Distance</code> - (default value of <code>1</code> is fine)
 
* <code>Fade Distance</code> - (default value of <code>1</code> is fine)
* <code>Wind Scale</code> - (default value of <code>false</code> is fine - the box appears unfilled when it is set to <code>false</code>)
+
* <code>Wind Scale</code> - (default value of <code>false</code> is fine)
 +
 
 +
[[Category: Overgrowth]]
 +
[[Category: Modding]]

Latest revision as of 23:22, 26 October 2019

There are a total of four pieces that make up the rain weather effects that you see on a level like Tree Climb or Cave Arena.

Rain particle effect

This adds the falling rain drop particles.

Rain-particles2 small.gif

To add this, add the GPU Particle Field entry to the level's script parameters. Set this value to #RAIN (make sure you use upper-case).

Here's instructions for adding a GPU Particle Field value.

Stop rain in a certain area

To do that you have to go to editor mode, click in Load, and then search for Particle Occluder Hotspot, and spawn it where you want rain to not have any effect.

After that, in editor mode, press "Y" and go to Custom Shaders, here write #GPU_PARTICLE_FIELD_OCCLUSION (make sure you use upper-case).

Take in mind using this Custom shader can affect performance a bit.

Water "rain splash" shader effect

This adds the shimmering water layer effect to all the objects in the world.

Rainy-shader3-z-small.gif

To add this, add the Custom Shader entry to the level's script parameters. Set this value to #RAINY (make sure you use upper-case, and it is #RAINY not #RAIN).

Here's instructions for adding a Custom Shader value.

Thunder and lightning hotspot

This add the periodic light flashes and thunder clap sound (the ambient rain sound is separate, in case you want to have a lightning storm going on nearby, but no rain).

Rain-hotspot-lightning-effect.gif

Load item... menu option

To add this, use the Load item... menu option:

  1. Spawn the new hotspot object: Top Bar -> Load -> Load item...
    (this will open a new window to browse for files. It may be easier to do this step if you have the game in windowed mode)
  2. Browse to Data/Objects/Hotspots and select rain.xml
  3. Your cursor will turn into a + symbol
  4. Click somewhere in the world to place the hotspot. The location doesn't matter, since it acts globally across the level.

There are no parameters for this hotspot, so you don't have to change anything at this point.

Note: If you want to customize this effect, you're going to need to make your own copy of the script for that hotspot (Data/Scripts/hotspots/rain.as) and edit that script.
Then copy the hotspot XML (Data/Objects/Hotspots/rain.xml) and point it at your new script.

Ambient rain sound

This adds the constant rain sound that you hear throughout the level.

Ambient sound hotspot menu option
  1. Spawn the new hotspot object: Top Bar -> Load -> Sounds -> Ambient sound hotspot
  2. Your cursor will turn into a + symbol
  3. Click somewhere in the world to place the hotspot. The location doesn't matter, since it acts globally across the level
  4. Double click on the new object to select it
  5. Open the object properties: Top Bar -> Windows -> Selected (or just press the U key)
  6. Drill down to find the script params, and set these values:

Values for Ambient sound hotspot

Rain sound hotspot settings
  • Sound Path - Set this to Data/Sounds/weather/rain.wav
  • Gain - You might want to set it to 0.5 or even lower. We set ours to 0.57
  • Global - (default value of true is fine)
  • Delay Max - (default value of 10 is fine)
  • Delay Min - (default value of 3 is fine)
  • Fade Distance - (default value of 1 is fine)
  • Wind Scale - (default value of false is fine)