Index: /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
===================================================================
--- /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc	(revision 8179)
+++ /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc	(revision 8180)
@@ -55,5 +55,5 @@
 
 	//load wind sound
-	if (this->rainWindForce > 0) {
+	if (this->rainWindForce != 0) {
 		if (this->windBuffer != NULL)
 			ResourceManager::getInstance()->unload(this->windBuffer);
@@ -86,4 +86,5 @@
 	LoadParam(root, "life", this, RainEffect, setRainLife);
 	LoadParam(root, "wind", this, RainEffect, setRainWind);
+	LoadParam(root, "startraining", this, RainEffect, setRainStart);
 
 	LOAD_PARAM_START_CYCLE(root, element);
@@ -108,4 +109,7 @@
 	this->rainMaxParticles = this->rainRate * this->rainLife;
 	this->rainWindForce  = 0;
+	this->rainStartDuration = 0;
+	this->localTimer = 0;
+	this->soundRainVolume = 0.8f;
 
 	this->emitter = new PlaneEmitter(this->rainSize);
@@ -144,7 +148,6 @@
 	this->emitter->setSpread(this->rainWindForce / 50, 0.2);
 	
-	this->soundSource.loop(this->rainBuffer, 0.8f);
-	if (this->rainWindForce > 0)
-		this->soundSource.loop(this->windBuffer, 0.5f);
+	this->soundSource.loop(this->rainBuffer, this->soundRainVolume);
+	if (this->rainWindForce != 0) this->soundSource.loop(this->windBuffer, 0.1f * this->rainWindForce);
 
 	lightMan->setAmbientColor(.1,.1,.1);
@@ -168,14 +171,27 @@
 		this->emitter->setRelCoor(this->rainCoord.x , this->rainCoord.y+800, this->rainCoord.z);
 	}
+
+	if (this->rainStartDuration != 0 && this->localTimer < this->rainStartDuration) {
+		this->localTimer += dt;
+		float progress = this->localTimer / this->rainStartDuration;
+
+		// use alpha in color to fade in
+		RainEffect::rainParticles->setColor(0, 0.3, 0.3, 0.5, 0.2 * progress); // grey blue 1
+		RainEffect::rainParticles->setColor(0.5, 0.4, 0.4, 0.5, 0.2 * progress); // grey blue 2
+		RainEffect::rainParticles->setColor(1, 0.7, 0.7, 0.7, 0.2 * progress); // light grey
+
+		// increase radius for more "heavy" rain
+		RainEffect::rainParticles->setRadius(0, 0.03 * progress);
+		RainEffect::rainParticles->setRadius(0.2, 0.02 * progress);
+		RainEffect::rainParticles->setRadius(1, 0.01 * progress);
+
+		// increase sound volume
+		this->soundSource.loop(this->rainBuffer, this->soundRainVolume * progress);
+
+	}
 }
 
-/**
-*  Slowly starts rain
-*  @param duration duration of the fade in process in seconds
-*/
-void RainEffect::startRaining(float duration)
-{
-	// use alpha in color to fade in
-	// increase radius for more "heavy" rain
-	// increase sound volume
+void RainEffect::startRaining() {
+	this->rainStartDuration = 10;
+	// this->activate;
 }
Index: /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
===================================================================
--- /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h	(revision 8179)
+++ /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h	(revision 8180)
@@ -39,4 +39,5 @@
 		inline void activateRain() { this->activate(); }
 		inline void deactivateRain() { this->deactivate(); }
+		void startRaining();
 
 		inline void setRainCoord(float x, float y, float z) { this->rainCoord = Vector(x, y, z); }
@@ -46,4 +47,6 @@
 		inline void setRainLife(float life) { this->rainLife = life; }
 		inline void setRainWind(int force) { this->rainWindForce = force; }
+		inline void setRainStart(float duration) { this->rainStartDuration = duration; }
+
 		inline void setRainOption(const std::string& option) {
 			if (option == "moverain") this->rainMove = true;
@@ -51,9 +54,10 @@
 		}
 
-		void startRaining(float duration);
 
 	private:
 		static SparkParticles*			rainParticles;
 		ParticleEmitter*			emitter;
+
+		float					localTimer;
 
 		Vector					rainCoord;
@@ -64,4 +68,5 @@
 		GLfloat					rainMaxParticles;
 		int					rainWindForce;
+		GLfloat					rainStartDuration;
 		bool					rainMove;
 		bool					rainActivate;
@@ -71,4 +76,6 @@
 		OrxSound::SoundBuffer*			windBuffer;
 
+		float					soundRainVolume;
+
 		LightManager* lightMan;
 };
