Readme.txt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. Rain Maker, (c) 2015 Digital Ruby, LLC
  2. http://www.digitalruby.com
  3. Created by Jeff Johnson
  4. Version 2.1.2 (2019-04-05)
  5. --------------------
  6. Change Log:
  7. --------------------
  8. 2.1.2 - Update to Unity 2017.4. Add audio mixer options to script.
  9. 2.1.1 - Update to Unity 5.6.5
  10. 2.1.0 - Add follow camera option
  11. 2.0.3 - Fix 2D collision
  12. 2.0.2 - A few small bug fixes
  13. 2.0.1 - Remove deprecated methods
  14. 2.0.0 - Added 2D mode
  15. 1.0.3 - Fix prefab material references
  16. --------------------
  17. **** NOTE *****
  18. For a full weather system, with improved lighting, sun, clouds, sky sphere, lightning, etc. please purchase my new Weather Maker asset at http://u3d.as/s0Z
  19. ***************
  20. Rain Maker gives you highly configurable and realistic rain for your game or app.
  21. I've spent many, many hours tuning, debugging and configuring Rain Maker so that it can
  22. mostly be used as is. If you want to tweak settings and change things, that is an
  23. option of course, and I will explain how to do that now.
  24. Rain Maker consists of a custom shader, several particle systems and two scripts. To get
  25. going, drag the RainPrefab into your scene. The script will automatically link up
  26. to your main camera, but you can also assign your own custom camera if you want as well.
  27. To make it rain, set the RainIntensity on the script. The script automatically detects
  28. changes and will alter the rain intensity appropriately, seamlessly and cleanly. For
  29. most users, this will be all you need.
  30. 2D mode is also available. Note that 2D mode does not yet support lighting.
  31. Advanced Users
  32. ---------------------
  33. So you want to tweak and configure Rain Maker? I'll explain everything now so that you
  34. can do that. If you are going to configure the prefab, you'll probably want to break
  35. the prefab connection and configure it, rename it and save it as your own prefab, that
  36. way you have the original prefab as a backup or reference.
  37. The Rain Maker prefab contains the following pieces:
  38. 1] Rain fall particle system
  39. This is the stuff that falls from the sky. The particle system is setup to be as realistic
  40. as possible, but you can of course tweak the particle system as you need.
  41. This particle system uses RainMaterial.
  42. 2] Rain explosion particle system
  43. This particle system is emitted whenever a rain drop hits something. RainCollision.cs deals
  44. with handling the collision and spawning appropriate splash particles. Feel free to customize
  45. the number, size, velocity, etc. of the splash particles if you want to tweak the effect. The
  46. rain splash uses RainExplosionMaterial.
  47. 3] Rain mist particle system
  48. For higher rain intensities, mist will start to appear. The CheckForRainChange method in
  49. RainScript.cs controls what intensity (default is 0.5) that the mist starts to appear. The mist
  50. uses RainMistMaterial.
  51. 4] Rain wind zone
  52. The prefab also comes with a wind zone that is setup to blow the rain around randomly to provide
  53. a more realistic effect. If you don't like this, feel free to delete the wind zone, replace it
  54. with your own, or configure it a different way. The wind zone can be null.
  55. RainScript.cs is the smarts behind the rain, and controls what sounds play, how the wind changes,
  56. etc. If you decide to swap out the sounds for the rain and wind, be sure they are seamless and
  57. loop cleanly. You can use a program like Audacity to create a seamless audio file and test
  58. that it loops properly.
  59. If you decided to tweak the wind sound or parameters, these four parameters will be of use to you:
  60. - [Tooltip("Wind sound volume modifier, use this to lower your sound if it's too loud.")]
  61. public float WindSoundVolumeModifier = 0.5f;
  62. - [Tooltip("Wind zone that will affect and follow the rain")]
  63. public WindZone WindZone;
  64. - [Tooltip("Minimum, maximum and absolute maximum wind speed. Set to 0 if you are managing the wind speed yourself or don't want wind. " +
  65. "The absolute maximum should always be >= to the current maximum wind speed and should generally never change. The maximum is " +
  66. "used to determine how much louder your wind sound gets.")]
  67. public Vector3 WindSpeedRange = new Vector3(50.0f, 500.0f, 500.0f);
  68. - [Tooltip("How often the wind speed and direction changes (minimum and maximum change interval in seconds)")]
  69. public Vector2 WindChangeInterval = new Vector2(5.0f, 30.0f);
  70. I've also written a highly optimized and custom shader that uses per vertex lighting but still
  71. looks great. The shader uses the 4 brightest lights from your scene, including any directional light.
  72. The shader is called RainShader.shader. All of the rain materials are set to use this shader.
  73. If you want to tweak parameters of the shader, I'll explain that now:
  74. - _MainTex ("Color (RGB) Alpha (A)", 2D) = "gray" {}
  75. This texture is the gray faded rain texture, but you can replace it if you have a texture that
  76. better suits your needs. It should be a very translucent, grayish texture for best effect,
  77. although you can certainly get creative if you want something special.
  78. - _TintColor ("Tint Color (RGB)", Color) = (1, 1, 1, 1)
  79. Tint color, with this you could make acid rain, blood rain or any other type of rain you
  80. can think of. The alpha value is also used and will make the rain more faint if lowered.
  81. - _PointSpotLightMultiplier ("Point/Spot Light Multiplier", Range (0, 10)) = 2
  82. How much do point and spot lights light up the rain. Keep in mind that the rain alpha will
  83. never go above the value in _TintColor.
  84. - _DirectionalLightMultiplier ("Directional Light Multiplier", Range (0, 10)) = 1
  85. How much do directional lights effect the rain color? As directional lights go below the horizon,
  86. they effect the rain less and less until they have no effect, until they come back near the horizon
  87. or higher.
  88. - _InvFade ("Soft Particles Factor", Range(0.01, 3.0)) = 1.0
  89. This works exactly the same way as the particles/alpha blended shader and can help with large
  90. particles hitting the edges of objects. This is only enabled for the RainMistMaterial, as the
  91. rain fall and rain explosion particles don't have issues with edges.
  92. _AmbientLightMultiplier ("Ambient light multiplier", Range(0, 1)) = 0.25
  93. Each vertex will start of with the ambient light multiplied by this number.
  94. Troubleshooting:
  95. If you see any problems with the rain, ensure that the particle systems have the correct material assigned.
  96. I'm always happy to answer questions, so please email me at jjxtra@gmail.com and I'll do my best
  97. to help you out.